Gtk.Gesture_Drag

Entities

Tagged Types

Access Types

Constants

Subprograms

Description

Gtk.Gesture_Drag.Gtk_Gesture_Drag is a Gtk.Gesture.Gtk_Gesture implementation that recognizes drag operations. The drag operation itself can be tracked throught the Gtk.Gesture_Drag.Gtk_Gesture_Drag::drag-begin, Gtk.Gesture_Drag.Gtk_Gesture_Drag::drag-update and Gtk.Gesture_Drag.Gtk_Gesture_Drag::drag-end signals, or the relevant coordinates be extracted through Gtk.Gesture_Drag.Get_Offset and Gtk.Gesture_Drag.Get_Start_Point.

Cb_GObject_Gdouble_Gdouble_Void

type Cb_GObject_Gdouble_Gdouble_Void is not null access procedure
  (Self    : access Glib.Object.GObject_Record'Class;
   Start_X : Gdouble;
   Start_Y : Gdouble);
Parameters
Self
Start_X
Start_Y

Cb_Gtk_Gesture_Drag_Gdouble_Gdouble_Void

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);
Parameters
Self
Start_X
Start_Y

Get_Offset

function Get_Offset
   (Self : not null access Gtk_Gesture_Drag_Record;
    X    : access Gdouble;
    Y    : access Gdouble) return Boolean

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. Since: gtk+ 3.14

Parameters
Self
X

X offset for the current point

Y

Y offset for the current point

Return Value

True if the gesture is active

Get_Start_Point

function Get_Start_Point
   (Self : not null access Gtk_Gesture_Drag_Record;
    X    : access Gdouble;
    Y    : access Gdouble) return Boolean

If the Gesture is active, this function returns True and fills in X and Y with the drag start coordinates, in window-relative coordinates. Since: gtk+ 3.14

Parameters
Self
X

X coordinate for the drag start point

Y

Y coordinate for the drag start point

Return Value

True if the gesture is active

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_Gesture_Drag

type Gtk_Gesture_Drag is access all Gtk_Gesture_Drag_Record'Class;

Gtk_Gesture_Drag_New

function Gtk_Gesture_Drag_New
   (Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class)
    return Gtk_Gesture_Drag

Returns a newly created Gtk.Gesture.Gtk_Gesture that recognizes drags. Since: gtk+ 3.14

Parameters
Widget

a Gtk.Widget.Gtk_Widget

Return Value

Gtk_Gesture_Drag_Record

type Gtk_Gesture_Drag_Record is new Gtk_Gesture_Single_Record with null record;

Gtk_New

procedure Gtk_New
   (Self   : out Gtk_Gesture_Drag;
    Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class)

Returns a newly created Gtk.Gesture.Gtk_Gesture that recognizes drags. Since: gtk+ 3.14 Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Self
Widget

a Gtk.Widget.Gtk_Widget

Initialize

procedure Initialize
   (Self   : not null access Gtk_Gesture_Drag_Record'Class;
    Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class)

Returns a newly created Gtk.Gesture.Gtk_Gesture that recognizes drags. Since: gtk+ 3.14 Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Self
Widget

a Gtk.Widget.Gtk_Widget

On_Drag_Begin

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)

This signal is 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

Parameters
Self
Call
Slot
After

On_Drag_Begin

procedure On_Drag_Begin
   (Self  : not null access Gtk_Gesture_Drag_Record;
    Call  : Cb_Gtk_Gesture_Drag_Gdouble_Gdouble_Void;
    After : Boolean := False)

This signal is 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

Parameters
Self
Call
After

On_Drag_End

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)

This signal is 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

Parameters
Self
Call
Slot
After

On_Drag_End

procedure On_Drag_End
   (Self  : not null access Gtk_Gesture_Drag_Record;
    Call  : Cb_Gtk_Gesture_Drag_Gdouble_Gdouble_Void;
    After : Boolean := False)

This signal is 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

Parameters
Self
Call
After

On_Drag_Update

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)

This signal is 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

Parameters
Self
Call
Slot
After

On_Drag_Update

procedure On_Drag_Update
   (Self  : not null access Gtk_Gesture_Drag_Record;
    Call  : Cb_Gtk_Gesture_Drag_Gdouble_Gdouble_Void;
    After : Boolean := False)

This signal is 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

Parameters
Self
Call
After

Signal_Drag_Begin

Signal_Drag_Begin : constant Glib.Signal_Name := "drag-begin";

This signal is 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

Signal_Drag_End : constant Glib.Signal_Name := "drag-end";

This signal is 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

Signal_Drag_Update : constant Glib.Signal_Name := "drag-update";

This signal is 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