package wayland
Pure OCaml Wayland protocol library
Install
Dune Dependency
Authors
Maintainers
Sources
wayland-2.1.tbz
sha256=0ffb53958954f1ed4ef874a122c071a9cf3de77ae341b963eb7b513d8028f3c1
sha512=e391b91b4161ada44339bb97b0acf40a0ef3d3c8f62a114333a61155b70288b31b5904492ebbf187bad957849ff6e1df172d014f46ffc33db7140fa833449f5c
doc/src/wayland.protocols/drm_client.ml.html
Source file drm_client.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
(* This file was generated automatically by wayland-scanner-ocaml *) [@@@ocaml.warning "-27"] open struct module Imports = struct include Drm_proto include Wayland.Wayland_proto end module Proxy = Wayland.Proxy module Msg = Wayland.Msg module Fixed = Wayland.Fixed module Iface_reg = Wayland.Iface_reg module S = Wayland.S end module Wl_drm = struct type 'v t = ([`Wl_drm], 'v, [`Client]) Proxy.t module Error = Drm_proto.Wl_drm.Error module Format = Drm_proto.Wl_drm.Format module Capability = Drm_proto.Wl_drm.Capability (** {2 Version 1} *) let create_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) id in let _msg = Proxy.alloc _t ~op:2 ~ints:11 ~strings:[] ~arrays:[] in Msg.add_int _msg (Proxy.id __id); Msg.add_int _msg name; Msg.add_int _msg width; Msg.add_int _msg height; Msg.add_int _msg format; Msg.add_int _msg offset0; Msg.add_int _msg stride0; Msg.add_int _msg offset1; Msg.add_int _msg stride1; Msg.add_int _msg offset2; Msg.add_int _msg stride2; Proxy.send _t _msg; __id let create_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) id in let _msg = Proxy.alloc _t ~op:1 ~ints:6 ~strings:[] ~arrays:[] in Msg.add_int _msg (Proxy.id __id); Msg.add_int _msg name; Msg.add_int _msg width; Msg.add_int _msg height; Msg.add_int _msg stride; Msg.add_int _msg format; Proxy.send _t _msg; __id let authenticate (_t:([< `V1 | `V2] as 'v) t) ~id = let _msg = Proxy.alloc _t ~op:0 ~ints:1 ~strings:[] ~arrays:[] in Msg.add_int _msg id; Proxy.send _t _msg (** {2 Version 2} *) let create_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) id in let _msg = Proxy.alloc _t ~op:3 ~ints:11 ~strings:[] ~arrays:[] in Msg.add_int _msg (Proxy.id __id); Msg.add_fd _msg name; Msg.add_int _msg width; Msg.add_int _msg height; Msg.add_int _msg format; Msg.add_int _msg offset0; Msg.add_int _msg stride0; Msg.add_int _msg offset1; Msg.add_int _msg stride1; Msg.add_int _msg offset2; Msg.add_int _msg stride2; Proxy.send _t _msg; __id (**/**) class virtual ['v] _handlers_unsafe = object (_self : (_, 'v, _) #Proxy.Handler.t) method user_data = S.No_data method metadata = (module Drm_proto.Wl_drm) method max_version = 2l method private virtual on_device : [> ] t -> name:string -> unit method private virtual on_format : [> ] t -> format:int32 -> unit method private virtual on_authenticated : [> ] t -> unit method private virtual on_capabilities : [> ] t -> value:int32 -> unit method dispatch (_proxy : 'v t) _msg = let _proxy = Proxy.cast_version _proxy in match Msg.op _msg with | 0 -> let name = Msg.get_string _msg in _self#on_device _proxy ~name | 1 -> let format = Msg.get_int _msg in _self#on_format _proxy ~format | 2 -> _self#on_authenticated _proxy | 3 -> let value = Msg.get_int _msg in _self#on_capabilities _proxy ~value | _ -> assert false end (**/**) (** {2 Handlers} Note: Servers will always want to use [v1]. *) (** Handler for a proxy with version >= 1. *) class virtual ['v] v1 = object (_ : (_, 'v, _) #Proxy.Service_handler.t) (**/**) inherit [[< `V1 | `V2] as 'v] _handlers_unsafe (**/**) method private virtual on_device : [> `V1 | `V2] t -> name:string -> unit method private virtual on_format : [> `V1 | `V2] t -> format:int32 -> unit method private virtual on_authenticated : [> `V1 | `V2] t -> unit method private virtual on_capabilities : [> `V1 | `V2] t -> value:int32 -> unit method min_version = 1l method bind_version : [`V1] = `V1 end (** Handler for a proxy with version >= 2. *) class virtual ['v] v2 = object (_ : (_, 'v, _) #Proxy.Service_handler.t) (**/**) inherit [[< `V2] as 'v] _handlers_unsafe (**/**) method private virtual on_device : [> `V2] t -> name:string -> unit method private virtual on_format : [> `V2] t -> format:int32 -> unit method private virtual on_authenticated : [> `V2] t -> unit method private virtual on_capabilities : [> `V2] t -> value:int32 -> unit method min_version = 2l method bind_version : [`V2] = `V2 end end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>