GestureLongPress
-
class GestureLongPress(**properties: Any)
Superclasses: GestureSingle
, Gesture
, EventController
, Object
GtkGestureLongPress
is a GtkGesture
for long presses.
This gesture is also known as “Press and Hold”.
When the timeout is exceeded, the gesture is triggering the
pressed
signal.
If the touchpoint is lifted before the timeout passes, or if
it drifts too far of the initial press point, the
cancelled
signal will be emitted.
How long the timeout is before the ::pressed signal gets emitted is
determined by the gtk_long_press_time
setting.
It can be modified by the delay_factor
property.
Constructors
-
class GestureLongPress
-
classmethod new() → Gesture
Returns a newly created GtkGesture
that recognizes long presses.
Methods
-
class GestureLongPress
-
get_delay_factor() → float
Returns the delay factor.
-
set_delay_factor(delay_factor: float) → None
Applies the given delay factor.
The default long press time will be multiplied by this value.
Valid values are in the range [0.5..2.0].
- Parameters:
delay_factor – The delay factor to apply
Properties
-
class GestureLongPress
-
props.delay_factor: float
The type of the None singleton.
Signals
-
class GestureLongPress.signals
-
cancelled() → None
The type of the None singleton.
-
pressed(x: float, y: float) → None
The type of the None singleton.
- Parameters:
x – the X coordinate where the press happened, relative to the widget allocation
y – the Y coordinate where the press happened, relative to the widget allocation