Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file server_decoration_server.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177(* 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,[`Server])Proxy.tmoduleMode=Server_decoration_proto.Org_kde_kwin_server_decoration_manager.Mode(** {2 Version 1} *)(** 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. *)letdefault_mode(_t:([<`V1]as'v)t)~mode=let_msg=Proxy.alloc_t~op:0~ints:1~strings:[]~arrays:[]inMsg.add_int_msgmode;Proxy.send_t_msg(**/**)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_create:[>]t->([`Org_kde_kwin_server_decoration],'v,[`Server])Proxy.t->surface:([`Wl_surface],[>Imports.Wl_surface.versions],[`Server])Proxy.t->unitmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|0->letid:([`Org_kde_kwin_server_decoration],_,_)Proxy.t=Msg.get_int_msg|>Proxy.Handler.accept_new_proxy(moduleImports.Org_kde_kwin_server_decoration)inletsurface:([`Wl_surface],_,_)Proxy.t=letProxy.Proxyp=Msg.get_int_msg|>Proxy.lookup_other_proxyinmatchProxy.typwith|Imports.Wl_surface.T->p|_->Proxy.wrong_type~parent:_proxy~expected:"wl_surface"pin_self#on_create_proxyid~surface|_->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_create:[>`V1]t->([`Org_kde_kwin_server_decoration],'v,[`Server])Proxy.t->surface:([`Wl_surface],[>Imports.Wl_surface.versions],[`Server])Proxy.t->unit(** 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. *)methodmin_version=1lmethodbind_version:[`V1]=`V1endendmoduleOrg_kde_kwin_server_decoration=structtype'vt=([`Org_kde_kwin_server_decoration],'v,[`Server])Proxy.tmoduleMode=Server_decoration_proto.Org_kde_kwin_server_decoration.Mode(** {2 Version 1} *)(** 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. *)letmode(_t:([<`V1]as'v)t)~mode=let_msg=Proxy.alloc_t~op:0~ints:1~strings:[]~arrays:[]inMsg.add_int_msgmode;Proxy.send_t_msg(**/**)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_release:[>]t->unitmethodprivatevirtualon_request_mode:[>]t->mode:int32->unitmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|0->Proxy.shutdown_recv_proxy;_self#on_release_proxy|1->letmode=Msg.get_int_msgin_self#on_request_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_release:[>`V1]t->unit(** Release the server decoration object.
*)methodprivatevirtualon_request_mode:[>`V1]t->mode:int32->unit(** The decoration mode the surface wants to use..
*)methodmin_version=1lendend