diff options
author | Ted Gould <ted@canonical.com> | 2009-08-26 17:22:50 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-08-26 17:22:50 -0500 |
commit | c2a08568e054ace4d5cf6425e6fb0924ab4d2129 (patch) | |
tree | ca1ee41fc748488d48e03fa790aa151ffd301658 | |
parent | b1e8c02ec17a79d89df08a5c7aedf0f5e46a2dfa (diff) | |
download | libdbusmenu-c2a08568e054ace4d5cf6425e6fb0924ab4d2129.tar.gz libdbusmenu-c2a08568e054ace4d5cf6425e6fb0924ab4d2129.tar.bz2 libdbusmenu-c2a08568e054ace4d5cf6425e6fb0924ab4d2129.zip |
Adding a public accessor for getting the gtk client
-rw-r--r-- | libdbusmenu-gtk/menu.c | 16 | ||||
-rw-r--r-- | libdbusmenu-gtk/menu.h | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/libdbusmenu-gtk/menu.c b/libdbusmenu-gtk/menu.c index b6f8061..92cd13b 100644 --- a/libdbusmenu-gtk/menu.c +++ b/libdbusmenu-gtk/menu.c @@ -289,3 +289,19 @@ dbusmenu_gtkmenu_new (gchar * dbus_name, gchar * dbus_object) NULL); } +/** + dbusmenu_gtkmenu_get_client: + @menu: The #DbusmenuGtkMenu to get the client from + + An accessor for the client that this menu is using to + communicate with the server. + + Return value: A valid #DbusmenuGtkClient or NULL on error. +*/ +DbusmenuGtkClient * +dbusmenu_gtkmenu_get_client (DbusmenuGtkMenu * menu) +{ + g_return_val_if_fail(DBUSMENU_IS_GTKMENU(menu), NULL); + DbusmenuGtkMenuPrivate * priv = DBUSMENU_GTKMENU_GET_PRIVATE(menu); + return priv->client; +} diff --git a/libdbusmenu-gtk/menu.h b/libdbusmenu-gtk/menu.h index 73804c5..5147d30 100644 --- a/libdbusmenu-gtk/menu.h +++ b/libdbusmenu-gtk/menu.h @@ -31,6 +31,7 @@ License version 3 and version 2.1 along with this program. If not, see #include <glib.h> #include <glib-object.h> +#include "client.h" G_BEGIN_DECLS @@ -71,6 +72,7 @@ struct _DbusmenuGtkMenu { GType dbusmenu_gtkmenu_get_type (void); DbusmenuGtkMenu * dbusmenu_gtkmenu_new (gchar * dbus_name, gchar * dbus_object); +DbusmenuGtkClient * dbusmenu_gtkmenu_get_client (DbusmenuGtkMenu * menu); /** SECTION:gtkmenu |