GestureDrag

#GtkGestureDrag is a #GtkGesture implementation that recognizes drag operations. The drag operation itself can be tracked throught the #GtkGestureDrag::drag-begin, #GtkGestureDrag::drag-update and #GtkGestureDrag::drag-end signals, or the relevant coordinates be extracted through gtk_gesture_drag_get_offset() and gtk_gesture_drag_get_start_point().

class GestureDrag : GestureSingle {}

Constructors

this
this(GtkGestureDrag* gtkGestureDrag, bool ownedRef)

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

this
this(Widget widget)

Returns a newly created #GtkGesture that recognizes drags.

Members

Classes

OnDragBeginDelegateWrapper
class OnDragBeginDelegateWrapper
Undocumented in source.
OnDragEndDelegateWrapper
class OnDragEndDelegateWrapper
Undocumented in source.
OnDragUpdateDelegateWrapper
class OnDragUpdateDelegateWrapper
Undocumented in source.

Functions

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

This signal is emitted whenever dragging starts.

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

This signal is emitted whenever the dragging is finished.

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

This signal is emitted whenever the dragging point moves.

getGestureDragStruct
GtkGestureDrag* getGestureDragStruct(bool transferOwnership)

Get the main Gtk struct

getOffset
bool getOffset(double x, double y)

If the @gesture is active, this function returns %TRUE and fills in @x and @y with the coordinates of the current point, as an offset to the starting drag point.

getStartPoint
bool getStartPoint(double x, double y)

If the @gesture is active, this function returns %TRUE and fills in @x and @y with the drag start coordinates, in window-relative coordinates.

getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

callBackDragBegin
void callBackDragBegin(GtkGestureDrag* gesturedragStruct, double startX, double startY, OnDragBeginDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDragBeginDestroy
void callBackDragBeginDestroy(OnDragBeginDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDragEnd
void callBackDragEnd(GtkGestureDrag* gesturedragStruct, double offsetX, double offsetY, OnDragEndDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDragEndDestroy
void callBackDragEndDestroy(OnDragEndDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDragUpdate
void callBackDragUpdate(GtkGestureDrag* gesturedragStruct, double offsetX, double offsetY, OnDragUpdateDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDragUpdateDestroy
void callBackDragUpdateDestroy(OnDragUpdateDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
getType
GType getType()

Variables

gtkGestureDrag
GtkGestureDrag* gtkGestureDrag;

the main Gtk struct

onDragBeginListeners
OnDragBeginDelegateWrapper[] onDragBeginListeners;
Undocumented in source.
onDragEndListeners
OnDragEndDelegateWrapper[] onDragEndListeners;
Undocumented in source.
onDragUpdateListeners
OnDragUpdateDelegateWrapper[] onDragUpdateListeners;
Undocumented in source.

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*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
getType
GType getType()
getButton
uint getButton()

Returns the button number @gesture listens for, or 0 if @gesture reacts to any button press.

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. This is only meaningful if gtk_gesture_is_active() returns %TRUE.

getExclusive
bool getExclusive()

Gets whether a gesture is exclusive. For more information, see gtk_gesture_single_set_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. If non-0, every button press from a different button number will be ignored. Touch events implicitly match with button 1.

setExclusive
void setExclusive(bool exclusive)

Sets whether @gesture is exclusive. An exclusive gesture will only handle pointer and "pointer emulated" touch events, so at any given time, there is only one sequence able to interact with those.

setTouchOnly
void setTouchOnly(bool touchOnly)

If @touch_only is %TRUE, @gesture will only handle events of type #GDK_TOUCH_BEGIN, #GDK_TOUCH_UPDATE or #GDK_TOUCH_END. If %FALSE, mouse events will be handled too.

Meta