libdbusmenu-gtk Reference Manual | ||||
---|---|---|---|---|
Top | Description |
#include <libdbusmenu-gtk/menu.h> struct DbusmenuGtkMenuClass; DbusmenuGtkMenu * dbusmenu_gtkmenu_new (gchar *dbus_name
,gchar *dbus_object
); DbusmenuGtkClient * dbusmenu_gtkmenu_get_client (DbusmenuGtkMenu *menu
);
In general, this is just a GtkMenu, why else would you care? Oh, because this menu is created by someone else on a server that exists on the other side of DBus. You need a DbusmenuServer to be able push the data into this menu.
The first thing you need to know is how to find that DbusmenuServer
on DBus. This involves both the DBus name and the DBus object that
the menu interface can be found on. Those two value should be set
when creating the object using dbusmenu_gtkmenu_new()
. They are then
stored on two properties "dbus-name" and "dbus-object".
After creation the DbusmenuGtkMenu it will continue to keep in synchronization with the DbusmenuServer object across Dbus. If the number of entries change, the menus change, if they change thier properties change, they update in the items. All of this should be handled transparently to the user of this object.
struct DbusmenuGtkMenuClass { GtkMenuClass parent_class; /*< Private >*/ void (*reserved1) (void); void (*reserved2) (void); void (*reserved3) (void); void (*reserved4) (void); void (*reserved5) (void); void (*reserved6) (void); };
All of the subclassable functions and signal slots for a DbusmenuGtkMenu.
DbusmenuGtkMenu * dbusmenu_gtkmenu_new (gchar *dbus_name
,gchar *dbus_object
);
Creates a new DbusmenuGtkMenu object and creates a DbusmenuClient that connects across DBus to a DbusmenuServer.
|
Name of the DbusmenuServer on DBus |
|
Name of the object on the DbusmenuServer |
Returns : |
A new DbusmenuGtkMenu sync'd with a server |
DbusmenuGtkClient * dbusmenu_gtkmenu_get_client (DbusmenuGtkMenu *menu
);
An accessor for the client that this menu is using to communicate with the server.
|
The DbusmenuGtkMenu to get the client from |
Returns : |
A valid DbusmenuGtkClient or NULL on error. [transfer none] |