1.84 <GtkGestureLongPress>

Class: <GtkGestureLongPress>

It derives from <GtkGestureSingle>.

Recognizes long press gestures.

This gesture is also known as “Press and Hold”.

When the timeout is exceeded, the gesture is triggering the gesture-long-press:pressed signal.

If the touchpoint is lifted before the timeout passes, or if it drifts too far of the initial press point, the gesture-long-press: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 gesture-long-press:delay-factor property.

Properties

Property: gesture-long-press:delay-factor self

Factor by which to modify the default timeout.

Its value is a real number.

Set it with (set! (gesture-long-press:delay-factor self) value).

Procedures

Method: gesture-long-press:get-delay-factor self ⇒ %return
Method: get-delay-factor self ⇒ %return

Returns the delay factor.

self

Passed: a <GtkGestureLongPress>.

A <GtkGestureLongPress>

%return

Returned: a real number.

the delay factor

Procedure: gesture-long-press:new ⇒ %return

Returns a newly created <GtkGesture> that recognizes long presses.

%return

Returned: a <GtkGesture>.

a newly created <GtkGestureLongPress>.

Method: gesture-long-press:set-delay-factor self delay-factor
Method: set-delay-factor self 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].

self

Passed: a <GtkGestureLongPress>.

A <GtkGestureLongPress>

delay-factor

Passed: a real number.

The delay factor to apply

Signals

Signal: gesture-long-press:cancelled

Connect a handler with (connect object gesture-long-press:cancelled handler). It is called as (handler self).

Emitted whenever a press moved too far, or was released before gesture-long-press:pressed happened.

self

Passed: a <GtkGestureLongPress>.

Signal: gesture-long-press:pressed

Connect a handler with (connect object gesture-long-press:pressed handler). It is called as (handler self x y).

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

self

Passed: a <GtkGestureLongPress>.

x

Passed: a real number.

the X coordinate where the press happened, relative to the widget allocation

y

Passed: a real number.

the Y coordinate where the press happened, relative to the widget allocation