GestureLongPress

class GestureLongPress(**properties: Any)

Superclasses: GestureSingle, Gesture, EventController, Object

Constructors:

GestureLongPress(**properties)
new() -> Gtk.Gesture

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

Factor by which to modify the default timeout.

Signals

class GestureLongPress.signals
cancelled() None

Emitted whenever a press moved too far, or was released before pressed happened.

pressed(x: float, y: float) None

Emitted whenever a press goes unmoved/unreleased longer than what the GTK defaults tell.

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