Recognizes drag gestures.
The drag operation itself can be tracked throughout the [signalGtk.GestureDrag::drag-begin], [signalGtk.GestureDrag::drag-update] and [signalGtk.GestureDrag::drag-end] signals, and the relevant coordinates can be extracted through [methodGtk.GestureDrag.get_offset] and [methodGtk.GestureDrag.get_start_point].
type Cb_GObject_Gdouble_Gdouble_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class;
Start_X : Gdouble;
Start_Y : Gdouble);
type Cb_Gtk_Gesture_Drag_Gdouble_Gdouble_Void is not null access procedure
(Self : access Gtk_Gesture_Drag_Record'Class;
Start_X : Gdouble;
Start_Y : Gdouble);
function Get_Offset
(Self : not null access Gtk_Gesture_Drag_Record;
X : access Gdouble := null;
Y : access Gdouble := null) return Boolean
Gets the offset from the start point. If the Gesture is active, this function returns True and fills in X and Y with the coordinates of the current point, as an offset to the starting drag point.
X offset for the current point
Y offset for the current point
True if the gesture is active
function Get_Start_Point
(Self : not null access Gtk_Gesture_Drag_Record;
X : access Gdouble := null;
Y : access Gdouble := null) return Boolean
Gets the point where the drag started. If the Gesture is active, this function returns True and fills in X and Y with the drag start coordinates, in widget-relative coordinates.
X coordinate for the drag start point
Y coordinate for the drag start point
True if the gesture is active
function Get_Type return Glib.GType
type Gtk_Gesture_Drag is access all Gtk_Gesture_Drag_Record'Class;
function Gtk_Gesture_Drag_New return Gtk_Gesture_Drag
Returns a newly created GtkGesture that recognizes drags.
type Gtk_Gesture_Drag_Record is new Gtk_Gesture_Single_Record with null record;
procedure Gtk_New (Self : out Gtk_Gesture_Drag)
Returns a newly created GtkGesture that recognizes drags. 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_Drag_Record'Class)
Returns a newly created GtkGesture that recognizes drags. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
procedure On_Drag_Begin
(Self : not null access Gtk_Gesture_Drag_Record;
Call : Cb_GObject_Gdouble_Gdouble_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted whenever dragging starts.
Callback parameters: -- @param Start_X X coordinate, relative to the widget allocation -- @param Start_Y Y coordinate, relative to the widget allocation
procedure On_Drag_Begin
(Self : not null access Gtk_Gesture_Drag_Record;
Call : Cb_Gtk_Gesture_Drag_Gdouble_Gdouble_Void;
After : Boolean := False)
Emitted whenever dragging starts.
Callback parameters: -- @param Start_X X coordinate, relative to the widget allocation -- @param Start_Y Y coordinate, relative to the widget allocation
procedure On_Drag_End
(Self : not null access Gtk_Gesture_Drag_Record;
Call : Cb_GObject_Gdouble_Gdouble_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted whenever the dragging is finished.
Callback parameters: -- @param Offset_X X offset, relative to the start point -- @param Offset_Y Y offset, relative to the start point
procedure On_Drag_End
(Self : not null access Gtk_Gesture_Drag_Record;
Call : Cb_Gtk_Gesture_Drag_Gdouble_Gdouble_Void;
After : Boolean := False)
Emitted whenever the dragging is finished.
Callback parameters: -- @param Offset_X X offset, relative to the start point -- @param Offset_Y Y offset, relative to the start point
procedure On_Drag_Update
(Self : not null access Gtk_Gesture_Drag_Record;
Call : Cb_GObject_Gdouble_Gdouble_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted whenever the dragging point moves.
Callback parameters: -- @param Offset_X X offset, relative to the start point -- @param Offset_Y Y offset, relative to the start point
procedure On_Drag_Update
(Self : not null access Gtk_Gesture_Drag_Record;
Call : Cb_Gtk_Gesture_Drag_Gdouble_Gdouble_Void;
After : Boolean := False)
Emitted whenever the dragging point moves.
Callback parameters: -- @param Offset_X X offset, relative to the start point -- @param Offset_Y Y offset, relative to the start point
Signal_Drag_Begin : constant Glib.Signal_Name := "drag-begin";
Emitted whenever dragging starts.
Callback parameters: -- @param Start_X X coordinate, relative to the widget allocation -- @param Start_Y Y coordinate, relative to the widget allocation
Signal_Drag_End : constant Glib.Signal_Name := "drag-end";
Emitted whenever the dragging is finished.
Callback parameters: -- @param Offset_X X offset, relative to the start point -- @param Offset_Y Y offset, relative to the start point
Signal_Drag_Update : constant Glib.Signal_Name := "drag-update";
Emitted whenever the dragging point moves.
Callback parameters: -- @param Offset_X X offset, relative to the start point -- @param Offset_Y Y offset, relative to the start point