123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180(* This file was generated automatically by wayland-scanner-ocaml *)[@@@ocaml.warning"-27"]openstructmoduleImports=structincludeRelative_pointer_unstable_v1_protoincludeWayland.Wayland_protoendmoduleProxy=Wayland.ProxymoduleMsg=Wayland.MsgmoduleFixed=Wayland.FixedmoduleIface_reg=Wayland.Iface_regmoduleS=Wayland.Send(** Get relative pointer objects.
A global interface used for getting the relative pointer object for a
given pointer. *)moduleZwp_relative_pointer_manager_v1=structtype'vt=([`Zwp_relative_pointer_manager_v1],'v,[`Server])Proxy.t(** {2 Version 1} *)(**/**)classvirtual['v]_handlers_unsafe=object(_self:(_,'v,_)#Proxy.Handler.t)methoduser_data=S.No_datamethodmetadata=(moduleRelative_pointer_unstable_v1_proto.Zwp_relative_pointer_manager_v1)methodmax_version=1lmethodprivatevirtualon_destroy:[>]t->unitmethodprivatevirtualon_get_relative_pointer:[>]t->([`Zwp_relative_pointer_v1],'v,[`Server])Proxy.t->pointer:([`Wl_pointer],[>Imports.Wl_pointer.versions],[`Server])Proxy.t->unitmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|0->Proxy.shutdown_recv_proxy;_self#on_destroy_proxy|1->letid:([`Zwp_relative_pointer_v1],_,_)Proxy.t=Msg.get_int_msg|>Proxy.Handler.accept_new_proxy(moduleImports.Zwp_relative_pointer_v1)inletpointer:([`Wl_pointer],_,_)Proxy.t=letProxy.Proxyp=Msg.get_int_msg|>Proxy.lookup_other_proxyinmatchProxy.typwith|Imports.Wl_pointer.T->p|_->Proxy.wrong_type~parent:_proxy~expected:"wl_pointer"pin_self#on_get_relative_pointer_proxyid~pointer|_->assertfalseend(**/**)(** {2 Handlers}
Note: Servers will always want to use [v1].
*)(** Handler for a proxy with version >= 1. *)classvirtual['v]v1=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V1]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_destroy:[>`V1]t->unit(** Destroy the relative pointer manager object.
Used by the client to notify the server that it will no longer use this
relative pointer manager object. *)methodprivatevirtualon_get_relative_pointer:[>`V1]t->([`Zwp_relative_pointer_v1],'v,[`Server])Proxy.t->pointer:([`Wl_pointer],[>Imports.Wl_pointer.versions],[`Server])Proxy.t->unit(** Get a relative pointer object.
Create a relative pointer interface given a wl_pointer object. See the
wp_relative_pointer interface for more details. *)methodmin_version=1lmethodbind_version:[`V1]=`V1endend(** Relative pointer object.
A wp_relative_pointer object is an extension to the wl_pointer interface
used for emitting relative pointer events. It shares the same focus as
wl_pointer objects of the same seat and will only emit events when it has
focus. *)moduleZwp_relative_pointer_v1=structtype'vt=([`Zwp_relative_pointer_v1],'v,[`Server])Proxy.t(** {2 Version 1} *)(** Relative pointer motion.
Relative x/y pointer motion from the pointer of the seat associated with
this object.
A relative motion is in the same dimension as regular wl_pointer motion
events, except they do not represent an absolute position. For example,
moving a pointer from (x, y) to (x', y') would have the equivalent
relative motion (x' - x, y' - y). If a pointer motion caused the
absolute pointer position to be clipped by for example the edge of the
monitor, the relative motion is unaffected by the clipping and will
represent the unclipped motion.
This event also contains non-accelerated motion deltas. The
non-accelerated delta is, when applicable, the regular pointer motion
delta as it was before having applied motion acceleration and other
transformations such as normalization.
Note that the non-accelerated delta does not represent 'raw' events as
they were read from some device. Pointer motion acceleration is device-
and configuration-specific and non-accelerated deltas and accelerated
deltas may have the same value on some devices.
Relative motions are not coupled to wl_pointer.motion events, and can be
sent in combination with such events, but also independently. There may
also be scenarios where wl_pointer.motion is sent, but there is no
relative motion. The order of an absolute and relative motion event
originating from the same physical motion is not guaranteed.
If the client needs button events or focus state, it can receive them
from a wl_pointer object of the same seat that the wp_relative_pointer
object is associated with. *)letrelative_motion(_t:([<`V1]as'v)t)~utime_hi~utime_lo~dx~dy~dx_unaccel~dy_unaccel=let_msg=Proxy.alloc_t~op:0~ints:6~strings:[]~arrays:[]inMsg.add_int_msgutime_hi;Msg.add_int_msgutime_lo;Msg.add_fixed_msgdx;Msg.add_fixed_msgdy;Msg.add_fixed_msgdx_unaccel;Msg.add_fixed_msgdy_unaccel;Proxy.send_t_msg(**/**)classvirtual['v]_handlers_unsafe=object(_self:(_,'v,_)#Proxy.Handler.t)methoduser_data=S.No_datamethodmetadata=(moduleRelative_pointer_unstable_v1_proto.Zwp_relative_pointer_v1)methodmax_version=1lmethodprivatevirtualon_destroy:[>]t->unitmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|0->Proxy.shutdown_recv_proxy;_self#on_destroy_proxy|_->assertfalseend(**/**)(** {2 Handlers}
Note: Servers will always want to use [v1].
*)(** Handler for a proxy with version >= 1. *)classvirtual['v]v1=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V1]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_destroy:[>`V1]t->unit(** Release the relative pointer object.
*)methodmin_version=1lendend