Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file xdg_decoration_unstable_v1_client.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205(* This file was generated automatically by wayland-scanner-ocaml *)[@@@ocaml.warning"-27"]openstructmoduleImports=structincludeXdg_decoration_unstable_v1_protoincludeWayland.Wayland_protoincludeXdg_shell_protoendmoduleProxy=Wayland.ProxymoduleMsg=Wayland.MsgmoduleFixed=Wayland.FixedmoduleIface_reg=Wayland.Iface_regmoduleS=Wayland.Send(** Window decoration manager.
This interface allows a compositor to announce support for server-side
decorations.
A window decoration is a set of window controls as deemed appropriate by
the party managing them, such as user interface components used to move,
resize and change a window's state.
A client can use this protocol to request being decorated by a supporting
compositor.
If compositor and client do not negotiate the use of a server-side
decoration using this protocol, clients continue to self-decorate as they
see fit.
Warning! The protocol described in this file is experimental and
backward incompatible changes may be made. Backward compatible changes
may be added together with the corresponding interface version bump.
Backward incompatible changes are done by bumping the version number in
the protocol and interface names and resetting the interface version.
Once the protocol is to be declared stable, the 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset. *)moduleZxdg_decoration_manager_v1=structtype'vt=([`Zxdg_decoration_manager_v1],'v,[`Client])Proxy.t(** {2 Version 1} *)(** Create a new toplevel decoration object.
Create a new decoration object associated with the given toplevel.
Creating an xdg_toplevel_decoration from an xdg_toplevel 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
xdg_toplevel_decoration.configure event must also be treated as
errors. *)letget_toplevel_decoration(_t:([<`V1]as'v)t)(id:([`Zxdg_toplevel_decoration_v1],'v,[`Client])#Proxy.Handler.t)~(toplevel:([`Xdg_toplevel],_,[`Client])Proxy.t)=let__id=Proxy.spawn_tidinlet_msg=Proxy.alloc_t~op:1~ints:2~strings:[]~arrays:[]inMsg.add_int_msg(Proxy.id__id);Msg.add_int_msg(Proxy.idtoplevel);Proxy.send_t_msg;__id(** Destroy the decoration manager object.
Destroy the decoration manager. This doesn't destroy objects created
with the manager. *)letdestroy(_t:([<`V1]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=(moduleXdg_decoration_unstable_v1_proto.Zxdg_decoration_manager_v1)methodmax_version=1lmethoddispatch(_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]as'v]_handlers_unsafe(**/**)methodmin_version=1lmethodbind_version:[`V1]=`V1endend(** Decoration object for a toplevel surface.
The decoration object allows the compositor to toggle server-side window
decorations for a toplevel surface. The client can request to switch to
another mode.
The xdg_toplevel_decoration object must be destroyed before its
xdg_toplevel. *)moduleZxdg_toplevel_decoration_v1=structtype'vt=([`Zxdg_toplevel_decoration_v1],'v,[`Client])Proxy.tmoduleError=Xdg_decoration_unstable_v1_proto.Zxdg_toplevel_decoration_v1.ErrormoduleMode=Xdg_decoration_unstable_v1_proto.Zxdg_toplevel_decoration_v1.Mode(** {2 Version 1} *)(** Unset the decoration mode.
Unset the toplevel surface decoration mode. This informs the compositor
that the client doesn't prefer a particular decoration mode.
This request has the same semantics as set_mode. *)letunset_mode(_t:([<`V1]as'v)t)=let_msg=Proxy.alloc_t~op:2~ints:0~strings:[]~arrays:[]inProxy.send_t_msg(** Set the decoration mode.
Set the toplevel surface decoration mode. This informs the compositor
that the client prefers the provided decoration mode.
After requesting a decoration mode, the compositor will respond by
emitting an xdg_surface.configure event. The client should then update
its content, drawing it without decorations if the received mode is
server-side decorations. The client must also acknowledge the configure
when committing the new content (see xdg_surface.ack_configure).
The compositor can decide not to use the client's mode and enforce a
different mode instead.
Clients whose decoration mode depend on the xdg_toplevel state may send
a set_mode request in response to an xdg_surface.configure event and wait
for the next xdg_surface.configure event to prevent unwanted state.
Such clients are responsible for preventing configure loops and must
make sure not to send multiple successive set_mode requests with the
same decoration mode. *)letset_mode(_t:([<`V1]as'v)t)~mode=let_msg=Proxy.alloc_t~op:1~ints:1~strings:[]~arrays:[]inMsg.add_int_msg(Imports.Zxdg_toplevel_decoration_v1.Mode.to_int32mode);Proxy.send_t_msg(** Destroy the decoration object.
Switch back to a mode without any server-side decorations at the next
commit. *)letdestroy(_t:([<`V1]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=(moduleXdg_decoration_unstable_v1_proto.Zxdg_toplevel_decoration_v1)methodmax_version=1lmethodprivatevirtualon_configure:[>]t->mode:Imports.Zxdg_toplevel_decoration_v1.Mode.t->unitmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|0->letmode=Msg.get_int_msg|>Imports.Zxdg_toplevel_decoration_v1.Mode.of_int32in_self#on_configure_proxy~mode|_->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_configure:[>`V1]t->mode:Imports.Zxdg_toplevel_decoration_v1.Mode.t->unit(** Notify a decoration mode change.
The configure event configures the effective decoration mode. The
configured state should not be applied immediately. Clients must send an
ack_configure in response to this event. See xdg_surface.configure and
xdg_surface.ack_configure for details.
A configure event can be sent at any time. The specified mode must be
obeyed by the client. *)methodmin_version=1lendend