wlr-layer-shell-unstable-v1.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. /* Generated by wayland-scanner 1.22.0 */
  2. #ifndef WLR_LAYER_SHELL_V1_UNSTABLE_V1_CLIENT_PROTOCOL_H
  3. #define WLR_LAYER_SHELL_V1_UNSTABLE_V1_CLIENT_PROTOCOL_H
  4. #include <stdint.h>
  5. #include <stddef.h>
  6. #include "wayland-client.h"
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. /**
  11. * @page page_wlr_layer_shell_v1_unstable_v1 The wlr_layer_shell_v1_unstable_v1 protocol
  12. * @section page_ifaces_wlr_layer_shell_v1_unstable_v1 Interfaces
  13. * - @subpage page_iface_zwlr_layer_shell_v1 - create surfaces that are layers of the desktop
  14. * - @subpage page_iface_zwlr_layer_surface_v1 - layer metadata interface
  15. * @section page_copyright_wlr_layer_shell_v1_unstable_v1 Copyright
  16. * <pre>
  17. *
  18. * Copyright © 2017 Drew DeVault
  19. *
  20. * Permission to use, copy, modify, distribute, and sell this
  21. * software and its documentation for any purpose is hereby granted
  22. * without fee, provided that the above copyright notice appear in
  23. * all copies and that both that copyright notice and this permission
  24. * notice appear in supporting documentation, and that the name of
  25. * the copyright holders not be used in advertising or publicity
  26. * pertaining to distribution of the software without specific,
  27. * written prior permission. The copyright holders make no
  28. * representations about the suitability of this software for any
  29. * purpose. It is provided "as is" without express or implied
  30. * warranty.
  31. *
  32. * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
  33. * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  34. * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
  35. * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  36. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
  37. * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  38. * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
  39. * THIS SOFTWARE.
  40. * </pre>
  41. */
  42. struct wl_output;
  43. struct wl_surface;
  44. struct xdg_popup;
  45. struct zwlr_layer_shell_v1;
  46. struct zwlr_layer_surface_v1;
  47. #ifndef ZWLR_LAYER_SHELL_V1_INTERFACE
  48. #define ZWLR_LAYER_SHELL_V1_INTERFACE
  49. /**
  50. * @page page_iface_zwlr_layer_shell_v1 zwlr_layer_shell_v1
  51. * @section page_iface_zwlr_layer_shell_v1_desc Description
  52. *
  53. * Clients can use this interface to assign the surface_layer role to
  54. * wl_surfaces. Such surfaces are assigned to a "layer" of the output and
  55. * rendered with a defined z-depth respective to each other. They may also be
  56. * anchored to the edges and corners of a screen and specify input handling
  57. * semantics. This interface should be suitable for the implementation of
  58. * many desktop shell components, and a broad number of other applications
  59. * that interact with the desktop.
  60. * @section page_iface_zwlr_layer_shell_v1_api API
  61. * See @ref iface_zwlr_layer_shell_v1.
  62. */
  63. /**
  64. * @defgroup iface_zwlr_layer_shell_v1 The zwlr_layer_shell_v1 interface
  65. *
  66. * Clients can use this interface to assign the surface_layer role to
  67. * wl_surfaces. Such surfaces are assigned to a "layer" of the output and
  68. * rendered with a defined z-depth respective to each other. They may also be
  69. * anchored to the edges and corners of a screen and specify input handling
  70. * semantics. This interface should be suitable for the implementation of
  71. * many desktop shell components, and a broad number of other applications
  72. * that interact with the desktop.
  73. */
  74. extern const struct wl_interface zwlr_layer_shell_v1_interface;
  75. #endif
  76. #ifndef ZWLR_LAYER_SURFACE_V1_INTERFACE
  77. #define ZWLR_LAYER_SURFACE_V1_INTERFACE
  78. /**
  79. * @page page_iface_zwlr_layer_surface_v1 zwlr_layer_surface_v1
  80. * @section page_iface_zwlr_layer_surface_v1_desc Description
  81. *
  82. * An interface that may be implemented by a wl_surface, for surfaces that
  83. * are designed to be rendered as a layer of a stacked desktop-like
  84. * environment.
  85. *
  86. * Layer surface state (size, anchor, exclusive zone, margin, interactivity)
  87. * is double-buffered, and will be applied at the time wl_surface.commit of
  88. * the corresponding wl_surface is called.
  89. * @section page_iface_zwlr_layer_surface_v1_api API
  90. * See @ref iface_zwlr_layer_surface_v1.
  91. */
  92. /**
  93. * @defgroup iface_zwlr_layer_surface_v1 The zwlr_layer_surface_v1 interface
  94. *
  95. * An interface that may be implemented by a wl_surface, for surfaces that
  96. * are designed to be rendered as a layer of a stacked desktop-like
  97. * environment.
  98. *
  99. * Layer surface state (size, anchor, exclusive zone, margin, interactivity)
  100. * is double-buffered, and will be applied at the time wl_surface.commit of
  101. * the corresponding wl_surface is called.
  102. */
  103. extern const struct wl_interface zwlr_layer_surface_v1_interface;
  104. #endif
  105. #ifndef ZWLR_LAYER_SHELL_V1_ERROR_ENUM
  106. #define ZWLR_LAYER_SHELL_V1_ERROR_ENUM
  107. enum zwlr_layer_shell_v1_error {
  108. /**
  109. * wl_surface has another role
  110. */
  111. ZWLR_LAYER_SHELL_V1_ERROR_ROLE = 0,
  112. /**
  113. * layer value is invalid
  114. */
  115. ZWLR_LAYER_SHELL_V1_ERROR_INVALID_LAYER = 1,
  116. /**
  117. * wl_surface has a buffer attached or committed
  118. */
  119. ZWLR_LAYER_SHELL_V1_ERROR_ALREADY_CONSTRUCTED = 2,
  120. };
  121. #endif /* ZWLR_LAYER_SHELL_V1_ERROR_ENUM */
  122. #ifndef ZWLR_LAYER_SHELL_V1_LAYER_ENUM
  123. #define ZWLR_LAYER_SHELL_V1_LAYER_ENUM
  124. /**
  125. * @ingroup iface_zwlr_layer_shell_v1
  126. * available layers for surfaces
  127. *
  128. * These values indicate which layers a surface can be rendered in. They
  129. * are ordered by z depth, bottom-most first. Traditional shell surfaces
  130. * will typically be rendered between the bottom and top layers.
  131. * Fullscreen shell surfaces are typically rendered at the top layer.
  132. * Multiple surfaces can share a single layer, and ordering within a
  133. * single layer is undefined.
  134. */
  135. enum zwlr_layer_shell_v1_layer {
  136. ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND = 0,
  137. ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM = 1,
  138. ZWLR_LAYER_SHELL_V1_LAYER_TOP = 2,
  139. ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY = 3,
  140. };
  141. #endif /* ZWLR_LAYER_SHELL_V1_LAYER_ENUM */
  142. #define ZWLR_LAYER_SHELL_V1_GET_LAYER_SURFACE 0
  143. /**
  144. * @ingroup iface_zwlr_layer_shell_v1
  145. */
  146. #define ZWLR_LAYER_SHELL_V1_GET_LAYER_SURFACE_SINCE_VERSION 1
  147. /** @ingroup iface_zwlr_layer_shell_v1 */
  148. static inline void
  149. zwlr_layer_shell_v1_set_user_data(struct zwlr_layer_shell_v1 *zwlr_layer_shell_v1, void *user_data)
  150. {
  151. wl_proxy_set_user_data((struct wl_proxy *) zwlr_layer_shell_v1, user_data);
  152. }
  153. /** @ingroup iface_zwlr_layer_shell_v1 */
  154. static inline void *
  155. zwlr_layer_shell_v1_get_user_data(struct zwlr_layer_shell_v1 *zwlr_layer_shell_v1)
  156. {
  157. return wl_proxy_get_user_data((struct wl_proxy *) zwlr_layer_shell_v1);
  158. }
  159. static inline uint32_t
  160. zwlr_layer_shell_v1_get_version(struct zwlr_layer_shell_v1 *zwlr_layer_shell_v1)
  161. {
  162. return wl_proxy_get_version((struct wl_proxy *) zwlr_layer_shell_v1);
  163. }
  164. /** @ingroup iface_zwlr_layer_shell_v1 */
  165. static inline void
  166. zwlr_layer_shell_v1_destroy(struct zwlr_layer_shell_v1 *zwlr_layer_shell_v1)
  167. {
  168. wl_proxy_destroy((struct wl_proxy *) zwlr_layer_shell_v1);
  169. }
  170. /**
  171. * @ingroup iface_zwlr_layer_shell_v1
  172. *
  173. * Create a layer surface for an existing surface. This assigns the role of
  174. * layer_surface, or raises a protocol error if another role is already
  175. * assigned.
  176. *
  177. * Creating a layer surface from a wl_surface which has a buffer attached
  178. * or committed is a client error, and any attempts by a client to attach
  179. * or manipulate a buffer prior to the first layer_surface.configure call
  180. * must also be treated as errors.
  181. *
  182. * You may pass NULL for output to allow the compositor to decide which
  183. * output to use. Generally this will be the one that the user most
  184. * recently interacted with.
  185. *
  186. * Clients can specify a namespace that defines the purpose of the layer
  187. * surface.
  188. */
  189. static inline struct zwlr_layer_surface_v1 *
  190. 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)
  191. {
  192. struct wl_proxy *id;
  193. id = wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_shell_v1,
  194. 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);
  195. return (struct zwlr_layer_surface_v1 *) id;
  196. }
  197. #ifndef ZWLR_LAYER_SURFACE_V1_ERROR_ENUM
  198. #define ZWLR_LAYER_SURFACE_V1_ERROR_ENUM
  199. enum zwlr_layer_surface_v1_error {
  200. /**
  201. * provided surface state is invalid
  202. */
  203. ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SURFACE_STATE = 0,
  204. /**
  205. * size is invalid
  206. */
  207. ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE = 1,
  208. /**
  209. * anchor bitfield is invalid
  210. */
  211. ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_ANCHOR = 2,
  212. };
  213. #endif /* ZWLR_LAYER_SURFACE_V1_ERROR_ENUM */
  214. #ifndef ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM
  215. #define ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM
  216. enum zwlr_layer_surface_v1_anchor {
  217. /**
  218. * the top edge of the anchor rectangle
  219. */
  220. ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP = 1,
  221. /**
  222. * the bottom edge of the anchor rectangle
  223. */
  224. ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM = 2,
  225. /**
  226. * the left edge of the anchor rectangle
  227. */
  228. ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT = 4,
  229. /**
  230. * the right edge of the anchor rectangle
  231. */
  232. ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT = 8,
  233. };
  234. #endif /* ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM */
  235. /**
  236. * @ingroup iface_zwlr_layer_surface_v1
  237. * @struct zwlr_layer_surface_v1_listener
  238. */
  239. struct zwlr_layer_surface_v1_listener {
  240. /**
  241. * suggest a surface change
  242. *
  243. * The configure event asks the client to resize its surface.
  244. *
  245. * Clients should arrange their surface for the new states, and
  246. * then send an ack_configure request with the serial sent in this
  247. * configure event at some point before committing the new surface.
  248. *
  249. * The client is free to dismiss all but the last configure event
  250. * it received.
  251. *
  252. * The width and height arguments specify the size of the window in
  253. * surface-local coordinates.
  254. *
  255. * The size is a hint, in the sense that the client is free to
  256. * ignore it if it doesn't resize, pick a smaller size (to satisfy
  257. * aspect ratio or resize in steps of NxM pixels). If the client
  258. * picks a smaller size and is anchored to two opposite anchors
  259. * (e.g. 'top' and 'bottom'), the surface will be centered on this
  260. * axis.
  261. *
  262. * If the width or height arguments are zero, it means the client
  263. * should decide its own window dimension.
  264. */
  265. void (*configure)(void *data,
  266. struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1,
  267. uint32_t serial,
  268. uint32_t width,
  269. uint32_t height);
  270. /**
  271. * surface should be closed
  272. *
  273. * The closed event is sent by the compositor when the surface
  274. * will no longer be shown. The output may have been destroyed or
  275. * the user may have asked for it to be removed. Further changes to
  276. * the surface will be ignored. The client should destroy the
  277. * resource after receiving this event, and create a new surface if
  278. * they so choose.
  279. */
  280. void (*closed)(void *data,
  281. struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1);
  282. };
  283. /**
  284. * @ingroup iface_zwlr_layer_surface_v1
  285. */
  286. static inline int
  287. zwlr_layer_surface_v1_add_listener(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1,
  288. const struct zwlr_layer_surface_v1_listener *listener, void *data)
  289. {
  290. return wl_proxy_add_listener((struct wl_proxy *) zwlr_layer_surface_v1,
  291. (void (**)(void)) listener, data);
  292. }
  293. #define ZWLR_LAYER_SURFACE_V1_SET_SIZE 0
  294. #define ZWLR_LAYER_SURFACE_V1_SET_ANCHOR 1
  295. #define ZWLR_LAYER_SURFACE_V1_SET_EXCLUSIVE_ZONE 2
  296. #define ZWLR_LAYER_SURFACE_V1_SET_MARGIN 3
  297. #define ZWLR_LAYER_SURFACE_V1_SET_KEYBOARD_INTERACTIVITY 4
  298. #define ZWLR_LAYER_SURFACE_V1_GET_POPUP 5
  299. #define ZWLR_LAYER_SURFACE_V1_ACK_CONFIGURE 6
  300. #define ZWLR_LAYER_SURFACE_V1_DESTROY 7
  301. /**
  302. * @ingroup iface_zwlr_layer_surface_v1
  303. */
  304. #define ZWLR_LAYER_SURFACE_V1_CONFIGURE_SINCE_VERSION 1
  305. /**
  306. * @ingroup iface_zwlr_layer_surface_v1
  307. */
  308. #define ZWLR_LAYER_SURFACE_V1_CLOSED_SINCE_VERSION 1
  309. /**
  310. * @ingroup iface_zwlr_layer_surface_v1
  311. */
  312. #define ZWLR_LAYER_SURFACE_V1_SET_SIZE_SINCE_VERSION 1
  313. /**
  314. * @ingroup iface_zwlr_layer_surface_v1
  315. */
  316. #define ZWLR_LAYER_SURFACE_V1_SET_ANCHOR_SINCE_VERSION 1
  317. /**
  318. * @ingroup iface_zwlr_layer_surface_v1
  319. */
  320. #define ZWLR_LAYER_SURFACE_V1_SET_EXCLUSIVE_ZONE_SINCE_VERSION 1
  321. /**
  322. * @ingroup iface_zwlr_layer_surface_v1
  323. */
  324. #define ZWLR_LAYER_SURFACE_V1_SET_MARGIN_SINCE_VERSION 1
  325. /**
  326. * @ingroup iface_zwlr_layer_surface_v1
  327. */
  328. #define ZWLR_LAYER_SURFACE_V1_SET_KEYBOARD_INTERACTIVITY_SINCE_VERSION 1
  329. /**
  330. * @ingroup iface_zwlr_layer_surface_v1
  331. */
  332. #define ZWLR_LAYER_SURFACE_V1_GET_POPUP_SINCE_VERSION 1
  333. /**
  334. * @ingroup iface_zwlr_layer_surface_v1
  335. */
  336. #define ZWLR_LAYER_SURFACE_V1_ACK_CONFIGURE_SINCE_VERSION 1
  337. /**
  338. * @ingroup iface_zwlr_layer_surface_v1
  339. */
  340. #define ZWLR_LAYER_SURFACE_V1_DESTROY_SINCE_VERSION 1
  341. /** @ingroup iface_zwlr_layer_surface_v1 */
  342. static inline void
  343. zwlr_layer_surface_v1_set_user_data(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, void *user_data)
  344. {
  345. wl_proxy_set_user_data((struct wl_proxy *) zwlr_layer_surface_v1, user_data);
  346. }
  347. /** @ingroup iface_zwlr_layer_surface_v1 */
  348. static inline void *
  349. zwlr_layer_surface_v1_get_user_data(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1)
  350. {
  351. return wl_proxy_get_user_data((struct wl_proxy *) zwlr_layer_surface_v1);
  352. }
  353. static inline uint32_t
  354. zwlr_layer_surface_v1_get_version(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1)
  355. {
  356. return wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1);
  357. }
  358. /**
  359. * @ingroup iface_zwlr_layer_surface_v1
  360. *
  361. * Sets the size of the surface in surface-local coordinates. The
  362. * compositor will display the surface centered with respect to its
  363. * anchors.
  364. *
  365. * If you pass 0 for either value, the compositor will assign it and
  366. * inform you of the assignment in the configure event. You must set your
  367. * anchor to opposite edges in the dimensions you omit; not doing so is a
  368. * protocol error. Both values are 0 by default.
  369. *
  370. * Size is double-buffered, see wl_surface.commit.
  371. */
  372. static inline void
  373. zwlr_layer_surface_v1_set_size(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t width, uint32_t height)
  374. {
  375. wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1,
  376. ZWLR_LAYER_SURFACE_V1_SET_SIZE, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, width, height);
  377. }
  378. /**
  379. * @ingroup iface_zwlr_layer_surface_v1
  380. *
  381. * Requests that the compositor anchor the surface to the specified edges
  382. * and corners. If two orthoginal edges are specified (e.g. 'top' and
  383. * 'left'), then the anchor point will be the intersection of the edges
  384. * (e.g. the top left corner of the output); otherwise the anchor point
  385. * will be centered on that edge, or in the center if none is specified.
  386. *
  387. * Anchor is double-buffered, see wl_surface.commit.
  388. */
  389. static inline void
  390. zwlr_layer_surface_v1_set_anchor(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t anchor)
  391. {
  392. wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1,
  393. ZWLR_LAYER_SURFACE_V1_SET_ANCHOR, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, anchor);
  394. }
  395. /**
  396. * @ingroup iface_zwlr_layer_surface_v1
  397. *
  398. * Requests that the compositor avoids occluding an area of the surface
  399. * with other surfaces. The compositor's use of this information is
  400. * implementation-dependent - do not assume that this region will not
  401. * actually be occluded.
  402. *
  403. * A positive value is only meaningful if the surface is anchored to an
  404. * edge, rather than a corner. The zone is the number of surface-local
  405. * coordinates from the edge that are considered exclusive.
  406. *
  407. * Surfaces that do not wish to have an exclusive zone may instead specify
  408. * how they should interact with surfaces that do. If set to zero, the
  409. * surface indicates that it would like to be moved to avoid occluding
  410. * surfaces with a positive excluzive zone. If set to -1, the surface
  411. * indicates that it would not like to be moved to accommodate for other
  412. * surfaces, and the compositor should extend it all the way to the edges
  413. * it is anchored to.
  414. *
  415. * For example, a panel might set its exclusive zone to 10, so that
  416. * maximized shell surfaces are not shown on top of it. A notification
  417. * might set its exclusive zone to 0, so that it is moved to avoid
  418. * occluding the panel, but shell surfaces are shown underneath it. A
  419. * wallpaper or lock screen might set their exclusive zone to -1, so that
  420. * they stretch below or over the panel.
  421. *
  422. * The default value is 0.
  423. *
  424. * Exclusive zone is double-buffered, see wl_surface.commit.
  425. */
  426. static inline void
  427. zwlr_layer_surface_v1_set_exclusive_zone(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, int32_t zone)
  428. {
  429. wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1,
  430. ZWLR_LAYER_SURFACE_V1_SET_EXCLUSIVE_ZONE, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, zone);
  431. }
  432. /**
  433. * @ingroup iface_zwlr_layer_surface_v1
  434. *
  435. * Requests that the surface be placed some distance away from the anchor
  436. * point on the output, in surface-local coordinates. Setting this value
  437. * for edges you are not anchored to has no effect.
  438. *
  439. * The exclusive zone includes the margin.
  440. *
  441. * Margin is double-buffered, see wl_surface.commit.
  442. */
  443. static inline void
  444. 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)
  445. {
  446. wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1,
  447. ZWLR_LAYER_SURFACE_V1_SET_MARGIN, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, top, right, bottom, left);
  448. }
  449. /**
  450. * @ingroup iface_zwlr_layer_surface_v1
  451. *
  452. * Set to 1 to request that the seat send keyboard events to this layer
  453. * surface. For layers below the shell surface layer, the seat will use
  454. * normal focus semantics. For layers above the shell surface layers, the
  455. * seat will always give exclusive keyboard focus to the top-most layer
  456. * which has keyboard interactivity set to true.
  457. *
  458. * Layer surfaces receive pointer, touch, and tablet events normally. If
  459. * you do not want to receive them, set the input region on your surface
  460. * to an empty region.
  461. *
  462. * Events is double-buffered, see wl_surface.commit.
  463. */
  464. static inline void
  465. zwlr_layer_surface_v1_set_keyboard_interactivity(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t keyboard_interactivity)
  466. {
  467. wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1,
  468. ZWLR_LAYER_SURFACE_V1_SET_KEYBOARD_INTERACTIVITY, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, keyboard_interactivity);
  469. }
  470. /**
  471. * @ingroup iface_zwlr_layer_surface_v1
  472. *
  473. * This assigns an xdg_popup's parent to this layer_surface. This popup
  474. * should have been created via xdg_surface::get_popup with the parent set
  475. * to NULL, and this request must be invoked before committing the popup's
  476. * initial state.
  477. *
  478. * See the documentation of xdg_popup for more details about what an
  479. * xdg_popup is and how it is used.
  480. */
  481. static inline void
  482. zwlr_layer_surface_v1_get_popup(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, struct xdg_popup *popup)
  483. {
  484. wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1,
  485. ZWLR_LAYER_SURFACE_V1_GET_POPUP, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, popup);
  486. }
  487. /**
  488. * @ingroup iface_zwlr_layer_surface_v1
  489. *
  490. * When a configure event is received, if a client commits the
  491. * surface in response to the configure event, then the client
  492. * must make an ack_configure request sometime before the commit
  493. * request, passing along the serial of the configure event.
  494. *
  495. * If the client receives multiple configure events before it
  496. * can respond to one, it only has to ack the last configure event.
  497. *
  498. * A client is not required to commit immediately after sending
  499. * an ack_configure request - it may even ack_configure several times
  500. * before its next surface commit.
  501. *
  502. * A client may send multiple ack_configure requests before committing, but
  503. * only the last request sent before a commit indicates which configure
  504. * event the client really is responding to.
  505. */
  506. static inline void
  507. zwlr_layer_surface_v1_ack_configure(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1, uint32_t serial)
  508. {
  509. wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1,
  510. ZWLR_LAYER_SURFACE_V1_ACK_CONFIGURE, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), 0, serial);
  511. }
  512. /**
  513. * @ingroup iface_zwlr_layer_surface_v1
  514. *
  515. * This request destroys the layer surface.
  516. */
  517. static inline void
  518. zwlr_layer_surface_v1_destroy(struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1)
  519. {
  520. wl_proxy_marshal_flags((struct wl_proxy *) zwlr_layer_surface_v1,
  521. ZWLR_LAYER_SURFACE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_layer_surface_v1), WL_MARSHAL_FLAG_DESTROY);
  522. }
  523. #ifdef __cplusplus
  524. }
  525. #endif
  526. #endif