package wayland

  1. Overview
  2. Docs
Pure OCaml Wayland protocol library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

wayland-2.2.tbz
sha256=0f882060a4cfe9424ed397676b8e2aaa931d84610beb29cb2ec9c355d1819625
sha512=847781a3d274da7463ad1a2e46bada3663b8dee08fa576ad787e7ba35cb0f39a3e1a0e6e9729db2f643885a35ae32ece0358c5897d31b68907cad44f1b26af31

doc/src/wayland.protocols/linux_dmabuf_unstable_v1_proto.ml.html

Source file linux_dmabuf_unstable_v1_proto.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
(* This file was generated automatically by wayland-scanner-ocaml *)

open struct
  module Proxy = Wayland.Proxy
  module Iface_reg = Wayland.Iface_reg
  module Metadata = Wayland.Metadata
end

module Zwp_linux_dmabuf_v1 = struct
  type t = [`Zwp_linux_dmabuf_v1]
  type _ Metadata.ty += T : [`Zwp_linux_dmabuf_v1] Metadata.ty
  type versions = [`V1 | `V2 | `V3 | `V4 | `V5]
  let interface = "zwp_linux_dmabuf_v1"
  let version = 5l
  
  let requests = function
    | 0 -> "destroy", []
    | 1 -> "create_params", ["params_id", `New_ID (Some "zwp_linux_buffer_params_v1")]
    | 2 -> "get_default_feedback", ["id", `New_ID (Some "zwp_linux_dmabuf_feedback_v1")]
    | 3 -> "get_surface_feedback", ["id", `New_ID (Some "zwp_linux_dmabuf_feedback_v1");
                                    "surface", `Object (Some "wl_surface")]
    | i -> Proxy.unknown_request i, []
  
  let events = function
    | 0 -> "format", ["format", `Uint]
    | 1 -> "modifier", ["format", `Uint; "modifier_hi", `Uint; "modifier_lo", `Uint]
    | i -> Proxy.unknown_event i, []
  
end
let () = Iface_reg.register (module Zwp_linux_dmabuf_v1)

module Zwp_linux_buffer_params_v1 = struct
  type t = [`Zwp_linux_buffer_params_v1]
  type _ Metadata.ty += T : [`Zwp_linux_buffer_params_v1] Metadata.ty
  type versions = [`V1 | `V2 | `V3 | `V4 | `V5]
  let interface = "zwp_linux_buffer_params_v1"
  let version = 5l
  
  module Error = struct
    type t =
      | Already_used : t
      | Plane_idx : t
      | Plane_set : t
      | Incomplete : t
      | Invalid_format : t
      | Invalid_dimensions : t
      | Out_of_bounds : t
      | Invalid_wl_buffer : t
    
    let to_int32 = function
      | Already_used -> 0l
      | Plane_idx -> 1l
      | Plane_set -> 2l
      | Incomplete -> 3l
      | Invalid_format -> 4l
      | Invalid_dimensions -> 5l
      | Out_of_bounds -> 6l
      | Invalid_wl_buffer -> 7l
    
    let of_int32 = function
      | 0l -> Already_used
      | 1l -> Plane_idx
      | 2l -> Plane_set
      | 3l -> Incomplete
      | 4l -> Invalid_format
      | 5l -> Invalid_dimensions
      | 6l -> Out_of_bounds
      | 7l -> Invalid_wl_buffer
      | x -> Fmt.failwith "Invalid error enum value %ld" x
  end
  
  
  module Flags = struct
    type t = int32
    
    let y_invert = 1l
    
    let interlaced = 2l
    
    let bottom_first = 4l
    
    let to_int32 = Fun.id
    let of_int32 = Fun.id
  end
  
  let requests = function
    | 0 -> "destroy", []
    | 1 -> "add", ["fd", `FD; "plane_idx", `Uint; "offset", `Uint; "stride", `Uint; "modifier_hi", `Uint;
                   "modifier_lo", `Uint]
    | 2 -> "create", ["width", `Int; "height", `Int; "format", `Uint; "flags", `Uint]
    | 3 -> "create_immed", ["buffer_id", `New_ID (Some "wl_buffer"); "width", `Int; "height", `Int; "format", `Uint;
                            "flags", `Uint]
    | i -> Proxy.unknown_request i, []
  
  let events = function
    | 0 -> "created", ["buffer", `New_ID (Some "wl_buffer")]
    | 1 -> "failed", []
    | i -> Proxy.unknown_event i, []
  
end
let () = Iface_reg.register (module Zwp_linux_buffer_params_v1)

module Zwp_linux_dmabuf_feedback_v1 = struct
  type t = [`Zwp_linux_dmabuf_feedback_v1]
  type _ Metadata.ty += T : [`Zwp_linux_dmabuf_feedback_v1] Metadata.ty
  type versions = [`V1 | `V2 | `V3 | `V4 | `V5]
  let interface = "zwp_linux_dmabuf_feedback_v1"
  let version = 5l
  
  module Tranche_flags = struct
    type t = int32
    
    let scanout = 1l
    
    let to_int32 = Fun.id
    let of_int32 = Fun.id
  end
  
  let requests = function
    | 0 -> "destroy", []
    | i -> Proxy.unknown_request i, []
  
  let events = function
    | 0 -> "done", []
    | 1 -> "format_table", ["fd", `FD; "size", `Uint]
    | 2 -> "main_device", ["device", `Array]
    | 3 -> "tranche_done", []
    | 4 -> "tranche_target_device", ["device", `Array]
    | 5 -> "tranche_formats", ["indices", `Array]
    | 6 -> "tranche_flags", ["flags", `Uint]
    | i -> Proxy.unknown_event i, []
  
end
let () = Iface_reg.register (module Zwp_linux_dmabuf_feedback_v1)
OCaml

Innovation. Community. Security.