diff options
-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 |