123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557(* This file was generated automatically by wayland-scanner-ocaml *)[@@@ocaml.warning"-27-34"]openstructmoduleImports=structincludeRiver_xkb_config_v1_protoincludeRiver_input_management_v1_protoendmoduleProxy=Wayland.ProxymoduleMsg=Wayland.MsgmoduleFixed=Wayland.FixedmoduleIface_reg=Wayland.Iface_regmoduleS=Wayland.Send(** Xkb config global interface.
Global interface for configuring xkb devices.
This global should only be advertised if river_input_manager_v1 is
advertised as well. *)moduleRiver_xkb_config_v1=structtype'vt=([`River_xkb_config_v1],'v,[`Client])Proxy.tmoduleError=River_xkb_config_v1_proto.River_xkb_config_v1.ErrormoduleKeymap_format=River_xkb_config_v1_proto.River_xkb_config_v1.Keymap_format(** {2 Version 1, 2} *)(** Create a keymap object.
The server must be able to mmap the fd with MAP_PRIVATE.
The server will fstat the fd to obtain the size of the keymap.
The client must not modify the contents of the fd after making this request.
The client should seal the fd with fcntl. *)letcreate_keymap(_t:([<`V1|`V2]as'v)t)(id:([`River_xkb_keymap_v1],'v,[`Client])#Proxy.Handler.t)~fd~format=let__id=Proxy.spawn_tidinlet_msg=Proxy.alloc_t~op:2~ints:3~strings:[]~arrays:[]inMsg.add_int_msg(Proxy.id__id);Msg.add_fd_msgfd;Msg.add_int_msg(Imports.River_xkb_config_v1.Keymap_format.to_int32format);Proxy.send_t_msg;__id(** Destroy the river_xkb_config_v1 object.
This request should be called after the finished event has been received
to complete destruction of the object.
It is a protocol error to make this request before the finished event
has been received.
If a client wishes to destroy this object it should send a
river_xkb_config_v1.stop request and wait for a
river_xkb_config_v1.finished event. Once the finished event is received
it is safe to destroy this object and any other objects created through
this interface. *)letdestroy(_t:([<`V1|`V2]as'v)t)=let_msg=Proxy.alloc_t~op:1~ints:0~strings:[]~arrays:[]inProxy.send_t_msg;Proxy.shutdown_send_t(** Stop sending events.
This request indicates that the client no longer wishes to receive
events on this object.
The Wayland protocol is asynchronous, which means the server may send
further events until the stop request is processed. The client must wait
for a river_xkb_config_v1.finished event before destroying this object. *)letstop(_t:([<`V1|`V2]as'v)t)=let_msg=Proxy.alloc_t~op:0~ints:0~strings:[]~arrays:[]inProxy.send_t_msg(**/**)classvirtual['v]_handlers_unsafe=object(_self:(_,'v,_)#Proxy.Handler.t)methoduser_data=S.No_datamethodmetadata=(moduleRiver_xkb_config_v1_proto.River_xkb_config_v1)methodmax_version=2lmethodprivatevirtualon_finished:[>]t->unitmethodprivatevirtualon_xkb_keyboard:[>]t->([`River_xkb_keyboard_v1],'v,[`Client])Proxy.t->unitmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|0->_self#on_finished_proxy|1->letid:([`River_xkb_keyboard_v1],_,_)Proxy.t=Msg.get_int_msg|>Proxy.Handler.accept_new_proxy(moduleImports.River_xkb_keyboard_v1)in_self#on_xkb_keyboard_proxyid|_->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|`V2]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_finished:[>`V1|`V2]t->unit(** The server has finished with the object.
This event indicates that the server will send no further events on this
object. The client should destroy the object. See
river_xkb_config_v1.destroy for more information. *)methodprivatevirtualon_xkb_keyboard:[>`V1|`V2]t->([`River_xkb_keyboard_v1],'v,[`Client])Proxy.t->unit(** New xkb keyboard.
A new xkbcommon keyboard has been created. Not every
river_input_device_v1 is necessarily an xkbcommon keyboard as well. *)methodmin_version=1lmethodbind_version:[`V1]=`V1end(** Handler for a proxy with version >= 2. *)classvirtual['v]v2=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V2]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_finished:[>`V2]t->unit(** The server has finished with the object.
This event indicates that the server will send no further events on this
object. The client should destroy the object. See
river_xkb_config_v1.destroy for more information. *)methodprivatevirtualon_xkb_keyboard:[>`V2]t->([`River_xkb_keyboard_v1],'v,[`Client])Proxy.t->unit(** New xkb keyboard.
A new xkbcommon keyboard has been created. Not every
river_input_device_v1 is necessarily an xkbcommon keyboard as well. *)methodmin_version=2lmethodbind_version:[`V2]=`V2endend(** Xkbcommon keymap.
This object is the result of attempting to create an xkbcommon keymap. *)moduleRiver_xkb_keymap_v1=structtype'vt=([`River_xkb_keymap_v1],'v,[`Client])Proxy.t(** {2 Version 1, 2} *)(** Destroy the keymap object.
This request indicates that the client will no longer use the keymap
object and that it may be safely destroyed. *)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(**/**)classvirtual['v]_handlers_unsafe=object(_self:(_,'v,_)#Proxy.Handler.t)methoduser_data=S.No_datamethodmetadata=(moduleRiver_xkb_config_v1_proto.River_xkb_keymap_v1)methodmax_version=2lmethodprivatevirtualon_success:[>]t->unitmethodprivatevirtualon_failure:[>]t->error_msg:string->unitmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|0->_self#on_success_proxy|1->leterror_msg=Msg.get_string_msgin_self#on_failure_proxy~error_msg|_->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|`V2]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_success:[>`V1|`V2]t->unit(** Keymap creation succeeded.
The keymap object was successfully created and may be used with the
river_xkb_keyboard_v1.set_keymap request. *)methodprivatevirtualon_failure:[>`V1|`V2]t->error_msg:string->unit(** Keymap creation failed.
The compositor failed to create a keymap from the given parameters.
It is a protocol error to use this keymap object with
river_xkb_keyboard_v1.set_keymap. *)methodmin_version=1lend(** Handler for a proxy with version >= 2. *)classvirtual['v]v2=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V2]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_success:[>`V2]t->unit(** Keymap creation succeeded.
The keymap object was successfully created and may be used with the
river_xkb_keyboard_v1.set_keymap request. *)methodprivatevirtualon_failure:[>`V2]t->error_msg:string->unit(** Keymap creation failed.
The compositor failed to create a keymap from the given parameters.
It is a protocol error to use this keymap object with
river_xkb_keyboard_v1.set_keymap. *)methodmin_version=2lendend(** Xkbcommon keyboard device.
This object represent a physical keyboard which has its configuration and
state managed by xkbcommon. *)moduleRiver_xkb_keyboard_v1=structtype'vt=([`River_xkb_keyboard_v1],'v,[`Client])Proxy.tmoduleError=River_xkb_config_v1_proto.River_xkb_keyboard_v1.Error(** {2 Version 1} *)(** Disable numlock.
Disable numlock for the keyboard. *)letnumlock_disable(_t:([<`V1|`V2]as'v)t)=let_msg=Proxy.alloc_t~op:7~ints:0~strings:[]~arrays:[]inProxy.send_t_msg(** Enable numlock.
Enable numlock for the keyboard. *)letnumlock_enable(_t:([<`V1|`V2]as'v)t)=let_msg=Proxy.alloc_t~op:6~ints:0~strings:[]~arrays:[]inProxy.send_t_msg(** Disable capslock.
Disable capslock for the keyboard. *)letcapslock_disable(_t:([<`V1|`V2]as'v)t)=let_msg=Proxy.alloc_t~op:5~ints:0~strings:[]~arrays:[]inProxy.send_t_msg(** Enable capslock.
Enable capslock for the keyboard. *)letcapslock_enable(_t:([<`V1|`V2]as'v)t)=let_msg=Proxy.alloc_t~op:4~ints:0~strings:[]~arrays:[]inProxy.send_t_msg(** Set the active layout by name.
Set the active layout for the keyboard's keymap. Has no effect if there
is no layout with the give name for the keyboard's keymap. *)letset_layout_by_name(_t:([<`V1|`V2]as'v)t)~name=let_msg=Proxy.alloc_t~op:3~ints:1~strings:[(Somename)]~arrays:[]inMsg.add_string_msgname;Proxy.send_t_msg(** Set the active layout by index.
Set the active layout for the keyboard's keymap. Has no effect if the
layout index is out of bounds for the current keymap. *)letset_layout_by_index(_t:([<`V1|`V2]as'v)t)~index=let_msg=Proxy.alloc_t~op:2~ints:1~strings:[]~arrays:[]inMsg.add_int_msgindex;Proxy.send_t_msg(** Set the keymap.
Set the keymap for the keyboard.
Setting a keymap will reset all layout/modifier state.
It is a protocol error to pass a keymap object for which the
river_xkb_keymap_v1.success event was not received. *)letset_keymap(_t:([<`V1|`V2]as'v)t)~(keymap:([`River_xkb_keymap_v1],_,[`Client])Proxy.t)=let_msg=Proxy.alloc_t~op:1~ints:1~strings:[]~arrays:[]inMsg.add_int_msg(Proxy.idkeymap);Proxy.send_t_msg(** Destroy the xkb keyboard object.
This request indicates that the client will no longer use the keyboard
object and that it may be safely destroyed. *)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(** {2 Version 2} *)(**/**)classvirtual['v]_handlers_unsafe=object(_self:(_,'v,_)#Proxy.Handler.t)methoduser_data=S.No_datamethodmetadata=(moduleRiver_xkb_config_v1_proto.River_xkb_keyboard_v1)methodmax_version=2lmethodprivatevirtualon_removed:[>]t->unitmethodprivatevirtualon_input_device:[>]t->device:([`River_input_device_v1],[>Imports.River_input_device_v1.versions],[`Client])Proxy.t->unitmethodprivatevirtualon_layout:[>]t->index:int32->name:stringoption->unitmethodprivatevirtualon_capslock_enabled:[>]t->unitmethodprivatevirtualon_capslock_disabled:[>]t->unitmethodprivatevirtualon_numlock_enabled:[>]t->unitmethodprivatevirtualon_numlock_disabled:[>]t->unitmethodprivatevirtualon_done:[>]t->unitmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|0->_self#on_removed_proxy|1->letdevice:([`River_input_device_v1],_,_)Proxy.t=letProxy.Proxyp=Msg.get_int_msg|>Proxy.lookup_other_proxyinmatchProxy.typwith|Imports.River_input_device_v1.T->p|_->Proxy.wrong_type~parent:_proxy~expected:"river_input_device_v1"pin_self#on_input_device_proxy~device|2->letindex=Msg.get_int_msginletname=Msg.get_string_opt_msgin_self#on_layout_proxy~index~name|3->_self#on_capslock_enabled_proxy|4->_self#on_capslock_disabled_proxy|5->_self#on_numlock_enabled_proxy|6->_self#on_numlock_disabled_proxy|7->_self#on_done_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|`V2]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_removed:[>`V1|`V2]t->unit(** The xkb keyboard is removed.
This event indicates that the xkb keyboard has been removed.
The server will send no further events on this object and ignore any
request (other than river_xkb_keyboard_v1.destroy) made after this event
is sent. The client should destroy this object with the
river_xkb_keyboard_v1.destroy request to free up resources. *)methodprivatevirtualon_input_device:[>`V1|`V2]t->device:([`River_input_device_v1],[>Imports.River_input_device_v1.versions],[`Client])Proxy.t->unit(** Corresponding river input device.
The river_input_device_v1 corresponding to this xkb keyboard. This event
will always be the first event sent on the river_xkb_keyboard_v1 object,
and it will be sent exactly once. *)methodprivatevirtualon_layout:[>`V1|`V2]t->index:int32->name:stringoption->unit(** Currently active layout.
The currently active layout index and name. The name arg may be null if
the active layout does not have a name.
This event is sent once when the river_xkb_keyboard_v1 is created and
again whenever the layout changes. *)methodprivatevirtualon_capslock_enabled:[>`V1|`V2]t->unit(** Capslock is currently enabled.
Capslock is currently enabled for the keyboard.
This event is sent once when the river_xkb_keyboard_v1 is created and
again whenever the capslock state changes. *)methodprivatevirtualon_capslock_disabled:[>`V1|`V2]t->unit(** Capslock is currently disabled.
Capslock is currently disabled for the keyboard.
This event is sent once when the river_xkb_keyboard_v1 is created and
again whenever the capslock state changes. *)methodprivatevirtualon_numlock_enabled:[>`V1|`V2]t->unit(** Numlock is currently enabled.
Numlock is currently enabled for the keyboard.
This event is sent once when the river_xkb_keyboard_v1 is created and
again whenever the numlock state changes. *)methodprivatevirtualon_numlock_disabled:[>`V1|`V2]t->unit(** Numlock is currently disabled.
Numlock is currently disabled for the keyboard.
This event is sent once when the river_xkb_keyboard_v1 is created and
again whenever the numlock state changes. *)methodprivatevirtualon_done:[>`V2]t->unit(** All information has been sent.
This event is sent after all information about the keyboard has been
sent.
This allows changes to one or more river_xkb_keyboard_v1 properties to
be seen as atomic, even if they happen via multiple events. *)methodmin_version=1lend(** Handler for a proxy with version >= 2. *)classvirtual['v]v2=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V2]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_removed:[>`V2]t->unit(** The xkb keyboard is removed.
This event indicates that the xkb keyboard has been removed.
The server will send no further events on this object and ignore any
request (other than river_xkb_keyboard_v1.destroy) made after this event
is sent. The client should destroy this object with the
river_xkb_keyboard_v1.destroy request to free up resources. *)methodprivatevirtualon_input_device:[>`V2]t->device:([`River_input_device_v1],[>Imports.River_input_device_v1.versions],[`Client])Proxy.t->unit(** Corresponding river input device.
The river_input_device_v1 corresponding to this xkb keyboard. This event
will always be the first event sent on the river_xkb_keyboard_v1 object,
and it will be sent exactly once. *)methodprivatevirtualon_layout:[>`V2]t->index:int32->name:stringoption->unit(** Currently active layout.
The currently active layout index and name. The name arg may be null if
the active layout does not have a name.
This event is sent once when the river_xkb_keyboard_v1 is created and
again whenever the layout changes. *)methodprivatevirtualon_capslock_enabled:[>`V2]t->unit(** Capslock is currently enabled.
Capslock is currently enabled for the keyboard.
This event is sent once when the river_xkb_keyboard_v1 is created and
again whenever the capslock state changes. *)methodprivatevirtualon_capslock_disabled:[>`V2]t->unit(** Capslock is currently disabled.
Capslock is currently disabled for the keyboard.
This event is sent once when the river_xkb_keyboard_v1 is created and
again whenever the capslock state changes. *)methodprivatevirtualon_numlock_enabled:[>`V2]t->unit(** Numlock is currently enabled.
Numlock is currently enabled for the keyboard.
This event is sent once when the river_xkb_keyboard_v1 is created and
again whenever the numlock state changes. *)methodprivatevirtualon_numlock_disabled:[>`V2]t->unit(** Numlock is currently disabled.
Numlock is currently disabled for the keyboard.
This event is sent once when the river_xkb_keyboard_v1 is created and
again whenever the numlock state changes. *)methodprivatevirtualon_done:[>`V2]t->unit(** All information has been sent.
This event is sent after all information about the keyboard has been
sent.
This allows changes to one or more river_xkb_keyboard_v1 properties to
be seen as atomic, even if they happen via multiple events. *)methodmin_version=2lendend