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_single/index.html

Module Wrappers.Gesture_single

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

Sets whether to handle only touch events.

If @touch_only is %TRUE, @gesture will only handle events of type %GDK_TOUCH_BEGIN, %GDK_TOUCH_UPDATE or %GDK_TOUCH_END. If %FALSE, mouse events will be handled too.

val set_exclusive : t -> bool -> unit

Sets whether @gesture is exclusive.

An exclusive gesture will only handle pointer and "pointer emulated" touch events, so at any given time, there is only one sequence able to interact with those.

val set_button : t -> int -> unit

Sets the button number @gesture listens to.

If non-0, every button press from a different button number will be ignored. Touch events implicitly match with button 1.

val get_touch_only : t -> bool

Returns %TRUE if the gesture is only triggered by touch events.

val get_exclusive : t -> bool

Gets whether a gesture is exclusive.

For more information, see method@Gtk.GestureSingle.set_exclusive.

val get_current_sequence : t -> Ocgtk_gdk.Gdk.Wrappers.Event_sequence.t option

Returns the event sequence currently interacting with @gesture.

This is only meaningful if method@Gtk.Gesture.is_active returns %TRUE.

val get_current_button : t -> int

Returns the button number currently interacting with @gesture, or 0 if there is none.

val get_button : t -> int

Returns the button number @gesture listens for.

If this is 0, the gesture reacts to any button press.