123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160(* This file was generated automatically by wayland-scanner-ocaml *)[@@@ocaml.warning"-27-34"]openstructmoduleImports=structincludeDrm_protoincludeWayland.Wayland_protoendmoduleProxy=Wayland.ProxymoduleMsg=Wayland.MsgmoduleFixed=Wayland.FixedmoduleIface_reg=Wayland.Iface_regmoduleS=Wayland.SendmoduleWl_drm=structtype'vt=([`Wl_drm],'v,[`Client])Proxy.tmoduleError=Drm_proto.Wl_drm.ErrormoduleFormat=Drm_proto.Wl_drm.FormatmoduleCapability=Drm_proto.Wl_drm.Capability(** {2 Version 1} *)letcreate_planar_buffer(_t:([<`V1|`V2]as'v)t)(id:([`Wl_buffer],[`V1],[`Client])#Proxy.Handler.t)~name~width~height~format~offset0~stride0~offset1~stride1~offset2~stride2=let__id=Proxy.spawn(Proxy.cast_version_t)idinlet_msg=Proxy.alloc_t~op:2~ints:11~strings:[]~arrays:[]inMsg.add_int_msg(Proxy.id__id);Msg.add_int_msgname;Msg.add_int_msgwidth;Msg.add_int_msgheight;Msg.add_int_msgformat;Msg.add_int_msgoffset0;Msg.add_int_msgstride0;Msg.add_int_msgoffset1;Msg.add_int_msgstride1;Msg.add_int_msgoffset2;Msg.add_int_msgstride2;Proxy.send_t_msg;__idletcreate_buffer(_t:([<`V1|`V2]as'v)t)(id:([`Wl_buffer],[`V1],[`Client])#Proxy.Handler.t)~name~width~height~stride~format=let__id=Proxy.spawn(Proxy.cast_version_t)idinlet_msg=Proxy.alloc_t~op:1~ints:6~strings:[]~arrays:[]inMsg.add_int_msg(Proxy.id__id);Msg.add_int_msgname;Msg.add_int_msgwidth;Msg.add_int_msgheight;Msg.add_int_msgstride;Msg.add_int_msgformat;Proxy.send_t_msg;__idletauthenticate(_t:([<`V1|`V2]as'v)t)~id=let_msg=Proxy.alloc_t~op:0~ints:1~strings:[]~arrays:[]inMsg.add_int_msgid;Proxy.send_t_msg(** {2 Version 2} *)letcreate_prime_buffer(_t:([<`V2]as'v)t)(id:([`Wl_buffer],[`V1],[`Client])#Proxy.Handler.t)~name~width~height~format~offset0~stride0~offset1~stride1~offset2~stride2=let__id=Proxy.spawn(Proxy.cast_version_t)idinlet_msg=Proxy.alloc_t~op:3~ints:11~strings:[]~arrays:[]inMsg.add_int_msg(Proxy.id__id);Msg.add_fd_msgname;Msg.add_int_msgwidth;Msg.add_int_msgheight;Msg.add_int_msgformat;Msg.add_int_msgoffset0;Msg.add_int_msgstride0;Msg.add_int_msgoffset1;Msg.add_int_msgstride1;Msg.add_int_msgoffset2;Msg.add_int_msgstride2;Proxy.send_t_msg;__id(**/**)classvirtual['v]_handlers_unsafe=object(_self:(_,'v,_)#Proxy.Handler.t)methoduser_data=S.No_datamethodmetadata=(moduleDrm_proto.Wl_drm)methodmax_version=2lmethodprivatevirtualon_device:[>]t->name:string->unitmethodprivatevirtualon_format:[>]t->format:int32->unitmethodprivatevirtualon_authenticated:[>]t->unitmethodprivatevirtualon_capabilities:[>]t->value:int32->unitmethoddispatch(_proxy:'vt)_msg=let_proxy=Proxy.cast_version_proxyinmatchMsg.op_msgwith|0->letname=Msg.get_string_msgin_self#on_device_proxy~name|1->letformat=Msg.get_int_msgin_self#on_format_proxy~format|2->_self#on_authenticated_proxy|3->letvalue=Msg.get_int_msgin_self#on_capabilities_proxy~value|_->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]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_device:[>`V1|`V2]t->name:string->unitmethodprivatevirtualon_format:[>`V1|`V2]t->format:int32->unitmethodprivatevirtualon_authenticated:[>`V1|`V2]t->unitmethodprivatevirtualon_capabilities:[>`V1|`V2]t->value:int32->unitmethodmin_version=1lmethodbind_version:[`V1]=`V1end(** Handler for a proxy with version >= 2. *)classvirtual['v]v2=object(_:(_,'v,_)#Proxy.Service_handler.t)(**/**)inherit[[<`V2]as'v]_handlers_unsafe(**/**)methodprivatevirtualon_device:[>`V2]t->name:string->unitmethodprivatevirtualon_format:[>`V2]t->format:int32->unitmethodprivatevirtualon_authenticated:[>`V2]t->unitmethodprivatevirtualon_capabilities:[>`V2]t->value:int32->unitmethodmin_version=2lmethodbind_version:[`V2]=`V2endend