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/viewporter_proto.ml.html

Source file viewporter_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
(* 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 Wp_viewporter = struct
  type t = [`Wp_viewporter]
  type _ Metadata.ty += T : [`Wp_viewporter] Metadata.ty
  type versions = [`V1]
  let interface = "wp_viewporter"
  let version = 1l
  
  module Error = struct
    type t =
      | Viewport_exists : t
    
    let to_int32 = function
      | Viewport_exists -> 0l
    
    let of_int32 = function
      | 0l -> Viewport_exists
      | x -> Fmt.failwith "Invalid error enum value %ld" x
  end
  
  let requests = function
    | 0 -> "destroy", []
    | 1 -> "get_viewport", ["id", `New_ID (Some "wp_viewport"); "surface", `Object (Some "wl_surface")]
    | i -> Proxy.unknown_request i, []
  
  let events = function
    | i -> Proxy.unknown_event i, []
  
end
let () = Iface_reg.register (module Wp_viewporter)

module Wp_viewport = struct
  type t = [`Wp_viewport]
  type _ Metadata.ty += T : [`Wp_viewport] Metadata.ty
  type versions = [`V1]
  let interface = "wp_viewport"
  let version = 1l
  
  module Error = struct
    type t =
      | Bad_value : t
      | Bad_size : t
      | Out_of_buffer : t
      | No_surface : t
    
    let to_int32 = function
      | Bad_value -> 0l
      | Bad_size -> 1l
      | Out_of_buffer -> 2l
      | No_surface -> 3l
    
    let of_int32 = function
      | 0l -> Bad_value
      | 1l -> Bad_size
      | 2l -> Out_of_buffer
      | 3l -> No_surface
      | x -> Fmt.failwith "Invalid error enum value %ld" x
  end
  
  let requests = function
    | 0 -> "destroy", []
    | 1 -> "set_source", ["x", `Fixed; "y", `Fixed; "width", `Fixed; "height", `Fixed]
    | 2 -> "set_destination", ["width", `Int; "height", `Int]
    | i -> Proxy.unknown_request i, []
  
  let events = function
    | i -> Proxy.unknown_event i, []
  
end
let () = Iface_reg.register (module Wp_viewport)
OCaml

Innovation. Community. Security.