GtkGestureSwipe
GtkGestureSwipe — Swipe gesture
|
|
Includes
#include <gtk/gtk.h>
Description
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.
Functions
gtk_gesture_swipe_get_velocity ()
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.
Returns
whether velocity could be calculated
Since: 3.14
Types and Values
GtkGestureSwipe
typedef struct _GtkGestureSwipe GtkGestureSwipe;
Signal Details
The “swipe” signal
void
user_function (GtkGestureSwipe *gesture,
gdouble velocity_x,
gdouble velocity_y,
gpointer user_data)
This signal is emitted when the recognized gesture is finished, velocity
and direction are a product of previously recorded events.
Flags: Run Last
Since: 3.14