diff options
author | Dan Winship <danw@gnome.org> | 2012-03-02 10:33:52 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2012-05-03 21:22:39 -0400 |
commit | 154ce014a8ff6961ace3a78359f3ca9aed2e681b (patch) | |
tree | f4a01b49c107ee7bb7c1bc486465164173b3a8ef /gdk/gdkevents.h | |
parent | 4d7c7ec32f3942229d7ed4cd6ae3cbe80d180731 (diff) | |
download | gtk+-154ce014a8ff6961ace3a78359f3ca9aed2e681b.tar.gz |
gdk: add bindings-friendly alias for GDK_EVENT_2BUTTON_PRESS
GDK_EVENT_2BUTTON_PRESS and GDK_EVENT_3BUTTON_PRESS can't be used from
some bindings because they'd translate to something syntactically
invalid. Add GDK_EVENT_DOUBLE_BUTTON_PRESS and
GDK_EVENT_TRIPLE_BUTTON_PRESS aliases to work around that.
https://bugzilla.gnome.org/show_bug.cgi?id=671025
Diffstat (limited to 'gdk/gdkevents.h')
-rw-r--r-- | gdk/gdkevents.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdk/gdkevents.h b/gdk/gdkevents.h index 73c9e83dec..7557c4ca69 100644 --- a/gdk/gdkevents.h +++ b/gdk/gdkevents.h @@ -225,8 +225,10 @@ typedef GdkFilterReturn (*GdkFilterFunc) (GdkXEvent *xevent, * @GDK_2BUTTON_PRESS: a mouse button has been double-clicked (clicked twice * within a short period of time). Note that each click also generates a * %GDK_BUTTON_PRESS event. + * @GDK_DOUBLE_BUTTON_PRESS: alias for %GDK_2BUTTON_PRESS, added in 3.6. * @GDK_3BUTTON_PRESS: a mouse button has been clicked 3 times in a short period * of time. Note that each click also generates a %GDK_BUTTON_PRESS event. + * @GDK_TRIPLE_BUTTON_PRESS: alias for %GDK_3BUTTON_PRESS, added in 3.6. * @GDK_BUTTON_RELEASE: a mouse button has been released. * @GDK_KEY_PRESS: a key has been pressed. * @GDK_KEY_RELEASE: a key has been released. @@ -280,6 +282,13 @@ typedef GdkFilterReturn (*GdkFilterFunc) (GdkXEvent *xevent, * Do not confuse these events with the signals that GTK+ widgets emit. * Although many of these events result in corresponding signals being emitted, * the events are often transformed or filtered along the way. + * + * In some language bindings, the values %GDK_2BUTTON_PRESS and + * %GDK_3BUTTON_PRESS would translate into something syntactically + * invalid (eg <literal>Gdk.EventType.2ButtonPress</literal>, where a + * symbol is not allowed to start with a number). In that case, the + * aliases %GDK_DOUBLE_BUTTON_PRESS and %GDK_TRIPLE_BUTTON_PRESS can + * be used instead. */ typedef enum { @@ -290,7 +299,9 @@ typedef enum GDK_MOTION_NOTIFY = 3, GDK_BUTTON_PRESS = 4, GDK_2BUTTON_PRESS = 5, + GDK_DOUBLE_BUTTON_PRESS = GDK_2BUTTON_PRESS, GDK_3BUTTON_PRESS = 6, + GDK_TRIPLE_BUTTON_PRESS = GDK_3BUTTON_PRESS, GDK_BUTTON_RELEASE = 7, GDK_KEY_PRESS = 8, GDK_KEY_RELEASE = 9, |