GestureLongPress

GtkGestureLongPress is a GtkGesture for long presses.

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

When the timeout is exceeded, the gesture is triggering the [signal@Gtk.GestureLongPress::pressed] signal.

If the touchpoint is lifted before the timeout passes, or if it drifts too far of the initial press point, the [signal@Gtk.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(GtkGestureLongPress* gtkGestureLongPress, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Returns a newly created GtkGesture that recognizes long presses.

Members

Functions

addOnCancelled
gulong addOnCancelled(void delegate(GestureLongPress) dlg, ConnectFlags connectFlags)

Emitted whenever a press moved too far, or was released before [signal@Gtk.GestureLongPress::pressed] happened.

addOnPressed
gulong addOnPressed(void delegate(double, double, GestureLongPress) dlg, ConnectFlags connectFlags)

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

getDelayFactor
double getDelayFactor()

Returns the delay factor.

getGestureLongPressStruct
GtkGestureLongPress* getGestureLongPressStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

setDelayFactor
void setDelayFactor(double delayFactor)

Applies the given delay factor.

Static functions

getType
GType getType()

Variables

gtkGestureLongPress
GtkGestureLongPress* gtkGestureLongPress;

the main Gtk struct

Inherited Members

From GestureSingle

gtkGestureSingle
GtkGestureSingle* gtkGestureSingle;

the main Gtk struct

getGestureSingleStruct
GtkGestureSingle* getGestureSingleStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
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
GdkEventSequence* 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.

Meta