diff options
| author | Ted Gould <ted@gould.cx> | 2010-03-31 13:58:29 -0500 |
|---|---|---|
| committer | Ted Gould <ted@gould.cx> | 2010-03-31 13:58:29 -0500 |
| commit | 1f308a47c578baec7ba7bfebb880e0ecf0a17688 (patch) | |
| tree | e6aaa5fd904fbb136625714c1643381b5baa26ce /libdbusmenu-glib/menuitem.h | |
| parent | 04ad3cb433ac8ed581998ea6ce69bd0e7d1dbb68 (diff) | |
| parent | 0bec1d5af5d3d61ffc24913e0257f724765e5563 (diff) | |
| download | libdbusmenu-1f308a47c578baec7ba7bfebb880e0ecf0a17688.tar.gz libdbusmenu-1f308a47c578baec7ba7bfebb880e0ecf0a17688.tar.bz2 libdbusmenu-1f308a47c578baec7ba7bfebb880e0ecf0a17688.zip | |
Merging in support for sending AboutToShow events.
Diffstat (limited to 'libdbusmenu-glib/menuitem.h')
| -rw-r--r-- | libdbusmenu-glib/menuitem.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/libdbusmenu-glib/menuitem.h b/libdbusmenu-glib/menuitem.h index 04fd911..cb6b8f4 100644 --- a/libdbusmenu-glib/menuitem.h +++ b/libdbusmenu-glib/menuitem.h @@ -85,6 +85,17 @@ struct _DbusmenuMenuitem }; /** + dbusmenu_menuitem_about_to_show_cb: + @mi Menu item that should be shown + @user_data Extra user data sent with the function + + Callback prototype for a callback that is called when the + menu should be shown. +*/ +typedef void (*dbusmenu_menuitem_about_to_show_cb) (DbusmenuMenuitem * mi, gpointer user_data); + + +/** DbusmenuMenuitemClass: @property_changed: Slot for #DbusmenuMenuitem::property-changed. @item_activated: Slot for #DbusmenuMenuitem::item-activated. @@ -97,6 +108,8 @@ struct _DbusmenuMenuitem @handle_event: This function is to override how events are handled by subclasses. Look at #dbusmenu_menuitem_handle_event for lots of good information. + @send_about_to_show: Virtual function that notifies server that the + client is about to show a menu. @reserved1: Reserved for future use. @reserved2: Reserved for future use. @reserved3: Reserved for future use. @@ -118,9 +131,10 @@ struct _DbusmenuMenuitemClass /* Virtual functions */ void (*buildxml) (GPtrArray * stringarray); void (*handle_event) (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp); + void (*send_about_to_show) (DbusmenuMenuitem * mi, dbusmenu_menuitem_about_to_show_cb cb, gpointer cb_data); void (*reserved1) (void); - void (*reserved2) (void); + /* void (*reserved2) (void); */ /* void (*reserved3) (void); */ /* void (*reserved4) (void); -- realized, realloc when bumping lib version */ }; @@ -161,6 +175,7 @@ gboolean dbusmenu_menuitem_get_root (DbusmenuMenuitem * mi); void dbusmenu_menuitem_foreach (DbusmenuMenuitem * mi, void (*func) (DbusmenuMenuitem * mi, gpointer data), gpointer data); void dbusmenu_menuitem_handle_event (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp); +void dbusmenu_menuitem_send_about_to_show (DbusmenuMenuitem * mi, dbusmenu_menuitem_about_to_show_cb cb, gpointer cb_data); /** SECTION:menuitem |
