| 1 | /* Generated by wayland-scanner 1.24.0 */ |
| 2 | |
| 3 | /* |
| 4 | * Copyright 2014 © Stephen "Lyude" Chandler Paul |
| 5 | * Copyright 2015-2016 © Red Hat, Inc. |
| 6 | * |
| 7 | * Permission is hereby granted, free of charge, to any person |
| 8 | * obtaining a copy of this software and associated documentation files |
| 9 | * (the "Software"), to deal in the Software without restriction, |
| 10 | * including without limitation the rights to use, copy, modify, merge, |
| 11 | * publish, distribute, sublicense, and/or sell copies of the Software, |
| 12 | * and to permit persons to whom the Software is furnished to do so, |
| 13 | * subject to the following conditions: |
| 14 | * |
| 15 | * The above copyright notice and this permission notice (including the |
| 16 | * next paragraph) shall be included in all copies or substantial |
| 17 | * portions of the Software. |
| 18 | * |
| 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS |
| 23 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
| 24 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
| 25 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 26 | * SOFTWARE. |
| 27 | */ |
| 28 | |
| 29 | #include <stdbool.h> |
| 30 | #include <stdlib.h> |
| 31 | #include <stdint.h> |
| 32 | #include "wayland-util.h" |
| 33 | |
| 34 | #ifndef __has_attribute |
| 35 | # define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ |
| 36 | #endif |
| 37 | |
| 38 | #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) |
| 39 | #define WL_PRIVATE __attribute__ ((visibility("hidden"))) |
| 40 | #else |
| 41 | #define WL_PRIVATE |
| 42 | #endif |
| 43 | |
| 44 | extern const struct wl_interface wl_seat_interface; |
| 45 | extern const struct wl_interface wl_surface_interface; |
| 46 | extern const struct wl_interface zwp_tablet_pad_group_v2_interface; |
| 47 | extern const struct wl_interface zwp_tablet_pad_ring_v2_interface; |
| 48 | extern const struct wl_interface zwp_tablet_pad_strip_v2_interface; |
| 49 | extern const struct wl_interface zwp_tablet_pad_v2_interface; |
| 50 | extern const struct wl_interface zwp_tablet_seat_v2_interface; |
| 51 | extern const struct wl_interface zwp_tablet_tool_v2_interface; |
| 52 | extern const struct wl_interface zwp_tablet_v2_interface; |
| 53 | |
| 54 | static const struct wl_interface *tablet_unstable_v2_types[] = { |
| 55 | NULL, |
| 56 | NULL, |
| 57 | NULL, |
| 58 | &zwp_tablet_seat_v2_interface, |
| 59 | &wl_seat_interface, |
| 60 | &zwp_tablet_v2_interface, |
| 61 | &zwp_tablet_tool_v2_interface, |
| 62 | &zwp_tablet_pad_v2_interface, |
| 63 | NULL, |
| 64 | &wl_surface_interface, |
| 65 | NULL, |
| 66 | NULL, |
| 67 | NULL, |
| 68 | &zwp_tablet_v2_interface, |
| 69 | &wl_surface_interface, |
| 70 | &zwp_tablet_pad_ring_v2_interface, |
| 71 | &zwp_tablet_pad_strip_v2_interface, |
| 72 | &zwp_tablet_pad_group_v2_interface, |
| 73 | NULL, |
| 74 | &zwp_tablet_v2_interface, |
| 75 | &wl_surface_interface, |
| 76 | NULL, |
| 77 | &wl_surface_interface, |
| 78 | }; |
| 79 | |
| 80 | static const struct wl_message zwp_tablet_manager_v2_requests[] = { |
| 81 | { "get_tablet_seat", "no", tablet_unstable_v2_types + 3 }, |
| 82 | { "destroy", "", tablet_unstable_v2_types + 0 }, |
| 83 | }; |
| 84 | |
| 85 | WL_PRIVATE const struct wl_interface zwp_tablet_manager_v2_interface = { |
| 86 | "zwp_tablet_manager_v2", 1, |
| 87 | 2, zwp_tablet_manager_v2_requests, |
| 88 | 0, NULL, |
| 89 | }; |
| 90 | |
| 91 | static const struct wl_message zwp_tablet_seat_v2_requests[] = { |
| 92 | { "destroy", "", tablet_unstable_v2_types + 0 }, |
| 93 | }; |
| 94 | |
| 95 | static const struct wl_message zwp_tablet_seat_v2_events[] = { |
| 96 | { "tablet_added", "n", tablet_unstable_v2_types + 5 }, |
| 97 | { "tool_added", "n", tablet_unstable_v2_types + 6 }, |
| 98 | { "pad_added", "n", tablet_unstable_v2_types + 7 }, |
| 99 | }; |
| 100 | |
| 101 | WL_PRIVATE const struct wl_interface zwp_tablet_seat_v2_interface = { |
| 102 | "zwp_tablet_seat_v2", 1, |
| 103 | 1, zwp_tablet_seat_v2_requests, |
| 104 | 3, zwp_tablet_seat_v2_events, |
| 105 | }; |
| 106 | |
| 107 | static const struct wl_message zwp_tablet_tool_v2_requests[] = { |
| 108 | { "set_cursor", "u?oii", tablet_unstable_v2_types + 8 }, |
| 109 | { "destroy", "", tablet_unstable_v2_types + 0 }, |
| 110 | }; |
| 111 | |
| 112 | static const struct wl_message zwp_tablet_tool_v2_events[] = { |
| 113 | { "type", "u", tablet_unstable_v2_types + 0 }, |
| 114 | { "hardware_serial", "uu", tablet_unstable_v2_types + 0 }, |
| 115 | { "hardware_id_wacom", "uu", tablet_unstable_v2_types + 0 }, |
| 116 | { "capability", "u", tablet_unstable_v2_types + 0 }, |
| 117 | { "done", "", tablet_unstable_v2_types + 0 }, |
| 118 | { "removed", "", tablet_unstable_v2_types + 0 }, |
| 119 | { "proximity_in", "uoo", tablet_unstable_v2_types + 12 }, |
| 120 | { "proximity_out", "", tablet_unstable_v2_types + 0 }, |
| 121 | { "down", "u", tablet_unstable_v2_types + 0 }, |
| 122 | { "up", "", tablet_unstable_v2_types + 0 }, |
| 123 | { "motion", "ff", tablet_unstable_v2_types + 0 }, |
| 124 | { "pressure", "u", tablet_unstable_v2_types + 0 }, |
| 125 | { "distance", "u", tablet_unstable_v2_types + 0 }, |
| 126 | { "tilt", "ff", tablet_unstable_v2_types + 0 }, |
| 127 | { "rotation", "f", tablet_unstable_v2_types + 0 }, |
| 128 | { "slider", "i", tablet_unstable_v2_types + 0 }, |
| 129 | { "wheel", "fi", tablet_unstable_v2_types + 0 }, |
| 130 | { "button", "uuu", tablet_unstable_v2_types + 0 }, |
| 131 | { "frame", "u", tablet_unstable_v2_types + 0 }, |
| 132 | }; |
| 133 | |
| 134 | WL_PRIVATE const struct wl_interface zwp_tablet_tool_v2_interface = { |
| 135 | "zwp_tablet_tool_v2", 1, |
| 136 | 2, zwp_tablet_tool_v2_requests, |
| 137 | 19, zwp_tablet_tool_v2_events, |
| 138 | }; |
| 139 | |
| 140 | static const struct wl_message zwp_tablet_v2_requests[] = { |
| 141 | { "destroy", "", tablet_unstable_v2_types + 0 }, |
| 142 | }; |
| 143 | |
| 144 | static const struct wl_message zwp_tablet_v2_events[] = { |
| 145 | { "name", "s", tablet_unstable_v2_types + 0 }, |
| 146 | { "id", "uu", tablet_unstable_v2_types + 0 }, |
| 147 | { "path", "s", tablet_unstable_v2_types + 0 }, |
| 148 | { "done", "", tablet_unstable_v2_types + 0 }, |
| 149 | { "removed", "", tablet_unstable_v2_types + 0 }, |
| 150 | }; |
| 151 | |
| 152 | WL_PRIVATE const struct wl_interface zwp_tablet_v2_interface = { |
| 153 | "zwp_tablet_v2", 1, |
| 154 | 1, zwp_tablet_v2_requests, |
| 155 | 5, zwp_tablet_v2_events, |
| 156 | }; |
| 157 | |
| 158 | static const struct wl_message zwp_tablet_pad_ring_v2_requests[] = { |
| 159 | { "set_feedback", "su", tablet_unstable_v2_types + 0 }, |
| 160 | { "destroy", "", tablet_unstable_v2_types + 0 }, |
| 161 | }; |
| 162 | |
| 163 | static const struct wl_message zwp_tablet_pad_ring_v2_events[] = { |
| 164 | { "source", "u", tablet_unstable_v2_types + 0 }, |
| 165 | { "angle", "f", tablet_unstable_v2_types + 0 }, |
| 166 | { "stop", "", tablet_unstable_v2_types + 0 }, |
| 167 | { "frame", "u", tablet_unstable_v2_types + 0 }, |
| 168 | }; |
| 169 | |
| 170 | WL_PRIVATE const struct wl_interface zwp_tablet_pad_ring_v2_interface = { |
| 171 | "zwp_tablet_pad_ring_v2", 1, |
| 172 | 2, zwp_tablet_pad_ring_v2_requests, |
| 173 | 4, zwp_tablet_pad_ring_v2_events, |
| 174 | }; |
| 175 | |
| 176 | static const struct wl_message zwp_tablet_pad_strip_v2_requests[] = { |
| 177 | { "set_feedback", "su", tablet_unstable_v2_types + 0 }, |
| 178 | { "destroy", "", tablet_unstable_v2_types + 0 }, |
| 179 | }; |
| 180 | |
| 181 | static const struct wl_message zwp_tablet_pad_strip_v2_events[] = { |
| 182 | { "source", "u", tablet_unstable_v2_types + 0 }, |
| 183 | { "position", "u", tablet_unstable_v2_types + 0 }, |
| 184 | { "stop", "", tablet_unstable_v2_types + 0 }, |
| 185 | { "frame", "u", tablet_unstable_v2_types + 0 }, |
| 186 | }; |
| 187 | |
| 188 | WL_PRIVATE const struct wl_interface zwp_tablet_pad_strip_v2_interface = { |
| 189 | "zwp_tablet_pad_strip_v2", 1, |
| 190 | 2, zwp_tablet_pad_strip_v2_requests, |
| 191 | 4, zwp_tablet_pad_strip_v2_events, |
| 192 | }; |
| 193 | |
| 194 | static const struct wl_message zwp_tablet_pad_group_v2_requests[] = { |
| 195 | { "destroy", "", tablet_unstable_v2_types + 0 }, |
| 196 | }; |
| 197 | |
| 198 | static const struct wl_message zwp_tablet_pad_group_v2_events[] = { |
| 199 | { "buttons", "a", tablet_unstable_v2_types + 0 }, |
| 200 | { "ring", "n", tablet_unstable_v2_types + 15 }, |
| 201 | { "strip", "n", tablet_unstable_v2_types + 16 }, |
| 202 | { "modes", "u", tablet_unstable_v2_types + 0 }, |
| 203 | { "done", "", tablet_unstable_v2_types + 0 }, |
| 204 | { "mode_switch", "uuu", tablet_unstable_v2_types + 0 }, |
| 205 | }; |
| 206 | |
| 207 | WL_PRIVATE const struct wl_interface zwp_tablet_pad_group_v2_interface = { |
| 208 | "zwp_tablet_pad_group_v2", 1, |
| 209 | 1, zwp_tablet_pad_group_v2_requests, |
| 210 | 6, zwp_tablet_pad_group_v2_events, |
| 211 | }; |
| 212 | |
| 213 | static const struct wl_message zwp_tablet_pad_v2_requests[] = { |
| 214 | { "set_feedback", "usu", tablet_unstable_v2_types + 0 }, |
| 215 | { "destroy", "", tablet_unstable_v2_types + 0 }, |
| 216 | }; |
| 217 | |
| 218 | static const struct wl_message zwp_tablet_pad_v2_events[] = { |
| 219 | { "group", "n", tablet_unstable_v2_types + 17 }, |
| 220 | { "path", "s", tablet_unstable_v2_types + 0 }, |
| 221 | { "buttons", "u", tablet_unstable_v2_types + 0 }, |
| 222 | { "done", "", tablet_unstable_v2_types + 0 }, |
| 223 | { "button", "uuu", tablet_unstable_v2_types + 0 }, |
| 224 | { "enter", "uoo", tablet_unstable_v2_types + 18 }, |
| 225 | { "leave", "uo", tablet_unstable_v2_types + 21 }, |
| 226 | { "removed", "", tablet_unstable_v2_types + 0 }, |
| 227 | }; |
| 228 | |
| 229 | WL_PRIVATE const struct wl_interface zwp_tablet_pad_v2_interface = { |
| 230 | "zwp_tablet_pad_v2", 1, |
| 231 | 2, zwp_tablet_pad_v2_requests, |
| 232 | 8, zwp_tablet_pad_v2_events, |
| 233 | }; |
| 234 | |
| 235 | |