wlr-layer-shell-unstable-v1-protocol.h (26443B)
1 /* Generated by wayland-scanner 1.22.0 */ 2 3 #ifndef WLR_LAYER_SHELL_UNSTABLE_V1_CLIENT_PROTOCOL_H 4 #define WLR_LAYER_SHELL_UNSTABLE_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_wlr_layer_shell_unstable_v1 The wlr_layer_shell_unstable_v1 protocol 16 * @section page_ifaces_wlr_layer_shell_unstable_v1 Interfaces 17 * - @subpage page_iface_zwlr_layer_shell_v1 - create surfaces that are layers of the desktop 18 * - @subpage page_iface_zwlr_layer_surface_v1 - layer metadata interface 19 * @section page_copyright_wlr_layer_shell_unstable_v1 Copyright 20 * <pre> 21 * 22 * Copyright © 2017 Drew DeVault 23 * 24 * Permission to use, copy, modify, distribute, and sell this 25 * software and its documentation for any purpose is hereby granted 26 * without fee, provided that the above copyright notice appear in 27 * all copies and that both that copyright notice and this permission 28 * notice appear in supporting documentation, and that the name of 29 * the copyright holders not be used in advertising or publicity 30 * pertaining to distribution of the software without specific, 31 * written prior permission. The copyright holders make no 32 * representations about the suitability of this software for any 33 * purpose. It is provided "as is" without express or implied 34 * warranty. 35 * 36 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS 37 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 38 * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY 39 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 40 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 41 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 42 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 43 * 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; 51 52 #ifndef ZWLR_LAYER_SHELL_V1_INTERFACE 53 #define ZWLR_LAYER_SHELL_V1_INTERFACE 54 /** 55 * @page page_iface_zwlr_layer_shell_v1 zwlr_layer_shell_v1 56 * @section page_iface_zwlr_layer_shell_v1_desc Description 57 * 58 * Clients can use this interface to assign the surface_layer role to 59 * wl_surfaces. Such surfaces are assigned to a "layer" of the output and 60 * rendered with a defined z-depth respective to each other. They may also be 61 * anchored to the edges and corners of a screen and specify input handling 62 * semantics. This interface should be suitable for the implementation of 63 * many desktop shell components, and a broad number of other applications 64 * that interact with the desktop. 65 * @section page_iface_zwlr_layer_shell_v1_api API 66 * See @ref iface_zwlr_layer_shell_v1. 67 */ 68 /** 69 * @defgroup iface_zwlr_layer_shell_v1 The zwlr_layer_shell_v1 interface 70 * 71 * Clients can use this interface to assign the surface_layer role to 72 * wl_surfaces. Such surfaces are assigned to a "layer" of the output and 73 * rendered with a defined z-depth respective to each other. They may also be 74 * anchored to the edges and corners of a screen and specify input handling 75 * semantics. This interface should be suitable for the implementation of 76 * many desktop shell components, and a broad number of other applications 77 * that interact with the desktop. 78 */ 79 extern const struct wl_interface zwlr_layer_shell_v1_interface; 80 #endif 81 #ifndef ZWLR_LAYER_SURFACE_V1_INTERFACE 82 #define ZWLR_LAYER_SURFACE_V1_INTERFACE 83 /** 84 * @page page_iface_zwlr_layer_surface_v1 zwlr_layer_surface_v1 85 * @section page_iface_zwlr_layer_surface_v1_desc Description 86 * 87 * An interface that may be implemented by a wl_surface, for surfaces that 88 * are designed to be rendered as a layer of a stacked desktop-like 89 * environment. 90 * 91 * Layer surface state (layer, size, anchor, exclusive zone, 92 * margin, interactivity) is double-buffered, and will be applied at the 93 * 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 the 98 * compositor until it is explicitly mapped again. The layer_surface 99 * 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 any 101 * buffer attached, waiting for a configure event and handling it as usual. 102 * @section page_iface_zwlr_layer_surface_v1_api API 103 * See @ref iface_zwlr_layer_surface_v1. 104 */ 105 /** 106 * @defgroup iface_zwlr_layer_surface_v1 The zwlr_layer_surface_v1 interface 107 * 108 * An interface that may be implemented by a wl_surface, for surfaces that 109 * are designed to be rendered as a layer of a stacked desktop-like 110 * environment. 111 * 112 * Layer surface state (layer, size, anchor, exclusive zone, 113 * margin, interactivity) is double-buffered, and will be applied at the 114 * 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 the 119 * compositor until it is explicitly mapped again. The layer_surface 120 * 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 any 122 * 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 #endif 126 127 #ifndef ZWLR_LAYER_SHELL_V1_ERROR_ENUM 128 #define ZWLR_LAYER_SHELL_V1_ERROR_ENUM 129 enum zwlr_layer_shell_v1_error { 130 /** 131 * wl_surface has another role 132 */ 133 ZWLR_LAYER_SHELL_V1_ERROR_ROLE = 0, 134 /** 135 * layer value is invalid 136 */ 137 ZWLR_LAYER_SHELL_V1_ERROR_INVALID_LAYER = 1, 138 /** 139 * wl_surface has a buffer attached or committed 140 */ 141 ZWLR_LAYER_SHELL_V1_ERROR_ALREADY_CONSTRUCTED = 2, 142 }; 143 #endif /* ZWLR_LAYER_SHELL_V1_ERROR_ENUM */ 144 145 #ifndef ZWLR_LAYER_SHELL_V1_LAYER_ENUM 146 #define ZWLR_LAYER_SHELL_V1_LAYER_ENUM 147 /** 148 * @ingroup iface_zwlr_layer_shell_v1 149 * available layers for surfaces 150 * 151 * These values indicate which layers a surface can be rendered in. They 152 * are ordered by z depth, bottom-most first. Traditional shell surfaces 153 * 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 a 156 * 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 */ 165 166 #define ZWLR_LAYER_SHELL_V1_GET_LAYER_SURFACE 0 167 #define ZWLR_LAYER_SHELL_V1_DESTROY 1 168 169 170 /** 171 * @ingroup iface_zwlr_layer_shell_v1 172 */ 173 #define ZWLR_LAYER_SHELL_V1_GET_LAYER_SURFACE_SINCE_VERSION 1 174 /** 175 * @ingroup iface_zwlr_layer_shell_v1 176 */ 177 #define ZWLR_LAYER_SHELL_V1_DESTROY_SINCE_VERSION 3 178 179 /** @ingroup iface_zwlr_layer_shell_v1 */ 180 static inline void 181 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 } 185 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 } 192 193 static inline uint32_t 194 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 } 198 199 /** 200 * @ingroup iface_zwlr_layer_shell_v1 201 * 202 * Create a layer surface for an existing surface. This assigns the role of 203 * layer_surface, or raises a protocol error if another role is already 204 * assigned. 205 * 206 * Creating a layer surface from a wl_surface which has a buffer attached 207 * or committed is a client error, and any attempts by a client to attach 208 * or manipulate a buffer prior to the first layer_surface.configure call 209 * must also be treated as errors. 210 * 211 * After creating a layer_surface object and setting it up, the client 212 * 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 buffer 215 * to map the surface. 216 * 217 * You may pass NULL for output to allow the compositor to decide which 218 * output to use. Generally this will be the one that the user most 219 * recently interacted with. 220 * 221 * Clients can specify a namespace that defines the purpose of the layer 222 * 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; 228 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); 231 232 return (struct zwlr_layer_surface_v1 *) id; 233 } 234 235 /** 236 * @ingroup iface_zwlr_layer_shell_v1 237 * 238 * This request indicates that the client will not use the layer_shell 239 * object any more. Objects that have been created through this instance 240 * are not affected. 241 */ 242 static inline void 243 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 } 248 249 #ifndef ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ENUM 250 #define ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ENUM 251 /** 252 * @ingroup iface_zwlr_layer_surface_v1 253 * types of keyboard interaction possible for a layer shell surface 254 * 255 * Types of keyboard interaction possible for layer shell surfaces. The 256 * rationale for this is twofold: (1) some applications are not interested 257 * in keyboard events and not allowing them to be focused can improve the 258 * desktop experience; (2) some applications will want to take exclusive 259 * keyboard focus. 260 */ 261 enum zwlr_layer_surface_v1_keyboard_interactivity { 262 /** 263 * no keyboard focus is possible 264 * 265 * This value indicates that this surface is not interested in 266 * keyboard events and the compositor should never assign it the 267 * keyboard focus. 268 * 269 * This is the default value, set for newly created layer shell 270 * surfaces. 271 * 272 * This is useful for e.g. desktop widgets that display information 273 * or only have interaction with non-keyboard input devices. 274 */ 275 ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE = 0, 276 /** 277 * request exclusive keyboard focus 278 * 279 * Request exclusive keyboard focus if this surface is above the 280 * shell surface layer. 281 * 282 * For the top and overlay layers, the seat will always give 283 * exclusive keyboard focus to the top-most layer which has 284 * keyboard interactivity set to exclusive. If this layer contains 285 * multiple surfaces with keyboard interactivity set to exclusive, 286 * the compositor determines the one receiving keyboard events in 287 * an implementation- defined manner. In this case, no guarantee is 288 * made when this surface will receive keyboard focus (if ever). 289 * 290 * For the bottom and background layers, the compositor is allowed 291 * to use normal focus semantics. 292 * 293 * This setting is mainly intended for applications that need to 294 * ensure they receive all keyboard events, such as a lock screen 295 * or a password prompt. 296 */ 297 ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE = 1, 298 /** 299 * request regular keyboard focus semantics 300 * 301 * This requests the compositor to allow this surface to be 302 * focused and unfocused by the user in an implementation-defined 303 * manner. The user should be able to unfocus this surface even 304 * regardless of the layer it is on. 305 * 306 * Typically, the compositor will want to use its normal mechanism 307 * to manage keyboard focus between layer shell surfaces with this 308 * setting and regular toplevels on the desktop layer (e.g. click 309 * to focus). Nevertheless, it is possible for a compositor to 310 * require a special interaction to focus or unfocus layer shell 311 * surfaces (e.g. requiring a click even if focus follows the mouse 312 * normally, or providing a keybinding to switch focus between 313 * layers). 314 * 315 * This setting is mainly intended for desktop shell components 316 * (e.g. panels) that allow keyboard interaction. Using this option 317 * can allow implementing a desktop shell that can be fully usable 318 * without the mouse. 319 * @since 4 320 */ 321 ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND = 2, 322 }; 323 /** 324 * @ingroup iface_zwlr_layer_surface_v1 325 */ 326 #define ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND_SINCE_VERSION 4 327 #endif /* ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ENUM */ 328 329 #ifndef ZWLR_LAYER_SURFACE_V1_ERROR_ENUM 330 #define ZWLR_LAYER_SURFACE_V1_ERROR_ENUM 331 enum zwlr_layer_surface_v1_error { 332 /** 333 * provided surface state is invalid 334 */ 335 ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SURFACE_STATE = 0, 336 /** 337 * size is invalid 338 */ 339 ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE = 1, 340 /** 341 * anchor bitfield is invalid 342 */ 343 ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_ANCHOR = 2, 344 /** 345 * keyboard interactivity is invalid 346 */ 347 ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_KEYBOARD_INTERACTIVITY = 3, 348 }; 349 #endif /* ZWLR_LAYER_SURFACE_V1_ERROR_ENUM */ 350 351 #ifndef ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM 352 #define ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM 353 enum zwlr_layer_surface_v1_anchor { 354 /** 355 * the top edge of the anchor rectangle 356 */ 357 ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP = 1, 358 /** 359 * the bottom edge of the anchor rectangle 360 */ 361 ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM = 2, 362 /** 363 * the left edge of the anchor rectangle 364 */ 365 ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT = 4, 366 /** 367 * the right edge of the anchor rectangle 368 */ 369 ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT = 8, 370 }; 371 #endif /* ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM */ 372 373 /** 374 * @ingroup iface_zwlr_layer_surface_v1 375 * @struct zwlr_layer_surface_v1_listener 376 */ 377 struct zwlr_layer_surface_v1_listener { 378 /** 379 * suggest a surface change 380 * 381 * The configure event asks the client to resize its surface. 382 * 383 * Clients should arrange their surface for the new states, and 384 * then send an ack_configure request with the serial sent in this 385 * configure event at some point before committing the new surface. 386 * 387 * The client is free to dismiss all but the last configure event 388 * it received. 389 * 390 * The width and height arguments specify the size of the window in 391 * surface-local coordinates. 392 * 393 * The size is a hint, in the sense that the client is free to 394 * ignore it if it doesn't resize, pick a smaller size (to satisfy 395 * aspect ratio or resize in steps of NxM pixels). If the client 396 * picks a smaller size and is anchored to two opposite anchors 397 * (e.g. 'top' and 'bottom'), the surface will be centered on this 398 * axis. 399 * 400 * If the width or height arguments are zero, it means the client 401 * should decide its own window dimension. 402 */ 403 void (*configure)(void *data, 404 struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, 405 uint32_t serial, 406 uint32_t width, 407 uint32_t height); 408 /** 409 * surface should be closed 410 * 411 * The closed event is sent by the compositor when the surface 412 * will no longer be shown. The output may have been destroyed or 413 * the user may have asked for it to be removed. Further changes to 414 * the surface will be ignored. The client should destroy the 415 * resource after receiving this event, and create a new surface if 416 * they so choose. 417 */ 418 void (*closed)(void *data, 419 struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1); 420 }; 421 422 /** 423 * @ingroup iface_zwlr_layer_surface_v1 424 */ 425 static inline int 426 zwlr_layer_surface_v1_add_listener(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, 427 const struct zwlr_layer_surface_v1_listener *listener, void *data) 428 { 429 return wl_proxy_add_listener((struct wl_proxy *) zwlr_layer_surface_v1, 430 (void (**)(void)) listener, data); 431 } 432 433 #define ZWLR_LAYER_SURFACE_V1_SET_SIZE 0 434 #define ZWLR_LAYER_SURFACE_V1_SET_ANCHOR 1 435 #define ZWLR_LAYER_SURFACE_V1_SET_EXCLUSIVE_ZONE 2 436 #define ZWLR_LAYER_SURFACE_V1_SET_MARGIN 3 437 #define ZWLR_LAYER_SURFACE_V1_SET_KEYBOARD_INTERACTIVITY 4 438 #define ZWLR_LAYER_SURFACE_V1_GET_POPUP 5 439 #define ZWLR_LAYER_SURFACE_V1_ACK_CONFIGURE 6 440 #define ZWLR_LAYER_SURFACE_V1_DESTROY 7 441 #define ZWLR_LAYER_SURFACE_V1_SET_LAYER 8 442 443 /** 444 * @ingroup iface_zwlr_layer_surface_v1 445 */ 446 #define ZWLR_LAYER_SURFACE_V1_CONFIGURE_SINCE_VERSION 1 447 /** 448 * @ingroup iface_zwlr_layer_surface_v1 449 */ 450 #define ZWLR_LAYER_SURFACE_V1_CLOSED_SINCE_VERSION 1 451 452 /** 453 * @ingroup iface_zwlr_layer_surface_v1 454 */ 455 #define ZWLR_LAYER_SURFACE_V1_SET_SIZE_SINCE_VERSION 1 456 /** 457 * @ingroup iface_zwlr_layer_surface_v1 458 */ 459 #define ZWLR_LAYER_SURFACE_V1_SET_ANCHOR_SINCE_VERSION 1 460 /** 461 * @ingroup iface_zwlr_layer_surface_v1 462 */ 463 #define ZWLR_LAYER_SURFACE_V1_SET_EXCLUSIVE_ZONE_SINCE_VERSION 1 464 /** 465 * @ingroup iface_zwlr_layer_surface_v1 466 */ 467 #define ZWLR_LAYER_SURFACE_V1_SET_MARGIN_SINCE_VERSION 1 468 /** 469 * @ingroup iface_zwlr_layer_surface_v1 470 */ 471 #define ZWLR_LAYER_SURFACE_V1_SET_KEYBOARD_INTERACTIVITY_SINCE_VERSION 1 472 /** 473 * @ingroup iface_zwlr_layer_surface_v1 474 */ 475 #define ZWLR_LAYER_SURFACE_V1_GET_POPUP_SINCE_VERSION 1 476 /** 477 * @ingroup iface_zwlr_layer_surface_v1 478 */ 479 #define ZWLR_LAYER_SURFACE_V1_ACK_CONFIGURE_SINCE_VERSION 1 480 /** 481 * @ingroup iface_zwlr_layer_surface_v1 482 */ 483 #define ZWLR_LAYER_SURFACE_V1_DESTROY_SINCE_VERSION 1 484 /** 485 * @ingroup iface_zwlr_layer_surface_v1 486 */ 487 #define ZWLR_LAYER_SURFACE_V1_SET_LAYER_SINCE_VERSION 2 488 489 /** @ingroup iface_zwlr_layer_surface_v1 */ 490 static inline void 491 zwlr_layer_surface_v1_set_user_data(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, void *user_data) 492 { 493 wl_proxy_set_user_data((struct wl_proxy *) zwlr_layer_surface_v1, user_data); 494 } 495 496 /** @ingroup iface_zwlr_layer_surface_v1 */ 497 static inline void * 498 zwlr_layer_surface_v1_get_user_data(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1) 499 { 500 return wl_proxy_get_user_data((struct wl_proxy *) zwlr_layer_surface_v1); 501 } 502 503 static inline uint32_t 504 zwlr_layer_surface_v1_get_version(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1) 505 { 506 return wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1); 507 } 508 509 /** 510 * @ingroup iface_zwlr_layer_surface_v1 511 * 512 * Sets the size of the surface in surface-local coordinates. The 513 * compositor will display the surface centered with respect to its 514 * anchors. 515 * 516 * If you pass 0 for either value, the compositor will assign it and 517 * inform you of the assignment in the configure event. You must set your 518 * anchor to opposite edges in the dimensions you omit; not doing so is a 519 * protocol error. Both values are 0 by default. 520 * 521 * Size is double-buffered, see wl_surface.commit. 522 */ 523 static inline void 524 zwlr_layer_surface_v1_set_size(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t width, uint32_t height) 525 { 526 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1, 527 ZWLR_LAYER_SURFACE_V1_SET_SIZE, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, width, height); 528 } 529 530 /** 531 * @ingroup iface_zwlr_layer_surface_v1 532 * 533 * Requests that the compositor anchor the surface to the specified edges 534 * and corners. If two orthogonal edges are specified (e.g. 'top' and 535 * 'left'), then the anchor point will be the intersection of the edges 536 * (e.g. the top left corner of the output); otherwise the anchor point 537 * will be centered on that edge, or in the center if none is specified. 538 * 539 * Anchor is double-buffered, see wl_surface.commit. 540 */ 541 static inline void 542 zwlr_layer_surface_v1_set_anchor(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t anchor) 543 { 544 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1, 545 ZWLR_LAYER_SURFACE_V1_SET_ANCHOR, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, anchor); 546 } 547 548 /** 549 * @ingroup iface_zwlr_layer_surface_v1 550 * 551 * Requests that the compositor avoids occluding an area with other 552 * surfaces. The compositor's use of this information is 553 * implementation-dependent - do not assume that this region will not 554 * actually be occluded. 555 * 556 * A positive value is only meaningful if the surface is anchored to one 557 * edge or an edge and both perpendicular edges. If the surface is not 558 * anchored, anchored to only two perpendicular edges (a corner), anchored 559 * to only two parallel edges or anchored to all edges, a positive value 560 * will be treated the same as zero. 561 * 562 * A positive zone is the distance from the edge in surface-local 563 * coordinates to consider exclusive. 564 * 565 * Surfaces that do not wish to have an exclusive zone may instead specify 566 * how they should interact with surfaces that do. If set to zero, the 567 * surface indicates that it would like to be moved to avoid occluding 568 * surfaces with a positive exclusive zone. If set to -1, the surface 569 * indicates that it would not like to be moved to accommodate for other 570 * surfaces, and the compositor should extend it all the way to the edges 571 * it is anchored to. 572 * 573 * For example, a panel might set its exclusive zone to 10, so that 574 * maximized shell surfaces are not shown on top of it. A notification 575 * might set its exclusive zone to 0, so that it is moved to avoid 576 * occluding the panel, but shell surfaces are shown underneath it. A 577 * wallpaper or lock screen might set their exclusive zone to -1, so that 578 * they stretch below or over the panel. 579 * 580 * The default value is 0. 581 * 582 * Exclusive zone is double-buffered, see wl_surface.commit. 583 */ 584 static inline void 585 zwlr_layer_surface_v1_set_exclusive_zone(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, int32_t zone) 586 { 587 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1, 588 ZWLR_LAYER_SURFACE_V1_SET_EXCLUSIVE_ZONE, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, zone); 589 } 590 591 /** 592 * @ingroup iface_zwlr_layer_surface_v1 593 * 594 * Requests that the surface be placed some distance away from the anchor 595 * point on the output, in surface-local coordinates. Setting this value 596 * for edges you are not anchored to has no effect. 597 * 598 * The exclusive zone includes the margin. 599 * 600 * Margin is double-buffered, see wl_surface.commit. 601 */ 602 static inline void 603 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) 604 { 605 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1, 606 ZWLR_LAYER_SURFACE_V1_SET_MARGIN, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, top, right, bottom, left); 607 } 608 609 /** 610 * @ingroup iface_zwlr_layer_surface_v1 611 * 612 * Set how keyboard events are delivered to this surface. By default, 613 * layer shell surfaces do not receive keyboard events; this request can 614 * be used to change this. 615 * 616 * This setting is inherited by child surfaces set by the get_popup 617 * request. 618 * 619 * Layer surfaces receive pointer, touch, and tablet events normally. If 620 * you do not want to receive them, set the input region on your surface 621 * to an empty region. 622 * 623 * Keyboard interactivity is double-buffered, see wl_surface.commit. 624 */ 625 static inline void 626 zwlr_layer_surface_v1_set_keyboard_interactivity(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t keyboard_interactivity) 627 { 628 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1, 629 ZWLR_LAYER_SURFACE_V1_SET_KEYBOARD_INTERACTIVITY, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, keyboard_interactivity); 630 } 631 632 /** 633 * @ingroup iface_zwlr_layer_surface_v1 634 * 635 * This assigns an xdg_popup's parent to this layer_surface. This popup 636 * should have been created via xdg_surface::get_popup with the parent set 637 * to NULL, and this request must be invoked before committing the popup's 638 * initial state. 639 * 640 * See the documentation of xdg_popup for more details about what an 641 * xdg_popup is and how it is used. 642 */ 643 static inline void 644 zwlr_layer_surface_v1_get_popup(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, struct xdg_popup *popup) 645 { 646 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1, 647 ZWLR_LAYER_SURFACE_V1_GET_POPUP, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, popup); 648 } 649 650 /** 651 * @ingroup iface_zwlr_layer_surface_v1 652 * 653 * When a configure event is received, if a client commits the 654 * surface in response to the configure event, then the client 655 * must make an ack_configure request sometime before the commit 656 * request, passing along the serial of the configure event. 657 * 658 * If the client receives multiple configure events before it 659 * can respond to one, it only has to ack the last configure event. 660 * 661 * A client is not required to commit immediately after sending 662 * an ack_configure request - it may even ack_configure several times 663 * before its next surface commit. 664 * 665 * A client may send multiple ack_configure requests before committing, but 666 * only the last request sent before a commit indicates which configure 667 * event the client really is responding to. 668 */ 669 static inline void 670 zwlr_layer_surface_v1_ack_configure(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t serial) 671 { 672 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1, 673 ZWLR_LAYER_SURFACE_V1_ACK_CONFIGURE, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, serial); 674 } 675 676 /** 677 * @ingroup iface_zwlr_layer_surface_v1 678 * 679 * This request destroys the layer surface. 680 */ 681 static inline void 682 zwlr_layer_surface_v1_destroy(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1) 683 { 684 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1, 685 ZWLR_LAYER_SURFACE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), WL_MARSHAL_FLAG_DESTROY); 686 } 687 688 /** 689 * @ingroup iface_zwlr_layer_surface_v1 690 * 691 * Change the layer that the surface is rendered on. 692 * 693 * Layer is double-buffered, see wl_surface.commit. 694 */ 695 static inline void 696 zwlr_layer_surface_v1_set_layer(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t layer) 697 { 698 wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1, 699 ZWLR_LAYER_SURFACE_V1_SET_LAYER, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, layer); 700 } 701 702 #ifdef __cplusplus 703 } 704 #endif 705 706 #endif