AtlatestRepositorysigil-ui
1
/* Generated by wayland-scanner 1.24.0 */3
#ifndef WLR_LAYER_SHELL_UNSTABLE_V1_CLIENT_PROTOCOL_H4
#define WLR_LAYER_SHELL_UNSTABLE_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_wlr_layer_shell_unstable_v1 The wlr_layer_shell_unstable_v1 protocol16
* @section page_ifaces_wlr_layer_shell_unstable_v1 Interfaces17
* - @subpage page_iface_zwlr_layer_shell_v1 - create surfaces that are layers of the desktop18
* - @subpage page_iface_zwlr_layer_surface_v1 - layer metadata interface19
* @section page_copyright_wlr_layer_shell_unstable_v1 Copyright20
* <pre>21
*22
* Copyright © 2017 Drew DeVault23
*24
* Permission to use, copy, modify, distribute, and sell this25
* software and its documentation for any purpose is hereby granted26
* without fee, provided that the above copyright notice appear in27
* all copies and that both that copyright notice and this permission28
* notice appear in supporting documentation, and that the name of29
* the copyright holders not be used in advertising or publicity30
* pertaining to distribution of the software without specific,31
* written prior permission. The copyright holders make no32
* representations about the suitability of this software for any33
* purpose. It is provided "as is" without express or implied34
* warranty.35
*36
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS37
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND38
* FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY39
* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES40
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN41
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,42
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF43
* THIS SOFTWARE.44
* </pre>45
*/46
struct wl_output;47
struct wl_surface;48
struct xdg_popup;49
struct zwlr_layer_shell_v1;50
struct zwlr_layer_surface_v1;52
#ifndef ZWLR_LAYER_SHELL_V1_INTERFACE53
#define ZWLR_LAYER_SHELL_V1_INTERFACE54
/**55
* @page page_iface_zwlr_layer_shell_v1 zwlr_layer_shell_v156
* @section page_iface_zwlr_layer_shell_v1_desc Description57
*58
* Clients can use this interface to assign the surface_layer role to59
* wl_surfaces. Such surfaces are assigned to a "layer" of the output and60
* rendered with a defined z-depth respective to each other. They may also be61
* anchored to the edges and corners of a screen and specify input handling62
* semantics. This interface should be suitable for the implementation of63
* many desktop shell components, and a broad number of other applications64
* that interact with the desktop.65
* @section page_iface_zwlr_layer_shell_v1_api API66
* See @ref iface_zwlr_layer_shell_v1.67
*/68
/**69
* @defgroup iface_zwlr_layer_shell_v1 The zwlr_layer_shell_v1 interface70
*71
* Clients can use this interface to assign the surface_layer role to72
* wl_surfaces. Such surfaces are assigned to a "layer" of the output and73
* rendered with a defined z-depth respective to each other. They may also be74
* anchored to the edges and corners of a screen and specify input handling75
* semantics. This interface should be suitable for the implementation of76
* many desktop shell components, and a broad number of other applications77
* that interact with the desktop.78
*/79
extern const struct wl_interface zwlr_layer_shell_v1_interface;80
#endif81
#ifndef ZWLR_LAYER_SURFACE_V1_INTERFACE82
#define ZWLR_LAYER_SURFACE_V1_INTERFACE83
/**84
* @page page_iface_zwlr_layer_surface_v1 zwlr_layer_surface_v185
* @section page_iface_zwlr_layer_surface_v1_desc Description86
*87
* An interface that may be implemented by a wl_surface, for surfaces that88
* are designed to be rendered as a layer of a stacked desktop-like89
* environment.90
*91
* Layer surface state (layer, size, anchor, exclusive zone,92
* margin, interactivity) is double-buffered, and will be applied at the93
* time wl_surface.commit of the corresponding wl_surface is called.94
*95
* Attaching a null buffer to a layer surface unmaps it.96
*97
* Unmapping a layer_surface means that the surface cannot be shown by the98
* compositor until it is explicitly mapped again. The layer_surface99
* returns to the state it had right after layer_shell.get_layer_surface.100
* The client can re-map the surface by performing a commit without any101
* buffer attached, waiting for a configure event and handling it as usual.102
* @section page_iface_zwlr_layer_surface_v1_api API103
* See @ref iface_zwlr_layer_surface_v1.104
*/105
/**106
* @defgroup iface_zwlr_layer_surface_v1 The zwlr_layer_surface_v1 interface107
*108
* An interface that may be implemented by a wl_surface, for surfaces that109
* are designed to be rendered as a layer of a stacked desktop-like110
* environment.111
*112
* Layer surface state (layer, size, anchor, exclusive zone,113
* margin, interactivity) is double-buffered, and will be applied at the114
* time wl_surface.commit of the corresponding wl_surface is called.115
*116
* Attaching a null buffer to a layer surface unmaps it.117
*118
* Unmapping a layer_surface means that the surface cannot be shown by the119
* compositor until it is explicitly mapped again. The layer_surface120
* returns to the state it had right after layer_shell.get_layer_surface.121
* The client can re-map the surface by performing a commit without any122
* buffer attached, waiting for a configure event and handling it as usual.123
*/124
extern const struct wl_interface zwlr_layer_surface_v1_interface;125
#endif127
#ifndef ZWLR_LAYER_SHELL_V1_ERROR_ENUM128
#define ZWLR_LAYER_SHELL_V1_ERROR_ENUM129
enum zwlr_layer_shell_v1_error {130
/**131
* wl_surface has another role132
*/133
ZWLR_LAYER_SHELL_V1_ERROR_ROLE = 0,134
/**135
* layer value is invalid136
*/137
ZWLR_LAYER_SHELL_V1_ERROR_INVALID_LAYER = 1,138
/**139
* wl_surface has a buffer attached or committed140
*/141
ZWLR_LAYER_SHELL_V1_ERROR_ALREADY_CONSTRUCTED = 2,142
};143
#endif /* ZWLR_LAYER_SHELL_V1_ERROR_ENUM */145
#ifndef ZWLR_LAYER_SHELL_V1_LAYER_ENUM146
#define ZWLR_LAYER_SHELL_V1_LAYER_ENUM147
/**148
* @ingroup iface_zwlr_layer_shell_v1149
* available layers for surfaces150
*151
* These values indicate which layers a surface can be rendered in. They152
* are ordered by z depth, bottom-most first. Traditional shell surfaces153
* will typically be rendered between the bottom and top layers.154
* Fullscreen shell surfaces are typically rendered at the top layer.155
* Multiple surfaces can share a single layer, and ordering within a156
* single layer is undefined.157
*/158
enum zwlr_layer_shell_v1_layer {159
ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND = 0,160
ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM = 1,161
ZWLR_LAYER_SHELL_V1_LAYER_TOP = 2,162
ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY = 3,163
};164
#endif /* ZWLR_LAYER_SHELL_V1_LAYER_ENUM */166
#define ZWLR_LAYER_SHELL_V1_GET_LAYER_SURFACE 0167
#define ZWLR_LAYER_SHELL_V1_DESTROY 1170
/**171
* @ingroup iface_zwlr_layer_shell_v1172
*/173
#define ZWLR_LAYER_SHELL_V1_GET_LAYER_SURFACE_SINCE_VERSION 1174
/**175
* @ingroup iface_zwlr_layer_shell_v1176
*/177
#define ZWLR_LAYER_SHELL_V1_DESTROY_SINCE_VERSION 3179
/** @ingroup iface_zwlr_layer_shell_v1 */180
static inline void181
zwlr_layer_shell_v1_set_user_data(struct zwlr_layer_shell_v1 *zwlr_layer_shell_v1, void *user_data)182
{183
wl_proxy_set_user_data((struct wl_proxy *) zwlr_layer_shell_v1, user_data);184
}186
/** @ingroup iface_zwlr_layer_shell_v1 */187
static inline void *188
zwlr_layer_shell_v1_get_user_data(struct zwlr_layer_shell_v1 *zwlr_layer_shell_v1)189
{190
return wl_proxy_get_user_data((struct wl_proxy *) zwlr_layer_shell_v1);191
}193
static inline uint32_t194
zwlr_layer_shell_v1_get_version(struct zwlr_layer_shell_v1 *zwlr_layer_shell_v1)195
{196
return wl_proxy_get_version((struct wl_proxy *) zwlr_layer_shell_v1);197
}199
/**200
* @ingroup iface_zwlr_layer_shell_v1201
*202
* Create a layer surface for an existing surface. This assigns the role of203
* layer_surface, or raises a protocol error if another role is already204
* assigned.205
*206
* Creating a layer surface from a wl_surface which has a buffer attached207
* or committed is a client error, and any attempts by a client to attach208
* or manipulate a buffer prior to the first layer_surface.configure call209
* must also be treated as errors.210
*211
* After creating a layer_surface object and setting it up, the client212
* must perform an initial commit without any buffer attached.213
* The compositor will reply with a layer_surface.configure event.214
* The client must acknowledge it and is then allowed to attach a buffer215
* to map the surface.216
*217
* You may pass NULL for output to allow the compositor to decide which218
* output to use. Generally this will be the one that the user most219
* recently interacted with.220
*221
* Clients can specify a namespace that defines the purpose of the layer222
* surface.223
*/224
static inline struct zwlr_layer_surface_v1 *225
zwlr_layer_shell_v1_get_layer_surface(struct zwlr_layer_shell_v1 *zwlr_layer_shell_v1, struct wl_surface *surface, struct wl_output *output, uint32_t layer, const char *namespace)226
{227
struct wl_proxy *id;229
id = wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_shell_v1,230
ZWLR_LAYER_SHELL_V1_GET_LAYER_SURFACE, &zwlr_layer_surface_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_shell_v1), 0, NULL, surface, output, layer, namespace);232
return (struct zwlr_layer_surface_v1 *) id;233
}235
/**236
* @ingroup iface_zwlr_layer_shell_v1237
*238
* This request indicates that the client will not use the layer_shell239
* object any more. Objects that have been created through this instance240
* are not affected.241
*/242
static inline void243
zwlr_layer_shell_v1_destroy(struct zwlr_layer_shell_v1 *zwlr_layer_shell_v1)244
{245
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_shell_v1,246
ZWLR_LAYER_SHELL_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_shell_v1), WL_MARSHAL_FLAG_DESTROY);247
}249
#ifndef ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ENUM250
#define ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ENUM251
/**252
* @ingroup iface_zwlr_layer_surface_v1253
* types of keyboard interaction possible for a layer shell surface254
*255
* Types of keyboard interaction possible for layer shell surfaces. The256
* rationale for this is twofold: (1) some applications are not interested257
* in keyboard events and not allowing them to be focused can improve the258
* desktop experience; (2) some applications will want to take exclusive259
* keyboard focus.260
*/261
enum zwlr_layer_surface_v1_keyboard_interactivity {262
/**263
* no keyboard focus is possible264
*265
* This value indicates that this surface is not interested in266
* keyboard events and the compositor should never assign it the267
* keyboard focus.268
*269
* This is the default value, set for newly created layer shell270
* surfaces.271
*272
* This is useful for e.g. desktop widgets that display information273
* or only have interaction with non-keyboard input devices.274
*/275
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE = 0,276
/**277
* request exclusive keyboard focus278
*279
* Request exclusive keyboard focus if this surface is above the280
* shell surface layer.281
*282
* For the top and overlay layers, the seat will always give283
* exclusive keyboard focus to the top-most layer which has284
* keyboard interactivity set to exclusive. If this layer contains285
* multiple surfaces with keyboard interactivity set to exclusive,286
* the compositor determines the one receiving keyboard events in287
* an implementation- defined manner. In this case, no guarantee is288
* made when this surface will receive keyboard focus (if ever).289
*290
* For the bottom and background layers, the compositor is allowed291
* to use normal focus semantics.292
*293
* This setting is mainly intended for applications that need to294
* ensure they receive all keyboard events, such as a lock screen295
* or a password prompt.296
*/297
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE = 1,298
/**299
* request regular keyboard focus semantics300
*301
* This requests the compositor to allow this surface to be302
* focused and unfocused by the user in an implementation-defined303
* manner. The user should be able to unfocus this surface even304
* regardless of the layer it is on.305
*306
* Typically, the compositor will want to use its normal mechanism307
* to manage keyboard focus between layer shell surfaces with this308
* setting and regular toplevels on the desktop layer (e.g. click309
* to focus). Nevertheless, it is possible for a compositor to310
* require a special interaction to focus or unfocus layer shell311
* surfaces (e.g. requiring a click even if focus follows the mouse312
* normally, or providing a keybinding to switch focus between313
* layers).314
*315
* This setting is mainly intended for desktop shell components316
* (e.g. panels) that allow keyboard interaction. Using this option317
* can allow implementing a desktop shell that can be fully usable318
* without the mouse.319
* @since 4320
*/321
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND = 2,322
};323
/**324
* @ingroup iface_zwlr_layer_surface_v1325
*/326
#define ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND_SINCE_VERSION 4327
#endif /* ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ENUM */329
#ifndef ZWLR_LAYER_SURFACE_V1_ERROR_ENUM330
#define ZWLR_LAYER_SURFACE_V1_ERROR_ENUM331
enum zwlr_layer_surface_v1_error {332
/**333
* provided surface state is invalid334
*/335
ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SURFACE_STATE = 0,336
/**337
* size is invalid338
*/339
ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE = 1,340
/**341
* anchor bitfield is invalid342
*/343
ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_ANCHOR = 2,344
/**345
* keyboard interactivity is invalid346
*/347
ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_KEYBOARD_INTERACTIVITY = 3,348
/**349
* exclusive edge is invalid given the surface anchors350
*/351
ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_EXCLUSIVE_EDGE = 4,352
};353
#endif /* ZWLR_LAYER_SURFACE_V1_ERROR_ENUM */355
#ifndef ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM356
#define ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM357
enum zwlr_layer_surface_v1_anchor {358
/**359
* the top edge of the anchor rectangle360
*/361
ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP = 1,362
/**363
* the bottom edge of the anchor rectangle364
*/365
ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM = 2,366
/**367
* the left edge of the anchor rectangle368
*/369
ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT = 4,370
/**371
* the right edge of the anchor rectangle372
*/373
ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT = 8,374
};375
#endif /* ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM */377
/**378
* @ingroup iface_zwlr_layer_surface_v1379
* @struct zwlr_layer_surface_v1_listener380
*/381
struct zwlr_layer_surface_v1_listener {382
/**383
* suggest a surface change384
*385
* The configure event asks the client to resize its surface.386
*387
* Clients should arrange their surface for the new states, and388
* then send an ack_configure request with the serial sent in this389
* configure event at some point before committing the new surface.390
*391
* The client is free to dismiss all but the last configure event392
* it received.393
*394
* The width and height arguments specify the size of the window in395
* surface-local coordinates.396
*397
* The size is a hint, in the sense that the client is free to398
* ignore it if it doesn't resize, pick a smaller size (to satisfy399
* aspect ratio or resize in steps of NxM pixels). If the client400
* picks a smaller size and is anchored to two opposite anchors401
* (e.g. 'top' and 'bottom'), the surface will be centered on this402
* axis.403
*404
* If the width or height arguments are zero, it means the client405
* should decide its own window dimension.406
*/407
void (*configure)(void *data,408
struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1,409
uint32_t serial,410
uint32_t width,411
uint32_t height);412
/**413
* surface should be closed414
*415
* The closed event is sent by the compositor when the surface416
* will no longer be shown. The output may have been destroyed or417
* the user may have asked for it to be removed. Further changes to418
* the surface will be ignored. The client should destroy the419
* resource after receiving this event, and create a new surface if420
* they so choose.421
*/422
void (*closed)(void *data,423
struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1);424
};426
/**427
* @ingroup iface_zwlr_layer_surface_v1428
*/429
static inline int430
zwlr_layer_surface_v1_add_listener(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1,431
const struct zwlr_layer_surface_v1_listener *listener, void *data)432
{433
return wl_proxy_add_listener((struct wl_proxy *) zwlr_layer_surface_v1,434
(void (**)(void)) listener, data);435
}437
#define ZWLR_LAYER_SURFACE_V1_SET_SIZE 0438
#define ZWLR_LAYER_SURFACE_V1_SET_ANCHOR 1439
#define ZWLR_LAYER_SURFACE_V1_SET_EXCLUSIVE_ZONE 2440
#define ZWLR_LAYER_SURFACE_V1_SET_MARGIN 3441
#define ZWLR_LAYER_SURFACE_V1_SET_KEYBOARD_INTERACTIVITY 4442
#define ZWLR_LAYER_SURFACE_V1_GET_POPUP 5443
#define ZWLR_LAYER_SURFACE_V1_ACK_CONFIGURE 6444
#define ZWLR_LAYER_SURFACE_V1_DESTROY 7445
#define ZWLR_LAYER_SURFACE_V1_SET_LAYER 8446
#define ZWLR_LAYER_SURFACE_V1_SET_EXCLUSIVE_EDGE 9448
/**449
* @ingroup iface_zwlr_layer_surface_v1450
*/451
#define ZWLR_LAYER_SURFACE_V1_CONFIGURE_SINCE_VERSION 1452
/**453
* @ingroup iface_zwlr_layer_surface_v1454
*/455
#define ZWLR_LAYER_SURFACE_V1_CLOSED_SINCE_VERSION 1457
/**458
* @ingroup iface_zwlr_layer_surface_v1459
*/460
#define ZWLR_LAYER_SURFACE_V1_SET_SIZE_SINCE_VERSION 1461
/**462
* @ingroup iface_zwlr_layer_surface_v1463
*/464
#define ZWLR_LAYER_SURFACE_V1_SET_ANCHOR_SINCE_VERSION 1465
/**466
* @ingroup iface_zwlr_layer_surface_v1467
*/468
#define ZWLR_LAYER_SURFACE_V1_SET_EXCLUSIVE_ZONE_SINCE_VERSION 1469
/**470
* @ingroup iface_zwlr_layer_surface_v1471
*/472
#define ZWLR_LAYER_SURFACE_V1_SET_MARGIN_SINCE_VERSION 1473
/**474
* @ingroup iface_zwlr_layer_surface_v1475
*/476
#define ZWLR_LAYER_SURFACE_V1_SET_KEYBOARD_INTERACTIVITY_SINCE_VERSION 1477
/**478
* @ingroup iface_zwlr_layer_surface_v1479
*/480
#define ZWLR_LAYER_SURFACE_V1_GET_POPUP_SINCE_VERSION 1481
/**482
* @ingroup iface_zwlr_layer_surface_v1483
*/484
#define ZWLR_LAYER_SURFACE_V1_ACK_CONFIGURE_SINCE_VERSION 1485
/**486
* @ingroup iface_zwlr_layer_surface_v1487
*/488
#define ZWLR_LAYER_SURFACE_V1_DESTROY_SINCE_VERSION 1489
/**490
* @ingroup iface_zwlr_layer_surface_v1491
*/492
#define ZWLR_LAYER_SURFACE_V1_SET_LAYER_SINCE_VERSION 2493
/**494
* @ingroup iface_zwlr_layer_surface_v1495
*/496
#define ZWLR_LAYER_SURFACE_V1_SET_EXCLUSIVE_EDGE_SINCE_VERSION 5498
/** @ingroup iface_zwlr_layer_surface_v1 */499
static inline void500
zwlr_layer_surface_v1_set_user_data(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, void *user_data)501
{502
wl_proxy_set_user_data((struct wl_proxy *) zwlr_layer_surface_v1, user_data);503
}505
/** @ingroup iface_zwlr_layer_surface_v1 */506
static inline void *507
zwlr_layer_surface_v1_get_user_data(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1)508
{509
return wl_proxy_get_user_data((struct wl_proxy *) zwlr_layer_surface_v1);510
}512
static inline uint32_t513
zwlr_layer_surface_v1_get_version(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1)514
{515
return wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1);516
}518
/**519
* @ingroup iface_zwlr_layer_surface_v1520
*521
* Sets the size of the surface in surface-local coordinates. The522
* compositor will display the surface centered with respect to its523
* anchors.524
*525
* If you pass 0 for either value, the compositor will assign it and526
* inform you of the assignment in the configure event. You must set your527
* anchor to opposite edges in the dimensions you omit; not doing so is a528
* protocol error. Both values are 0 by default.529
*530
* Size is double-buffered, see wl_surface.commit.531
*/532
static inline void533
zwlr_layer_surface_v1_set_size(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t width, uint32_t height)534
{535
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1,536
ZWLR_LAYER_SURFACE_V1_SET_SIZE, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, width, height);537
}539
/**540
* @ingroup iface_zwlr_layer_surface_v1541
*542
* Requests that the compositor anchor the surface to the specified edges543
* and corners. If two orthogonal edges are specified (e.g. 'top' and544
* 'left'), then the anchor point will be the intersection of the edges545
* (e.g. the top left corner of the output); otherwise the anchor point546
* will be centered on that edge, or in the center if none is specified.547
*548
* Anchor is double-buffered, see wl_surface.commit.549
*/550
static inline void551
zwlr_layer_surface_v1_set_anchor(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t anchor)552
{553
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1,554
ZWLR_LAYER_SURFACE_V1_SET_ANCHOR, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, anchor);555
}557
/**558
* @ingroup iface_zwlr_layer_surface_v1559
*560
* Requests that the compositor avoids occluding an area with other561
* surfaces. The compositor's use of this information is562
* implementation-dependent - do not assume that this region will not563
* actually be occluded.564
*565
* A positive value is only meaningful if the surface is anchored to one566
* edge or an edge and both perpendicular edges. If the surface is not567
* anchored, anchored to only two perpendicular edges (a corner), anchored568
* to only two parallel edges or anchored to all edges, a positive value569
* will be treated the same as zero.570
*571
* A positive zone is the distance from the edge in surface-local572
* coordinates to consider exclusive.573
*574
* Surfaces that do not wish to have an exclusive zone may instead specify575
* how they should interact with surfaces that do. If set to zero, the576
* surface indicates that it would like to be moved to avoid occluding577
* surfaces with a positive exclusive zone. If set to -1, the surface578
* indicates that it would not like to be moved to accommodate for other579
* surfaces, and the compositor should extend it all the way to the edges580
* it is anchored to.581
*582
* For example, a panel might set its exclusive zone to 10, so that583
* maximized shell surfaces are not shown on top of it. A notification584
* might set its exclusive zone to 0, so that it is moved to avoid585
* occluding the panel, but shell surfaces are shown underneath it. A586
* wallpaper or lock screen might set their exclusive zone to -1, so that587
* they stretch below or over the panel.588
*589
* The default value is 0.590
*591
* Exclusive zone is double-buffered, see wl_surface.commit.592
*/593
static inline void594
zwlr_layer_surface_v1_set_exclusive_zone(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, int32_t zone)595
{596
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1,597
ZWLR_LAYER_SURFACE_V1_SET_EXCLUSIVE_ZONE, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, zone);598
}600
/**601
* @ingroup iface_zwlr_layer_surface_v1602
*603
* Requests that the surface be placed some distance away from the anchor604
* point on the output, in surface-local coordinates. Setting this value605
* for edges you are not anchored to has no effect.606
*607
* The exclusive zone includes the margin.608
*609
* Margin is double-buffered, see wl_surface.commit.610
*/611
static inline void612
zwlr_layer_surface_v1_set_margin(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, int32_t top, int32_t right, int32_t bottom, int32_t left)613
{614
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1,615
ZWLR_LAYER_SURFACE_V1_SET_MARGIN, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, top, right, bottom, left);616
}618
/**619
* @ingroup iface_zwlr_layer_surface_v1620
*621
* Set how keyboard events are delivered to this surface. By default,622
* layer shell surfaces do not receive keyboard events; this request can623
* be used to change this.624
*625
* This setting is inherited by child surfaces set by the get_popup626
* request.627
*628
* Layer surfaces receive pointer, touch, and tablet events normally. If629
* you do not want to receive them, set the input region on your surface630
* to an empty region.631
*632
* Keyboard interactivity is double-buffered, see wl_surface.commit.633
*/634
static inline void635
zwlr_layer_surface_v1_set_keyboard_interactivity(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t keyboard_interactivity)636
{637
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1,638
ZWLR_LAYER_SURFACE_V1_SET_KEYBOARD_INTERACTIVITY, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, keyboard_interactivity);639
}641
/**642
* @ingroup iface_zwlr_layer_surface_v1643
*644
* This assigns an xdg_popup's parent to this layer_surface. This popup645
* should have been created via xdg_surface::get_popup with the parent set646
* to NULL, and this request must be invoked before committing the popup's647
* initial state.648
*649
* See the documentation of xdg_popup for more details about what an650
* xdg_popup is and how it is used.651
*/652
static inline void653
zwlr_layer_surface_v1_get_popup(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, struct xdg_popup *popup)654
{655
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1,656
ZWLR_LAYER_SURFACE_V1_GET_POPUP, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, popup);657
}659
/**660
* @ingroup iface_zwlr_layer_surface_v1661
*662
* When a configure event is received, if a client commits the663
* surface in response to the configure event, then the client664
* must make an ack_configure request sometime before the commit665
* request, passing along the serial of the configure event.666
*667
* If the client receives multiple configure events before it668
* can respond to one, it only has to ack the last configure event.669
*670
* A client is not required to commit immediately after sending671
* an ack_configure request - it may even ack_configure several times672
* before its next surface commit.673
*674
* A client may send multiple ack_configure requests before committing, but675
* only the last request sent before a commit indicates which configure676
* event the client really is responding to.677
*/678
static inline void679
zwlr_layer_surface_v1_ack_configure(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t serial)680
{681
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1,682
ZWLR_LAYER_SURFACE_V1_ACK_CONFIGURE, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, serial);683
}685
/**686
* @ingroup iface_zwlr_layer_surface_v1687
*688
* This request destroys the layer surface.689
*/690
static inline void691
zwlr_layer_surface_v1_destroy(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1)692
{693
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1,694
ZWLR_LAYER_SURFACE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), WL_MARSHAL_FLAG_DESTROY);695
}697
/**698
* @ingroup iface_zwlr_layer_surface_v1699
*700
* Change the layer that the surface is rendered on.701
*702
* Layer is double-buffered, see wl_surface.commit.703
*/704
static inline void705
zwlr_layer_surface_v1_set_layer(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t layer)706
{707
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1,708
ZWLR_LAYER_SURFACE_V1_SET_LAYER, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, layer);709
}711
/**712
* @ingroup iface_zwlr_layer_surface_v1713
*714
* Requests an edge for the exclusive zone to apply. The exclusive715
* edge will be automatically deduced from anchor points when possible,716
* but when the surface is anchored to a corner, it will be necessary717
* to set it explicitly to disambiguate, as it is not possible to deduce718
* which one of the two corner edges should be used.719
*720
* The edge must be one the surface is anchored to, otherwise the721
* invalid_exclusive_edge protocol error will be raised.722
*/723
static inline void724
zwlr_layer_surface_v1_set_exclusive_edge(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t edge)725
{726
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1,727
ZWLR_LAYER_SURFACE_V1_SET_EXCLUSIVE_EDGE, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, edge);728
}730
#ifdef __cplusplus731
}732
#endif734
#endif