123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661(* This file was generated automatically by wayland-scanner-ocaml *)[@@@ocaml.warning"-27-34"]openstructmoduleImports=structincludeRiver_xkb_bindings_v1_protoincludeRiver_window_management_v1_protoendmoduleProxy=Wayland.ProxymoduleMsg=Wayland.MsgmoduleFixed=Wayland.FixedmoduleIface_reg=Wayland.Iface_regmoduleS=Wayland.Send(** Xkbcommon bindings global interface.
This global interface should only be advertised to the client if the
river_window_manager_v1 global is also advertised. *)moduleRiver_xkb_bindings_v1=structtype'vt=([`River_xkb_bindings_v1],'v,[`Client])Proxy.tmoduleError=River_xkb_bindings_v1_proto.River_xkb_bindings_v1.Error(** {2 Version 1} *)(** Define a new xkbcommon key binding.
Define a key binding for the given seat in terms of an xkbcommon keysym
and other configurable properties.
The new key binding is not enabled until initial configuration is
completed and the enable request is made during a manage sequence. *)letget_xkb_binding(_t:([<`V1|`V2|`V3]as'v)t)~(seat:([`River_seat_v1],_,[`Client])Proxy.t)(id:([`River_xkb_binding_v1],'v,[`Client])#Proxy.Handler.t)~keysym~modifiers=let__id=Proxy.spawn_tidinlet_msg=Proxy.alloc_t~op:1~ints:4~strings:[]~arrays:[]inMsg.add_int_msg(Proxy.idseat);Msg.add_int_msg(Proxy.id__id);Msg.add_int_msgkeysym;Msg.add_int_msg(Imports.River_seat_v1.Modifiers.to_int32modifiers);Proxy.send_t_msg;__id(** Destroy the river_xkb_bindings_v1 object.
This request indicates that the client will no longer use the
river_xkb_bindings_v1 object. *)letdestroy(_t:([<`V1|`V2|`V3]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, 3} *)(** Manage seat-specific state.
Create an object to manage seat-specific xkb bindings state.
It is a protocol error to make this request more than once for a given
river_seat_v1 object. *)letget_seat(_t:([<`V2|`V3]as'v)t)(id:([`River_xkb_bindings_seat_v1],'v,[`Client])#Proxy.Handler.t)~(seat:([`River_seat_v1],_,[`Client])Proxy.t)=let__id=Proxy.spawn_tidinlet_msg=Proxy.alloc_t~op:2~ints:2~strings:[]~arrays:[]inMsg.add_int_msg(Proxy.id__id);Msg.add_int_msg(Proxy.idseat);Proxy.send_t_msg;__id(**/**)class['v]_handlers_unsafe=object(_self:(_,'v,_)#Proxy.Handler.t)methoduser_data=S.No_datamethodmetadata=(moduleRiver_xkb_bindings_v1_proto.River_xkb_bindings_v1)methodmax_version=3lmethoddispatch(_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|`V3]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|`V3]as'v]_handlers_unsafe(**/**)methodmin_version=2lmethodbind_version:[`V2]=`V2end(** Handler for a proxy with version >= 3. *)class['v]v3=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V3]as'v]_handlers_unsafe(**/**)methodmin_version=3lmethodbind_version:[`V3]=`V3endend(** Configure a xkb key binding, receive trigger events.
This object allows the window manager to configure a xkbcommon key binding
and receive events when the key binding is triggered.
The new key binding is not enabled until the enable request is made during
a manage sequence.
Normally, all key events are sent to the surface with keyboard focus by
the compositor. Key events that trigger a key binding are not sent to the
surface with keyboard focus.
If multiple key bindings would be triggered by a single physical key event
on the compositor side, it is compositor policy which key binding(s) will
receive press/release events or if all of the matched key bindings receive
press/release events.
Key bindings might be matched by the same physical key event due to shared
keysym and modifiers. The layout override feature may also cause the same
physical key event to trigger two key bindings with different keysyms and
different layout overrides configured. *)moduleRiver_xkb_binding_v1=structtype'vt=([`River_xkb_binding_v1],'v,[`Client])Proxy.t(** {2 Version 1} *)(** Disable the key binding.
This request may be used to temporarily disable the key binding. It may
be later re-enabled with the enable request.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description. *)letdisable(_t:([<`V1|`V2|`V3]as'v)t)=let_msg=Proxy.alloc_t~op:3~ints:0~strings:[]~arrays:[]inProxy.send_t_msg(** Enable the key binding.
This request should be made after all initial configuration has been
completed and the window manager wishes the key binding to be able to be
triggered.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description. *)letenable(_t:([<`V1|`V2|`V3]as'v)t)=let_msg=Proxy.alloc_t~op:2~ints:0~strings:[]~arrays:[]inProxy.send_t_msg(** Override currently active xkb layout.
Specify an xkb layout that should be used to translate key events for
the purpose of triggering this key binding irrespective of the currently
active xkb layout.
The layout argument is a 0-indexed xkbcommon layout number for the
keyboard that generated the key event.
If this request is never made, the currently active xkb layout of the
keyboard that generated the key event will be used.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description. *)letset_layout_override(_t:([<`V1|`V2|`V3]as'v)t)~layout=let_msg=Proxy.alloc_t~op:1~ints:1~strings:[]~arrays:[]inMsg.add_int_msglayout;Proxy.send_t_msg(** Destroy the xkb binding object.
This request indicates that the client will no longer use the xkb key
binding object and that it may be safely destroyed. *)letdestroy(_t:([<`V1|`V2|`V3]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, 3} *)(**/**)classvirtual['v]_handlers_unsafe=object(_self:(_,'v,_)#Proxy.Handler.t)methoduser_data=S.No_datamethodmetadata=(moduleRiver_xkb_bindings_v1_proto.River_xkb_binding_v1)methodmax_version=3lmethodprivatevirtualon_pressed:[>]t->unitmethodprivatevirtualon_released:[>]t->unitmethodprivatevirtualon_stop_repeat:[>]t->unitmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|0->_self#on_pressed_proxy|1->_self#on_released_proxy|2->_self#on_stop_repeat_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|`V3]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_pressed:[>`V1|`V2|`V3]t->unit(** The key triggering the binding has been pressed.
This event indicates that the physical key triggering the binding has
been pressed.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
The compositor should wait for the manage sequence to complete before
processing further input events. This allows the window manager client
to, for example, modify key bindings and keyboard focus without racing
against future input events. The window manager should of course respond
as soon as possible as the capacity of the compositor to buffer incoming
input events is finite. *)methodprivatevirtualon_released:[>`V1|`V2|`V3]t->unit(** The key triggering the binding has been released.
This event indicates that the physical key triggering the binding has
been released.
Releasing the modifiers for the binding without releasing the "main"
physical key that produces the bound keysym does not trigger the release
event. This event is sent when the "main" key is released, even if the
modifiers have changed since the pressed event.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
The compositor should wait for the manage sequence to complete before
processing further input events. This allows the window manager client
to, for example, modify key bindings and keyboard focus without racing
against future input events. The window manager should of course respond
as soon as possible as the capacity of the compositor to buffer incoming
input events is finite. *)methodprivatevirtualon_stop_repeat:[>`V2|`V3]t->unit(** Repeating should be stopped.
This event indicates that repeating should be stopped for the binding if
the window manager has been repeating some action since the pressed
event.
This event is generally sent when some other (possibly unbound) key is
pressed after the pressed event is sent and before the released event
is sent for this binding.
This event will be followed by a manage_start event after all other new
state has been sent by the server. *)methodmin_version=1lend(** Handler for a proxy with version >= 2. *)classvirtual['v]v2=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V2|`V3]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_pressed:[>`V2|`V3]t->unit(** The key triggering the binding has been pressed.
This event indicates that the physical key triggering the binding has
been pressed.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
The compositor should wait for the manage sequence to complete before
processing further input events. This allows the window manager client
to, for example, modify key bindings and keyboard focus without racing
against future input events. The window manager should of course respond
as soon as possible as the capacity of the compositor to buffer incoming
input events is finite. *)methodprivatevirtualon_released:[>`V2|`V3]t->unit(** The key triggering the binding has been released.
This event indicates that the physical key triggering the binding has
been released.
Releasing the modifiers for the binding without releasing the "main"
physical key that produces the bound keysym does not trigger the release
event. This event is sent when the "main" key is released, even if the
modifiers have changed since the pressed event.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
The compositor should wait for the manage sequence to complete before
processing further input events. This allows the window manager client
to, for example, modify key bindings and keyboard focus without racing
against future input events. The window manager should of course respond
as soon as possible as the capacity of the compositor to buffer incoming
input events is finite. *)methodprivatevirtualon_stop_repeat:[>`V2|`V3]t->unit(** Repeating should be stopped.
This event indicates that repeating should be stopped for the binding if
the window manager has been repeating some action since the pressed
event.
This event is generally sent when some other (possibly unbound) key is
pressed after the pressed event is sent and before the released event
is sent for this binding.
This event will be followed by a manage_start event after all other new
state has been sent by the server. *)methodmin_version=2lend(** Handler for a proxy with version >= 3. *)classvirtual['v]v3=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V3]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_pressed:[>`V3]t->unit(** The key triggering the binding has been pressed.
This event indicates that the physical key triggering the binding has
been pressed.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
The compositor should wait for the manage sequence to complete before
processing further input events. This allows the window manager client
to, for example, modify key bindings and keyboard focus without racing
against future input events. The window manager should of course respond
as soon as possible as the capacity of the compositor to buffer incoming
input events is finite. *)methodprivatevirtualon_released:[>`V3]t->unit(** The key triggering the binding has been released.
This event indicates that the physical key triggering the binding has
been released.
Releasing the modifiers for the binding without releasing the "main"
physical key that produces the bound keysym does not trigger the release
event. This event is sent when the "main" key is released, even if the
modifiers have changed since the pressed event.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
The compositor should wait for the manage sequence to complete before
processing further input events. This allows the window manager client
to, for example, modify key bindings and keyboard focus without racing
against future input events. The window manager should of course respond
as soon as possible as the capacity of the compositor to buffer incoming
input events is finite. *)methodprivatevirtualon_stop_repeat:[>`V3]t->unit(** Repeating should be stopped.
This event indicates that repeating should be stopped for the binding if
the window manager has been repeating some action since the pressed
event.
This event is generally sent when some other (possibly unbound) key is
pressed after the pressed event is sent and before the released event
is sent for this binding.
This event will be followed by a manage_start event after all other new
state has been sent by the server. *)methodmin_version=3lendend(** Xkb bindings seat.
This object manages xkb bindings state associated with a specific seat. *)moduleRiver_xkb_bindings_seat_v1=structtype'vt=([`River_xkb_bindings_seat_v1],'v,[`Client])Proxy.t(** {2 Version 2} *)(** Cancel an ensure_next_key_eaten request.
This requests cancels the effect of the latest ensure_next_key_eaten
request if no key has been eaten due to the request yet. This request
has no effect if a key has already been eaten or no
ensure_next_key_eaten was made.
Rationale: the window manager may wish cancel an uncompleted "chorded"
keybinding after a timeout of a few seconds. Note that since this
timeout use-case requires the window manager to trigger a manage sequence
with the river_window_manager_v1.manage_dirty request it is possible that
the ate_unbound_key key event may be sent before the window manager has
a chance to make the cancel_ensure_next_key_eaten request.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description. *)letcancel_ensure_next_key_eaten(_t:([<`V2|`V3]as'v)t)=let_msg=Proxy.alloc_t~op:2~ints:0~strings:[]~arrays:[]inProxy.send_t_msg(** Ensure the next key press event is eaten.
Ensure that the next non-modifier key press and corresponding release
events for this seat are not sent to the currently focused surface.
If the next non-modifier key press triggers a binding, the
pressed/released events are sent to the river_xkb_binding_v1 object as
usual.
If the next non-modifier key press does not trigger a binding, the
ate_unbound_key event is sent instead.
Rationale: the window manager may wish to implement "chorded"
keybindings where triggering a binding activates a "submap" with a
different set of keybindings. Without a way to eat the next key
press event, there is no good way for the window manager to know that it
should error out and exit the submap when a key not bound in the submap
is pressed.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description. *)letensure_next_key_eaten(_t:([<`V2|`V3]as'v)t)=let_msg=Proxy.alloc_t~op:1~ints:0~strings:[]~arrays:[]inProxy.send_t_msg(** Destroy the object.
This request indicates that the client will no longer use the object and
that it may be safely destroyed. *)letdestroy(_t:([<`V2|`V3]as'v)t)=let_msg=Proxy.alloc_t~op:0~ints:0~strings:[]~arrays:[]inProxy.send_t_msg;Proxy.shutdown_send_t(** {2 Version 3} *)(** Watch for change in active modifiers.
Request that the server send the modifiers_update event whenever a state
change occurs for at least one of the modifiers specified by the
modifiers argument.
The window manager should make this request with the modifiers argument
set to 0 when it no longer wishes to take action based on a change in
modifiers.
This request modifies window management state and may only be made as
part of a manage sequence, see the river_window_manager_v1 description. *)letmodifiers_watch(_t:([<`V3]as'v)t)~modifiers=let_msg=Proxy.alloc_t~op:3~ints:1~strings:[]~arrays:[]inMsg.add_int_msg(Imports.River_seat_v1.Modifiers.to_int32modifiers);Proxy.send_t_msg(**/**)classvirtual['v]_handlers_unsafe=object(_self:(_,'v,_)#Proxy.Handler.t)methoduser_data=S.No_datamethodmetadata=(moduleRiver_xkb_bindings_v1_proto.River_xkb_bindings_seat_v1)methodmax_version=3lmethodprivatevirtualon_ate_unbound_key:[>]t->unitmethodprivatevirtualon_modifiers_update:[>]t->old:Imports.River_seat_v1.Modifiers.t->new_:Imports.River_seat_v1.Modifiers.t->unitmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|0->_self#on_ate_unbound_key_proxy|1->letold=Msg.get_int_msg|>Imports.River_seat_v1.Modifiers.of_int32inletnew_=Msg.get_int_msg|>Imports.River_seat_v1.Modifiers.of_int32in_self#on_modifiers_update_proxy~old~new_|_->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|`V3]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_ate_unbound_key:[>`V2|`V3]t->unit(** An unbound key press event was eaten.
An unbound key press event was eaten due to the ensure_next_key_eaten
request.
This event will be followed by a manage_start event after all other new
state has been sent by the server. *)methodprivatevirtualon_modifiers_update:[>`V3]t->old:Imports.River_seat_v1.Modifiers.t->new_:Imports.River_seat_v1.Modifiers.t->unit(** Active modifiers for the seat changed.
The set of currently active modifiers for the seat changed. This event
is only sent when there is a change in state for modifiers marked as
watched using the modifiers_watch request.
The old and new arguments convey the set of modifiers active before and
after the change. All modifiers are included in the old and new
arguments, including modifiers that are not watched.
Since this event is only sent when there is a change in state for
watched modifiers, it follows that at least one watched modifier is
active in old but inactive in new or vice-versa.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
The compositor should wait for the manage sequence to complete before
processing further input events. This allows the window manager client
to, for example, modify key bindings and keyboard focus without racing
against future input events. The window manager should of course respond
as soon as possible as the capacity of the compositor to buffer incoming
input events is finite. *)methodmin_version=1lend(** Handler for a proxy with version >= 2. *)classvirtual['v]v2=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V2|`V3]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_ate_unbound_key:[>`V2|`V3]t->unit(** An unbound key press event was eaten.
An unbound key press event was eaten due to the ensure_next_key_eaten
request.
This event will be followed by a manage_start event after all other new
state has been sent by the server. *)methodprivatevirtualon_modifiers_update:[>`V3]t->old:Imports.River_seat_v1.Modifiers.t->new_:Imports.River_seat_v1.Modifiers.t->unit(** Active modifiers for the seat changed.
The set of currently active modifiers for the seat changed. This event
is only sent when there is a change in state for modifiers marked as
watched using the modifiers_watch request.
The old and new arguments convey the set of modifiers active before and
after the change. All modifiers are included in the old and new
arguments, including modifiers that are not watched.
Since this event is only sent when there is a change in state for
watched modifiers, it follows that at least one watched modifier is
active in old but inactive in new or vice-versa.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
The compositor should wait for the manage sequence to complete before
processing further input events. This allows the window manager client
to, for example, modify key bindings and keyboard focus without racing
against future input events. The window manager should of course respond
as soon as possible as the capacity of the compositor to buffer incoming
input events is finite. *)methodmin_version=2lend(** Handler for a proxy with version >= 3. *)classvirtual['v]v3=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V3]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_ate_unbound_key:[>`V3]t->unit(** An unbound key press event was eaten.
An unbound key press event was eaten due to the ensure_next_key_eaten
request.
This event will be followed by a manage_start event after all other new
state has been sent by the server. *)methodprivatevirtualon_modifiers_update:[>`V3]t->old:Imports.River_seat_v1.Modifiers.t->new_:Imports.River_seat_v1.Modifiers.t->unit(** Active modifiers for the seat changed.
The set of currently active modifiers for the seat changed. This event
is only sent when there is a change in state for modifiers marked as
watched using the modifiers_watch request.
The old and new arguments convey the set of modifiers active before and
after the change. All modifiers are included in the old and new
arguments, including modifiers that are not watched.
Since this event is only sent when there is a change in state for
watched modifiers, it follows that at least one watched modifier is
active in old but inactive in new or vice-versa.
This event will be followed by a manage_start event after all other new
state has been sent by the server.
The compositor should wait for the manage sequence to complete before
processing further input events. This allows the window manager client
to, for example, modify key bindings and keyboard focus without racing
against future input events. The window manager should of course respond
as soon as possible as the capacity of the compositor to buffer incoming
input events is finite. *)methodmin_version=3lendend