diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-01-23 08:55:12 -0600 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-01-23 08:55:12 -0600 |
commit | 95daf102dac37a69686f8a86bf7fe47cd442c7d6 (patch) | |
tree | 3891a7075873c6eeb320fe0c8a572ca14655f5af /libindicator/indicator-object.c | |
parent | 4f4190f71f8495e5bcf6779d73157931572e42ac (diff) | |
parent | 1cf6a9761db8beefc8d2a73c2cf9903264424c66 (diff) | |
download | libayatana-indicator-95daf102dac37a69686f8a86bf7fe47cd442c7d6.tar.gz libayatana-indicator-95daf102dac37a69686f8a86bf7fe47cd442c7d6.tar.bz2 libayatana-indicator-95daf102dac37a69686f8a86bf7fe47cd442c7d6.zip |
"bzr merge lp:indicator" + conflict resolution in tests suite
Diffstat (limited to 'libindicator/indicator-object.c')
-rw-r--r-- | libindicator/indicator-object.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c index 8deb706..a35a2fa 100644 --- a/libindicator/indicator-object.c +++ b/libindicator/indicator-object.c @@ -144,6 +144,10 @@ indicator_object_class_init (IndicatorObjectClass *klass) klass->entry_being_removed = entry_being_removed_default; klass->entry_was_added = entry_was_added_default; + klass->entry_activate = NULL; + klass->entry_activate_window = NULL; + klass->entry_close = NULL; + /** IndicatorObject::entry-added: @arg0: The #IndicatorObject object @@ -669,6 +673,37 @@ indicator_object_get_show_now (IndicatorObject * io, IndicatorObjectEntry * entr } /** + indicator_object_entry_activate_window: + @io: #IndicatorObject to query + @entry: The #IndicatorObjectEntry whose entry was shown + @windowid: ID of the window that is currently focused (or will + be very shortly) + @timestamp: The X11 timestamp of the event + + Used to signal to the indicator that the menu on an entry has + been clicked on. This can either be an activate or a showing + of the menu. Also includes a window ID so that we can know what + application is going to be getting focused soon. If there is + no override of this function, it is the same as calling + indicator_object_entry_activate and in general is preferable + if you have that information available. +*/ +void +indicator_object_entry_activate_window (IndicatorObject * io, IndicatorObjectEntry * entry, guint windowid, guint timestamp) +{ + g_return_if_fail(INDICATOR_IS_OBJECT(io)); + IndicatorObjectClass * class = INDICATOR_OBJECT_GET_CLASS(io); + + if (class->entry_activate_window != NULL) { + return class->entry_activate_window(io, entry, windowid, timestamp); + } else { + indicator_object_entry_activate(io, entry, timestamp); + } + + return; +} + +/** indicator_object_entry_activate: @io: #IndicatorObject to query @entry: The #IndicatorObjectEntry whose entry was shown |