Gtk.GestureLongPress

g GObject.Object GObject.Object Gtk.EventController Gtk.EventController GObject.Object->Gtk.EventController Gtk.Gesture Gtk.Gesture Gtk.EventController->Gtk.Gesture Gtk.GestureSingle Gtk.GestureSingle Gtk.Gesture->Gtk.GestureSingle Gtk.GestureLongPress Gtk.GestureLongPress Gtk.GestureSingle->Gtk.GestureLongPress

Subclasses:

None

Methods

Inherited:

Gtk.GestureSingle (8), Gtk.Gesture (19), Gtk.EventController (5), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (widget)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

Gtk.GestureSingle (3), Gtk.Gesture (2), Gtk.EventController (2)

Name

Type

Flags

Short Description

delay-factor

float

r/w

Factor by which to modify the default timeout

Signals

Inherited:

Gtk.Gesture (5), GObject.Object (1)

Name

Short Description

cancelled

This signal is emitted whenever a press moved too far, or was released before Gtk.GestureLongPress ::pressed happened.

pressed

This signal is emitted whenever a press goes unmoved/unreleased longer than what the GTK+ defaults tell.

Fields

Inherited:

Gtk.Gesture (5), GObject.Object (1)

Class Details

class Gtk.GestureLongPress(**kwargs)
Bases:

Gtk.GestureSingle

Abstract:

No

Structure:

Gtk.GestureLongPressClass

Gtk.GestureLongPress is a Gtk.Gesture implementation able to recognize long presses, triggering the Gtk.GestureLongPress ::pressed after the timeout is exceeded.

If the touchpoint is lifted before the timeout passes, or if it drifts too far of the initial press point, the Gtk.GestureLongPress ::cancelled signal will be emitted.

classmethod new(widget)[source]
Parameters:

widget (Gtk.Widget) – a Gtk.Widget

Returns:

a newly created Gtk.GestureLongPress

Return type:

Gtk.Gesture

Returns a newly created Gtk.Gesture that recognizes long presses.

New in version 3.14.

Signal Details

Gtk.GestureLongPress.signals.cancelled(gesture_long_press)
Signal Name:

cancelled

Flags:

RUN_LAST

Parameters:

gesture_long_press (Gtk.GestureLongPress) – The object which received the signal

This signal is emitted whenever a press moved too far, or was released before Gtk.GestureLongPress ::pressed happened.

New in version 3.14.

Gtk.GestureLongPress.signals.pressed(gesture_long_press, x, y)
Signal Name:

pressed

Flags:

RUN_LAST

Parameters:
  • gesture_long_press (Gtk.GestureLongPress) – The object which received the signal

  • x (float) – the X coordinate where the press happened, relative to the widget allocation

  • y (float) – the Y coordinate where the press happened, relative to the widget allocation

This signal is emitted whenever a press goes unmoved/unreleased longer than what the GTK+ defaults tell.

New in version 3.14.

Property Details

Gtk.GestureLongPress.props.delay_factor
Name:

delay-factor

Type:

float

Default Value:

1.0

Flags:

READABLE, WRITABLE

Factor by which to modify the default timeout