123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348(* This file was generated automatically by wayland-scanner-ocaml *)[@@@ocaml.warning"-27"]openstructmoduleImports=structincludeXdg_output_unstable_v1_protoincludeWayland.Wayland_protoendmoduleProxy=Wayland.ProxymoduleMsg=Wayland.MsgmoduleFixed=Wayland.FixedmoduleIface_reg=Wayland.Iface_regmoduleS=Wayland.Send(** Manage xdg_output objects.
A global factory interface for xdg_output objects. *)moduleZxdg_output_manager_v1=structtype'vt=([`Zxdg_output_manager_v1],'v,[`Server])Proxy.t(** {2 Version 1, 2, 3} *)(**/**)classvirtual['v]_handlers_unsafe=object(_self:(_,'v,_)#Proxy.Handler.t)methoduser_data=S.No_datamethodmetadata=(moduleXdg_output_unstable_v1_proto.Zxdg_output_manager_v1)methodmax_version=3lmethodprivatevirtualon_destroy:[>]t->unitmethodprivatevirtualon_get_xdg_output:[>]t->([`Zxdg_output_v1],'v,[`Server])Proxy.t->output:([`Wl_output],[>Imports.Wl_output.versions],[`Server])Proxy.t->unitmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|0->Proxy.shutdown_recv_proxy;_self#on_destroy_proxy|1->letid:([`Zxdg_output_v1],_,_)Proxy.t=Msg.get_int_msg|>Proxy.Handler.accept_new_proxy(moduleImports.Zxdg_output_v1)inletoutput:([`Wl_output],_,_)Proxy.t=letProxy.Proxyp=Msg.get_int_msg|>Proxy.lookup_other_proxyinmatchProxy.typwith|Imports.Wl_output.T->p|_->Proxy.wrong_type~parent:_proxy~expected:"wl_output"pin_self#on_get_xdg_output_proxyid~output|_->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_destroy:[>`V1|`V2|`V3]t->unit(** Destroy the xdg_output_manager object.
Using this request a client can tell the server that it is not
going to use the xdg_output_manager object anymore.
Any objects already created through this instance are not affected. *)methodprivatevirtualon_get_xdg_output:[>`V1|`V2|`V3]t->([`Zxdg_output_v1],'v,[`Server])Proxy.t->output:([`Wl_output],[>Imports.Wl_output.versions],[`Server])Proxy.t->unit(** Create an xdg output from a wl_output.
This creates a new xdg_output object for the given wl_output. *)methodmin_version=1lmethodbind_version:[`V1]=`V1end(** Handler for a proxy with version >= 2. *)classvirtual['v]v2=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V2|`V3]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_destroy:[>`V2|`V3]t->unit(** Destroy the xdg_output_manager object.
Using this request a client can tell the server that it is not
going to use the xdg_output_manager object anymore.
Any objects already created through this instance are not affected. *)methodprivatevirtualon_get_xdg_output:[>`V2|`V3]t->([`Zxdg_output_v1],'v,[`Server])Proxy.t->output:([`Wl_output],[>Imports.Wl_output.versions],[`Server])Proxy.t->unit(** Create an xdg output from a wl_output.
This creates a new xdg_output object for the given wl_output. *)methodmin_version=2lmethodbind_version:[`V2]=`V2end(** Handler for a proxy with version >= 3. *)classvirtual['v]v3=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V3]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_destroy:[>`V3]t->unit(** Destroy the xdg_output_manager object.
Using this request a client can tell the server that it is not
going to use the xdg_output_manager object anymore.
Any objects already created through this instance are not affected. *)methodprivatevirtualon_get_xdg_output:[>`V3]t->([`Zxdg_output_v1],'v,[`Server])Proxy.t->output:([`Wl_output],[>Imports.Wl_output.versions],[`Server])Proxy.t->unit(** Create an xdg output from a wl_output.
This creates a new xdg_output object for the given wl_output. *)methodmin_version=3lmethodbind_version:[`V3]=`V3endend(** Compositor logical output region.
An xdg_output describes part of the compositor geometry.
This typically corresponds to a monitor that displays part of the
compositor space.
For objects version 3 onwards, after all xdg_output properties have been
sent (when the object is created and when properties are updated), a
wl_output.done event is sent. This allows changes to the output
properties to be seen as atomic, even if they happen via multiple events. *)moduleZxdg_output_v1=structtype'vt=([`Zxdg_output_v1],'v,[`Server])Proxy.t(** {2 Version 1} *)(** All information about the output have been sent.
This event is sent after all other properties of an xdg_output
have been sent.
This allows changes to the xdg_output properties to be seen as
atomic, even if they happen via multiple events.
For objects version 3 onwards, this event is deprecated. Compositors
are not required to send it anymore and must send wl_output.done
instead. *)letdone_(_t:([<`V1|`V2|`V3]as'v)t)=let_msg=Proxy.alloc_t~op:2~ints:0~strings:[]~arrays:[]inProxy.send_t_msg(** Size of the output in the global compositor space.
The logical_size event describes the size of the output in the
global compositor space.
For example, a surface without any buffer scale, transformation
nor rotation set, with the size matching the logical_size will
have the same size as the corresponding output when displayed.
Most regular Wayland clients should not pay attention to the
logical size and would rather rely on xdg_shell interfaces.
Some clients such as Xwayland, however, need this to configure
their surfaces in the global compositor space as the compositor
may apply a different scale from what is advertised by the output
scaling property (to achieve fractional scaling, for example).
For example, for a wl_output mode 3840×2160 and a scale factor 2:
- A compositor not scaling the surface buffers will advertise a
logical size of 3840×2160,
- A compositor automatically scaling the surface buffers will
advertise a logical size of 1920×1080,
- A compositor using a fractional scale of 1.5 will advertise a
logical size of 2560×1440.
For example, for a wl_output mode 1920×1080 and a 90 degree rotation,
the compositor will advertise a logical size of 1080x1920.
The logical_size event is sent after creating an xdg_output
(see xdg_output_manager.get_xdg_output) and whenever the logical
size of the output changes, either as a result of a change in the
applied scale or because of a change in the corresponding output
mode(see wl_output.mode) or transform (see wl_output.transform). *)letlogical_size(_t:([<`V1|`V2|`V3]as'v)t)~width~height=let_msg=Proxy.alloc_t~op:1~ints:2~strings:[]~arrays:[]inMsg.add_int_msgwidth;Msg.add_int_msgheight;Proxy.send_t_msg(** Position of the output within the global compositor space.
The position event describes the location of the wl_output within
the global compositor space.
The logical_position event is sent after creating an xdg_output
(see xdg_output_manager.get_xdg_output) and whenever the location
of the output changes within the global compositor space. *)letlogical_position(_t:([<`V1|`V2|`V3]as'v)t)~x~y=let_msg=Proxy.alloc_t~op:0~ints:2~strings:[]~arrays:[]inMsg.add_int_msgx;Msg.add_int_msgy;Proxy.send_t_msg(** {2 Version 2, 3} *)(** Human-readable description of this output.
Many compositors can produce human-readable descriptions of their
outputs. The client may wish to know this description as well, to
communicate the user for various purposes.
The description is a UTF-8 string with no convention defined for its
contents. Examples might include 'Foocorp 11" Display' or 'Virtual X11
output via :1'.
The description event is sent after creating an xdg_output (see
xdg_output_manager.get_xdg_output) and whenever the description
changes. The description is optional, and may not be sent at all.
For objects of version 2 and lower, this event is only sent once per
xdg_output, and the description does not change over the lifetime of
the wl_output global.
" *)letdescription(_t:([<`V2|`V3]as'v)t)~description=let_msg=Proxy.alloc_t~op:4~ints:1~strings:[(Somedescription)]~arrays:[]inMsg.add_string_msgdescription;Proxy.send_t_msg(** Name of this output.
Many compositors will assign names to their outputs, show them to the
user, allow them to be configured by name, etc. The client may wish to
know this name as well to offer the user similar behaviors.
The naming convention is compositor defined, but limited to
alphanumeric characters and dashes (-). Each name is unique among all
wl_output globals, but if a wl_output global is destroyed the same name
may be reused later. The names will also remain consistent across
sessions with the same hardware and software configuration.
Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do
not assume that the name is a reflection of an underlying DRM
connector, X11 connection, etc.
The name event is sent after creating an xdg_output (see
xdg_output_manager.get_xdg_output). This event is only sent once per
xdg_output, and the name does not change over the lifetime of the
wl_output global. *)letname(_t:([<`V2|`V3]as'v)t)~name=let_msg=Proxy.alloc_t~op:3~ints:1~strings:[(Somename)]~arrays:[]inMsg.add_string_msgname;Proxy.send_t_msg(**/**)classvirtual['v]_handlers_unsafe=object(_self:(_,'v,_)#Proxy.Handler.t)methoduser_data=S.No_datamethodmetadata=(moduleXdg_output_unstable_v1_proto.Zxdg_output_v1)methodmax_version=3lmethodprivatevirtualon_destroy:[>]t->unitmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|0->Proxy.shutdown_recv_proxy;_self#on_destroy_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_destroy:[>`V1|`V2|`V3]t->unit(** Destroy the xdg_output object.
Using this request a client can tell the server that it is not
going to use the xdg_output object anymore. *)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_destroy:[>`V2|`V3]t->unit(** Destroy the xdg_output object.
Using this request a client can tell the server that it is not
going to use the xdg_output object anymore. *)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_destroy:[>`V3]t->unit(** Destroy the xdg_output object.
Using this request a client can tell the server that it is not
going to use the xdg_output object anymore. *)methodmin_version=3lendend