123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474(* This file was generated automatically by wayland-scanner-ocaml *)[@@@ocaml.warning"-27"]openstructmoduleImports=structincludeWlr_screencopy_unstable_v1_protoincludeWayland.Wayland_protoendmoduleProxy=Wayland.ProxymoduleMsg=Wayland.MsgmoduleFixed=Wayland.FixedmoduleIface_reg=Wayland.Iface_regmoduleS=Wayland.Send(** Manager to inform clients and begin capturing.
This object is a manager which offers requests to start capturing from a
source. *)moduleZwlr_screencopy_manager_v1=structtype'vt=([`Zwlr_screencopy_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=(moduleWlr_screencopy_unstable_v1_proto.Zwlr_screencopy_manager_v1)methodmax_version=3lmethodprivatevirtualon_capture_output:[>]t->([`Zwlr_screencopy_frame_v1],'v,[`Server])Proxy.t->overlay_cursor:int32->output:([`Wl_output],[>Imports.Wl_output.versions],[`Server])Proxy.t->unitmethodprivatevirtualon_capture_output_region:[>]t->([`Zwlr_screencopy_frame_v1],'v,[`Server])Proxy.t->overlay_cursor:int32->output:([`Wl_output],[>Imports.Wl_output.versions],[`Server])Proxy.t->x:int32->y:int32->width:int32->height:int32->unitmethodprivatevirtualon_destroy:[>]t->unitmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|0->letframe:([`Zwlr_screencopy_frame_v1],_,_)Proxy.t=Msg.get_int_msg|>Proxy.Handler.accept_new_proxy(moduleImports.Zwlr_screencopy_frame_v1)inletoverlay_cursor=Msg.get_int_msginletoutput:([`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_capture_output_proxyframe~overlay_cursor~output|1->letframe:([`Zwlr_screencopy_frame_v1],_,_)Proxy.t=Msg.get_int_msg|>Proxy.Handler.accept_new_proxy(moduleImports.Zwlr_screencopy_frame_v1)inletoverlay_cursor=Msg.get_int_msginletoutput:([`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"pinletx=Msg.get_int_msginlety=Msg.get_int_msginletwidth=Msg.get_int_msginletheight=Msg.get_int_msgin_self#on_capture_output_region_proxyframe~overlay_cursor~output~x~y~width~height|2->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_capture_output:[>`V1|`V2|`V3]t->([`Zwlr_screencopy_frame_v1],'v,[`Server])Proxy.t->overlay_cursor:int32->output:([`Wl_output],[>Imports.Wl_output.versions],[`Server])Proxy.t->unit(** Capture an output.
Capture the next frame of an entire output. *)methodprivatevirtualon_capture_output_region:[>`V1|`V2|`V3]t->([`Zwlr_screencopy_frame_v1],'v,[`Server])Proxy.t->overlay_cursor:int32->output:([`Wl_output],[>Imports.Wl_output.versions],[`Server])Proxy.t->x:int32->y:int32->width:int32->height:int32->unit(** Capture an output's region.
Capture the next frame of an output's region.
The region is given in output logical coordinates, see
xdg_output.logical_size. The region will be clipped to the output's
extents. *)methodprivatevirtualon_destroy:[>`V1|`V2|`V3]t->unit(** Destroy the manager.
All objects created by the manager will still remain valid, until their
appropriate destroy request has been called. *)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_capture_output:[>`V2|`V3]t->([`Zwlr_screencopy_frame_v1],'v,[`Server])Proxy.t->overlay_cursor:int32->output:([`Wl_output],[>Imports.Wl_output.versions],[`Server])Proxy.t->unit(** Capture an output.
Capture the next frame of an entire output. *)methodprivatevirtualon_capture_output_region:[>`V2|`V3]t->([`Zwlr_screencopy_frame_v1],'v,[`Server])Proxy.t->overlay_cursor:int32->output:([`Wl_output],[>Imports.Wl_output.versions],[`Server])Proxy.t->x:int32->y:int32->width:int32->height:int32->unit(** Capture an output's region.
Capture the next frame of an output's region.
The region is given in output logical coordinates, see
xdg_output.logical_size. The region will be clipped to the output's
extents. *)methodprivatevirtualon_destroy:[>`V2|`V3]t->unit(** Destroy the manager.
All objects created by the manager will still remain valid, until their
appropriate destroy request has been called. *)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_capture_output:[>`V3]t->([`Zwlr_screencopy_frame_v1],'v,[`Server])Proxy.t->overlay_cursor:int32->output:([`Wl_output],[>Imports.Wl_output.versions],[`Server])Proxy.t->unit(** Capture an output.
Capture the next frame of an entire output. *)methodprivatevirtualon_capture_output_region:[>`V3]t->([`Zwlr_screencopy_frame_v1],'v,[`Server])Proxy.t->overlay_cursor:int32->output:([`Wl_output],[>Imports.Wl_output.versions],[`Server])Proxy.t->x:int32->y:int32->width:int32->height:int32->unit(** Capture an output's region.
Capture the next frame of an output's region.
The region is given in output logical coordinates, see
xdg_output.logical_size. The region will be clipped to the output's
extents. *)methodprivatevirtualon_destroy:[>`V3]t->unit(** Destroy the manager.
All objects created by the manager will still remain valid, until their
appropriate destroy request has been called. *)methodmin_version=3lmethodbind_version:[`V3]=`V3endend(** A frame ready for copy.
This object represents a single frame.
When created, a series of buffer events will be sent, each representing a
supported buffer type. The "buffer_done" event is sent afterwards to
indicate that all supported buffer types have been enumerated. The client
will then be able to send a "copy" request. If the capture is successful,
the compositor will send a "flags" followed by a "ready" event.
For objects version 2 or lower, wl_shm buffers are always supported, ie.
the "buffer" event is guaranteed to be sent.
If the capture failed, the "failed" event is sent. This can happen anytime
before the "ready" event.
Once either a "ready" or a "failed" event is received, the client should
destroy the frame. *)moduleZwlr_screencopy_frame_v1=structtype'vt=([`Zwlr_screencopy_frame_v1],'v,[`Server])Proxy.tmoduleError=Wlr_screencopy_unstable_v1_proto.Zwlr_screencopy_frame_v1.ErrormoduleFlags=Wlr_screencopy_unstable_v1_proto.Zwlr_screencopy_frame_v1.Flags(** {2 Version 1} *)(** Frame copy failed.
This event indicates that the attempted frame copy has failed.
After receiving this event, the client should destroy the object. *)letfailed(_t:([<`V1|`V2|`V3]as'v)t)=let_msg=Proxy.alloc_t~op:3~ints:0~strings:[]~arrays:[]inProxy.send_t_msg(** Indicates frame is available for reading.
Called as soon as the frame is copied, indicating it is available
for reading. This event includes the time at which presentation happened
at.
The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples,
each component being an unsigned 32-bit value. Whole seconds are in
tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo,
and the additional fractional part in tv_nsec as nanoseconds. Hence,
for valid timestamps tv_nsec must be in [0, 999999999]. The seconds part
may have an arbitrary offset at start.
After receiving this event, the client should destroy the object. *)letready(_t:([<`V1|`V2|`V3]as'v)t)~tv_sec_hi~tv_sec_lo~tv_nsec=let_msg=Proxy.alloc_t~op:2~ints:3~strings:[]~arrays:[]inMsg.add_int_msgtv_sec_hi;Msg.add_int_msgtv_sec_lo;Msg.add_int_msgtv_nsec;Proxy.send_t_msg(** Frame flags.
Provides flags about the frame. This event is sent once before the
"ready" event. *)letflags(_t:([<`V1|`V2|`V3]as'v)t)~flags=let_msg=Proxy.alloc_t~op:1~ints:1~strings:[]~arrays:[]inMsg.add_int_msg(Imports.Zwlr_screencopy_frame_v1.Flags.to_int32flags);Proxy.send_t_msg(** Wl_shm buffer information.
Provides information about wl_shm buffer parameters that need to be
used for this frame. This event is sent once after the frame is created
if wl_shm buffers are supported. *)letbuffer(_t:([<`V1|`V2|`V3]as'v)t)~format~width~height~stride=let_msg=Proxy.alloc_t~op:0~ints:4~strings:[]~arrays:[]inMsg.add_int_msg(Imports.Wl_shm.Format.to_int32format);Msg.add_int_msgwidth;Msg.add_int_msgheight;Msg.add_int_msgstride;Proxy.send_t_msg(** {2 Version 2} *)(** Carries the coordinates of the damaged region.
This event is sent right before the ready event when copy_with_damage is
requested. It may be generated multiple times for each copy_with_damage
request.
The arguments describe a box around an area that has changed since the
last copy request that was derived from the current screencopy manager
instance.
The union of all regions received between the call to copy_with_damage
and a ready event is the total damage since the prior ready event. *)letdamage(_t:([<`V2|`V3]as'v)t)~x~y~width~height=let_msg=Proxy.alloc_t~op:4~ints:4~strings:[]~arrays:[]inMsg.add_int_msgx;Msg.add_int_msgy;Msg.add_int_msgwidth;Msg.add_int_msgheight;Proxy.send_t_msg(** {2 Version 3} *)(** All buffer types reported.
This event is sent once after all buffer events have been sent.
The client should proceed to create a buffer of one of the supported
types, and send a "copy" request. *)letbuffer_done(_t:([<`V3]as'v)t)=let_msg=Proxy.alloc_t~op:6~ints:0~strings:[]~arrays:[]inProxy.send_t_msg(** Linux-dmabuf buffer information.
Provides information about linux-dmabuf buffer parameters that need to
be used for this frame. This event is sent once after the frame is
created if linux-dmabuf buffers are supported. *)letlinux_dmabuf(_t:([<`V3]as'v)t)~format~width~height=let_msg=Proxy.alloc_t~op:5~ints:3~strings:[]~arrays:[]inMsg.add_int_msgformat;Msg.add_int_msgwidth;Msg.add_int_msgheight;Proxy.send_t_msg(**/**)classvirtual['v]_handlers_unsafe=object(_self:(_,'v,_)#Proxy.Handler.t)methoduser_data=S.No_datamethodmetadata=(moduleWlr_screencopy_unstable_v1_proto.Zwlr_screencopy_frame_v1)methodmax_version=3lmethodprivatevirtualon_copy:[>]t->buffer:([`Wl_buffer],[>Imports.Wl_buffer.versions],[`Server])Proxy.t->unitmethodprivatevirtualon_destroy:[>]t->unitmethodprivatevirtualon_copy_with_damage:[>]t->buffer:([`Wl_buffer],[>Imports.Wl_buffer.versions],[`Server])Proxy.t->unitmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|0->letbuffer:([`Wl_buffer],_,_)Proxy.t=letProxy.Proxyp=Msg.get_int_msg|>Proxy.lookup_other_proxyinmatchProxy.typwith|Imports.Wl_buffer.T->p|_->Proxy.wrong_type~parent:_proxy~expected:"wl_buffer"pin_self#on_copy_proxy~buffer|1->Proxy.shutdown_recv_proxy;_self#on_destroy_proxy|2->letbuffer:([`Wl_buffer],_,_)Proxy.t=letProxy.Proxyp=Msg.get_int_msg|>Proxy.lookup_other_proxyinmatchProxy.typwith|Imports.Wl_buffer.T->p|_->Proxy.wrong_type~parent:_proxy~expected:"wl_buffer"pin_self#on_copy_with_damage_proxy~buffer|_->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_copy:[>`V1|`V2|`V3]t->buffer:([`Wl_buffer],[>Imports.Wl_buffer.versions],[`Server])Proxy.t->unit(** Copy the frame.
Copy the frame to the supplied buffer. The buffer must have a the
correct size, see zwlr_screencopy_frame_v1.buffer and
zwlr_screencopy_frame_v1.linux_dmabuf. The buffer needs to have a
supported format.
If the frame is successfully copied, a "flags" and a "ready" events are
sent. Otherwise, a "failed" event is sent. *)methodprivatevirtualon_destroy:[>`V1|`V2|`V3]t->unit(** Delete this object, used or not.
Destroys the frame. This request can be sent at any time by the client. *)methodprivatevirtualon_copy_with_damage:[>`V2|`V3]t->buffer:([`Wl_buffer],[>Imports.Wl_buffer.versions],[`Server])Proxy.t->unit(** Copy the frame when it's damaged.
Same as copy, except it waits until there is damage to copy. *)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_copy:[>`V2|`V3]t->buffer:([`Wl_buffer],[>Imports.Wl_buffer.versions],[`Server])Proxy.t->unit(** Copy the frame.
Copy the frame to the supplied buffer. The buffer must have a the
correct size, see zwlr_screencopy_frame_v1.buffer and
zwlr_screencopy_frame_v1.linux_dmabuf. The buffer needs to have a
supported format.
If the frame is successfully copied, a "flags" and a "ready" events are
sent. Otherwise, a "failed" event is sent. *)methodprivatevirtualon_destroy:[>`V2|`V3]t->unit(** Delete this object, used or not.
Destroys the frame. This request can be sent at any time by the client. *)methodprivatevirtualon_copy_with_damage:[>`V2|`V3]t->buffer:([`Wl_buffer],[>Imports.Wl_buffer.versions],[`Server])Proxy.t->unit(** Copy the frame when it's damaged.
Same as copy, except it waits until there is damage to copy. *)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_copy:[>`V3]t->buffer:([`Wl_buffer],[>Imports.Wl_buffer.versions],[`Server])Proxy.t->unit(** Copy the frame.
Copy the frame to the supplied buffer. The buffer must have a the
correct size, see zwlr_screencopy_frame_v1.buffer and
zwlr_screencopy_frame_v1.linux_dmabuf. The buffer needs to have a
supported format.
If the frame is successfully copied, a "flags" and a "ready" events are
sent. Otherwise, a "failed" event is sent. *)methodprivatevirtualon_destroy:[>`V3]t->unit(** Delete this object, used or not.
Destroys the frame. This request can be sent at any time by the client. *)methodprivatevirtualon_copy_with_damage:[>`V3]t->buffer:([`Wl_buffer],[>Imports.Wl_buffer.versions],[`Server])Proxy.t->unit(** Copy the frame when it's damaged.
Same as copy, except it waits until there is damage to copy. *)methodmin_version=3lendend