AtlatestRepositorysigil-ui

sigil-ui / tree / native / waylandwlr-layer-shell-unstable-v1-client-protocol.h

1/* Generated by wayland-scanner 1.24.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
11extern "C" {
12#endif
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 */
46struct wl_output;
47struct wl_surface;
48struct xdg_popup;
49struct zwlr_layer_shell_v1;
50struct zwlr_layer_surface_v1;
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 */
79extern 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 */
124extern const struct wl_interface zwlr_layer_surface_v1_interface;
125#endif
127#ifndef ZWLR_LAYER_SHELL_V1_ERROR_ENUM
128#define ZWLR_LAYER_SHELL_V1_ERROR_ENUM
129enum 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 */
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 */
158enum 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 0
167#define ZWLR_LAYER_SHELL_V1_DESTROY 1
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
179/** @ingroup iface_zwlr_layer_shell_v1 */
180static inline void
181zwlr_layer_shell_v1_set_user_data(struct zwlr_layer_shell_v1 *zwlr_layer_shell_v1, void *user_data)
183 wl_proxy_set_user_data((struct wl_proxy *) zwlr_layer_shell_v1, user_data);
186/** @ingroup iface_zwlr_layer_shell_v1 */
187static inline void *
188zwlr_layer_shell_v1_get_user_data(struct zwlr_layer_shell_v1 *zwlr_layer_shell_v1)
190 return wl_proxy_get_user_data((struct wl_proxy *) zwlr_layer_shell_v1);
193static inline uint32_t
194zwlr_layer_shell_v1_get_version(struct zwlr_layer_shell_v1 *zwlr_layer_shell_v1)
196 return wl_proxy_get_version((struct wl_proxy *) zwlr_layer_shell_v1);
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 */
224static inline struct zwlr_layer_surface_v1 *
225zwlr_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)
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;
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 */
242static inline void
243zwlr_layer_shell_v1_destroy(struct zwlr_layer_shell_v1 *zwlr_layer_shell_v1)
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);
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 */
261enum 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 */
329#ifndef ZWLR_LAYER_SURFACE_V1_ERROR_ENUM
330#define ZWLR_LAYER_SURFACE_V1_ERROR_ENUM
331enum 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 * exclusive edge is invalid given the surface anchors
350 */
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_ENUM
356#define ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM
357enum zwlr_layer_surface_v1_anchor {
358 /**
359 * the top edge of the anchor rectangle
360 */
361 ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP = 1,
362 /**
363 * the bottom edge of the anchor rectangle
364 */
365 ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM = 2,
366 /**
367 * the left edge of the anchor rectangle
368 */
369 ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT = 4,
370 /**
371 * the right edge of the anchor rectangle
372 */
373 ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT = 8,
374};
375#endif /* ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM */
377/**
378 * @ingroup iface_zwlr_layer_surface_v1
379 * @struct zwlr_layer_surface_v1_listener
380 */
381struct zwlr_layer_surface_v1_listener {
382 /**
383 * suggest a surface change
384 *
385 * The configure event asks the client to resize its surface.
386 *
387 * Clients should arrange their surface for the new states, and
388 * then send an ack_configure request with the serial sent in this
389 * configure event at some point before committing the new surface.
390 *
391 * The client is free to dismiss all but the last configure event
392 * it received.
393 *
394 * The width and height arguments specify the size of the window in
395 * surface-local coordinates.
396 *
397 * The size is a hint, in the sense that the client is free to
398 * ignore it if it doesn't resize, pick a smaller size (to satisfy
399 * aspect ratio or resize in steps of NxM pixels). If the client
400 * picks a smaller size and is anchored to two opposite anchors
401 * (e.g. 'top' and 'bottom'), the surface will be centered on this
402 * axis.
403 *
404 * If the width or height arguments are zero, it means the client
405 * 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 closed
414 *
415 * The closed event is sent by the compositor when the surface
416 * will no longer be shown. The output may have been destroyed or
417 * the user may have asked for it to be removed. Further changes to
418 * the surface will be ignored. The client should destroy the
419 * resource after receiving this event, and create a new surface if
420 * 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_v1
428 */
429static inline int
430zwlr_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)
433 return wl_proxy_add_listener((struct wl_proxy *) zwlr_layer_surface_v1,
434 (void (**)(void)) listener, data);
437#define ZWLR_LAYER_SURFACE_V1_SET_SIZE 0
438#define ZWLR_LAYER_SURFACE_V1_SET_ANCHOR 1
439#define ZWLR_LAYER_SURFACE_V1_SET_EXCLUSIVE_ZONE 2
440#define ZWLR_LAYER_SURFACE_V1_SET_MARGIN 3
441#define ZWLR_LAYER_SURFACE_V1_SET_KEYBOARD_INTERACTIVITY 4
442#define ZWLR_LAYER_SURFACE_V1_GET_POPUP 5
443#define ZWLR_LAYER_SURFACE_V1_ACK_CONFIGURE 6
444#define ZWLR_LAYER_SURFACE_V1_DESTROY 7
445#define ZWLR_LAYER_SURFACE_V1_SET_LAYER 8
446#define ZWLR_LAYER_SURFACE_V1_SET_EXCLUSIVE_EDGE 9
448/**
449 * @ingroup iface_zwlr_layer_surface_v1
450 */
451#define ZWLR_LAYER_SURFACE_V1_CONFIGURE_SINCE_VERSION 1
452/**
453 * @ingroup iface_zwlr_layer_surface_v1
454 */
455#define ZWLR_LAYER_SURFACE_V1_CLOSED_SINCE_VERSION 1
457/**
458 * @ingroup iface_zwlr_layer_surface_v1
459 */
460#define ZWLR_LAYER_SURFACE_V1_SET_SIZE_SINCE_VERSION 1
461/**
462 * @ingroup iface_zwlr_layer_surface_v1
463 */
464#define ZWLR_LAYER_SURFACE_V1_SET_ANCHOR_SINCE_VERSION 1
465/**
466 * @ingroup iface_zwlr_layer_surface_v1
467 */
468#define ZWLR_LAYER_SURFACE_V1_SET_EXCLUSIVE_ZONE_SINCE_VERSION 1
469/**
470 * @ingroup iface_zwlr_layer_surface_v1
471 */
472#define ZWLR_LAYER_SURFACE_V1_SET_MARGIN_SINCE_VERSION 1
473/**
474 * @ingroup iface_zwlr_layer_surface_v1
475 */
476#define ZWLR_LAYER_SURFACE_V1_SET_KEYBOARD_INTERACTIVITY_SINCE_VERSION 1
477/**
478 * @ingroup iface_zwlr_layer_surface_v1
479 */
480#define ZWLR_LAYER_SURFACE_V1_GET_POPUP_SINCE_VERSION 1
481/**
482 * @ingroup iface_zwlr_layer_surface_v1
483 */
484#define ZWLR_LAYER_SURFACE_V1_ACK_CONFIGURE_SINCE_VERSION 1
485/**
486 * @ingroup iface_zwlr_layer_surface_v1
487 */
488#define ZWLR_LAYER_SURFACE_V1_DESTROY_SINCE_VERSION 1
489/**
490 * @ingroup iface_zwlr_layer_surface_v1
491 */
492#define ZWLR_LAYER_SURFACE_V1_SET_LAYER_SINCE_VERSION 2
493/**
494 * @ingroup iface_zwlr_layer_surface_v1
495 */
496#define ZWLR_LAYER_SURFACE_V1_SET_EXCLUSIVE_EDGE_SINCE_VERSION 5
498/** @ingroup iface_zwlr_layer_surface_v1 */
499static inline void
500zwlr_layer_surface_v1_set_user_data(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, void *user_data)
502 wl_proxy_set_user_data((struct wl_proxy *) zwlr_layer_surface_v1, user_data);
505/** @ingroup iface_zwlr_layer_surface_v1 */
506static inline void *
507zwlr_layer_surface_v1_get_user_data(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1)
509 return wl_proxy_get_user_data((struct wl_proxy *) zwlr_layer_surface_v1);
512static inline uint32_t
513zwlr_layer_surface_v1_get_version(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1)
515 return wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1);
518/**
519 * @ingroup iface_zwlr_layer_surface_v1
520 *
521 * Sets the size of the surface in surface-local coordinates. The
522 * compositor will display the surface centered with respect to its
523 * anchors.
524 *
525 * If you pass 0 for either value, the compositor will assign it and
526 * inform you of the assignment in the configure event. You must set your
527 * anchor to opposite edges in the dimensions you omit; not doing so is a
528 * protocol error. Both values are 0 by default.
529 *
530 * Size is double-buffered, see wl_surface.commit.
531 */
532static inline void
533zwlr_layer_surface_v1_set_size(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t width, uint32_t height)
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);
539/**
540 * @ingroup iface_zwlr_layer_surface_v1
541 *
542 * Requests that the compositor anchor the surface to the specified edges
543 * and corners. If two orthogonal edges are specified (e.g. 'top' and
544 * 'left'), then the anchor point will be the intersection of the edges
545 * (e.g. the top left corner of the output); otherwise the anchor point
546 * 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 */
550static inline void
551zwlr_layer_surface_v1_set_anchor(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t anchor)
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);
557/**
558 * @ingroup iface_zwlr_layer_surface_v1
559 *
560 * Requests that the compositor avoids occluding an area with other
561 * surfaces. The compositor's use of this information is
562 * implementation-dependent - do not assume that this region will not
563 * actually be occluded.
564 *
565 * A positive value is only meaningful if the surface is anchored to one
566 * edge or an edge and both perpendicular edges. If the surface is not
567 * anchored, anchored to only two perpendicular edges (a corner), anchored
568 * to only two parallel edges or anchored to all edges, a positive value
569 * will be treated the same as zero.
570 *
571 * A positive zone is the distance from the edge in surface-local
572 * coordinates to consider exclusive.
573 *
574 * Surfaces that do not wish to have an exclusive zone may instead specify
575 * how they should interact with surfaces that do. If set to zero, the
576 * surface indicates that it would like to be moved to avoid occluding
577 * surfaces with a positive exclusive zone. If set to -1, the surface
578 * indicates that it would not like to be moved to accommodate for other
579 * surfaces, and the compositor should extend it all the way to the edges
580 * it is anchored to.
581 *
582 * For example, a panel might set its exclusive zone to 10, so that
583 * maximized shell surfaces are not shown on top of it. A notification
584 * might set its exclusive zone to 0, so that it is moved to avoid
585 * occluding the panel, but shell surfaces are shown underneath it. A
586 * wallpaper or lock screen might set their exclusive zone to -1, so that
587 * 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 */
593static inline void
594zwlr_layer_surface_v1_set_exclusive_zone(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, int32_t zone)
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);
600/**
601 * @ingroup iface_zwlr_layer_surface_v1
602 *
603 * Requests that the surface be placed some distance away from the anchor
604 * point on the output, in surface-local coordinates. Setting this value
605 * 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 */
611static inline void
612zwlr_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)
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);
618/**
619 * @ingroup iface_zwlr_layer_surface_v1
620 *
621 * Set how keyboard events are delivered to this surface. By default,
622 * layer shell surfaces do not receive keyboard events; this request can
623 * be used to change this.
624 *
625 * This setting is inherited by child surfaces set by the get_popup
626 * request.
627 *
628 * Layer surfaces receive pointer, touch, and tablet events normally. If
629 * you do not want to receive them, set the input region on your surface
630 * to an empty region.
631 *
632 * Keyboard interactivity is double-buffered, see wl_surface.commit.
633 */
634static inline void
635zwlr_layer_surface_v1_set_keyboard_interactivity(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t keyboard_interactivity)
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);
641/**
642 * @ingroup iface_zwlr_layer_surface_v1
643 *
644 * This assigns an xdg_popup's parent to this layer_surface. This popup
645 * should have been created via xdg_surface::get_popup with the parent set
646 * to NULL, and this request must be invoked before committing the popup's
647 * initial state.
648 *
649 * See the documentation of xdg_popup for more details about what an
650 * xdg_popup is and how it is used.
651 */
652static inline void
653zwlr_layer_surface_v1_get_popup(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, struct xdg_popup *popup)
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);
659/**
660 * @ingroup iface_zwlr_layer_surface_v1
661 *
662 * When a configure event is received, if a client commits the
663 * surface in response to the configure event, then the client
664 * must make an ack_configure request sometime before the commit
665 * request, passing along the serial of the configure event.
666 *
667 * If the client receives multiple configure events before it
668 * can respond to one, it only has to ack the last configure event.
669 *
670 * A client is not required to commit immediately after sending
671 * an ack_configure request - it may even ack_configure several times
672 * before its next surface commit.
673 *
674 * A client may send multiple ack_configure requests before committing, but
675 * only the last request sent before a commit indicates which configure
676 * event the client really is responding to.
677 */
678static inline void
679zwlr_layer_surface_v1_ack_configure(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t serial)
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);
685/**
686 * @ingroup iface_zwlr_layer_surface_v1
687 *
688 * This request destroys the layer surface.
689 */
690static inline void
691zwlr_layer_surface_v1_destroy(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1)
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);
697/**
698 * @ingroup iface_zwlr_layer_surface_v1
699 *
700 * Change the layer that the surface is rendered on.
701 *
702 * Layer is double-buffered, see wl_surface.commit.
703 */
704static inline void
705zwlr_layer_surface_v1_set_layer(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t layer)
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);
711/**
712 * @ingroup iface_zwlr_layer_surface_v1
713 *
714 * Requests an edge for the exclusive zone to apply. The exclusive
715 * edge will be automatically deduced from anchor points when possible,
716 * but when the surface is anchored to a corner, it will be necessary
717 * to set it explicitly to disambiguate, as it is not possible to deduce
718 * which one of the two corner edges should be used.
719 *
720 * The edge must be one the surface is anchored to, otherwise the
721 * invalid_exclusive_edge protocol error will be raised.
722 */
723static inline void
724zwlr_layer_surface_v1_set_exclusive_edge(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t edge)
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);
730#ifdef __cplusplus
732#endif
734#endif