diff options
author | Ted Gould <ted@gould.cx> | 2010-09-14 10:53:40 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-09-14 10:53:40 -0500 |
commit | 4e26272abb5a9722371a98449fd2d4e05bf0d232 (patch) | |
tree | d2badfe07c2ed0e97b271c448495f1de59f5f7ae | |
parent | 8839b12e3deb35d69a61edc87d0d8649b6459132 (diff) | |
parent | f0cd0042e672c6d7c230aea322ff3fb868237ea6 (diff) | |
download | libayatana-indicator-4e26272abb5a9722371a98449fd2d4e05bf0d232.tar.gz libayatana-indicator-4e26272abb5a9722371a98449fd2d4e05bf0d232.tar.bz2 libayatana-indicator-4e26272abb5a9722371a98449fd2d4e05bf0d232.zip |
* Upstream Merge
* Adding a menu_show signal
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | libindicator/indicator-object-marshal.list | 1 | ||||
-rw-r--r-- | libindicator/indicator-object.c | 53 | ||||
-rw-r--r-- | libindicator/indicator-object.h | 15 |
4 files changed, 52 insertions, 24 deletions
diff --git a/debian/changelog b/debian/changelog index ace2ebf..831f3f5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +libindicator (0.3.12-0ubuntu1~ppa2) maverick; urgency=low + + * Upstream Merge + * Adding a menu_show signal + + -- Ted Gould <ted@ubuntu.com> Tue, 14 Sep 2010 10:53:29 -0500 + libindicator (0.3.12-0ubuntu1~ppa1) maverick; urgency=low * New upstream release. diff --git a/libindicator/indicator-object-marshal.list b/libindicator/indicator-object-marshal.list index d9dd126..bb447bb 100644 --- a/libindicator/indicator-object-marshal.list +++ b/libindicator/indicator-object-marshal.list @@ -1,2 +1,3 @@ VOID: POINTER, UINT, UINT VOID: UINT,ENUM +VOID: POINTER, UINT diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c index 511a407..a5fd740 100644 --- a/libindicator/indicator-object.c +++ b/libindicator/indicator-object.c @@ -57,7 +57,8 @@ enum { ENTRY_ADDED, ENTRY_REMOVED, ENTRY_MOVED, - SCROLL, + SCROLL, + MENU_SHOW, LAST_SIGNAL }; @@ -145,22 +146,40 @@ indicator_object_class_init (IndicatorObjectClass *klass) G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_NONE); - /** - IndicatorObject::scroll: - @arg0: The #IndicatorObject object - @arg1: The delta of the scroll event - @arg2: The orientation of the scroll event. - - When the indicator receives a mouse scroll wheel event - from the user, this signal is emitted. - */ - signals[SCROLL] = g_signal_new (INDICATOR_OBJECT_SIGNAL_SCROLL, - G_TYPE_FROM_CLASS(klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (IndicatorObjectClass, scroll), - NULL, NULL, - _indicator_object_marshal_VOID__UINT_ENUM, - G_TYPE_NONE, 2, G_TYPE_UINT, INDICATOR_OBJECT_TYPE_SCROLL_DIRECTION); + /** + IndicatorObject::scroll: + @arg0: The #IndicatorObject object + @arg1: The delta of the scroll event + @arg2: The orientation of the scroll event. + + When the indicator receives a mouse scroll wheel event + from the user, this signal is emitted. + */ + signals[SCROLL] = g_signal_new (INDICATOR_OBJECT_SIGNAL_SCROLL, + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IndicatorObjectClass, scroll), + NULL, NULL, + _indicator_object_marshal_VOID__UINT_ENUM, + G_TYPE_NONE, 2, G_TYPE_UINT, INDICATOR_OBJECT_TYPE_SCROLL_DIRECTION); + + /** + IndicatorObject::menu-show: + @arg0: The #IndicatorObject object + @arg1: A pointer to the #IndicatorObjectEntry that + is being shown. + @arg2: The timestamp of the event + + Used when the indicator wants to signal up the stack + that the menu should be shown. + */ + signals[MENU_SHOW] = g_signal_new (INDICATOR_OBJECT_SIGNAL_MENU_SHOW, + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IndicatorObjectClass, menu_show), + NULL, NULL, + _indicator_object_marshal_VOID__POINTER_UINT, + G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT); return; diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h index 3c6bec5..32a35f9 100644 --- a/libindicator/indicator-object.h +++ b/libindicator/indicator-object.h @@ -51,6 +51,8 @@ typedef enum #define INDICATOR_OBJECT_SIGNAL_ENTRY_MOVED_ID (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_ENTRY_MOVED, INDICATOR_OBJECT_TYPE)) #define INDICATOR_OBJECT_SIGNAL_SCROLL "scroll" #define INDICATOR_OBJECT_SIGNAL_SCROLL_ID (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_SCROLL, INDICATOR_OBJECT_TYPE)) +#define INDICATOR_OBJECT_SIGNAL_MENU_SHOW "menu-show" +#define INDICATOR_OBJECT_SIGNAL_MENU_SHOW_ID (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_MENU_SHOW, INDICATOR_OBJECT_TYPE)) typedef struct _IndicatorObject IndicatorObject; typedef struct _IndicatorObjectClass IndicatorObjectClass; @@ -79,8 +81,7 @@ typedef struct _IndicatorObjectEntry IndicatorObjectEntry; @entry_added: Slot for #IndicatorObject::entry-added @entry_removed: Slot for #IndicatorObject::entry-removed @entry_moved: Slot for #IndicatorObject::entry-moved - @indicator_object_reserved_1: Reserved for future use - @indicator_object_reserved_2: Reserved for future use + @menu_show: Slot for #IndicatorObject::menu-show */ struct _IndicatorObjectClass { GObjectClass parent_class; @@ -94,13 +95,13 @@ struct _IndicatorObjectClass { guint (*get_location) (IndicatorObject * io, IndicatorObjectEntry * entry); /* Signals */ - void (*entry_added) (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_data); - void (*entry_removed) (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_data); - void (*entry_moved) (IndicatorObject * io, IndicatorObjectEntry * entry, guint old_pos, guint new_pos, gpointer user_data); - void (*scroll) (IndicatorObject * io, gint delta, IndicatorScrollDirection direction); + void (*entry_added) (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_data); + void (*entry_removed) (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_data); + void (*entry_moved) (IndicatorObject * io, IndicatorObjectEntry * entry, guint old_pos, guint new_pos, gpointer user_data); + void (*scroll) (IndicatorObject * io, gint delta, IndicatorScrollDirection direction); + void (*menu_show) (IndicatorObject * io, IndicatorObjectEntry * entry, guint timestamp, gpointer user_data); /* Reserved */ - void (* indicator_object_reserved_1) (void); }; /** |