GtkGestureSingle
GtkGestureSingle — Base class for mouse/single-touch gestures
|
|
Includes
#include <gtk/gtk.h>
Functions
gtk_gesture_single_set_exclusive ()
void
gtk_gesture_single_set_exclusive (GtkGestureSingle *gesture,
gboolean exclusive);
Sets whether gesture
is exclusive. An exclusive gesture will
only handle pointer and "pointer emulated" touch events, so at
any given time, there is only one sequence able to interact with
those.
Since: 3.14
gtk_gesture_single_get_touch_only ()
gboolean
gtk_gesture_single_get_touch_only (GtkGestureSingle *gesture);
Returns TRUE if the gesture is only triggered by touch events.
Returns
TRUE if the gesture only handles touch events
Since: 3.14
gtk_gesture_single_get_button ()
guint
gtk_gesture_single_get_button (GtkGestureSingle *gesture);
Returns the button number gesture
listens for, or 0 if gesture
reacts to any button press.
Returns
The button number, or 0 for any button
Since: 3.14
gtk_gesture_single_set_button ()
void
gtk_gesture_single_set_button (GtkGestureSingle *gesture,
guint button);
Sets the button number gesture
listens to. If non-0, every
button press from a different button number will be ignored.
Touch events implicitly match with button 1.
Since: 3.14
gtk_gesture_single_get_current_button ()
guint
gtk_gesture_single_get_current_button (GtkGestureSingle *gesture);
Returns the button number currently interacting with gesture
, or 0 if there
is none.
Returns
The current button number
Since: 3.14
Types and Values
GtkGestureSingle
typedef struct _GtkGestureSingle GtkGestureSingle;
Property Details
The “button” property
“button” guint
Mouse button number to listen to, or 0 to listen for any button.
Owner: GtkGestureSingle
Flags: Read / Write
Default value: 1
Since: 3.14
The “exclusive” property
“exclusive” gboolean
Whether the gesture is exclusive. Exclusive gestures only listen to pointer
and pointer emulated events.
Owner: GtkGestureSingle
Flags: Read / Write
Default value: FALSE
Since: 3.14
The “touch-only” property
“touch-only” gboolean
Whether the gesture handles only touch events.
Owner: GtkGestureSingle
Flags: Read / Write
Default value: FALSE
Since: 3.14