Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file cursor_shape_v1_client.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188(* This file was generated automatically by wayland-scanner-ocaml *)[@@@ocaml.warning"-27-34"]openstructmoduleImports=structincludeCursor_shape_v1_protoincludeWayland.Wayland_protoincludeTablet_v2_protoendmoduleProxy=Wayland.ProxymoduleMsg=Wayland.MsgmoduleFixed=Wayland.FixedmoduleIface_reg=Wayland.Iface_regmoduleS=Wayland.Send(** Cursor shape manager.
This global offers an alternative, optional way to set cursor images. This
new way uses enumerated cursors instead of a wl_surface like
wl_pointer.set_cursor does.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension. *)moduleWp_cursor_shape_manager_v1=structtype'vt=([`Wp_cursor_shape_manager_v1],'v,[`Client])Proxy.t(** {2 Version 1, 2} *)(** Manage the cursor shape of a tablet tool device.
Obtain a wp_cursor_shape_device_v1 for a zwp_tablet_tool_v2 object.
When the zwp_tablet_tool_v2 is removed, the wp_cursor_shape_device_v1
object becomes inert. *)letget_tablet_tool_v2(_t:([<`V1|`V2]as'v)t)(cursor_shape_device:([`Wp_cursor_shape_device_v1],'v,[`Client])#Proxy.Handler.t)~(tablet_tool:([`Zwp_tablet_tool_v2],_,[`Client])Proxy.t)=let__cursor_shape_device=Proxy.spawn_tcursor_shape_deviceinlet_msg=Proxy.alloc_t~op:2~ints:2~strings:[]~arrays:[]inMsg.add_int_msg(Proxy.id__cursor_shape_device);Msg.add_int_msg(Proxy.idtablet_tool);Proxy.send_t_msg;__cursor_shape_device(** Manage the cursor shape of a pointer device.
Obtain a wp_cursor_shape_device_v1 for a wl_pointer object.
When the pointer capability is removed from the wl_seat, the
wp_cursor_shape_device_v1 object becomes inert. *)letget_pointer(_t:([<`V1|`V2]as'v)t)(cursor_shape_device:([`Wp_cursor_shape_device_v1],'v,[`Client])#Proxy.Handler.t)~(pointer:([`Wl_pointer],_,[`Client])Proxy.t)=let__cursor_shape_device=Proxy.spawn_tcursor_shape_deviceinlet_msg=Proxy.alloc_t~op:1~ints:2~strings:[]~arrays:[]inMsg.add_int_msg(Proxy.id__cursor_shape_device);Msg.add_int_msg(Proxy.idpointer);Proxy.send_t_msg;__cursor_shape_device(** Destroy the manager.
Destroy the cursor shape manager. *)letdestroy(_t:([<`V1|`V2]as'v)t)=let_msg=Proxy.alloc_t~op:0~ints:0~strings:[]~arrays:[]inProxy.send_t_msg;Proxy.shutdown_send_t(**/**)class['v]_handlers_unsafe=object(_self:(_,'v,_)#Proxy.Handler.t)methoduser_data=S.No_datamethodmetadata=(moduleCursor_shape_v1_proto.Wp_cursor_shape_manager_v1)methodmax_version=2lmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|_->assertfalseend(**/**)(** {2 Handlers}
Note: Servers will always want to use [v1].
*)(** Handler for a proxy with version >= 1. *)class['v]v1=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V1|`V2]as'v]_handlers_unsafe(**/**)methodmin_version=1lmethodbind_version:[`V1]=`V1end(** Handler for a proxy with version >= 2. *)class['v]v2=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V2]as'v]_handlers_unsafe(**/**)methodmin_version=2lmethodbind_version:[`V2]=`V2endend(** Cursor shape for a device.
This interface allows clients to set the cursor shape. *)moduleWp_cursor_shape_device_v1=structtype'vt=([`Wp_cursor_shape_device_v1],'v,[`Client])Proxy.tmoduleShape=Cursor_shape_v1_proto.Wp_cursor_shape_device_v1.ShapemoduleError=Cursor_shape_v1_proto.Wp_cursor_shape_device_v1.Error(** {2 Version 1, 2} *)(** Set device cursor to the shape.
Sets the device cursor to the specified shape. The compositor will
change the cursor image based on the specified shape.
The cursor actually changes only if the input device focus is one of
the requesting client's surfaces. If any, the previous cursor image
(surface or shape) is replaced.
The "shape" argument must be a valid enum entry, otherwise the
invalid_shape protocol error is raised.
This is similar to the wl_pointer.set_cursor and
zwp_tablet_tool_v2.set_cursor requests, but this request accepts a
shape instead of contents in the form of a surface. Clients can mix
set_cursor and set_shape requests.
The serial parameter must match the latest wl_pointer.enter or
zwp_tablet_tool_v2.proximity_in serial number sent to the client.
Otherwise the request will be ignored. *)letset_shape(_t:([<`V1|`V2]as'v)t)~serial~shape=let_msg=Proxy.alloc_t~op:1~ints:2~strings:[]~arrays:[]inMsg.add_int_msgserial;Msg.add_int_msg(Imports.Wp_cursor_shape_device_v1.Shape.to_int32shape);Proxy.send_t_msg(** Destroy the cursor shape device.
Destroy the cursor shape device.
The device cursor shape remains unchanged. *)letdestroy(_t:([<`V1|`V2]as'v)t)=let_msg=Proxy.alloc_t~op:0~ints:0~strings:[]~arrays:[]inProxy.send_t_msg;Proxy.shutdown_send_t(**/**)class['v]_handlers_unsafe=object(_self:(_,'v,_)#Proxy.Handler.t)methoduser_data=S.No_datamethodmetadata=(moduleCursor_shape_v1_proto.Wp_cursor_shape_device_v1)methodmax_version=2lmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|_->assertfalseend(**/**)(** {2 Handlers}
Note: Servers will always want to use [v1].
*)(** Handler for a proxy with version >= 1. *)class['v]v1=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V1|`V2]as'v]_handlers_unsafe(**/**)methodmin_version=1lend(** Handler for a proxy with version >= 2. *)class['v]v2=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V2]as'v]_handlers_unsafe(**/**)methodmin_version=2lendend