Gtk.GestureLongPress¶
class — extends GestureSingle
Recognizes long press gestures.
This gesture is also known as “Press and Hold”.
When the timeout is exceeded, the gesture is triggering the
GestureLongPress.pressed signal.
If the touchpoint is lifted before the timeout passes, or if
it drifts too far of the initial press point, the
GestureLongPress.cancelled signal will be emitted.
How long the timeout is before the ::pressed signal gets emitted is
determined by the Settings.gtk-long-press-time setting.
It can be modified by the GestureLongPress.delay-factor
property.
Constructors¶
new¶
Returns a newly created GtkGesture that recognizes long presses.
Methods¶
get_delay_factor¶
Returns the delay factor.
set_delay_factor¶
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¶
delay_factor¶
Factor by which to modify the default timeout.
Signals¶
cancelled¶
Emitted whenever a press moved too far, or was released
before GestureLongPress.pressed happened.
pressed¶
Emitted whenever a press goes unmoved/unreleased longer than what the GTK defaults tell.