Recognizes swipe gestures.
After a press/move/.../move/release sequence happens, the [signalGtk.GestureSwipe::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, [methodGtk.GestureSwipe.get_velocity] can be called in a [signalGtk.Gesture::update] handler.
All velocities are reported in pixels/sec units.
type Cb_GObject_Gdouble_Gdouble_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class;
Velocity_X : Gdouble;
Velocity_Y : Gdouble);
type Cb_Gtk_Gesture_Swipe_Gdouble_Gdouble_Void is not null access procedure
(Self : access Gtk_Gesture_Swipe_Record'Class;
Velocity_X : Gdouble;
Velocity_Y : Gdouble);
function Get_Type return Glib.GType
function Get_Velocity
(Self : not null access Gtk_Gesture_Swipe_Record;
Velocity_X : out Gdouble;
Velocity_Y : out Gdouble) return Boolean
Gets the current velocity. If the gesture is recognized, this function returns True and fills in Velocity_X and Velocity_Y with the recorded velocity, as per the last events processed.
return value for the velocity in the X axis, in pixels/sec
return value for the velocity in the Y axis, in pixels/sec
whether velocity could be calculated
type Gtk_Gesture_Swipe is access all Gtk_Gesture_Swipe_Record'Class;
function Gtk_Gesture_Swipe_New return Gtk_Gesture_Swipe
Returns a newly created GtkGesture that recognizes swipes.
type Gtk_Gesture_Swipe_Record is new Gtk_Gesture_Single_Record with null record;
procedure Gtk_New (Self : out Gtk_Gesture_Swipe)
Returns a newly created GtkGesture that recognizes swipes. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
procedure Initialize
(Self : not null access Gtk_Gesture_Swipe_Record'Class)
Returns a newly created GtkGesture that recognizes swipes. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
procedure On_Swipe
(Self : not null access Gtk_Gesture_Swipe_Record;
Call : Cb_GObject_Gdouble_Gdouble_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted when the recognized gesture is finished.
Velocity and direction are a product of previously recorded events.
Callback parameters: -- @param Velocity_X velocity in the X axis, in pixels/sec -- @param Velocity_Y velocity in the Y axis, in pixels/sec
procedure On_Swipe
(Self : not null access Gtk_Gesture_Swipe_Record;
Call : Cb_Gtk_Gesture_Swipe_Gdouble_Gdouble_Void;
After : Boolean := False)
Emitted when the recognized gesture is finished.
Velocity and direction are a product of previously recorded events.
Callback parameters: -- @param Velocity_X velocity in the X axis, in pixels/sec -- @param Velocity_Y velocity in the Y axis, in pixels/sec
Signal_Swipe : constant Glib.Signal_Name := "swipe";
Emitted when the recognized gesture is finished.
Velocity and direction are a product of previously recorded events.
Callback parameters: -- @param Velocity_X velocity in the X axis, in pixels/sec -- @param Velocity_Y velocity in the Y axis, in pixels/sec