Gtk.GestureDrag


Gtk.GestureDrag — Drag gesture

Object Hierarchy:

    GObject
    ╰── Gtk.EventController
        ╰── Gtk.Gesture
            ╰── Gtk.GestureSingle
                ╰── Gtk.GestureDrag
                    ╰── Gtk.GesturePan

See also:

Gtk.GestureSwipe


Functions:


Signals:

  • “drag-begin” (gesture, start_x, start_y, user_data)
  • “drag-end” (gesture, offset_x, offset_y, user_data)

Description:

Gtk.GestureDrag is a Gtk.Gesture implementation that recognizes drag operations. The drag operation itself can be tracked throught the extracted through Gtk.GestureDrag::get_offset() and Gtk.GestureDrag::get_start_point().


Function Details:

new()

new (widget:Gtk.Widget) -> Gtk.Gesture

Returns a newly created Gtk.Gesture that recognizes drags.

  • Returns: a newly created Gtk.GestureDrag

  • Since: 3.14


get_start_point()

get_start_point (self) -> bool, x:float, y:float

If the gesture is active, this function returns Trueand fills in x and y with the drag start coordinates,in window-relative coordinates.

  • Returns: True if the gesture is active

  • Since: 3.14


get_offset()

get_offset (self) -> bool, x:float, y:float

If the gesture is active, this function returns True andfills in x and y with the coordinates of the current point,as an offset to the starting drag point.

  • Returns: True if the gesture is active

  • Since: 3.14


results matching ""

    No results matching ""