package wayland

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

Source file pointer_constraints_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
(* 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_pointer_constraints_v1 = struct
  type t = [`Zwp_pointer_constraints_v1]
  type _ Metadata.ty += T : [`Zwp_pointer_constraints_v1] Metadata.ty
  type versions = [`V1]
  let interface = "zwp_pointer_constraints_v1"
  let version = 1l
  
  (** Wp_pointer_constraints error values.
      
      These errors can be emitted in response to wp_pointer_constraints
      requests. *)
  module Error = struct
    type t =
      | Already_constrained : t
    
    let to_int32 = function
      | Already_constrained -> 1l
    
    let of_int32 = function
      | 1l -> Already_constrained
      | x -> Fmt.failwith "Invalid error enum value %ld" x
  end
  
  
  (** Constraint lifetime.
      
      These values represent different lifetime semantics. They are passed
      as arguments to the factory requests to specify how the constraint
      lifetimes should be managed. *)
  module Lifetime = struct
    type t =
      | Oneshot : t
        (** The pointer constraint is defunct once deactivated.
            
            A oneshot pointer constraint will never reactivate once it has been
            deactivated. See the corresponding deactivation event
            (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for
            details. *)
      | Persistent : t
        (** The pointer constraint may reactivate.
            
            A persistent pointer constraint may again reactivate once it has
            been deactivated. See the corresponding deactivation event
            (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for
            details. *)
    
    let to_int32 = function
      | Oneshot -> 1l
      | Persistent -> 2l
    
    let of_int32 = function
      | 1l -> Oneshot
      | 2l -> Persistent
      | x -> Fmt.failwith "Invalid lifetime enum value %ld" x
  end
  
  let requests = function
    | 0 -> "destroy", []
    | 1 -> "lock_pointer", ["id", `New_ID (Some "zwp_locked_pointer_v1"); "surface", `Object (Some "wl_surface");
                            "pointer", `Object (Some "wl_pointer"); "region", `Object (Some "wl_region");
                            "lifetime", `Uint]
    | 2 -> "confine_pointer", ["id", `New_ID (Some "zwp_confined_pointer_v1"); "surface", `Object (Some "wl_surface");
                               "pointer", `Object (Some "wl_pointer"); "region", `Object (Some "wl_region");
                               "lifetime", `Uint]
    | i -> Proxy.unknown_request i, []
  
  let events = function
    | i -> Proxy.unknown_event i, []
  
end
let () = Iface_reg.register (module Zwp_pointer_constraints_v1)

module Zwp_locked_pointer_v1 = struct
  type t = [`Zwp_locked_pointer_v1]
  type _ Metadata.ty += T : [`Zwp_locked_pointer_v1] Metadata.ty
  type versions = [`V1]
  let interface = "zwp_locked_pointer_v1"
  let version = 1l
  
  let requests = function
    | 0 -> "destroy", []
    | 1 -> "set_cursor_position_hint", ["surface_x", `Fixed; "surface_y", `Fixed]
    | 2 -> "set_region", ["region", `Object (Some "wl_region")]
    | i -> Proxy.unknown_request i, []
  
  let events = function
    | 0 -> "locked", []
    | 1 -> "unlocked", []
    | i -> Proxy.unknown_event i, []
  
end
let () = Iface_reg.register (module Zwp_locked_pointer_v1)

module Zwp_confined_pointer_v1 = struct
  type t = [`Zwp_confined_pointer_v1]
  type _ Metadata.ty += T : [`Zwp_confined_pointer_v1] Metadata.ty
  type versions = [`V1]
  let interface = "zwp_confined_pointer_v1"
  let version = 1l
  
  let requests = function
    | 0 -> "destroy", []
    | 1 -> "set_region", ["region", `Object (Some "wl_region")]
    | i -> Proxy.unknown_request i, []
  
  let events = function
    | 0 -> "confined", []
    | 1 -> "unconfined", []
    | i -> Proxy.unknown_event i, []
  
end
let () = Iface_reg.register (module Zwp_confined_pointer_v1)
OCaml

Innovation. Community. Security.