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.
GestureSingle self()Returns `this`, for use in `with` statements.GestureSingleGidBuilder builder()Get builder for [gtk.gesture_single.GestureSingle] Returns: New builder objectuint button() @propertyGet `button` property. Returns: Mouse button number to listen to, or 0 to listen for any button.void button(uint propval) @propertySet `button` property. Params: propval = Mouse button number to listen to, or 0 to listen for any button.void exclusive(bool propval) @propertySet `exclusive` property. Params: propval = Whether the gesture is exclusive.bool touchOnly() @propertyGet `touchOnly` property. Returns: Whether the gesture handles only touch events.void touchOnly(bool propval) @propertySet `touchOnly` property. Params: propval = Whether the gesture handles only touch events.uint getButton()Returns the button number gesture listens for.uint getCurrentButton()Returns the button number currently interacting with gesture, or 0 if there is none. Returns: The current button numbergdk.event_sequence.EventSequence getCurrentSequence()Returns the event sequence currently interacting with gesture.bool getExclusive()Gets whether a gesture is exclusive.bool getTouchOnly()Returns true if the gesture is only triggered by touch events. Returns: true if the gesture only handles touch eventsvoid setButton(uint button)Sets the button number gesture listens to.void setExclusive(bool exclusive)Sets whether gesture is exclusive.void setTouchOnly(bool touchOnly)Sets whether to handle only touch events.Fluent builder implementation template for gtk.gesture_single.GestureSingle
T button(uint propval)Set `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)Set `exclusive` property. Params: propval = Whether the gesture is exclusive.T touchOnly(bool propval)Set `touchOnly` property. Params: propval = Whether the gesture handles only touch events. Returns: Builder instance for fluent chainingFluent builder for gtk.gesture_single.GestureSingle
GestureSingle build()Create object from builder. Returns: New object