| OLD | NEW |
| 1 /* Generated by wayland-scanner 1.11.0 */ | 1 /* Generated by wayland-scanner 1.11.0 */ |
| 2 | 2 |
| 3 #ifndef STYLUS_UNSTABLE_V1_SERVER_PROTOCOL_H | 3 #ifndef STYLUS_UNSTABLE_V1_SERVER_PROTOCOL_H |
| 4 #define STYLUS_UNSTABLE_V1_SERVER_PROTOCOL_H | 4 #define STYLUS_UNSTABLE_V1_SERVER_PROTOCOL_H |
| 5 | 5 |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include "wayland-server.h" | 8 #include "wayland-server.h" |
| 9 | 9 |
| 10 #ifdef __cplusplus | 10 #ifdef __cplusplus |
| 11 extern "C" { | 11 extern "C" { |
| 12 #endif | 12 #endif |
| 13 | 13 |
| 14 struct wl_client; | 14 struct wl_client; |
| 15 struct wl_resource; | 15 struct wl_resource; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * @page page_stylus_unstable_v1 The stylus_unstable_v1 protocol | 18 * @page page_stylus_unstable_v1 The stylus_unstable_v1 protocol |
| 19 * @section page_ifaces_stylus_unstable_v1 Interfaces | 19 * @section page_ifaces_stylus_unstable_v1 Interfaces |
| 20 * - @subpage page_iface_zcr_stylus_v1 - extends wl_pointer with events for on-s
creen stylus | 20 * - @subpage page_iface_zcr_stylus_v1 - extends wl_pointer with events for on-s
creen stylus |
| 21 * - @subpage page_iface_zcr_pointer_stylus_v1 - stylus extension for pointer | 21 * - @subpage page_iface_zcr_pointer_stylus_v1 - stylus extension for pointer |
| 22 * - @subpage page_iface_zwp_stylus_v1 - DEPRECATED | |
| 23 * - @subpage page_iface_zwp_pointer_stylus_v1 - DEPRECATED | |
| 24 * @section page_copyright_stylus_unstable_v1 Copyright | 22 * @section page_copyright_stylus_unstable_v1 Copyright |
| 25 * <pre> | 23 * <pre> |
| 26 * | 24 * |
| 27 * Copyright 2016 The Chromium Authors. | 25 * Copyright 2016 The Chromium Authors. |
| 28 * | 26 * |
| 29 * Permission is hereby granted, free of charge, to any person obtaining a | 27 * Permission is hereby granted, free of charge, to any person obtaining a |
| 30 * copy of this software and associated documentation files (the "Software"), | 28 * copy of this software and associated documentation files (the "Software"), |
| 31 * to deal in the Software without restriction, including without limitation | 29 * to deal in the Software without restriction, including without limitation |
| 32 * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 30 * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 33 * and/or sell copies of the Software, and to permit persons to whom the | 31 * and/or sell copies of the Software, and to permit persons to whom the |
| 34 * Software is furnished to do so, subject to the following conditions: | 32 * Software is furnished to do so, subject to the following conditions: |
| 35 * | 33 * |
| 36 * The above copyright notice and this permission notice (including the next | 34 * The above copyright notice and this permission notice (including the next |
| 37 * paragraph) shall be included in all copies or substantial portions of the | 35 * paragraph) shall be included in all copies or substantial portions of the |
| 38 * Software. | 36 * Software. |
| 39 * | 37 * |
| 40 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 38 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 41 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 39 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 42 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | 40 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 43 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | 41 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 44 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | 42 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 45 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 43 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 46 * DEALINGS IN THE SOFTWARE. | 44 * DEALINGS IN THE SOFTWARE. |
| 47 * </pre> | 45 * </pre> |
| 48 */ | 46 */ |
| 49 struct wl_pointer; | 47 struct wl_pointer; |
| 50 struct zcr_pointer_stylus_v1; | 48 struct zcr_pointer_stylus_v1; |
| 51 struct zcr_stylus_v1; | 49 struct zcr_stylus_v1; |
| 52 struct zwp_pointer_stylus_v1; | |
| 53 struct zwp_stylus_v1; | |
| 54 | 50 |
| 55 /** | 51 /** |
| 56 * @page page_iface_zcr_stylus_v1 zcr_stylus_v1 | 52 * @page page_iface_zcr_stylus_v1 zcr_stylus_v1 |
| 57 * @section page_iface_zcr_stylus_v1_desc Description | 53 * @section page_iface_zcr_stylus_v1_desc Description |
| 58 * | 54 * |
| 59 * Allows a wl_pointer to represent an on-screen stylus. The client can | 55 * Allows a wl_pointer to represent an on-screen stylus. The client can |
| 60 * interpret the on-screen stylus like any other mouse device, and use | 56 * interpret the on-screen stylus like any other mouse device, and use |
| 61 * this protocol to obtain detail information about the type of stylus, | 57 * this protocol to obtain detail information about the type of stylus, |
| 62 * as well as the force and tilt of the tool. | 58 * as well as the force and tilt of the tool. |
| 63 * | 59 * |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 * @section page_iface_zcr_pointer_stylus_v1_api API | 101 * @section page_iface_zcr_pointer_stylus_v1_api API |
| 106 * See @ref iface_zcr_pointer_stylus_v1. | 102 * See @ref iface_zcr_pointer_stylus_v1. |
| 107 */ | 103 */ |
| 108 /** | 104 /** |
| 109 * @defgroup iface_zcr_pointer_stylus_v1 The zcr_pointer_stylus_v1 interface | 105 * @defgroup iface_zcr_pointer_stylus_v1 The zcr_pointer_stylus_v1 interface |
| 110 * | 106 * |
| 111 * The zcr_pointer_stylus_v1 interface extends the wl_pointer interface with | 107 * The zcr_pointer_stylus_v1 interface extends the wl_pointer interface with |
| 112 * events to describe details about a stylus acting as a pointer. | 108 * events to describe details about a stylus acting as a pointer. |
| 113 */ | 109 */ |
| 114 extern const struct wl_interface zcr_pointer_stylus_v1_interface; | 110 extern const struct wl_interface zcr_pointer_stylus_v1_interface; |
| 115 /** | |
| 116 * @page page_iface_zwp_stylus_v1 zwp_stylus_v1 | |
| 117 * @section page_iface_zwp_stylus_v1_desc Description | |
| 118 * | |
| 119 * Allows a wl_pointer to represent an on-screen stylus. The client can | |
| 120 * interpret the on-screen stylus like any other mouse device, and use | |
| 121 * this protocol to obtain detail information about the type of stylus, | |
| 122 * as well as the force and tilt of the tool. | |
| 123 * | |
| 124 * These events are to be fired by the server within the same frame as other | |
| 125 * wl_pointer events. | |
| 126 * | |
| 127 * Warning! The protocol described in this file is experimental and | |
| 128 * backward incompatible changes may be made. Backward compatible changes | |
| 129 * may be added together with the corresponding uinterface version bump. | |
| 130 * Backward incompatible changes are done by bumping the version number in | |
| 131 * the protocol and uinterface names and resetting the interface version. | |
| 132 * Once the protocol is to be declared stable, the 'z' prefix and the | |
| 133 * version number in the protocol and interface names are removed and the | |
| 134 * interface version number is reset. | |
| 135 * @section page_iface_zwp_stylus_v1_api API | |
| 136 * See @ref iface_zwp_stylus_v1. | |
| 137 */ | |
| 138 /** | |
| 139 * @defgroup iface_zwp_stylus_v1 The zwp_stylus_v1 interface | |
| 140 * | |
| 141 * Allows a wl_pointer to represent an on-screen stylus. The client can | |
| 142 * interpret the on-screen stylus like any other mouse device, and use | |
| 143 * this protocol to obtain detail information about the type of stylus, | |
| 144 * as well as the force and tilt of the tool. | |
| 145 * | |
| 146 * These events are to be fired by the server within the same frame as other | |
| 147 * wl_pointer events. | |
| 148 * | |
| 149 * Warning! The protocol described in this file is experimental and | |
| 150 * backward incompatible changes may be made. Backward compatible changes | |
| 151 * may be added together with the corresponding uinterface version bump. | |
| 152 * Backward incompatible changes are done by bumping the version number in | |
| 153 * the protocol and uinterface names and resetting the interface version. | |
| 154 * Once the protocol is to be declared stable, the 'z' prefix and the | |
| 155 * version number in the protocol and interface names are removed and the | |
| 156 * interface version number is reset. | |
| 157 */ | |
| 158 extern const struct wl_interface zwp_stylus_v1_interface; | |
| 159 /** | |
| 160 * @page page_iface_zwp_pointer_stylus_v1 zwp_pointer_stylus_v1 | |
| 161 * @section page_iface_zwp_pointer_stylus_v1_desc Description | |
| 162 * | |
| 163 * The zwp_pointer_stylus_v1 interface extends the wl_pointer interface with | |
| 164 * events to describe details about a stylus acting as a pointer. | |
| 165 * @section page_iface_zwp_pointer_stylus_v1_api API | |
| 166 * See @ref iface_zwp_pointer_stylus_v1. | |
| 167 */ | |
| 168 /** | |
| 169 * @defgroup iface_zwp_pointer_stylus_v1 The zwp_pointer_stylus_v1 interface | |
| 170 * | |
| 171 * The zwp_pointer_stylus_v1 interface extends the wl_pointer interface with | |
| 172 * events to describe details about a stylus acting as a pointer. | |
| 173 */ | |
| 174 extern const struct wl_interface zwp_pointer_stylus_v1_interface; | |
| 175 | 111 |
| 176 /** | 112 /** |
| 177 * @ingroup iface_zcr_stylus_v1 | 113 * @ingroup iface_zcr_stylus_v1 |
| 178 * @struct zcr_stylus_v1_interface | 114 * @struct zcr_stylus_v1_interface |
| 179 */ | 115 */ |
| 180 struct zcr_stylus_v1_interface { | 116 struct zcr_stylus_v1_interface { |
| 181 /** | 117 /** |
| 182 * get stylus interface for pointer | 118 * get stylus interface for pointer |
| 183 * | 119 * |
| 184 * Create pointer_stylus object. See zcr_pointer_stylus_v1 | 120 * Create pointer_stylus object. See zcr_pointer_stylus_v1 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 * @param time timestamp with millisecond granularity | 216 * @param time timestamp with millisecond granularity |
| 281 * @param tilt_x tilt in x direction | 217 * @param tilt_x tilt in x direction |
| 282 * @param tilt_y tilt in y direction | 218 * @param tilt_y tilt in y direction |
| 283 */ | 219 */ |
| 284 static inline void | 220 static inline void |
| 285 zcr_pointer_stylus_v1_send_tilt(struct wl_resource *resource_, uint32_t time, wl
_fixed_t tilt_x, wl_fixed_t tilt_y) | 221 zcr_pointer_stylus_v1_send_tilt(struct wl_resource *resource_, uint32_t time, wl
_fixed_t tilt_x, wl_fixed_t tilt_y) |
| 286 { | 222 { |
| 287 wl_resource_post_event(resource_, ZCR_POINTER_STYLUS_V1_TILT, time, tilt
_x, tilt_y); | 223 wl_resource_post_event(resource_, ZCR_POINTER_STYLUS_V1_TILT, time, tilt
_x, tilt_y); |
| 288 } | 224 } |
| 289 | 225 |
| 290 /** | |
| 291 * @ingroup iface_zwp_stylus_v1 | |
| 292 * @struct zwp_stylus_v1_interface | |
| 293 */ | |
| 294 struct zwp_stylus_v1_interface { | |
| 295 /** | |
| 296 * get stylus interface for pointer | |
| 297 * | |
| 298 * Create pointer_stylus object. See zwp_pointer_stylus_v1 | |
| 299 * interface for details. | |
| 300 */ | |
| 301 void (*get_pointer_stylus)(struct wl_client *client, | |
| 302 struct wl_resource *resource, | |
| 303 uint32_t id, | |
| 304 struct wl_resource *pointer); | |
| 305 }; | |
| 306 | |
| 307 | |
| 308 #ifndef ZWP_POINTER_STYLUS_V1_TOOL_TYPE_ENUM | |
| 309 #define ZWP_POINTER_STYLUS_V1_TOOL_TYPE_ENUM | |
| 310 /** | |
| 311 * @ingroup iface_zwp_pointer_stylus_v1 | |
| 312 * tool type of device. | |
| 313 */ | |
| 314 enum zwp_pointer_stylus_v1_tool_type { | |
| 315 /** | |
| 316 * Mouse or touchpad, not a stylus. | |
| 317 */ | |
| 318 ZWP_POINTER_STYLUS_V1_TOOL_TYPE_MOUSE = 0, | |
| 319 /** | |
| 320 * Pen | |
| 321 */ | |
| 322 ZWP_POINTER_STYLUS_V1_TOOL_TYPE_PEN = 1, | |
| 323 /** | |
| 324 * Touch | |
| 325 */ | |
| 326 ZWP_POINTER_STYLUS_V1_TOOL_TYPE_TOUCH = 2, | |
| 327 /** | |
| 328 * Eraser | |
| 329 */ | |
| 330 ZWP_POINTER_STYLUS_V1_TOOL_TYPE_ERASER = 3, | |
| 331 }; | |
| 332 #endif /* ZWP_POINTER_STYLUS_V1_TOOL_TYPE_ENUM */ | |
| 333 | |
| 334 /** | |
| 335 * @ingroup iface_zwp_pointer_stylus_v1 | |
| 336 * @struct zwp_pointer_stylus_v1_interface | |
| 337 */ | |
| 338 struct zwp_pointer_stylus_v1_interface { | |
| 339 /** | |
| 340 * destroy stylus object | |
| 341 * | |
| 342 * | |
| 343 */ | |
| 344 void (*destroy)(struct wl_client *client, | |
| 345 struct wl_resource *resource); | |
| 346 }; | |
| 347 | |
| 348 #define ZWP_POINTER_STYLUS_V1_TOOL_CHANGE 0 | |
| 349 #define ZWP_POINTER_STYLUS_V1_FORCE 1 | |
| 350 #define ZWP_POINTER_STYLUS_V1_TILT 2 | |
| 351 | |
| 352 /** | |
| 353 * @ingroup iface_zwp_pointer_stylus_v1 | |
| 354 */ | |
| 355 #define ZWP_POINTER_STYLUS_V1_TOOL_CHANGE_SINCE_VERSION 1 | |
| 356 /** | |
| 357 * @ingroup iface_zwp_pointer_stylus_v1 | |
| 358 */ | |
| 359 #define ZWP_POINTER_STYLUS_V1_FORCE_SINCE_VERSION 1 | |
| 360 /** | |
| 361 * @ingroup iface_zwp_pointer_stylus_v1 | |
| 362 */ | |
| 363 #define ZWP_POINTER_STYLUS_V1_TILT_SINCE_VERSION 1 | |
| 364 | |
| 365 /** | |
| 366 * @ingroup iface_zwp_pointer_stylus_v1 | |
| 367 * Sends an tool_change event to the client owning the resource. | |
| 368 * @param resource_ The client's resource | |
| 369 * @param type new device type | |
| 370 */ | |
| 371 static inline void | |
| 372 zwp_pointer_stylus_v1_send_tool_change(struct wl_resource *resource_, uint32_t t
ype) | |
| 373 { | |
| 374 wl_resource_post_event(resource_, ZWP_POINTER_STYLUS_V1_TOOL_CHANGE, typ
e); | |
| 375 } | |
| 376 | |
| 377 /** | |
| 378 * @ingroup iface_zwp_pointer_stylus_v1 | |
| 379 * Sends an force event to the client owning the resource. | |
| 380 * @param resource_ The client's resource | |
| 381 * @param time timestamp with millisecond granularity | |
| 382 * @param force new value of force | |
| 383 */ | |
| 384 static inline void | |
| 385 zwp_pointer_stylus_v1_send_force(struct wl_resource *resource_, uint32_t time, w
l_fixed_t force) | |
| 386 { | |
| 387 wl_resource_post_event(resource_, ZWP_POINTER_STYLUS_V1_FORCE, time, for
ce); | |
| 388 } | |
| 389 | |
| 390 /** | |
| 391 * @ingroup iface_zwp_pointer_stylus_v1 | |
| 392 * Sends an tilt event to the client owning the resource. | |
| 393 * @param resource_ The client's resource | |
| 394 * @param time timestamp with millisecond granularity | |
| 395 * @param tilt_x tilt in x direction | |
| 396 * @param tilt_y tilt in y direction | |
| 397 */ | |
| 398 static inline void | |
| 399 zwp_pointer_stylus_v1_send_tilt(struct wl_resource *resource_, uint32_t time, wl
_fixed_t tilt_x, wl_fixed_t tilt_y) | |
| 400 { | |
| 401 wl_resource_post_event(resource_, ZWP_POINTER_STYLUS_V1_TILT, time, tilt
_x, tilt_y); | |
| 402 } | |
| 403 | |
| 404 #ifdef __cplusplus | 226 #ifdef __cplusplus |
| 405 } | 227 } |
| 406 #endif | 228 #endif |
| 407 | 229 |
| 408 #endif | 230 #endif |
| OLD | NEW |