package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Gesture_stylus/index.html
Module Wrappers.Gesture_stylus
type t =
[ `gesture_stylus
| `gesture_single
| `gesture
| `event_controller
| `object_ ]
Gobject.objval new_ : unit -> tCreate a new GestureStylus
val set_stylus_only : t -> bool -> unitSets the state of stylus-only
If true, the gesture will exclusively handle events from stylus input devices, otherwise it'll handle events from any pointing device.
val get_stylus_only : t -> boolChecks whether the gesture is for styluses only.
Stylus-only gestures will signal events exclusively from stylus input devices.
val get_device_tool : t -> Ocgtk_gdk.Gdk.Wrappers.Device_tool.t optionReturns the `GdkDeviceTool` currently driving input through this gesture.
This function must be called from the handler of one of the signal@Gtk.GestureStylus::down, signal@Gtk.GestureStylus::motion, signal@Gtk.GestureStylus::up or signal@Gtk.GestureStylus::proximity signals.
val get_backlog : t -> bool * Ocgtk_gdk.Gdk.Wrappers.Time_coord.t array * intReturns the accumulated backlog of tracking information.
By default, GTK will limit rate of input events. On stylus input where accuracy of strokes is paramount, this function returns the accumulated coordinate/timing state before the emission of the current Gtk.GestureStylus::motion signal.
This function may only be called within a signal@Gtk.GestureStylus::motion signal handler, the state given in this signal and obtainable through method@Gtk.GestureStylus.get_axis express the latest (most up-to-date) state in motion history.
The @backlog is provided in chronological order.
val get_axis : t -> Ocgtk_gdk.Gdk.axisuse -> bool * floatReturns the current value for the requested @axis.
This function must be called from the handler of one of the signal@Gtk.GestureStylus::down, signal@Gtk.GestureStylus::motion, signal@Gtk.GestureStylus::up or signal@Gtk.GestureStylus::proximity signals.
val on_down :
?after:bool ->
t ->
callback:(x:float -> y:float -> unit) ->
Gobject.Signal.handler_idval on_motion :
?after:bool ->
t ->
callback:(x:float -> y:float -> unit) ->
Gobject.Signal.handler_idval on_proximity :
?after:bool ->
t ->
callback:(x:float -> y:float -> unit) ->
Gobject.Signal.handler_idval on_up :
?after:bool ->
t ->
callback:(x:float -> y:float -> unit) ->
Gobject.Signal.handler_id