aboutsummaryrefslogtreecommitdiff
path: root/libindicator/indicator-object.c
diff options
context:
space:
mode:
Diffstat (limited to 'libindicator/indicator-object.c')
-rw-r--r--libindicator/indicator-object.c35
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