GestureLongPress

gtk.gesture_long_press.GestureLongPress is a gtk.gesture.Gesture for long presses.

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

When the timeout is exceeded, the gesture is triggering the gtk.gesture_long_press.GestureLongPress.pressed signal.

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

How long the timeout is before the ::pressed signal gets emitted is determined by the property@Gtk.Settings:gtk-long-press-time setting. It can be modified by the property@Gtk.GestureLongPress:delay-factor property.

Constructors

this
this(void* ptr, Flag!"Take" take)
this
this()

Returns a newly created gtk.gesture.Gesture that recognizes long presses.

Members

Functions

connectCancelled
ulong connectCancelled(T callback, Flag!"After" after)

Connect to Cancelled signal.

connectPressed
ulong connectPressed(T callback, Flag!"After" after)

Connect to Pressed signal.

getDelayFactor
double getDelayFactor()

Returns the delay factor.

self
GestureLongPress self()

Returns this, for use in with statements.

setDelayFactor
void setDelayFactor(double delayFactor)

Applies the given delay factor.

Properties

delayFactor
double delayFactor [@property getter]

Get delayFactor property.

delayFactor
double delayFactor [@property setter]

Set delayFactor property.

gType
GType gType [@property getter]

Static functions

getGType
GType getGType()

Inherited Members

From GestureSingle

getGType
GType getGType()
gType
GType gType [@property getter]
self
GestureSingle self()

Returns this, for use in with statements.

button
uint button [@property getter]

Get button property.

button
uint button [@property setter]

Set button property.

exclusive
bool exclusive [@property getter]

Get exclusive property.

exclusive
bool exclusive [@property setter]

Set exclusive property.

touchOnly
bool touchOnly [@property getter]

Get touchOnly property.

touchOnly
bool touchOnly [@property setter]

Set touchOnly property.

getButton
uint getButton()

Returns the button number gesture listens for.

getCurrentButton
uint getCurrentButton()

Returns the button number currently interacting with gesture, or 0 if there is none.

getCurrentSequence
gdk.event_sequence.EventSequence getCurrentSequence()

Returns the event sequence currently interacting with gesture.

getExclusive
bool getExclusive()

Gets whether a gesture is exclusive.

getTouchOnly
bool getTouchOnly()

Returns true if the gesture is only triggered by touch events.

setButton
void setButton(uint button)

Sets the button number gesture listens to.

setExclusive
void setExclusive(bool exclusive)

Sets whether gesture is exclusive.

setTouchOnly
void setTouchOnly(bool touchOnly)

Sets whether to handle only touch events.