1.89 <GtkGestureSwipe>

Class: <GtkGestureSwipe>

It derives from <GtkGestureSingle>.

Recognizes swipe gestures.

After a press/move/.../move/release sequence happens, the gesture-swipe:swipe signal will be emitted, providing the velocity and directionality of the sequence at the time it was lifted.

If the velocity is desired in intermediate points, gesture-swipe:get-velocity can be called in a gesture:update handler.

All velocities are reported in pixels/sec units.

Procedures

Method: gesture-swipe:get-velocity self ⇒ %return velocity-x velocity-y
Method: get-velocity self ⇒ %return velocity-x velocity-y

Gets the current velocity.

If the gesture is recognized, this function returns #t and fills in velocity-x and velocity-y with the recorded velocity, as per the last events processed.

self

Passed: a <GtkGestureSwipe>.

a <GtkGestureSwipe>

%return

Returned: a boolean.

whether velocity could be calculated

velocity-x

Returned: a real number.

return value for the velocity in the X axis, in pixels/sec

velocity-y

Returned: a real number.

return value for the velocity in the Y axis, in pixels/sec

Procedure: gesture-swipe:new ⇒ %return

Returns a newly created <GtkGesture> that recognizes swipes.

%return

Returned: a <GtkGesture>.

a newly created <GtkGestureSwipe>

Signals

Signal: gesture-swipe:swipe

Connect a handler with (connect object gesture-swipe:swipe handler). It is called as (handler self velocity-x velocity-y).

Emitted when the recognized gesture is finished.

Velocity and direction are a product of previously recorded events.

self

Passed: a <GtkGestureSwipe>.

velocity-x

Passed: a real number.

velocity in the X axis, in pixels/sec

velocity-y

Passed: a real number.

velocity in the Y axis, in pixels/sec