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.
GestureSingleGidBuilder builder() static nothrowGet builder for [gtk.gesture_single.GestureSingle] Returns: New builder objectuint 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 getCurrentButton() nothrowReturns the button number currently interacting with gesture, or 0 if there is none. Returns: The current button numbergdk.event_sequence.EventSequence getCurrentSequence() nothrowReturns the event sequence currently interacting with gesture.bool getTouchOnly() nothrowReturns true if the gesture is only triggered by touch events. Returns: true if the gesture only handles touch eventsFluent builder implementation template for gtk.gesture_single.GestureSingle
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 chainingT 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 chainingFluent builder for gtk.gesture_single.GestureSingle