123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605(* This file was generated automatically by wayland-scanner-ocaml *)[@@@ocaml.warning"-27-34"]openstructmoduleImports=structincludeWlr_layer_shell_unstable_v1_protoincludeWayland.Wayland_protoincludeXdg_shell_protoendmoduleProxy=Wayland.ProxymoduleMsg=Wayland.MsgmoduleFixed=Wayland.FixedmoduleIface_reg=Wayland.Iface_regmoduleS=Wayland.Send(** Create surfaces that are layers of the desktop.
Clients can use this interface to assign the surface_layer role to
wl_surfaces. Such surfaces are assigned to a "layer" of the output and
rendered with a defined z-depth respective to each other. They may also be
anchored to the edges and corners of a screen and specify input handling
semantics. This interface should be suitable for the implementation of
many desktop shell components, and a broad number of other applications
that interact with the desktop. *)moduleZwlr_layer_shell_v1=structtype'vt=([`Zwlr_layer_shell_v1],'v,[`Client])Proxy.tmoduleError=Wlr_layer_shell_unstable_v1_proto.Zwlr_layer_shell_v1.ErrormoduleLayer=Wlr_layer_shell_unstable_v1_proto.Zwlr_layer_shell_v1.Layer(** {2 Version 1, 2} *)(** Create a layer_surface from a surface.
Create a layer surface for an existing surface. This assigns the role of
layer_surface, or raises a protocol error if another role is already
assigned.
Creating a layer surface from a wl_surface which has a buffer attached
or committed is a client error, and any attempts by a client to attach
or manipulate a buffer prior to the first layer_surface.configure call
must also be treated as errors.
After creating a layer_surface object and setting it up, the client
must perform an initial commit without any buffer attached.
The compositor will reply with a layer_surface.configure event.
The client must acknowledge it and is then allowed to attach a buffer
to map the surface.
You may pass NULL for output to allow the compositor to decide which
output to use. Generally this will be the one that the user most
recently interacted with.
Clients can specify a namespace that defines the purpose of the layer
surface. *)letget_layer_surface(_t:([<`V1|`V2|`V3|`V4|`V5]as'v)t)(id:([`Zwlr_layer_surface_v1],'v,[`Client])#Proxy.Handler.t)~(surface:([`Wl_surface],_,[`Client])Proxy.t)~(output:([`Wl_output],_,[`Client])Proxy.toption)~layer~namespace=let__id=Proxy.spawn_tidinlet_msg=Proxy.alloc_t~op:0~ints:5~strings:[(Somenamespace)]~arrays:[]inMsg.add_int_msg(Proxy.id__id);Msg.add_int_msg(Proxy.idsurface);Msg.add_int_msg(Proxy.id_optoutput);Msg.add_int_msg(Imports.Zwlr_layer_shell_v1.Layer.to_int32layer);Msg.add_string_msgnamespace;Proxy.send_t_msg;__id(** {2 Version 3, 4, 5} *)(** Destroy the layer_shell object.
This request indicates that the client will not use the layer_shell
object any more. Objects that have been created through this instance
are not affected. *)letdestroy(_t:([<`V3|`V4|`V5]as'v)t)=let_msg=Proxy.alloc_t~op:1~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=(moduleWlr_layer_shell_unstable_v1_proto.Zwlr_layer_shell_v1)methodmax_version=5lmethoddispatch(_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|`V4|`V5]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|`V4|`V5]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|`V4|`V5]as'v]_handlers_unsafe(**/**)methodmin_version=3lmethodbind_version:[`V3]=`V3end(** Handler for a proxy with version >= 4. *)class['v]v4=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V4|`V5]as'v]_handlers_unsafe(**/**)methodmin_version=4lmethodbind_version:[`V4]=`V4end(** Handler for a proxy with version >= 5. *)class['v]v5=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V5]as'v]_handlers_unsafe(**/**)methodmin_version=5lmethodbind_version:[`V5]=`V5endend(** Layer metadata interface.
An interface that may be implemented by a wl_surface, for surfaces that
are designed to be rendered as a layer of a stacked desktop-like
environment.
Layer surface state (layer, size, anchor, exclusive zone,
margin, interactivity) is double-buffered, and will be applied at the
time wl_surface.commit of the corresponding wl_surface is called.
Attaching a null buffer to a layer surface unmaps it.
Unmapping a layer_surface means that the surface cannot be shown by the
compositor until it is explicitly mapped again. The layer_surface
returns to the state it had right after layer_shell.get_layer_surface.
The client can re-map the surface by performing a commit without any
buffer attached, waiting for a configure event and handling it as usual. *)moduleZwlr_layer_surface_v1=structtype'vt=([`Zwlr_layer_surface_v1],'v,[`Client])Proxy.tmoduleKeyboard_interactivity=Wlr_layer_shell_unstable_v1_proto.Zwlr_layer_surface_v1.Keyboard_interactivitymoduleError=Wlr_layer_shell_unstable_v1_proto.Zwlr_layer_surface_v1.ErrormoduleAnchor=Wlr_layer_shell_unstable_v1_proto.Zwlr_layer_surface_v1.Anchor(** {2 Version 1} *)(** Destroy the layer_surface.
This request destroys the layer surface. *)letdestroy(_t:([<`V1|`V2|`V3|`V4|`V5]as'v)t)=let_msg=Proxy.alloc_t~op:7~ints:0~strings:[]~arrays:[]inProxy.send_t_msg;Proxy.shutdown_send_t(** Ack a configure event.
When a configure event is received, if a client commits the
surface in response to the configure event, then the client
must make an ack_configure request sometime before the commit
request, passing along the serial of the configure event.
If the client receives multiple configure events before it
can respond to one, it only has to ack the last configure event.
A client is not required to commit immediately after sending
an ack_configure request - it may even ack_configure several times
before its next surface commit.
A client may send multiple ack_configure requests before committing, but
only the last request sent before a commit indicates which configure
event the client really is responding to. *)letack_configure(_t:([<`V1|`V2|`V3|`V4|`V5]as'v)t)~serial=let_msg=Proxy.alloc_t~op:6~ints:1~strings:[]~arrays:[]inMsg.add_int_msgserial;Proxy.send_t_msg(** Assign this layer_surface as an xdg_popup parent.
This assigns an xdg_popup's parent to this layer_surface. This popup
should have been created via xdg_surface::get_popup with the parent set
to NULL, and this request must be invoked before committing the popup's
initial state.
See the documentation of xdg_popup for more details about what an
xdg_popup is and how it is used. *)letget_popup(_t:([<`V1|`V2|`V3|`V4|`V5]as'v)t)~(popup:([`Xdg_popup],_,[`Client])Proxy.t)=let_msg=Proxy.alloc_t~op:5~ints:1~strings:[]~arrays:[]inMsg.add_int_msg(Proxy.idpopup);Proxy.send_t_msg(** Requests keyboard events.
Set how keyboard events are delivered to this surface. By default,
layer shell surfaces do not receive keyboard events; this request can
be used to change this.
This setting is inherited by child surfaces set by the get_popup
request.
Layer surfaces receive pointer, touch, and tablet events normally. If
you do not want to receive them, set the input region on your surface
to an empty region.
Keyboard interactivity is double-buffered, see wl_surface.commit. *)letset_keyboard_interactivity(_t:([<`V1|`V2|`V3|`V4|`V5]as'v)t)~keyboard_interactivity=let_msg=Proxy.alloc_t~op:4~ints:1~strings:[]~arrays:[]inMsg.add_int_msg(Imports.Zwlr_layer_surface_v1.Keyboard_interactivity.to_int32keyboard_interactivity);Proxy.send_t_msg(** Sets a margin from the anchor point.
Requests that the surface be placed some distance away from the anchor
point on the output, in surface-local coordinates. Setting this value
for edges you are not anchored to has no effect.
The exclusive zone includes the margin.
Margin is double-buffered, see wl_surface.commit. *)letset_margin(_t:([<`V1|`V2|`V3|`V4|`V5]as'v)t)~top~right~bottom~left=let_msg=Proxy.alloc_t~op:3~ints:4~strings:[]~arrays:[]inMsg.add_int_msgtop;Msg.add_int_msgright;Msg.add_int_msgbottom;Msg.add_int_msgleft;Proxy.send_t_msg(** Configures the exclusive geometry of this surface.
Requests that the compositor avoids occluding an area with other
surfaces. The compositor's use of this information is
implementation-dependent - do not assume that this region will not
actually be occluded.
A positive value is only meaningful if the surface is anchored to one
edge or an edge and both perpendicular edges. If the surface is not
anchored, anchored to only two perpendicular edges (a corner), anchored
to only two parallel edges or anchored to all edges, a positive value
will be treated the same as zero.
A positive zone is the distance from the edge in surface-local
coordinates to consider exclusive.
Surfaces that do not wish to have an exclusive zone may instead specify
how they should interact with surfaces that do. If set to zero, the
surface indicates that it would like to be moved to avoid occluding
surfaces with a positive exclusive zone. If set to -1, the surface
indicates that it would not like to be moved to accommodate for other
surfaces, and the compositor should extend it all the way to the edges
it is anchored to.
For example, a panel might set its exclusive zone to 10, so that
maximized shell surfaces are not shown on top of it. A notification
might set its exclusive zone to 0, so that it is moved to avoid
occluding the panel, but shell surfaces are shown underneath it. A
wallpaper or lock screen might set their exclusive zone to -1, so that
they stretch below or over the panel.
The default value is 0.
Exclusive zone is double-buffered, see wl_surface.commit. *)letset_exclusive_zone(_t:([<`V1|`V2|`V3|`V4|`V5]as'v)t)~zone=let_msg=Proxy.alloc_t~op:2~ints:1~strings:[]~arrays:[]inMsg.add_int_msgzone;Proxy.send_t_msg(** Configures the anchor point of the surface.
Requests that the compositor anchor the surface to the specified edges
and corners. If two orthogonal edges are specified (e.g. 'top' and
'left'), then the anchor point will be the intersection of the edges
(e.g. the top left corner of the output); otherwise the anchor point
will be centered on that edge, or in the center if none is specified.
Anchor is double-buffered, see wl_surface.commit. *)letset_anchor(_t:([<`V1|`V2|`V3|`V4|`V5]as'v)t)~anchor=let_msg=Proxy.alloc_t~op:1~ints:1~strings:[]~arrays:[]inMsg.add_int_msg(Imports.Zwlr_layer_surface_v1.Anchor.to_int32anchor);Proxy.send_t_msg(** Sets the size of the surface.
Sets the size of the surface in surface-local coordinates. The
compositor will display the surface centered with respect to its
anchors.
If you pass 0 for either value, the compositor will assign it and
inform you of the assignment in the configure event. You must set your
anchor to opposite edges in the dimensions you omit; not doing so is a
protocol error. Both values are 0 by default.
Size is double-buffered, see wl_surface.commit. *)letset_size(_t:([<`V1|`V2|`V3|`V4|`V5]as'v)t)~width~height=let_msg=Proxy.alloc_t~op:0~ints:2~strings:[]~arrays:[]inMsg.add_int_msgwidth;Msg.add_int_msgheight;Proxy.send_t_msg(** {2 Version 2, 3, 4} *)(** Change the layer of the surface.
Change the layer that the surface is rendered on.
Layer is double-buffered, see wl_surface.commit. *)letset_layer(_t:([<`V2|`V3|`V4|`V5]as'v)t)~layer=let_msg=Proxy.alloc_t~op:8~ints:1~strings:[]~arrays:[]inMsg.add_int_msg(Imports.Zwlr_layer_shell_v1.Layer.to_int32layer);Proxy.send_t_msg(** {2 Version 5} *)(** Set the edge the exclusive zone will be applied to.
Requests an edge for the exclusive zone to apply. The exclusive
edge will be automatically deduced from anchor points when possible,
but when the surface is anchored to a corner, it will be necessary
to set it explicitly to disambiguate, as it is not possible to deduce
which one of the two corner edges should be used.
The edge must be one the surface is anchored to, otherwise the
invalid_exclusive_edge protocol error will be raised. *)letset_exclusive_edge(_t:([<`V5]as'v)t)~edge=let_msg=Proxy.alloc_t~op:9~ints:1~strings:[]~arrays:[]inMsg.add_int_msg(Imports.Zwlr_layer_surface_v1.Anchor.to_int32edge);Proxy.send_t_msg(**/**)classvirtual['v]_handlers_unsafe=object(_self:(_,'v,_)#Proxy.Handler.t)methoduser_data=S.No_datamethodmetadata=(moduleWlr_layer_shell_unstable_v1_proto.Zwlr_layer_surface_v1)methodmax_version=5lmethodprivatevirtualon_configure:[>]t->serial:int32->width:int32->height:int32->unitmethodprivatevirtualon_closed:[>]t->unitmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|0->letserial=Msg.get_int_msginletwidth=Msg.get_int_msginletheight=Msg.get_int_msgin_self#on_configure_proxy~serial~width~height|1->_self#on_closed_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|`V4|`V5]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_configure:[>`V1|`V2|`V3|`V4|`V5]t->serial:int32->width:int32->height:int32->unit(** Suggest a surface change.
The configure event asks the client to resize its surface.
Clients should arrange their surface for the new states, and then send
an ack_configure request with the serial sent in this configure event at
some point before committing the new surface.
The client is free to dismiss all but the last configure event it
received.
The width and height arguments specify the size of the window in
surface-local coordinates.
The size is a hint, in the sense that the client is free to ignore it if
it doesn't resize, pick a smaller size (to satisfy aspect ratio or
resize in steps of NxM pixels). If the client picks a smaller size and
is anchored to two opposite anchors (e.g. 'top' and 'bottom'), the
surface will be centered on this axis.
If the width or height arguments are zero, it means the client should
decide its own window dimension. *)methodprivatevirtualon_closed:[>`V1|`V2|`V3|`V4|`V5]t->unit(** Surface should be closed.
The closed event is sent by the compositor when the surface will no
longer be shown. The output may have been destroyed or the user may
have asked for it to be removed. Further changes to the surface will be
ignored. The client should destroy the resource after receiving this
event, and create a new surface if they so choose. *)methodmin_version=1lend(** Handler for a proxy with version >= 2. *)classvirtual['v]v2=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V2|`V3|`V4|`V5]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_configure:[>`V2|`V3|`V4|`V5]t->serial:int32->width:int32->height:int32->unit(** Suggest a surface change.
The configure event asks the client to resize its surface.
Clients should arrange their surface for the new states, and then send
an ack_configure request with the serial sent in this configure event at
some point before committing the new surface.
The client is free to dismiss all but the last configure event it
received.
The width and height arguments specify the size of the window in
surface-local coordinates.
The size is a hint, in the sense that the client is free to ignore it if
it doesn't resize, pick a smaller size (to satisfy aspect ratio or
resize in steps of NxM pixels). If the client picks a smaller size and
is anchored to two opposite anchors (e.g. 'top' and 'bottom'), the
surface will be centered on this axis.
If the width or height arguments are zero, it means the client should
decide its own window dimension. *)methodprivatevirtualon_closed:[>`V2|`V3|`V4|`V5]t->unit(** Surface should be closed.
The closed event is sent by the compositor when the surface will no
longer be shown. The output may have been destroyed or the user may
have asked for it to be removed. Further changes to the surface will be
ignored. The client should destroy the resource after receiving this
event, and create a new surface if they so choose. *)methodmin_version=2lend(** Handler for a proxy with version >= 3. *)classvirtual['v]v3=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V3|`V4|`V5]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_configure:[>`V3|`V4|`V5]t->serial:int32->width:int32->height:int32->unit(** Suggest a surface change.
The configure event asks the client to resize its surface.
Clients should arrange their surface for the new states, and then send
an ack_configure request with the serial sent in this configure event at
some point before committing the new surface.
The client is free to dismiss all but the last configure event it
received.
The width and height arguments specify the size of the window in
surface-local coordinates.
The size is a hint, in the sense that the client is free to ignore it if
it doesn't resize, pick a smaller size (to satisfy aspect ratio or
resize in steps of NxM pixels). If the client picks a smaller size and
is anchored to two opposite anchors (e.g. 'top' and 'bottom'), the
surface will be centered on this axis.
If the width or height arguments are zero, it means the client should
decide its own window dimension. *)methodprivatevirtualon_closed:[>`V3|`V4|`V5]t->unit(** Surface should be closed.
The closed event is sent by the compositor when the surface will no
longer be shown. The output may have been destroyed or the user may
have asked for it to be removed. Further changes to the surface will be
ignored. The client should destroy the resource after receiving this
event, and create a new surface if they so choose. *)methodmin_version=3lend(** Handler for a proxy with version >= 4. *)classvirtual['v]v4=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V4|`V5]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_configure:[>`V4|`V5]t->serial:int32->width:int32->height:int32->unit(** Suggest a surface change.
The configure event asks the client to resize its surface.
Clients should arrange their surface for the new states, and then send
an ack_configure request with the serial sent in this configure event at
some point before committing the new surface.
The client is free to dismiss all but the last configure event it
received.
The width and height arguments specify the size of the window in
surface-local coordinates.
The size is a hint, in the sense that the client is free to ignore it if
it doesn't resize, pick a smaller size (to satisfy aspect ratio or
resize in steps of NxM pixels). If the client picks a smaller size and
is anchored to two opposite anchors (e.g. 'top' and 'bottom'), the
surface will be centered on this axis.
If the width or height arguments are zero, it means the client should
decide its own window dimension. *)methodprivatevirtualon_closed:[>`V4|`V5]t->unit(** Surface should be closed.
The closed event is sent by the compositor when the surface will no
longer be shown. The output may have been destroyed or the user may
have asked for it to be removed. Further changes to the surface will be
ignored. The client should destroy the resource after receiving this
event, and create a new surface if they so choose. *)methodmin_version=4lend(** Handler for a proxy with version >= 5. *)classvirtual['v]v5=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V5]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_configure:[>`V5]t->serial:int32->width:int32->height:int32->unit(** Suggest a surface change.
The configure event asks the client to resize its surface.
Clients should arrange their surface for the new states, and then send
an ack_configure request with the serial sent in this configure event at
some point before committing the new surface.
The client is free to dismiss all but the last configure event it
received.
The width and height arguments specify the size of the window in
surface-local coordinates.
The size is a hint, in the sense that the client is free to ignore it if
it doesn't resize, pick a smaller size (to satisfy aspect ratio or
resize in steps of NxM pixels). If the client picks a smaller size and
is anchored to two opposite anchors (e.g. 'top' and 'bottom'), the
surface will be centered on this axis.
If the width or height arguments are zero, it means the client should
decide its own window dimension. *)methodprivatevirtualon_closed:[>`V5]t->unit(** Surface should be closed.
The closed event is sent by the compositor when the surface will no
longer be shown. The output may have been destroyed or the user may
have asked for it to be removed. Further changes to the surface will be
ignored. The client should destroy the resource after receiving this
event, and create a new surface if they so choose. *)methodmin_version=5lendend