| libdbusmenu-gtk Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
DbusmenuGtkSerializableMenuItemDbusmenuGtkSerializableMenuItem — A way to build GtkMenuItems that can be sent over Dbusmenu |
#include <libdbusmenu-gtk/serializablemenuitem.h> #define DBUSMENU_GTK_SERIALIZABLE_MENU_ITEM_PROP_MENUITEM struct DbusmenuGtkSerializableMenuItemClass; DbusmenuMenuitem * dbusmenu_gtk_serializable_menu_item_build_menuitem (DbusmenuGtkSerializableMenuItem *smi); void dbusmenu_gtk_serializable_menu_item_register_to_client (DbusmenuClient *client,GType item_type); void dbusmenu_gtk_serializable_menu_item_set_menuitem (DbusmenuGtkSerializableMenuItem *smi,DbusmenuMenuitem *mi);
Menuitems can subclass from this instead of GtkMenuItem and by providing the appropriate functions Dbusmenu will be able to parse them and send them over the bus.
#define DBUSMENU_GTK_SERIALIZABLE_MENU_ITEM_PROP_MENUITEM "dbusmenu-menuitem"
String to access property "dbusmenu-menuitem"
struct DbusmenuGtkSerializableMenuItemClass {
GtkMenuItemClass parent_class;
/* Subclassable functions */
const gchar * (*get_type_string) (void);
GHashTable * (*get_default_properties) (void);
DbusmenuMenuitem * (*build_dbusmenu_menuitem) (DbusmenuGtkSerializableMenuItem * smi);
/* Signals */
/* Empty Space */
/*< Private >*/
void (*_dbusmenu_gtk_serializable_menu_item_reserved1) (void);
void (*_dbusmenu_gtk_serializable_menu_item_reserved2) (void);
void (*_dbusmenu_gtk_serializable_menu_item_reserved3) (void);
void (*_dbusmenu_gtk_serializable_menu_item_reserved4) (void);
void (*_dbusmenu_gtk_serializable_menu_item_reserved5) (void);
void (*_dbusmenu_gtk_serializable_menu_item_reserved6) (void);
};
Signals and functions for DbusmenuGtkSerializableMenuItem.
| Inherit from GtkMenuItem | |
| Static function to get a string describing this type | |
| Return a hashtable of defaults for the menu item type | |
| Build a menuitem that can be sent over dbus | |
| Reserved for future use. | |
| Reserved for future use. | |
| Reserved for future use. | |
| Reserved for future use. | |
| Reserved for future use. | |
| Reserved for future use. |
DbusmenuMenuitem * dbusmenu_gtk_serializable_menu_item_build_menuitem
(DbusmenuGtkSerializableMenuItem *smi);
This function is for menu items that are instanciated from GTK and have their properites set using GTK functions. This builds a DbusmenuMenuitem that then has the properties that should be sent over the bus to create a new item of this type on the other side.
|
DbusmenuGtkSerializableMenuItem to build a DbusmenuMenuitem mirroring |
Returns : |
A DbusmenuMenuitem who's values will be set by this object. [transfer full] |
void dbusmenu_gtk_serializable_menu_item_register_to_client (DbusmenuClient *client,GType item_type);
Registers a generic handler for dealing with all subclasses of DbusmenuGtkSerializableMenuItem. This handler responds to the callback, creates a new object and attaches it to the appropriate DbusmenuMenuitem object.
|
DbusmenuClient that we should register a type at. |
|
The GType of a class that is a subclass of DbusmenuGtkSerializableMenuItem |
void dbusmenu_gtk_serializable_menu_item_set_menuitem (DbusmenuGtkSerializableMenuItem *smi,DbusmenuMenuitem *mi);
This function is used on the server side to signal to the object
that it should get its' property change events from mi instead
of expecting calls to its' API. A call to this function sets the
property and subclasses should listen to the notify signal to
pick up this property being set.
|
DbusmenuGtkSerializableMenuItem to set the DbusmenuGtkSerializableMenuItem::dbusmenu-menuitem of |
|
Menuitem to get the properties from |