GestureSingle
Superclasses: Gesture
, EventController
, Object
Subclasses: DragSource
, GestureClick
, GestureDrag
, GestureLongPress
, GestureStylus
, GestureSwipe
- Constructors:
GestureSingle(**properties)
Methods
- class GestureSingle
- get_button() int
Returns the button number
gesture
listens for.If this is 0, the gesture reacts to any button press.
- get_current_button() int
Returns the button number currently interacting with
gesture
, or 0 if there is none.
- get_current_sequence() EventSequence | None
Returns the event sequence currently interacting with
gesture
.This is only meaningful if
is_active
returnsTrue
.
- get_exclusive() bool
Gets whether a gesture is exclusive.
For more information, see
set_exclusive
.
- set_button(button: int) None
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.
- Parameters:
button – button number to listen to, or 0 for any button
- set_exclusive(exclusive: bool) None
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.
- Parameters:
exclusive –
True
to makegesture
exclusive
- set_touch_only(touch_only: bool) None
Sets whether to handle only touch events.
If
touch_only
isTrue
,gesture
will only handle events of type%GDK_TOUCH_BEGIN
,%GDK_TOUCH_UPDATE
or%GDK_TOUCH_END
. IfFalse
, mouse events will be handled too.- Parameters:
touch_only – whether
gesture
handles only touch events