package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Gesture_drag/index.html

Module Wrappers.Gesture_drag

type t = [ `gesture_drag | `gesture_single | `gesture | `event_controller | `object_ ] Gobject.obj
val new_ : unit -> t

Create a new GestureDrag

val get_start_point : t -> bool * float * float

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.

val get_offset : t -> bool * float * float

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.

val on_drag_begin : ?after:bool -> t -> callback:(start_x:float -> start_y:float -> unit) -> Gobject.Signal.handler_id
val on_drag_end : ?after:bool -> t -> callback:(offset_x:float -> offset_y:float -> unit) -> Gobject.Signal.handler_id
val on_drag_update : ?after:bool -> t -> callback:(offset_x:float -> offset_y:float -> unit) -> Gobject.Signal.handler_id