aboutsummaryrefslogtreecommitdiff
path: root/libindicator/indicator-object.c
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2011-07-09 03:39:10 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2011-07-09 03:39:10 +0200
commit6f1c8e020c0db10a1b2c69c0d2f08a5e69cbc271 (patch)
treed3f22299558dbbcefa779251a77b52d721dfbdca /libindicator/indicator-object.c
parent5f78a771bfb0a7f334da952eeb9a8b4c049110be (diff)
downloadlibayatana-indicator-6f1c8e020c0db10a1b2c69c0d2f08a5e69cbc271.tar.gz
libayatana-indicator-6f1c8e020c0db10a1b2c69c0d2f08a5e69cbc271.tar.bz2
libayatana-indicator-6f1c8e020c0db10a1b2c69c0d2f08a5e69cbc271.zip
Added support for secondary activate signal: i.e. middle-click
Secondary activate signal is designed to be used for a secondary kind of activation, for example using middle-click. It exports both the event time and the mouse position (this is mostly needed to follow the Status Notifier specifications).
Diffstat (limited to 'libindicator/indicator-object.c')
-rw-r--r--libindicator/indicator-object.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c
index 2fe8dd1..04809f1 100644
--- a/libindicator/indicator-object.c
+++ b/libindicator/indicator-object.c
@@ -63,6 +63,7 @@ enum {
MENU_SHOW,
SHOW_NOW_CHANGED,
ACCESSIBLE_DESC_UPDATE,
+ SECONDARY_ACTIVATE,
LAST_SIGNAL
};
@@ -149,8 +150,7 @@ indicator_object_class_init (IndicatorObjectClass *klass)
NULL, NULL,
_indicator_object_marshal_VOID__POINTER_UINT_UINT,
G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_NONE);
-
-/**
+ /**
IndicatorObject::entry-scrolled:
@arg0: The #IndicatorObject object
@arg1: A pointer to the #IndicatorObjectEntry that
@@ -169,6 +169,26 @@ indicator_object_class_init (IndicatorObjectClass *klass)
_indicator_object_marshal_VOID__POINTER_UINT_ENUM,
G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_UINT,
INDICATOR_OBJECT_TYPE_SCROLL_DIRECTION);
+ /**
+ IndicatorObject::secondary-activate:
+ @arg0: The #IndicatorObject object
+ @arg1: A pointer to the #IndicatorObjectEntry that
+ receives the secondary activate event.
+ @arg2: The timestamp of the event
+ @arg3: The X position of the pointer
+ @arg4: The Y position of the pointer
+
+ When the indicator receives a secondary activation event
+ from the user, this signal is emitted.
+ */
+ signals[SECONDARY_ACTIVATE] = g_signal_new (INDICATOR_OBJECT_SIGNAL_SECONDARY_ACTIVATE,
+ G_TYPE_FROM_CLASS(klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (IndicatorObjectClass, secondary_activate),
+ NULL, NULL,
+ _indicator_object_marshal_VOID__POINTER_UINT_INT_INT,
+ G_TYPE_NONE, 4, G_TYPE_POINTER, G_TYPE_UINT,
+ G_TYPE_INT, G_TYPE_INT);
/**
IndicatorObject::menu-show: