package wayland

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file wlr_screencopy_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
(* 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 Zwlr_screencopy_manager_v1 = struct
  type t = [`Zwlr_screencopy_manager_v1]
  type _ Metadata.ty += T : [`Zwlr_screencopy_manager_v1] Metadata.ty
  type versions = [`V1 | `V2 | `V3]
  let interface = "zwlr_screencopy_manager_v1"
  let version = 3l
  
  let requests = function
    | 0 -> "capture_output", ["frame", `New_ID (Some "zwlr_screencopy_frame_v1"); "overlay_cursor", `Int;
                              "output", `Object (Some "wl_output")]
    | 1 -> "capture_output_region", ["frame", `New_ID (Some "zwlr_screencopy_frame_v1"); "overlay_cursor", `Int;
                                     "output", `Object (Some "wl_output"); "x", `Int; "y", `Int; "width", `Int;
                                     "height", `Int]
    | 2 -> "destroy", []
    | i -> Proxy.unknown_request i, []
  
  let events = function
    | i -> Proxy.unknown_event i, []
  
end
let () = Iface_reg.register (module Zwlr_screencopy_manager_v1)

module Zwlr_screencopy_frame_v1 = struct
  type t = [`Zwlr_screencopy_frame_v1]
  type _ Metadata.ty += T : [`Zwlr_screencopy_frame_v1] Metadata.ty
  type versions = [`V1 | `V2 | `V3]
  let interface = "zwlr_screencopy_frame_v1"
  let version = 3l
  
  module Error = struct
    type t =
      | Already_used : t
      | Invalid_buffer : t
    
    let to_int32 = function
      | Already_used -> 0l
      | Invalid_buffer -> 1l
    
    let of_int32 = function
      | 0l -> Already_used
      | 1l -> Invalid_buffer
      | x -> Fmt.failwith "Invalid error enum value %ld" x
  end
  
  
  module Flags = struct
    type t = int32
    
    let y_invert = 1l
    
    let to_int32 = Fun.id
    let of_int32 = Fun.id
  end
  
  let requests = function
    | 0 -> "copy", ["buffer", `Object (Some "wl_buffer")]
    | 1 -> "destroy", []
    | 2 -> "copy_with_damage", ["buffer", `Object (Some "wl_buffer")]
    | i -> Proxy.unknown_request i, []
  
  let events = function
    | 0 -> "buffer", ["format", `Uint; "width", `Uint; "height", `Uint; "stride", `Uint]
    | 1 -> "flags", ["flags", `Uint]
    | 2 -> "ready", ["tv_sec_hi", `Uint; "tv_sec_lo", `Uint; "tv_nsec", `Uint]
    | 3 -> "failed", []
    | 4 -> "damage", ["x", `Uint; "y", `Uint; "width", `Uint; "height", `Uint]
    | 5 -> "linux_dmabuf", ["format", `Uint; "width", `Uint; "height", `Uint]
    | 6 -> "buffer_done", []
    | i -> Proxy.unknown_event i, []
  
end
let () = Iface_reg.register (module Zwlr_screencopy_frame_v1)
OCaml

Innovation. Community. Security.