event: Add symbolic names for left, middle, and right buttons
Symbolic names are better than magic numbers, even if they are well-established and won't likely change. This maps to a commit in GTK+ that introduced the same names; it was decided to go for PRIMARY, MIDDLE, and SECONDARY because of the confusion that may arise when the button order gets flipped in left-handed configurations - the "left" button (i.e. 1) becomes the right-most button, and the "right" button (i.e. 3) becomes the left-most button. https://bugzilla.gnome.org/show_bug.cgi?id=668692
This commit is contained in:
parent
90397bf06c
commit
60cddbd28e
@ -51,7 +51,7 @@ G_BEGIN_DECLS
|
||||
*
|
||||
* Since: 0.4
|
||||
*/
|
||||
#define CLUTTER_CURRENT_TIME 0L
|
||||
#define CLUTTER_CURRENT_TIME (0L)
|
||||
|
||||
/**
|
||||
* CLUTTER_EVENT_PROPAGATE:
|
||||
@ -61,7 +61,7 @@ G_BEGIN_DECLS
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
#define CLUTTER_EVENT_PROPAGATE FALSE
|
||||
#define CLUTTER_EVENT_PROPAGATE (FALSE)
|
||||
|
||||
/**
|
||||
* CLUTTER_EVENT_STOP:
|
||||
@ -71,7 +71,40 @@ G_BEGIN_DECLS
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
#define CLUTTER_EVENT_STOP TRUE
|
||||
#define CLUTTER_EVENT_STOP (TRUE)
|
||||
|
||||
/**
|
||||
* CLUTTER_BUTTON_PRIMARY:
|
||||
*
|
||||
* The primary button of a pointer device.
|
||||
*
|
||||
* This is typically the left mouse button in a right-handed
|
||||
* mouse configuration.
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
#define CLUTTER_BUTTON_PRIMARY (1)
|
||||
|
||||
/**
|
||||
* CLUTTER_BUTTON_MIDDLE:
|
||||
*
|
||||
* The middle button of a pointer device.
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
#define CLUTTER_BUTTON_MIDDLE (2)
|
||||
|
||||
/**
|
||||
* CLUTTER_BUTTON_SECONDARY:
|
||||
*
|
||||
* The secondary button of a pointer device.
|
||||
*
|
||||
* This is typically the right mouse button in a right-handed
|
||||
* mouse configuration.
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
#define CLUTTER_BUTTON_SECONDARY (3)
|
||||
|
||||
typedef struct _ClutterAnyEvent ClutterAnyEvent;
|
||||
typedef struct _ClutterButtonEvent ClutterButtonEvent;
|
||||
|
Loading…
Reference in New Issue
Block a user