| 1 | /* Generated by wayland-scanner 1.24.0 */ |
| 2 | |
| 3 | #ifndef CURSOR_SHAPE_V1_CLIENT_PROTOCOL_H |
| 4 | #define CURSOR_SHAPE_V1_CLIENT_PROTOCOL_H |
| 5 | |
| 6 | #include <stdint.h> |
| 7 | #include <stddef.h> |
| 8 | #include "wayland-client.h" |
| 9 | |
| 10 | #ifdef __cplusplus |
| 11 | extern "C" { |
| 12 | #endif |
| 13 | |
| 14 | /** |
| 15 | * @page page_cursor_shape_v1 The cursor_shape_v1 protocol |
| 16 | * @section page_ifaces_cursor_shape_v1 Interfaces |
| 17 | * - @subpage page_iface_wp_cursor_shape_manager_v1 - cursor shape manager |
| 18 | * - @subpage page_iface_wp_cursor_shape_device_v1 - cursor shape for a device |
| 19 | * @section page_copyright_cursor_shape_v1 Copyright |
| 20 | * <pre> |
| 21 | * |
| 22 | * Copyright 2018 The Chromium Authors |
| 23 | * Copyright 2023 Simon Ser |
| 24 | * |
| 25 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 26 | * copy of this software and associated documentation files (the "Software"), |
| 27 | * to deal in the Software without restriction, including without limitation |
| 28 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 29 | * and/or sell copies of the Software, and to permit persons to whom the |
| 30 | * Software is furnished to do so, subject to the following conditions: |
| 31 | * The above copyright notice and this permission notice (including the next |
| 32 | * paragraph) shall be included in all copies or substantial portions of the |
| 33 | * Software. |
| 34 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 35 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 36 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 37 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 38 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 39 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 40 | * DEALINGS IN THE SOFTWARE. |
| 41 | * </pre> |
| 42 | */ |
| 43 | struct wl_pointer; |
| 44 | struct wp_cursor_shape_device_v1; |
| 45 | struct wp_cursor_shape_manager_v1; |
| 46 | struct zwp_tablet_tool_v2; |
| 47 | |
| 48 | #ifndef WP_CURSOR_SHAPE_MANAGER_V1_INTERFACE |
| 49 | #define WP_CURSOR_SHAPE_MANAGER_V1_INTERFACE |
| 50 | /** |
| 51 | * @page page_iface_wp_cursor_shape_manager_v1 wp_cursor_shape_manager_v1 |
| 52 | * @section page_iface_wp_cursor_shape_manager_v1_desc Description |
| 53 | * |
| 54 | * This global offers an alternative, optional way to set cursor images. This |
| 55 | * new way uses enumerated cursors instead of a wl_surface like |
| 56 | * wl_pointer.set_cursor does. |
| 57 | * |
| 58 | * Warning! The protocol described in this file is currently in the testing |
| 59 | * phase. Backward compatible changes may be added together with the |
| 60 | * corresponding interface version bump. Backward incompatible changes can |
| 61 | * only be done by creating a new major version of the extension. |
| 62 | * @section page_iface_wp_cursor_shape_manager_v1_api API |
| 63 | * See @ref iface_wp_cursor_shape_manager_v1. |
| 64 | */ |
| 65 | /** |
| 66 | * @defgroup iface_wp_cursor_shape_manager_v1 The wp_cursor_shape_manager_v1 interface |
| 67 | * |
| 68 | * This global offers an alternative, optional way to set cursor images. This |
| 69 | * new way uses enumerated cursors instead of a wl_surface like |
| 70 | * wl_pointer.set_cursor does. |
| 71 | * |
| 72 | * Warning! The protocol described in this file is currently in the testing |
| 73 | * phase. Backward compatible changes may be added together with the |
| 74 | * corresponding interface version bump. Backward incompatible changes can |
| 75 | * only be done by creating a new major version of the extension. |
| 76 | */ |
| 77 | extern const struct wl_interface wp_cursor_shape_manager_v1_interface; |
| 78 | #endif |
| 79 | #ifndef WP_CURSOR_SHAPE_DEVICE_V1_INTERFACE |
| 80 | #define WP_CURSOR_SHAPE_DEVICE_V1_INTERFACE |
| 81 | /** |
| 82 | * @page page_iface_wp_cursor_shape_device_v1 wp_cursor_shape_device_v1 |
| 83 | * @section page_iface_wp_cursor_shape_device_v1_desc Description |
| 84 | * |
| 85 | * This interface allows clients to set the cursor shape. |
| 86 | * @section page_iface_wp_cursor_shape_device_v1_api API |
| 87 | * See @ref iface_wp_cursor_shape_device_v1. |
| 88 | */ |
| 89 | /** |
| 90 | * @defgroup iface_wp_cursor_shape_device_v1 The wp_cursor_shape_device_v1 interface |
| 91 | * |
| 92 | * This interface allows clients to set the cursor shape. |
| 93 | */ |
| 94 | extern const struct wl_interface wp_cursor_shape_device_v1_interface; |
| 95 | #endif |
| 96 | |
| 97 | #define WP_CURSOR_SHAPE_MANAGER_V1_DESTROY 0 |
| 98 | #define WP_CURSOR_SHAPE_MANAGER_V1_GET_POINTER 1 |
| 99 | #define WP_CURSOR_SHAPE_MANAGER_V1_GET_TABLET_TOOL_V2 2 |
| 100 | |
| 101 | |
| 102 | /** |
| 103 | * @ingroup iface_wp_cursor_shape_manager_v1 |
| 104 | */ |
| 105 | #define WP_CURSOR_SHAPE_MANAGER_V1_DESTROY_SINCE_VERSION 1 |
| 106 | /** |
| 107 | * @ingroup iface_wp_cursor_shape_manager_v1 |
| 108 | */ |
| 109 | #define WP_CURSOR_SHAPE_MANAGER_V1_GET_POINTER_SINCE_VERSION 1 |
| 110 | /** |
| 111 | * @ingroup iface_wp_cursor_shape_manager_v1 |
| 112 | */ |
| 113 | #define WP_CURSOR_SHAPE_MANAGER_V1_GET_TABLET_TOOL_V2_SINCE_VERSION 1 |
| 114 | |
| 115 | /** @ingroup iface_wp_cursor_shape_manager_v1 */ |
| 116 | static inline void |
| 117 | wp_cursor_shape_manager_v1_set_user_data(struct wp_cursor_shape_manager_v1 *wp_cursor_shape_manager_v1, void *user_data) |
| 118 | { |
| 119 | wl_proxy_set_user_data((struct wl_proxy *) wp_cursor_shape_manager_v1, user_data); |
| 120 | } |
| 121 | |
| 122 | /** @ingroup iface_wp_cursor_shape_manager_v1 */ |
| 123 | static inline void * |
| 124 | wp_cursor_shape_manager_v1_get_user_data(struct wp_cursor_shape_manager_v1 *wp_cursor_shape_manager_v1) |
| 125 | { |
| 126 | return wl_proxy_get_user_data((struct wl_proxy *) wp_cursor_shape_manager_v1); |
| 127 | } |
| 128 | |
| 129 | static inline uint32_t |
| 130 | wp_cursor_shape_manager_v1_get_version(struct wp_cursor_shape_manager_v1 *wp_cursor_shape_manager_v1) |
| 131 | { |
| 132 | return wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_manager_v1); |
| 133 | } |
| 134 | |
| 135 | /** |
| 136 | * @ingroup iface_wp_cursor_shape_manager_v1 |
| 137 | * |
| 138 | * Destroy the cursor shape manager. |
| 139 | */ |
| 140 | static inline void |
| 141 | wp_cursor_shape_manager_v1_destroy(struct wp_cursor_shape_manager_v1 *wp_cursor_shape_manager_v1) |
| 142 | { |
| 143 | wl_proxy_marshal_flags((struct wl_proxy *) wp_cursor_shape_manager_v1, |
| 144 | WP_CURSOR_SHAPE_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_manager_v1), WL_MARSHAL_FLAG_DESTROY); |
| 145 | } |
| 146 | |
| 147 | /** |
| 148 | * @ingroup iface_wp_cursor_shape_manager_v1 |
| 149 | * |
| 150 | * Obtain a wp_cursor_shape_device_v1 for a wl_pointer object. |
| 151 | * |
| 152 | * When the pointer capability is removed from the wl_seat, the |
| 153 | * wp_cursor_shape_device_v1 object becomes inert. |
| 154 | */ |
| 155 | static inline struct wp_cursor_shape_device_v1 * |
| 156 | wp_cursor_shape_manager_v1_get_pointer(struct wp_cursor_shape_manager_v1 *wp_cursor_shape_manager_v1, struct wl_pointer *pointer) |
| 157 | { |
| 158 | struct wl_proxy *cursor_shape_device; |
| 159 | |
| 160 | cursor_shape_device = wl_proxy_marshal_flags((struct wl_proxy *) wp_cursor_shape_manager_v1, |
| 161 | WP_CURSOR_SHAPE_MANAGER_V1_GET_POINTER, &wp_cursor_shape_device_v1_interface, wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_manager_v1), 0, NULL, pointer); |
| 162 | |
| 163 | return (struct wp_cursor_shape_device_v1 *) cursor_shape_device; |
| 164 | } |
| 165 | |
| 166 | /** |
| 167 | * @ingroup iface_wp_cursor_shape_manager_v1 |
| 168 | * |
| 169 | * Obtain a wp_cursor_shape_device_v1 for a zwp_tablet_tool_v2 object. |
| 170 | * |
| 171 | * When the zwp_tablet_tool_v2 is removed, the wp_cursor_shape_device_v1 |
| 172 | * object becomes inert. |
| 173 | */ |
| 174 | static inline struct wp_cursor_shape_device_v1 * |
| 175 | wp_cursor_shape_manager_v1_get_tablet_tool_v2(struct wp_cursor_shape_manager_v1 *wp_cursor_shape_manager_v1, struct zwp_tablet_tool_v2 *tablet_tool) |
| 176 | { |
| 177 | struct wl_proxy *cursor_shape_device; |
| 178 | |
| 179 | cursor_shape_device = wl_proxy_marshal_flags((struct wl_proxy *) wp_cursor_shape_manager_v1, |
| 180 | WP_CURSOR_SHAPE_MANAGER_V1_GET_TABLET_TOOL_V2, &wp_cursor_shape_device_v1_interface, wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_manager_v1), 0, NULL, tablet_tool); |
| 181 | |
| 182 | return (struct wp_cursor_shape_device_v1 *) cursor_shape_device; |
| 183 | } |
| 184 | |
| 185 | #ifndef WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ENUM |
| 186 | #define WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ENUM |
| 187 | /** |
| 188 | * @ingroup iface_wp_cursor_shape_device_v1 |
| 189 | * cursor shapes |
| 190 | * |
| 191 | * This enum describes cursor shapes. |
| 192 | * |
| 193 | * The names are taken from the CSS W3C specification: |
| 194 | * https://w3c.github.io/csswg-drafts/css-ui/#cursor |
| 195 | * with a few additions. |
| 196 | * |
| 197 | * Note that there are some groups of cursor shapes that are related: |
| 198 | * The first group is drag-and-drop cursors which are used to indicate |
| 199 | * the selected action during dnd operations. The second group is resize |
| 200 | * cursors which are used to indicate resizing and moving possibilities |
| 201 | * on window borders. It is recommended that the shapes in these groups |
| 202 | * should use visually compatible images and metaphors. |
| 203 | */ |
| 204 | enum wp_cursor_shape_device_v1_shape { |
| 205 | /** |
| 206 | * default cursor |
| 207 | */ |
| 208 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DEFAULT = 1, |
| 209 | /** |
| 210 | * a context menu is available for the object under the cursor |
| 211 | */ |
| 212 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CONTEXT_MENU = 2, |
| 213 | /** |
| 214 | * help is available for the object under the cursor |
| 215 | */ |
| 216 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_HELP = 3, |
| 217 | /** |
| 218 | * pointer that indicates a link or another interactive element |
| 219 | */ |
| 220 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_POINTER = 4, |
| 221 | /** |
| 222 | * progress indicator |
| 223 | */ |
| 224 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_PROGRESS = 5, |
| 225 | /** |
| 226 | * program is busy, user should wait |
| 227 | */ |
| 228 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_WAIT = 6, |
| 229 | /** |
| 230 | * a cell or set of cells may be selected |
| 231 | */ |
| 232 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CELL = 7, |
| 233 | /** |
| 234 | * simple crosshair |
| 235 | */ |
| 236 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CROSSHAIR = 8, |
| 237 | /** |
| 238 | * text may be selected |
| 239 | */ |
| 240 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_TEXT = 9, |
| 241 | /** |
| 242 | * vertical text may be selected |
| 243 | */ |
| 244 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_VERTICAL_TEXT = 10, |
| 245 | /** |
| 246 | * drag-and-drop: alias of/shortcut to something is to be created |
| 247 | */ |
| 248 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALIAS = 11, |
| 249 | /** |
| 250 | * drag-and-drop: something is to be copied |
| 251 | */ |
| 252 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_COPY = 12, |
| 253 | /** |
| 254 | * drag-and-drop: something is to be moved |
| 255 | */ |
| 256 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_MOVE = 13, |
| 257 | /** |
| 258 | * drag-and-drop: the dragged item cannot be dropped at the current cursor location |
| 259 | */ |
| 260 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NO_DROP = 14, |
| 261 | /** |
| 262 | * drag-and-drop: the requested action will not be carried out |
| 263 | */ |
| 264 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NOT_ALLOWED = 15, |
| 265 | /** |
| 266 | * drag-and-drop: something can be grabbed |
| 267 | */ |
| 268 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_GRAB = 16, |
| 269 | /** |
| 270 | * drag-and-drop: something is being grabbed |
| 271 | */ |
| 272 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_GRABBING = 17, |
| 273 | /** |
| 274 | * resizing: the east border is to be moved |
| 275 | */ |
| 276 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_E_RESIZE = 18, |
| 277 | /** |
| 278 | * resizing: the north border is to be moved |
| 279 | */ |
| 280 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_N_RESIZE = 19, |
| 281 | /** |
| 282 | * resizing: the north-east corner is to be moved |
| 283 | */ |
| 284 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NE_RESIZE = 20, |
| 285 | /** |
| 286 | * resizing: the north-west corner is to be moved |
| 287 | */ |
| 288 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NW_RESIZE = 21, |
| 289 | /** |
| 290 | * resizing: the south border is to be moved |
| 291 | */ |
| 292 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_S_RESIZE = 22, |
| 293 | /** |
| 294 | * resizing: the south-east corner is to be moved |
| 295 | */ |
| 296 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_SE_RESIZE = 23, |
| 297 | /** |
| 298 | * resizing: the south-west corner is to be moved |
| 299 | */ |
| 300 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_SW_RESIZE = 24, |
| 301 | /** |
| 302 | * resizing: the west border is to be moved |
| 303 | */ |
| 304 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_W_RESIZE = 25, |
| 305 | /** |
| 306 | * resizing: the east and west borders are to be moved |
| 307 | */ |
| 308 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_EW_RESIZE = 26, |
| 309 | /** |
| 310 | * resizing: the north and south borders are to be moved |
| 311 | */ |
| 312 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NS_RESIZE = 27, |
| 313 | /** |
| 314 | * resizing: the north-east and south-west corners are to be moved |
| 315 | */ |
| 316 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NESW_RESIZE = 28, |
| 317 | /** |
| 318 | * resizing: the north-west and south-east corners are to be moved |
| 319 | */ |
| 320 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NWSE_RESIZE = 29, |
| 321 | /** |
| 322 | * resizing: that the item/column can be resized horizontally |
| 323 | */ |
| 324 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_COL_RESIZE = 30, |
| 325 | /** |
| 326 | * resizing: that the item/row can be resized vertically |
| 327 | */ |
| 328 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ROW_RESIZE = 31, |
| 329 | /** |
| 330 | * something can be scrolled in any direction |
| 331 | */ |
| 332 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALL_SCROLL = 32, |
| 333 | /** |
| 334 | * something can be zoomed in |
| 335 | */ |
| 336 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ZOOM_IN = 33, |
| 337 | /** |
| 338 | * something can be zoomed out |
| 339 | */ |
| 340 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ZOOM_OUT = 34, |
| 341 | /** |
| 342 | * drag-and-drop: the user will select which action will be carried out (non-css value) |
| 343 | * @since 2 |
| 344 | */ |
| 345 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DND_ASK = 35, |
| 346 | /** |
| 347 | * resizing: something can be moved or resized in any direction (non-css value) |
| 348 | * @since 2 |
| 349 | */ |
| 350 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALL_RESIZE = 36, |
| 351 | }; |
| 352 | /** |
| 353 | * @ingroup iface_wp_cursor_shape_device_v1 |
| 354 | */ |
| 355 | #define WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DND_ASK_SINCE_VERSION 2 |
| 356 | /** |
| 357 | * @ingroup iface_wp_cursor_shape_device_v1 |
| 358 | */ |
| 359 | #define WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALL_RESIZE_SINCE_VERSION 2 |
| 360 | #endif /* WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ENUM */ |
| 361 | |
| 362 | #ifndef WP_CURSOR_SHAPE_DEVICE_V1_ERROR_ENUM |
| 363 | #define WP_CURSOR_SHAPE_DEVICE_V1_ERROR_ENUM |
| 364 | enum wp_cursor_shape_device_v1_error { |
| 365 | /** |
| 366 | * the specified shape value is invalid |
| 367 | */ |
| 368 | WP_CURSOR_SHAPE_DEVICE_V1_ERROR_INVALID_SHAPE = 1, |
| 369 | }; |
| 370 | #endif /* WP_CURSOR_SHAPE_DEVICE_V1_ERROR_ENUM */ |
| 371 | |
| 372 | #define WP_CURSOR_SHAPE_DEVICE_V1_DESTROY 0 |
| 373 | #define WP_CURSOR_SHAPE_DEVICE_V1_SET_SHAPE 1 |
| 374 | |
| 375 | |
| 376 | /** |
| 377 | * @ingroup iface_wp_cursor_shape_device_v1 |
| 378 | */ |
| 379 | #define WP_CURSOR_SHAPE_DEVICE_V1_DESTROY_SINCE_VERSION 1 |
| 380 | /** |
| 381 | * @ingroup iface_wp_cursor_shape_device_v1 |
| 382 | */ |
| 383 | #define WP_CURSOR_SHAPE_DEVICE_V1_SET_SHAPE_SINCE_VERSION 1 |
| 384 | |
| 385 | /** @ingroup iface_wp_cursor_shape_device_v1 */ |
| 386 | static inline void |
| 387 | wp_cursor_shape_device_v1_set_user_data(struct wp_cursor_shape_device_v1 *wp_cursor_shape_device_v1, void *user_data) |
| 388 | { |
| 389 | wl_proxy_set_user_data((struct wl_proxy *) wp_cursor_shape_device_v1, user_data); |
| 390 | } |
| 391 | |
| 392 | /** @ingroup iface_wp_cursor_shape_device_v1 */ |
| 393 | static inline void * |
| 394 | wp_cursor_shape_device_v1_get_user_data(struct wp_cursor_shape_device_v1 *wp_cursor_shape_device_v1) |
| 395 | { |
| 396 | return wl_proxy_get_user_data((struct wl_proxy *) wp_cursor_shape_device_v1); |
| 397 | } |
| 398 | |
| 399 | static inline uint32_t |
| 400 | wp_cursor_shape_device_v1_get_version(struct wp_cursor_shape_device_v1 *wp_cursor_shape_device_v1) |
| 401 | { |
| 402 | return wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_device_v1); |
| 403 | } |
| 404 | |
| 405 | /** |
| 406 | * @ingroup iface_wp_cursor_shape_device_v1 |
| 407 | * |
| 408 | * Destroy the cursor shape device. |
| 409 | * |
| 410 | * The device cursor shape remains unchanged. |
| 411 | */ |
| 412 | static inline void |
| 413 | wp_cursor_shape_device_v1_destroy(struct wp_cursor_shape_device_v1 *wp_cursor_shape_device_v1) |
| 414 | { |
| 415 | wl_proxy_marshal_flags((struct wl_proxy *) wp_cursor_shape_device_v1, |
| 416 | WP_CURSOR_SHAPE_DEVICE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_device_v1), WL_MARSHAL_FLAG_DESTROY); |
| 417 | } |
| 418 | |
| 419 | /** |
| 420 | * @ingroup iface_wp_cursor_shape_device_v1 |
| 421 | * |
| 422 | * Sets the device cursor to the specified shape. The compositor will |
| 423 | * change the cursor image based on the specified shape. |
| 424 | * |
| 425 | * The cursor actually changes only if the input device focus is one of |
| 426 | * the requesting client's surfaces. If any, the previous cursor image |
| 427 | * (surface or shape) is replaced. |
| 428 | * |
| 429 | * The "shape" argument must be a valid enum entry, otherwise the |
| 430 | * invalid_shape protocol error is raised. |
| 431 | * |
| 432 | * This is similar to the wl_pointer.set_cursor and |
| 433 | * zwp_tablet_tool_v2.set_cursor requests, but this request accepts a |
| 434 | * shape instead of contents in the form of a surface. Clients can mix |
| 435 | * set_cursor and set_shape requests. |
| 436 | * |
| 437 | * The serial parameter must match the latest wl_pointer.enter or |
| 438 | * zwp_tablet_tool_v2.proximity_in serial number sent to the client. |
| 439 | * Otherwise the request will be ignored. |
| 440 | */ |
| 441 | static inline void |
| 442 | wp_cursor_shape_device_v1_set_shape(struct wp_cursor_shape_device_v1 *wp_cursor_shape_device_v1, uint32_t serial, uint32_t shape) |
| 443 | { |
| 444 | wl_proxy_marshal_flags((struct wl_proxy *) wp_cursor_shape_device_v1, |
| 445 | WP_CURSOR_SHAPE_DEVICE_V1_SET_SHAPE, NULL, wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_device_v1), 0, serial, shape); |
| 446 | } |
| 447 | |
| 448 | #ifdef __cplusplus |
| 449 | } |
| 450 | #endif |
| 451 | |
| 452 | #endif |
| 453 | |