aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-08-26 17:22:50 -0500
committerTed Gould <ted@canonical.com>2009-08-26 17:22:50 -0500
commitc2a08568e054ace4d5cf6425e6fb0924ab4d2129 (patch)
treeca1ee41fc748488d48e03fa790aa151ffd301658
parentb1e8c02ec17a79d89df08a5c7aedf0f5e46a2dfa (diff)
downloadlibdbusmenu-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.c16
-rw-r--r--libdbusmenu-gtk/menu.h2
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