AtlatestRepositorysigil-ui
1
/* Generated by wayland-scanner 1.24.0 */3
#ifndef CURSOR_SHAPE_V1_CLIENT_PROTOCOL_H4
#define CURSOR_SHAPE_V1_CLIENT_PROTOCOL_H6
#include <stdint.h>7
#include <stddef.h>8
#include "wayland-client.h"10
#ifdef __cplusplus11
extern "C" {12
#endif14
/**15
* @page page_cursor_shape_v1 The cursor_shape_v1 protocol16
* @section page_ifaces_cursor_shape_v1 Interfaces17
* - @subpage page_iface_wp_cursor_shape_manager_v1 - cursor shape manager18
* - @subpage page_iface_wp_cursor_shape_device_v1 - cursor shape for a device19
* @section page_copyright_cursor_shape_v1 Copyright20
* <pre>21
*22
* Copyright 2018 The Chromium Authors23
* Copyright 2023 Simon Ser24
*25
* Permission is hereby granted, free of charge, to any person obtaining a26
* copy of this software and associated documentation files (the "Software"),27
* to deal in the Software without restriction, including without limitation28
* the rights to use, copy, modify, merge, publish, distribute, sublicense,29
* and/or sell copies of the Software, and to permit persons to whom the30
* Software is furnished to do so, subject to the following conditions:31
* The above copyright notice and this permission notice (including the next32
* paragraph) shall be included in all copies or substantial portions of the33
* Software.34
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR35
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,36
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL37
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER38
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING39
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER40
* 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;48
#ifndef WP_CURSOR_SHAPE_MANAGER_V1_INTERFACE49
#define WP_CURSOR_SHAPE_MANAGER_V1_INTERFACE50
/**51
* @page page_iface_wp_cursor_shape_manager_v1 wp_cursor_shape_manager_v152
* @section page_iface_wp_cursor_shape_manager_v1_desc Description53
*54
* This global offers an alternative, optional way to set cursor images. This55
* new way uses enumerated cursors instead of a wl_surface like56
* wl_pointer.set_cursor does.57
*58
* Warning! The protocol described in this file is currently in the testing59
* phase. Backward compatible changes may be added together with the60
* corresponding interface version bump. Backward incompatible changes can61
* only be done by creating a new major version of the extension.62
* @section page_iface_wp_cursor_shape_manager_v1_api API63
* See @ref iface_wp_cursor_shape_manager_v1.64
*/65
/**66
* @defgroup iface_wp_cursor_shape_manager_v1 The wp_cursor_shape_manager_v1 interface67
*68
* This global offers an alternative, optional way to set cursor images. This69
* new way uses enumerated cursors instead of a wl_surface like70
* wl_pointer.set_cursor does.71
*72
* Warning! The protocol described in this file is currently in the testing73
* phase. Backward compatible changes may be added together with the74
* corresponding interface version bump. Backward incompatible changes can75
* 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
#endif79
#ifndef WP_CURSOR_SHAPE_DEVICE_V1_INTERFACE80
#define WP_CURSOR_SHAPE_DEVICE_V1_INTERFACE81
/**82
* @page page_iface_wp_cursor_shape_device_v1 wp_cursor_shape_device_v183
* @section page_iface_wp_cursor_shape_device_v1_desc Description84
*85
* This interface allows clients to set the cursor shape.86
* @section page_iface_wp_cursor_shape_device_v1_api API87
* See @ref iface_wp_cursor_shape_device_v1.88
*/89
/**90
* @defgroup iface_wp_cursor_shape_device_v1 The wp_cursor_shape_device_v1 interface91
*92
* This interface allows clients to set the cursor shape.93
*/94
extern const struct wl_interface wp_cursor_shape_device_v1_interface;95
#endif97
#define WP_CURSOR_SHAPE_MANAGER_V1_DESTROY 098
#define WP_CURSOR_SHAPE_MANAGER_V1_GET_POINTER 199
#define WP_CURSOR_SHAPE_MANAGER_V1_GET_TABLET_TOOL_V2 2102
/**103
* @ingroup iface_wp_cursor_shape_manager_v1104
*/105
#define WP_CURSOR_SHAPE_MANAGER_V1_DESTROY_SINCE_VERSION 1106
/**107
* @ingroup iface_wp_cursor_shape_manager_v1108
*/109
#define WP_CURSOR_SHAPE_MANAGER_V1_GET_POINTER_SINCE_VERSION 1110
/**111
* @ingroup iface_wp_cursor_shape_manager_v1112
*/113
#define WP_CURSOR_SHAPE_MANAGER_V1_GET_TABLET_TOOL_V2_SINCE_VERSION 1115
/** @ingroup iface_wp_cursor_shape_manager_v1 */116
static inline void117
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
}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
}129
static inline uint32_t130
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
}135
/**136
* @ingroup iface_wp_cursor_shape_manager_v1137
*138
* Destroy the cursor shape manager.139
*/140
static inline void141
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
}147
/**148
* @ingroup iface_wp_cursor_shape_manager_v1149
*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, the153
* 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;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);163
return (struct wp_cursor_shape_device_v1 *) cursor_shape_device;164
}166
/**167
* @ingroup iface_wp_cursor_shape_manager_v1168
*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_v1172
* 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;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);182
return (struct wp_cursor_shape_device_v1 *) cursor_shape_device;183
}185
#ifndef WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ENUM186
#define WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ENUM187
/**188
* @ingroup iface_wp_cursor_shape_device_v1189
* cursor shapes190
*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/#cursor195
* 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 indicate199
* the selected action during dnd operations. The second group is resize200
* cursors which are used to indicate resizing and moving possibilities201
* on window borders. It is recommended that the shapes in these groups202
* should use visually compatible images and metaphors.203
*/204
enum wp_cursor_shape_device_v1_shape {205
/**206
* default cursor207
*/208
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DEFAULT = 1,209
/**210
* a context menu is available for the object under the cursor211
*/212
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CONTEXT_MENU = 2,213
/**214
* help is available for the object under the cursor215
*/216
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_HELP = 3,217
/**218
* pointer that indicates a link or another interactive element219
*/220
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_POINTER = 4,221
/**222
* progress indicator223
*/224
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_PROGRESS = 5,225
/**226
* program is busy, user should wait227
*/228
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_WAIT = 6,229
/**230
* a cell or set of cells may be selected231
*/232
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CELL = 7,233
/**234
* simple crosshair235
*/236
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CROSSHAIR = 8,237
/**238
* text may be selected239
*/240
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_TEXT = 9,241
/**242
* vertical text may be selected243
*/244
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_VERTICAL_TEXT = 10,245
/**246
* drag-and-drop: alias of/shortcut to something is to be created247
*/248
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALIAS = 11,249
/**250
* drag-and-drop: something is to be copied251
*/252
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_COPY = 12,253
/**254
* drag-and-drop: something is to be moved255
*/256
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_MOVE = 13,257
/**258
* drag-and-drop: the dragged item cannot be dropped at the current cursor location259
*/260
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NO_DROP = 14,261
/**262
* drag-and-drop: the requested action will not be carried out263
*/264
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NOT_ALLOWED = 15,265
/**266
* drag-and-drop: something can be grabbed267
*/268
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_GRAB = 16,269
/**270
* drag-and-drop: something is being grabbed271
*/272
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_GRABBING = 17,273
/**274
* resizing: the east border is to be moved275
*/276
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_E_RESIZE = 18,277
/**278
* resizing: the north border is to be moved279
*/280
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_N_RESIZE = 19,281
/**282
* resizing: the north-east corner is to be moved283
*/284
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NE_RESIZE = 20,285
/**286
* resizing: the north-west corner is to be moved287
*/288
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NW_RESIZE = 21,289
/**290
* resizing: the south border is to be moved291
*/292
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_S_RESIZE = 22,293
/**294
* resizing: the south-east corner is to be moved295
*/296
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_SE_RESIZE = 23,297
/**298
* resizing: the south-west corner is to be moved299
*/300
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_SW_RESIZE = 24,301
/**302
* resizing: the west border is to be moved303
*/304
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_W_RESIZE = 25,305
/**306
* resizing: the east and west borders are to be moved307
*/308
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_EW_RESIZE = 26,309
/**310
* resizing: the north and south borders are to be moved311
*/312
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NS_RESIZE = 27,313
/**314
* resizing: the north-east and south-west corners are to be moved315
*/316
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NESW_RESIZE = 28,317
/**318
* resizing: the north-west and south-east corners are to be moved319
*/320
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NWSE_RESIZE = 29,321
/**322
* resizing: that the item/column can be resized horizontally323
*/324
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_COL_RESIZE = 30,325
/**326
* resizing: that the item/row can be resized vertically327
*/328
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ROW_RESIZE = 31,329
/**330
* something can be scrolled in any direction331
*/332
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALL_SCROLL = 32,333
/**334
* something can be zoomed in335
*/336
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ZOOM_IN = 33,337
/**338
* something can be zoomed out339
*/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 2344
*/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 2349
*/350
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALL_RESIZE = 36,351
};352
/**353
* @ingroup iface_wp_cursor_shape_device_v1354
*/355
#define WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DND_ASK_SINCE_VERSION 2356
/**357
* @ingroup iface_wp_cursor_shape_device_v1358
*/359
#define WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALL_RESIZE_SINCE_VERSION 2360
#endif /* WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ENUM */362
#ifndef WP_CURSOR_SHAPE_DEVICE_V1_ERROR_ENUM363
#define WP_CURSOR_SHAPE_DEVICE_V1_ERROR_ENUM364
enum wp_cursor_shape_device_v1_error {365
/**366
* the specified shape value is invalid367
*/368
WP_CURSOR_SHAPE_DEVICE_V1_ERROR_INVALID_SHAPE = 1,369
};370
#endif /* WP_CURSOR_SHAPE_DEVICE_V1_ERROR_ENUM */372
#define WP_CURSOR_SHAPE_DEVICE_V1_DESTROY 0373
#define WP_CURSOR_SHAPE_DEVICE_V1_SET_SHAPE 1376
/**377
* @ingroup iface_wp_cursor_shape_device_v1378
*/379
#define WP_CURSOR_SHAPE_DEVICE_V1_DESTROY_SINCE_VERSION 1380
/**381
* @ingroup iface_wp_cursor_shape_device_v1382
*/383
#define WP_CURSOR_SHAPE_DEVICE_V1_SET_SHAPE_SINCE_VERSION 1385
/** @ingroup iface_wp_cursor_shape_device_v1 */386
static inline void387
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
}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
}399
static inline uint32_t400
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
}405
/**406
* @ingroup iface_wp_cursor_shape_device_v1407
*408
* Destroy the cursor shape device.409
*410
* The device cursor shape remains unchanged.411
*/412
static inline void413
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
}419
/**420
* @ingroup iface_wp_cursor_shape_device_v1421
*422
* Sets the device cursor to the specified shape. The compositor will423
* change the cursor image based on the specified shape.424
*425
* The cursor actually changes only if the input device focus is one of426
* the requesting client's surfaces. If any, the previous cursor image427
* (surface or shape) is replaced.428
*429
* The "shape" argument must be a valid enum entry, otherwise the430
* invalid_shape protocol error is raised.431
*432
* This is similar to the wl_pointer.set_cursor and433
* zwp_tablet_tool_v2.set_cursor requests, but this request accepts a434
* shape instead of contents in the form of a surface. Clients can mix435
* set_cursor and set_shape requests.436
*437
* The serial parameter must match the latest wl_pointer.enter or438
* zwp_tablet_tool_v2.proximity_in serial number sent to the client.439
* Otherwise the request will be ignored.440
*/441
static inline void442
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
}448
#ifdef __cplusplus449
}450
#endif452
#endif