gtk.gesture_single

Module for [GestureSingle] class

Types 3

gtk.gesture_single.GestureSingle is a GtkGestures subclass optimized for singe-touch and mouse 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 it to 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.
void exclusive(bool propval) @property nothrowSet `exclusive` property. Params: propval = Whether the gesture is exclusive.
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.
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.
bool getExclusive() nothrowGets whether a 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.
void setExclusive(bool exclusive) nothrowSets whether gesture is exclusive.
void setTouchOnly(bool touchOnly) nothrowSets whether to handle only touch events.
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.
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