gtk.gesture_single

Module for [GestureSingle] class

Types 3

#GtkGestureSingle is a subclass of #GtkGesture, optimized (although not restricted) for dealing with mouse and single-touch gestures. Under interaction, these gestures stick to the first interacting sequence, which is accessible through gtk.gesture_single.GestureSingle.getCurrentSequence while the gesture is being interacted with.

By default gestures react to both gdk.types.BUTTON_PRIMARY and touch events, gtk.gesture_single.GestureSingle.setTouchOnly can be used to change the touch behavior. Callers may also specify a different mouse button number to interact with through gtk.gesture_single.GestureSingle.setButton, or react to any mouse button by setting 0. While the gesture is active, the button being currently pressed can be known through gtk.gesture_single.GestureSingle.getCurrentButton.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
GestureSingle self() nothrowReturns `this`, for use in `with` statements.
GestureSingleGidBuilder builder() static nothrowGet builder for [gtk.gesture_single.GestureSingle] Returns: New builder object
uint button() @property nothrowGet `button` property. Returns: Mouse button number to listen to, or 0 to listen for any button.
void button(uint propval) @property nothrowSet `button` property. Params: propval = Mouse button number to listen to, or 0 to listen for any button.
bool exclusive() @property nothrowGet `exclusive` property. Returns: Whether the gesture is exclusive. Exclusive gestures only listen to pointer and pointer emulated events.
void exclusive(bool propval) @property nothrowSet `exclusive` property. Params: propval = Whether the gesture is exclusive. Exclusive gestures only listen to pointer and pointer emulated events.
bool touchOnly() @property nothrowGet `touchOnly` property. Returns: Whether the gesture handles only touch events.
void touchOnly(bool propval) @property nothrowSet `touchOnly` property. Params: propval = Whether the gesture handles only touch events.
uint getButton() nothrowReturns the button number gesture listens for, or 0 if gesture reacts to any button press. Returns: The button number, or 0 for any button
uint getCurrentButton() nothrowReturns the button number currently interacting with gesture, or 0 if there is none. Returns: The current button number
gdk.event_sequence.EventSequence getCurrentSequence() nothrowReturns the event sequence currently interacting with gesture. This is only meaningful if [gtk.gesture.Gesture.isActive] returns true. Returns: the current sequence
bool getExclusive() nothrowGets whether a gesture is exclusive. For more information, see [gtk.gesture_single.GestureSingle.setExclusive]. Returns: Whether the gesture is exclusive
bool getTouchOnly() nothrowReturns true if the gesture is only triggered by touch events. Returns: true if the gesture only handles touch events
void setButton(uint button) nothrowSets 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.
void setExclusive(bool exclusive) nothrowSets 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.
void setTouchOnly(bool touchOnly) nothrowIf touch_only is true, gesture will only handle events of type #GDK_TOUCH_BEGIN, #GDK_TOUCH_UPDATE or #GDK_TOUCH_END. If false, mouse events will be handled too.
Constructors
this(void * ptr, Flag!"Take" take)

Fluent builder implementation template for gtk.gesture_single.GestureSingle

Methods
T button(uint propval) nothrowSet `button` property. Params: propval = Mouse button number to listen to, or 0 to listen for any button. Returns: Builder instance for fluent chaining
T exclusive(bool propval) nothrowSet `exclusive` property. Params: propval = Whether the gesture is exclusive. Exclusive gestures only listen to pointer and pointer emulated events. Returns: Builder instance for fluent chaining
T touchOnly(bool propval) nothrowSet `touchOnly` property. Params: propval = Whether the gesture handles only touch events. Returns: Builder instance for fluent chaining
Methods
GestureSingle build() nothrowCreate object from builder. Returns: New object