1.83 <GtkGestureDrag>

Class: <GtkGestureDrag>

It derives from <GtkGestureSingle>.

Recognizes drag gestures.

The drag operation itself can be tracked throughout the gesture-drag:drag-begin, gesture-drag:drag-update and gesture-drag:drag-end signals, and the relevant coordinates can be extracted through gesture-drag:get-offset and gesture-drag:get-start-point.

Procedures

Method: gesture-drag:get-offset self ⇒ %return x y
Method: get-offset self ⇒ %return x y

Gets the offset from the start point.

If the self is active, this function returns #t and fills in x and y with the coordinates of the current point, as an offset to the starting drag point.

self

Passed: a <GtkGestureDrag>.

a <GtkGesture>

%return

Returned: a boolean.

#t if the gesture is active

x

Returned: a real number.

X offset for the current point

y

Returned: a real number.

Y offset for the current point

Method: gesture-drag:get-start-point self ⇒ %return x y
Method: get-start-point self ⇒ %return x y

Gets the point where the drag started.

If the self is active, this function returns #t and fills in x and y with the drag start coordinates, in widget-relative coordinates.

self

Passed: a <GtkGestureDrag>.

a <GtkGesture>

%return

Returned: a boolean.

#t if the gesture is active

x

Returned: a real number.

X coordinate for the drag start point

y

Returned: a real number.

Y coordinate for the drag start point

Procedure: gesture-drag:new ⇒ %return

Returns a newly created <GtkGesture> that recognizes drags.

%return

Returned: a <GtkGesture>.

a newly created <GtkGestureDrag>

Signals

Signal: gesture-drag:drag-begin

Connect a handler with (connect object gesture-drag:drag-begin handler). It is called as (handler self start-x start-y).

Emitted whenever dragging starts.

self

Passed: a <GtkGestureDrag>.

start-x

Passed: a real number.

X coordinate, relative to the widget allocation

start-y

Passed: a real number.

Y coordinate, relative to the widget allocation

Signal: gesture-drag:drag-end

Connect a handler with (connect object gesture-drag:drag-end handler). It is called as (handler self offset-x offset-y).

Emitted whenever the dragging is finished.

self

Passed: a <GtkGestureDrag>.

offset-x

Passed: a real number.

X offset, relative to the start point

offset-y

Passed: a real number.

Y offset, relative to the start point

Signal: gesture-drag:drag-update

Connect a handler with (connect object gesture-drag:drag-update handler). It is called as (handler self offset-x offset-y).

Emitted whenever the dragging point moves.

self

Passed: a <GtkGestureDrag>.

offset-x

Passed: a real number.

X offset, relative to the start point

offset-y

Passed: a real number.

Y offset, relative to the start point