GestureDrag

GtkGestureDrag is a GtkGesture implementation for drags.

The drag operation itself can be tracked throughout the [signal@Gtk.GestureDrag::drag-begin], [signal@Gtk.GestureDrag::drag-update] and [signal@Gtk.GestureDrag::drag-end] signals, and the relevant coordinates can be extracted through [method@Gtk.GestureDrag.get_offset] and [method@Gtk.GestureDrag.get_start_point].

Constructors

this
this(GtkGestureDrag* gtkGestureDrag, bool ownedRef)

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

this
this()

Returns a newly created GtkGesture that recognizes drags.

Members

Functions

addOnDragBegin
gulong addOnDragBegin(void delegate(double, double, GestureDrag) dlg, ConnectFlags connectFlags)

Emitted whenever dragging starts.

addOnDragEnd
gulong addOnDragEnd(void delegate(double, double, GestureDrag) dlg, ConnectFlags connectFlags)

Emitted whenever the dragging is finished.

addOnDragUpdate
gulong addOnDragUpdate(void delegate(double, double, GestureDrag) dlg, ConnectFlags connectFlags)

Emitted whenever the dragging point moves.

getGestureDragStruct
GtkGestureDrag* getGestureDragStruct(bool transferOwnership)

Get the main Gtk struct

getOffset
bool getOffset(double x, double y)

Gets the offset from the start point.

getStartPoint
bool getStartPoint(double x, double y)

Gets the point where the drag started.

getStruct
void* getStruct()

the main Gtk struct as a void*

Static functions

getType
GType getType()

Variables

gtkGestureDrag
GtkGestureDrag* gtkGestureDrag;

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