aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib/client.h
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-01-27 16:40:56 -0500
committerKen VanDine <ken.vandine@canonical.com>2011-01-27 16:40:56 -0500
commite08b0e33060a39b3c95e43531825a95f5d415af8 (patch)
treecb3deecc01d16e57265afe76ce1074df10a79baa /libdbusmenu-glib/client.h
parent4ef0a2886c4d4865a453ee32656937eb37669421 (diff)
parentea3e23cd918f2b8c7b6f9a94b3d80499bc0ce550 (diff)
downloadlibdbusmenu-e08b0e33060a39b3c95e43531825a95f5d415af8.tar.gz
libdbusmenu-e08b0e33060a39b3c95e43531825a95f5d415af8.tar.bz2
libdbusmenu-e08b0e33060a39b3c95e43531825a95f5d415af8.zip
releasing version 0.3.94-0ubuntu1
Diffstat (limited to 'libdbusmenu-glib/client.h')
-rw-r--r--libdbusmenu-glib/client.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/libdbusmenu-glib/client.h b/libdbusmenu-glib/client.h
index 1ae89fa..6d78edf 100644
--- a/libdbusmenu-glib/client.h
+++ b/libdbusmenu-glib/client.h
@@ -110,7 +110,29 @@ struct _DbusmenuClient {
DbusmenuClientPrivate * priv;
};
-typedef gboolean (*DbusmenuClientTypeHandler) (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client);
+/**
+ DbusmenuClientTypeHandler:
+ @newitem: The #DbusmenuMenuitem that was created
+ @parent: The parent of @newitem or #NULL if none
+ @client: A pointer to the #DbusmenuClient
+ @user_data: The data you gave us
+
+ The type handler is called when a dbusmenu item is created
+ with a matching type as setup in #dbusmenu_client_add_type_handler
+*/
+typedef gboolean (*DbusmenuClientTypeHandler) (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client, gpointer user_data);
+
+/**
+ DbusmenuClientTypeDestroyHandler:
+ @client: A pointer to the #DbusmenuClient
+ @type: The type that this handler was registered with
+ @user_data: The data you gave us
+
+ This handler is called when the type becomes unregistered by the
+ client. This is usally caused by the #DbusmenuClient being destroyed
+ and should free memory or unref objects in @user_data.
+*/
+typedef void (*DbusmenuClientTypeDestroyHandler) (DbusmenuClient * client, const gchar * type, gpointer user_data);
GType dbusmenu_client_get_type (void);
DbusmenuClient * dbusmenu_client_new (const gchar * name,
@@ -119,6 +141,11 @@ DbusmenuMenuitem * dbusmenu_client_get_root (DbusmenuClient * client)
gboolean dbusmenu_client_add_type_handler (DbusmenuClient * client,
const gchar * type,
DbusmenuClientTypeHandler newfunc);
+gboolean dbusmenu_client_add_type_handler_full (DbusmenuClient * client,
+ const gchar * type,
+ DbusmenuClientTypeHandler newfunc,
+ gpointer user_data,
+ DbusmenuClientTypeDestroyHandler destory_func);
void dbusmenu_client_send_event (DbusmenuClient * client,
gint id,
const gchar * name,