Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file server_decoration_client.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166(* This file was generated automatically by wayland-scanner-ocaml *)[@@@ocaml.warning"-27"]openstructmoduleImports=structincludeServer_decoration_protoincludeWayland.Wayland_protoendmoduleProxy=Wayland.ProxymoduleMsg=Wayland.MsgmoduleFixed=Wayland.FixedmoduleIface_reg=Wayland.Iface_regmoduleS=Wayland.Send(** Server side window decoration manager.
This interface allows to coordinate whether the server should create
a server-side window decoration around a wl_surface representing a
shell surface (wl_shell_surface or similar). By announcing support
for this interface the server indicates that it supports server
side decorations. *)moduleOrg_kde_kwin_server_decoration_manager=structtype'vt=([`Org_kde_kwin_server_decoration_manager],'v,[`Client])Proxy.tmoduleMode=Server_decoration_proto.Org_kde_kwin_server_decoration_manager.Mode(** {2 Version 1} *)(** Create a server-side decoration object for a given surface.
When a client creates a server-side decoration object it indicates
that it supports the protocol. The client is supposed to tell the
server whether it wants server-side decorations or will provide
client-side decorations.
If the client does not create a server-side decoration object for
a surface the server interprets this as lack of support for this
protocol and considers it as client-side decorated. Nevertheless a
client-side decorated surface should use this protocol to indicate
to the server that it does not want a server-side deco. *)letcreate(_t:([<`V1]as'v)t)(id:([`Org_kde_kwin_server_decoration],'v,[`Client])#Proxy.Handler.t)~(surface:([`Wl_surface],_,[`Client])Proxy.t)=let__id=Proxy.spawn_tidinlet_msg=Proxy.alloc_t~op:0~ints:2~strings:[]~arrays:[]inMsg.add_int_msg(Proxy.id__id);Msg.add_int_msg(Proxy.idsurface);Proxy.send_t_msg;__id(**/**)classvirtual['v]_handlers_unsafe=object(_self:(_,'v,_)#Proxy.Handler.t)methoduser_data=S.No_datamethodmetadata=(moduleServer_decoration_proto.Org_kde_kwin_server_decoration_manager)methodmax_version=1lmethodprivatevirtualon_default_mode:[>]t->mode:int32->unitmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|0->letmode=Msg.get_int_msgin_self#on_default_mode_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_default_mode:[>`V1]t->mode:int32->unit(** The default mode used on the server.
This event is emitted directly after binding the interface. It contains
the default mode for the decoration. When a new server decoration object
is created this new object will be in the default mode until the first
request_mode is requested.
The server may change the default mode at any time. *)methodmin_version=1lmethodbind_version:[`V1]=`V1endendmoduleOrg_kde_kwin_server_decoration=structtype'vt=([`Org_kde_kwin_server_decoration],'v,[`Client])Proxy.tmoduleMode=Server_decoration_proto.Org_kde_kwin_server_decoration.Mode(** {2 Version 1} *)(** The decoration mode the surface wants to use..
*)letrequest_mode(_t:([<`V1]as'v)t)~mode=let_msg=Proxy.alloc_t~op:1~ints:1~strings:[]~arrays:[]inMsg.add_int_msgmode;Proxy.send_t_msg(** Release the server decoration object.
*)letrelease(_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=(moduleServer_decoration_proto.Org_kde_kwin_server_decoration)methodmax_version=1lmethodprivatevirtualon_mode:[>]t->mode:int32->unitmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|0->letmode=Msg.get_int_msgin_self#on_mode_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_mode:[>`V1]t->mode:int32->unit(** The new decoration mode applied by the server.
This event is emitted directly after the decoration is created and
represents the base decoration policy by the server. E.g. a server
which wants all surfaces to be client-side decorated will send Client,
a server which wants server-side decoration will send Server.
The client can request a different mode through the decoration request.
The server will acknowledge this by another event with the same mode. So
even if a server prefers server-side decoration it's possible to force a
client-side decoration.
The server may emit this event at any time. In this case the client can
again request a different mode. It's the responsibility of the server to
prevent a feedback loop. *)methodmin_version=1lendend