Top | ![]() |
![]() |
![]() |
![]() |
GtkGestureSwipe is a GtkGesture implementation able to recognize swipes, after a press/move/.../move/release sequence happens, the “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,
gtk_gesture_swipe_get_velocity()
can be called on eg. a
“update” handler.
All velocities are reported in pixels/sec units.
GtkGesture *
gtk_gesture_swipe_new (GtkWidget *widget
);
Returns a newly created GtkGesture that recognizes swipes.
Since: 3.14
gboolean gtk_gesture_swipe_get_velocity (GtkGestureSwipe *gesture
,gdouble *velocity_x
,gdouble *velocity_y
);
If the gesture is recognized, this function returns TRUE
and fill in
velocity_x
and velocity_y
with the recorded velocity, as per the
last event(s) processed.
gesture |
||
velocity_x |
return value for the velocity in the X axis, in pixels/sec. |
[out] |
velocity_y |
return value for the velocity in the Y axis, in pixels/sec. |
[out] |
Since: 3.14