v / thirdparty / sokol / pointer-constraints-unstable-v1-protocol.c
109 lines · 94 sloc · 3.88 KB · 5d6de17f708abcf79877f70e677d60a4e23bb727
Raw
1/* Generated by wayland-scanner 1.24.0 */
2
3/*
4 * Copyright © 2014 Jonas Ådahl
5 * Copyright © 2015 Red Hat Inc.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the next
15 * paragraph) shall be included in all copies or substantial portions of the
16 * Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 * DEALINGS IN THE SOFTWARE.
25 */
26
27#include <stdbool.h>
28#include <stdlib.h>
29#include <stdint.h>
30#include "wayland-util.h"
31
32#ifndef __has_attribute
33# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
34#endif
35
36#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
37#define WL_PRIVATE __attribute__ ((visibility("hidden")))
38#else
39#define WL_PRIVATE
40#endif
41
42extern const struct wl_interface wl_pointer_interface;
43extern const struct wl_interface wl_region_interface;
44extern const struct wl_interface wl_surface_interface;
45extern const struct wl_interface zwp_confined_pointer_v1_interface;
46extern const struct wl_interface zwp_locked_pointer_v1_interface;
47
48static const struct wl_interface *pointer_constraints_unstable_v1_types[] = {
49 NULL,
50 NULL,
51 &zwp_locked_pointer_v1_interface,
52 &wl_surface_interface,
53 &wl_pointer_interface,
54 &wl_region_interface,
55 NULL,
56 &zwp_confined_pointer_v1_interface,
57 &wl_surface_interface,
58 &wl_pointer_interface,
59 &wl_region_interface,
60 NULL,
61 &wl_region_interface,
62 &wl_region_interface,
63};
64
65static const struct wl_message zwp_pointer_constraints_v1_requests[] = {
66 { "destroy", "", pointer_constraints_unstable_v1_types + 0 },
67 { "lock_pointer", "noo?ou", pointer_constraints_unstable_v1_types + 2 },
68 { "confine_pointer", "noo?ou", pointer_constraints_unstable_v1_types + 7 },
69};
70
71WL_PRIVATE const struct wl_interface zwp_pointer_constraints_v1_interface = {
72 "zwp_pointer_constraints_v1", 1,
73 3, zwp_pointer_constraints_v1_requests,
74 0, NULL,
75};
76
77static const struct wl_message zwp_locked_pointer_v1_requests[] = {
78 { "destroy", "", pointer_constraints_unstable_v1_types + 0 },
79 { "set_cursor_position_hint", "ff", pointer_constraints_unstable_v1_types + 0 },
80 { "set_region", "?o", pointer_constraints_unstable_v1_types + 12 },
81};
82
83static const struct wl_message zwp_locked_pointer_v1_events[] = {
84 { "locked", "", pointer_constraints_unstable_v1_types + 0 },
85 { "unlocked", "", pointer_constraints_unstable_v1_types + 0 },
86};
87
88WL_PRIVATE const struct wl_interface zwp_locked_pointer_v1_interface = {
89 "zwp_locked_pointer_v1", 1,
90 3, zwp_locked_pointer_v1_requests,
91 2, zwp_locked_pointer_v1_events,
92};
93
94static const struct wl_message zwp_confined_pointer_v1_requests[] = {
95 { "destroy", "", pointer_constraints_unstable_v1_types + 0 },
96 { "set_region", "?o", pointer_constraints_unstable_v1_types + 13 },
97};
98
99static const struct wl_message zwp_confined_pointer_v1_events[] = {
100 { "confined", "", pointer_constraints_unstable_v1_types + 0 },
101 { "unconfined", "", pointer_constraints_unstable_v1_types + 0 },
102};
103
104WL_PRIVATE const struct wl_interface zwp_confined_pointer_v1_interface = {
105 "zwp_confined_pointer_v1", 1,
106 2, zwp_confined_pointer_v1_requests,
107 2, zwp_confined_pointer_v1_events,
108};
109
110