1 /* Generated by wayland-scanner 1.22.0 */
2
3 #ifndef REMOTE_SHELL_UNSTABLE_V1_CLIENT_PROTOCOL_H
4 #define REMOTE_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_remote_shell_unstable_v1 The remote_shell_unstable_v1 protocol
16 * Create remote desktop-style surfaces
17 *
18 * @section page_desc_remote_shell_unstable_v1 Description
19 *
20 * remote_shell allows clients to turn a wl_surface into a "real window"
21 * which can be stacked and activated by the user.
22 *
23 * Warning! The protocol described in this file is experimental and backward
24 * incompatible changes may be made. Backward compatible changes may be added
25 * together with the corresponding interface version bump. Backward
26 * incompatible changes are done by bumping the version number in the protocol
27 * and interface names and resetting the interface version. Once the protocol
28 * is to be declared stable, the 'z' prefix and the version number in the
29 * protocol and interface names are removed and the interface version number is
30 * reset.
31 *
32 * @section page_ifaces_remote_shell_unstable_v1 Interfaces
33 * - @subpage page_iface_zcr_remote_shell_v1 - remote_shell
34 * - @subpage page_iface_zcr_remote_surface_v1 - A desktop window
35 * - @subpage page_iface_zcr_notification_surface_v1 - A notification window
36 * - @subpage page_iface_zcr_input_method_surface_v1 - An input method window
37 * - @subpage page_iface_zcr_toast_surface_v1 - A toast window
38 * - @subpage page_iface_zcr_remote_output_v1 - remote shell interface to a wl_output
39 * @section page_copyright_remote_shell_unstable_v1 Copyright
40 * <pre>
41 *
42 * Copyright 2016 The Chromium Authors
43 *
44 * Permission is hereby granted, free of charge, to any person obtaining a
45 * copy of this software and associated documentation files (the "Software"),
46 * to deal in the Software without restriction, including without limitation
47 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
48 * and/or sell copies of the Software, and to permit persons to whom the
49 * Software is furnished to do so, subject to the following conditions:
50 *
51 * The above copyright notice and this permission notice (including the next
52 * paragraph) shall be included in all copies or substantial portions of the
53 * Software.
54 *
55 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
56 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
57 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
58 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
59 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
60 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
61 * DEALINGS IN THE SOFTWARE.
62 * </pre>
63 */
64 struct wl_output;
65 struct wl_region;
66 struct wl_surface;
67 struct zcr_input_method_surface_v1;
68 struct zcr_notification_surface_v1;
69 struct zcr_remote_output_v1;
70 struct zcr_remote_shell_v1;
71 struct zcr_remote_surface_v1;
72 struct zcr_toast_surface_v1;
73
74 #ifndef ZCR_REMOTE_SHELL_V1_INTERFACE
75 #define ZCR_REMOTE_SHELL_V1_INTERFACE
76 /**
77 * @page page_iface_zcr_remote_shell_v1 zcr_remote_shell_v1
78 * @section page_iface_zcr_remote_shell_v1_desc Description
79 *
80 * The global interface that allows clients to turn a wl_surface into a
81 * "real window" which is remotely managed but can be stacked, activated
82 * and made fullscreen by the user.
83 * @section page_iface_zcr_remote_shell_v1_api API
84 * See @ref iface_zcr_remote_shell_v1.
85 */
86 /**
87 * @defgroup iface_zcr_remote_shell_v1 The zcr_remote_shell_v1 interface
88 *
89 * The global interface that allows clients to turn a wl_surface into a
90 * "real window" which is remotely managed but can be stacked, activated
91 * and made fullscreen by the user.
92 */
93 extern const struct wl_interface zcr_remote_shell_v1_interface;
94 #endif
95 #ifndef ZCR_REMOTE_SURFACE_V1_INTERFACE
96 #define ZCR_REMOTE_SURFACE_V1_INTERFACE
97 /**
98 * @page page_iface_zcr_remote_surface_v1 zcr_remote_surface_v1
99 * @section page_iface_zcr_remote_surface_v1_desc Description
100 *
101 * An interface that may be implemented by a wl_surface, for
102 * implementations that provide a desktop-style user interface
103 * and allows for remotely managed windows.
104 *
105 * It provides requests to treat surfaces like windows, allowing to set
106 * properties like app id and geometry.
107 *
108 * The client must call wl_surface.commit on the corresponding wl_surface
109 * for the remote_surface state to take effect.
110 *
111 * For a surface to be mapped by the compositor the client must have
112 * committed both an remote_surface state and a buffer.
113 * @section page_iface_zcr_remote_surface_v1_api API
114 * See @ref iface_zcr_remote_surface_v1.
115 */
116 /**
117 * @defgroup iface_zcr_remote_surface_v1 The zcr_remote_surface_v1 interface
118 *
119 * An interface that may be implemented by a wl_surface, for
120 * implementations that provide a desktop-style user interface
121 * and allows for remotely managed windows.
122 *
123 * It provides requests to treat surfaces like windows, allowing to set
124 * properties like app id and geometry.
125 *
126 * The client must call wl_surface.commit on the corresponding wl_surface
127 * for the remote_surface state to take effect.
128 *
129 * For a surface to be mapped by the compositor the client must have
130 * committed both an remote_surface state and a buffer.
131 */
132 extern const struct wl_interface zcr_remote_surface_v1_interface;
133 #endif
134 #ifndef ZCR_NOTIFICATION_SURFACE_V1_INTERFACE
135 #define ZCR_NOTIFICATION_SURFACE_V1_INTERFACE
136 /**
137 * @page page_iface_zcr_notification_surface_v1 zcr_notification_surface_v1
138 * @section page_iface_zcr_notification_surface_v1_desc Description
139 *
140 * An interface that may be implemented by a wl_surface to host
141 * notification contents.
142 * @section page_iface_zcr_notification_surface_v1_api API
143 * See @ref iface_zcr_notification_surface_v1.
144 */
145 /**
146 * @defgroup iface_zcr_notification_surface_v1 The zcr_notification_surface_v1 interface
147 *
148 * An interface that may be implemented by a wl_surface to host
149 * notification contents.
150 */
151 extern const struct wl_interface zcr_notification_surface_v1_interface;
152 #endif
153 #ifndef ZCR_INPUT_METHOD_SURFACE_V1_INTERFACE
154 #define ZCR_INPUT_METHOD_SURFACE_V1_INTERFACE
155 /**
156 * @page page_iface_zcr_input_method_surface_v1 zcr_input_method_surface_v1
157 * @section page_iface_zcr_input_method_surface_v1_desc Description
158 *
159 * An interface that may be implemented by a wl_surface to host IME contents.
160 * @section page_iface_zcr_input_method_surface_v1_api API
161 * See @ref iface_zcr_input_method_surface_v1.
162 */
163 /**
164 * @defgroup iface_zcr_input_method_surface_v1 The zcr_input_method_surface_v1 interface
165 *
166 * An interface that may be implemented by a wl_surface to host IME contents.
167 */
168 extern const struct wl_interface zcr_input_method_surface_v1_interface;
169 #endif
170 #ifndef ZCR_TOAST_SURFACE_V1_INTERFACE
171 #define ZCR_TOAST_SURFACE_V1_INTERFACE
172 /**
173 * @page page_iface_zcr_toast_surface_v1 zcr_toast_surface_v1
174 * @section page_iface_zcr_toast_surface_v1_desc Description
175 *
176 * An interface that may be implemented by a wl_surface to host
177 * toast contents.
178 * @section page_iface_zcr_toast_surface_v1_api API
179 * See @ref iface_zcr_toast_surface_v1.
180 */
181 /**
182 * @defgroup iface_zcr_toast_surface_v1 The zcr_toast_surface_v1 interface
183 *
184 * An interface that may be implemented by a wl_surface to host
185 * toast contents.
186 */
187 extern const struct wl_interface zcr_toast_surface_v1_interface;
188 #endif
189 #ifndef ZCR_REMOTE_OUTPUT_V1_INTERFACE
190 #define ZCR_REMOTE_OUTPUT_V1_INTERFACE
191 /**
192 * @page page_iface_zcr_remote_output_v1 zcr_remote_output_v1
193 * @section page_iface_zcr_remote_output_v1_desc Description
194 *
195 * An additional interface to a wl_output object, which allows the
196 * client to access additional functionality for output.
197 * @section page_iface_zcr_remote_output_v1_api API
198 * See @ref iface_zcr_remote_output_v1.
199 */
200 /**
201 * @defgroup iface_zcr_remote_output_v1 The zcr_remote_output_v1 interface
202 *
203 * An additional interface to a wl_output object, which allows the
204 * client to access additional functionality for output.
205 */
206 extern const struct wl_interface zcr_remote_output_v1_interface;
207 #endif
208
209 #ifndef ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM
210 #define ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM
211 /**
212 * @ingroup iface_zcr_remote_shell_v1
213 * containers for remote surfaces
214 *
215 * Determine how a remote surface should be stacked relative to other
216 * shell surfaces.
217 */
218 enum zcr_remote_shell_v1_container {
219 /**
220 * default container
221 */
222 ZCR_REMOTE_SHELL_V1_CONTAINER_DEFAULT = 1,
223 /**
224 * system modal container
225 */
226 ZCR_REMOTE_SHELL_V1_CONTAINER_OVERLAY = 2,
227 };
228 #endif /* ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM */
229
230 #ifndef ZCR_REMOTE_SHELL_V1_STATE_TYPE_ENUM
231 #define ZCR_REMOTE_SHELL_V1_STATE_TYPE_ENUM
232 /**
233 * @ingroup iface_zcr_remote_shell_v1
234 * state types for remote surfaces
235 *
236 * Defines common show states for shell surfaces.
237 */
238 enum zcr_remote_shell_v1_state_type {
239 /**
240 * normal window state
241 */
242 ZCR_REMOTE_SHELL_V1_STATE_TYPE_NORMAL = 1,
243 /**
244 * minimized window state
245 */
246 ZCR_REMOTE_SHELL_V1_STATE_TYPE_MINIMIZED = 2,
247 /**
248 * maximized window state
249 */
250 ZCR_REMOTE_SHELL_V1_STATE_TYPE_MAXIMIZED = 3,
251 /**
252 * fullscreen window state
253 */
254 ZCR_REMOTE_SHELL_V1_STATE_TYPE_FULLSCREEN = 4,
255 /**
256 * pinned window state
257 */
258 ZCR_REMOTE_SHELL_V1_STATE_TYPE_PINNED = 5,
259 /**
260 * trusted pinned window state
261 */
262 ZCR_REMOTE_SHELL_V1_STATE_TYPE_TRUSTED_PINNED = 6,
263 /**
264 * moving window state
265 */
266 ZCR_REMOTE_SHELL_V1_STATE_TYPE_MOVING = 7,
267 /**
268 * resizing window state
269 */
270 ZCR_REMOTE_SHELL_V1_STATE_TYPE_RESIZING = 8,
271 /**
272 * left snapped window state
273 */
274 ZCR_REMOTE_SHELL_V1_STATE_TYPE_LEFT_SNAPPED = 9,
275 /**
276 * right snapped window state
277 */
278 ZCR_REMOTE_SHELL_V1_STATE_TYPE_RIGHT_SNAPPED = 10,
279 /**
280 * pip window state
281 */
282 ZCR_REMOTE_SHELL_V1_STATE_TYPE_PIP = 11,
283 };
284 #endif /* ZCR_REMOTE_SHELL_V1_STATE_TYPE_ENUM */
285
286 #ifndef ZCR_REMOTE_SHELL_V1_ERROR_ENUM
287 #define ZCR_REMOTE_SHELL_V1_ERROR_ENUM
288 enum zcr_remote_shell_v1_error {
289 /**
290 * given wl_surface has another role
291 */
292 ZCR_REMOTE_SHELL_V1_ERROR_ROLE = 0,
293 /**
294 * invalid notification key
295 */
296 ZCR_REMOTE_SHELL_V1_ERROR_INVALID_NOTIFICATION_KEY = 1,
297 };
298 #endif /* ZCR_REMOTE_SHELL_V1_ERROR_ENUM */
299
300 #ifndef ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_ENUM
301 #define ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_ENUM
302 /**
303 * @ingroup iface_zcr_remote_shell_v1
304 * the layout mode
305 *
306 * Determine how a client should layout surfaces.
307 */
308 enum zcr_remote_shell_v1_layout_mode {
309 /**
310 * multiple windows
311 */
312 ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_WINDOWED = 1,
313 /**
314 * restricted mode for tablet
315 */
316 ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_TABLET = 2,
317 };
318 #endif /* ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_ENUM */
319
320 #ifndef ZCR_REMOTE_SHELL_V1_DESKTOP_FOCUS_STATE_ENUM
321 #define ZCR_REMOTE_SHELL_V1_DESKTOP_FOCUS_STATE_ENUM
322 /**
323 * @ingroup iface_zcr_remote_shell_v1
324 * desktop foucs state
325 *
326 * Desktop client window focus state.
327 */
328 enum zcr_remote_shell_v1_desktop_focus_state {
329 /**
330 * no window get focused
331 */
332 ZCR_REMOTE_SHELL_V1_DESKTOP_FOCUS_STATE_NO_FOCUS = 1,
333 /**
334 * client window get focused
335 */
336 ZCR_REMOTE_SHELL_V1_DESKTOP_FOCUS_STATE_CLIENT_FOCUSED = 2,
337 /**
338 * other client window get focused
339 */
340 ZCR_REMOTE_SHELL_V1_DESKTOP_FOCUS_STATE_OTHER_CLIENT_FOCUSED = 3,
341 };
342 #endif /* ZCR_REMOTE_SHELL_V1_DESKTOP_FOCUS_STATE_ENUM */
343
344 /**
345 * @ingroup iface_zcr_remote_shell_v1
346 * @struct zcr_remote_shell_v1_listener
347 */
348 struct zcr_remote_shell_v1_listener {
349 /**
350 * activated surface changed
351 *
352 * Notifies client that the activated surface changed.
353 */
354 void (*activated)(void *data,
355 struct zcr_remote_shell_v1 *zcr_remote_shell_v1,
356 struct wl_surface *gained_active,
357 struct wl_surface *lost_active);
358 /**
359 * suggests a re-configuration of remote shell
360 *
361 * [Deprecated] Suggests a re-configuration of remote shell.
362 */
363 void (*configuration_changed)(void *data,
364 struct zcr_remote_shell_v1 *zcr_remote_shell_v1,
365 int32_t width,
366 int32_t height,
367 int32_t transform,
368 wl_fixed_t scale_factor,
369 int32_t work_area_inset_left,
370 int32_t work_area_inset_top,
371 int32_t work_area_inset_right,
372 int32_t work_area_inset_bottom,
373 uint32_t layout_mode);
374 /**
375 * area of remote shell
376 *
377 * [Deprecated] Defines an area of the remote shell used for
378 * layout. Each series of "workspace" events must be terminated by
379 * a "configure" event.
380 * @param is_internal 1 if screen is built-in
381 * @since 5
382 */
383 void (*workspace)(void *data,
384 struct zcr_remote_shell_v1 *zcr_remote_shell_v1,
385 uint32_t display_id_hi,
386 uint32_t display_id_lo,
387 int32_t x,
388 int32_t y,
389 int32_t width,
390 int32_t height,
391 int32_t inset_left,
392 int32_t inset_top,
393 int32_t inset_right,
394 int32_t inset_bottom,
395 int32_t transform,
396 wl_fixed_t scale_factor,
397 uint32_t is_internal);
398 /**
399 * suggests configuration of remote shell
400 *
401 * Suggests a new configuration of the remote shell. Preceded by
402 * a series of "workspace" events.
403 * @since 5
404 */
405 void (*configure)(void *data,
406 struct zcr_remote_shell_v1 *zcr_remote_shell_v1,
407 uint32_t layout_mode);
408 /**
409 * initialize scale configuration
410 *
411 * Sends the default device scale factor.
412 * @param scale DP to pixels ratio, in 8.24 fixed point format
413 * @since 8
414 */
415 void (*default_device_scale_factor)(void *data,
416 struct zcr_remote_shell_v1 *zcr_remote_shell_v1,
417 int32_t scale);
418 /**
419 * extra display information
420 *
421 * [Deprecated] Sends display size in pixels and display
422 * identification data, typically in EDID format. Preceded by a
423 * "workspace" event for the same display.
424 * @since 19
425 */
426 void (*display_info)(void *data,
427 struct zcr_remote_shell_v1 *zcr_remote_shell_v1,
428 uint32_t display_id_hi,
429 uint32_t display_id_lo,
430 int32_t width,
431 int32_t height,
432 struct wl_array *identification_data);
433 /**
434 * area of remote shell in pixels
435 *
436 * [Deprecated] Sends display information such as size, work area
437 * and its related information. Each series of "workspace_info"
438 * events must be terminated by a "configure" event.
439 * @param systemui_visibility systemui_visibility_state
440 * @param is_internal 1 if screen is built-in
441 * @param identification_data EDID blob data
442 * @since 20
443 */
444 void (*workspace_info)(void *data,
445 struct zcr_remote_shell_v1 *zcr_remote_shell_v1,
446 uint32_t display_id_hi,
447 uint32_t display_id_lo,
448 int32_t x,
449 int32_t y,
450 int32_t width,
451 int32_t height,
452 int32_t inset_left,
453 int32_t inset_top,
454 int32_t inset_right,
455 int32_t inset_bottom,
456 int32_t stable_inset_left,
457 int32_t stable_inset_top,
458 int32_t stable_inset_right,
459 int32_t stable_inset_bottom,
460 int32_t systemui_visibility,
461 int32_t transform,
462 uint32_t is_internal,
463 struct wl_array *identification_data);
464 /**
465 * sends the layout_mode
466 *
467 * Sends the layout_mode used by the server.
468 * @param layout_mode layout_mode enum
469 * @since 29
470 */
471 void (*layout_mode)(void *data,
472 struct zcr_remote_shell_v1 *zcr_remote_shell_v1,
473 uint32_t layout_mode);
474 /**
475 * desktop window focus state change
476 *
477 * Notifies client that the window focus state change.
478 * @since 30
479 */
480 void (*desktop_focus_state_changed)(void *data,
481 struct zcr_remote_shell_v1 *zcr_remote_shell_v1,
482 uint32_t focus_state);
483 };
484
485 /**
486 * @ingroup iface_zcr_remote_shell_v1
487 */
488 static inline int
zcr_remote_shell_v1_add_listener(struct zcr_remote_shell_v1 * zcr_remote_shell_v1,const struct zcr_remote_shell_v1_listener * listener,void * data)489 zcr_remote_shell_v1_add_listener(struct zcr_remote_shell_v1 *zcr_remote_shell_v1,
490 const struct zcr_remote_shell_v1_listener *listener, void *data)
491 {
492 return wl_proxy_add_listener((struct wl_proxy *) zcr_remote_shell_v1,
493 (void (**)(void)) listener, data);
494 }
495
496 #define ZCR_REMOTE_SHELL_V1_DESTROY 0
497 #define ZCR_REMOTE_SHELL_V1_GET_REMOTE_SURFACE 1
498 #define ZCR_REMOTE_SHELL_V1_GET_NOTIFICATION_SURFACE 2
499 #define ZCR_REMOTE_SHELL_V1_GET_INPUT_METHOD_SURFACE 3
500 #define ZCR_REMOTE_SHELL_V1_GET_TOAST_SURFACE 4
501 #define ZCR_REMOTE_SHELL_V1_GET_REMOTE_OUTPUT 5
502 #define ZCR_REMOTE_SHELL_V1_SET_USE_DEFAULT_DEVICE_SCALE_CANCELLATION 6
503
504 /**
505 * @ingroup iface_zcr_remote_shell_v1
506 */
507 #define ZCR_REMOTE_SHELL_V1_ACTIVATED_SINCE_VERSION 1
508 /**
509 * @ingroup iface_zcr_remote_shell_v1
510 */
511 #define ZCR_REMOTE_SHELL_V1_CONFIGURATION_CHANGED_SINCE_VERSION 1
512 /**
513 * @ingroup iface_zcr_remote_shell_v1
514 */
515 #define ZCR_REMOTE_SHELL_V1_WORKSPACE_SINCE_VERSION 5
516 /**
517 * @ingroup iface_zcr_remote_shell_v1
518 */
519 #define ZCR_REMOTE_SHELL_V1_CONFIGURE_SINCE_VERSION 5
520 /**
521 * @ingroup iface_zcr_remote_shell_v1
522 */
523 #define ZCR_REMOTE_SHELL_V1_DEFAULT_DEVICE_SCALE_FACTOR_SINCE_VERSION 8
524 /**
525 * @ingroup iface_zcr_remote_shell_v1
526 */
527 #define ZCR_REMOTE_SHELL_V1_DISPLAY_INFO_SINCE_VERSION 19
528 /**
529 * @ingroup iface_zcr_remote_shell_v1
530 */
531 #define ZCR_REMOTE_SHELL_V1_WORKSPACE_INFO_SINCE_VERSION 20
532 /**
533 * @ingroup iface_zcr_remote_shell_v1
534 */
535 #define ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_SINCE_VERSION 29
536 /**
537 * @ingroup iface_zcr_remote_shell_v1
538 */
539 #define ZCR_REMOTE_SHELL_V1_DESKTOP_FOCUS_STATE_CHANGED_SINCE_VERSION 30
540
541 /**
542 * @ingroup iface_zcr_remote_shell_v1
543 */
544 #define ZCR_REMOTE_SHELL_V1_DESTROY_SINCE_VERSION 1
545 /**
546 * @ingroup iface_zcr_remote_shell_v1
547 */
548 #define ZCR_REMOTE_SHELL_V1_GET_REMOTE_SURFACE_SINCE_VERSION 1
549 /**
550 * @ingroup iface_zcr_remote_shell_v1
551 */
552 #define ZCR_REMOTE_SHELL_V1_GET_NOTIFICATION_SURFACE_SINCE_VERSION 1
553 /**
554 * @ingroup iface_zcr_remote_shell_v1
555 */
556 #define ZCR_REMOTE_SHELL_V1_GET_INPUT_METHOD_SURFACE_SINCE_VERSION 17
557 /**
558 * @ingroup iface_zcr_remote_shell_v1
559 */
560 #define ZCR_REMOTE_SHELL_V1_GET_TOAST_SURFACE_SINCE_VERSION 28
561 /**
562 * @ingroup iface_zcr_remote_shell_v1
563 */
564 #define ZCR_REMOTE_SHELL_V1_GET_REMOTE_OUTPUT_SINCE_VERSION 29
565 /**
566 * @ingroup iface_zcr_remote_shell_v1
567 */
568 #define ZCR_REMOTE_SHELL_V1_SET_USE_DEFAULT_DEVICE_SCALE_CANCELLATION_SINCE_VERSION 29
569
570 /** @ingroup iface_zcr_remote_shell_v1 */
571 static inline void
zcr_remote_shell_v1_set_user_data(struct zcr_remote_shell_v1 * zcr_remote_shell_v1,void * user_data)572 zcr_remote_shell_v1_set_user_data(struct zcr_remote_shell_v1 *zcr_remote_shell_v1, void *user_data)
573 {
574 wl_proxy_set_user_data((struct wl_proxy *) zcr_remote_shell_v1, user_data);
575 }
576
577 /** @ingroup iface_zcr_remote_shell_v1 */
578 static inline void *
zcr_remote_shell_v1_get_user_data(struct zcr_remote_shell_v1 * zcr_remote_shell_v1)579 zcr_remote_shell_v1_get_user_data(struct zcr_remote_shell_v1 *zcr_remote_shell_v1)
580 {
581 return wl_proxy_get_user_data((struct wl_proxy *) zcr_remote_shell_v1);
582 }
583
584 static inline uint32_t
zcr_remote_shell_v1_get_version(struct zcr_remote_shell_v1 * zcr_remote_shell_v1)585 zcr_remote_shell_v1_get_version(struct zcr_remote_shell_v1 *zcr_remote_shell_v1)
586 {
587 return wl_proxy_get_version((struct wl_proxy *) zcr_remote_shell_v1);
588 }
589
590 /**
591 * @ingroup iface_zcr_remote_shell_v1
592 *
593 * Destroy this remote_shell object.
594 *
595 * Destroying a bound remote_shell object while there are surfaces
596 * still alive created by this remote_shell object instance is illegal
597 * and will result in a protocol error.
598 */
599 static inline void
zcr_remote_shell_v1_destroy(struct zcr_remote_shell_v1 * zcr_remote_shell_v1)600 zcr_remote_shell_v1_destroy(struct zcr_remote_shell_v1 *zcr_remote_shell_v1)
601 {
602 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_shell_v1,
603 ZCR_REMOTE_SHELL_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_shell_v1), WL_MARSHAL_FLAG_DESTROY);
604 }
605
606 /**
607 * @ingroup iface_zcr_remote_shell_v1
608 *
609 * This creates an remote_surface for the given surface and gives it the
610 * remote_surface role. A wl_surface can only be given a remote_surface
611 * role once. If get_remote_surface is called with a wl_surface that
612 * already has an active remote_surface associated with it, or if it had
613 * any other role, an error is raised.
614 *
615 * See the documentation of remote_surface for more details about what an
616 * remote_surface is and how it is used.
617 */
618 static inline struct zcr_remote_surface_v1 *
zcr_remote_shell_v1_get_remote_surface(struct zcr_remote_shell_v1 * zcr_remote_shell_v1,struct wl_surface * surface,uint32_t container)619 zcr_remote_shell_v1_get_remote_surface(struct zcr_remote_shell_v1 *zcr_remote_shell_v1, struct wl_surface *surface, uint32_t container)
620 {
621 struct wl_proxy *id;
622
623 id = wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_shell_v1,
624 ZCR_REMOTE_SHELL_V1_GET_REMOTE_SURFACE, &zcr_remote_surface_v1_interface, wl_proxy_get_version((struct wl_proxy *) zcr_remote_shell_v1), 0, NULL, surface, container);
625
626 return (struct zcr_remote_surface_v1 *) id;
627 }
628
629 /**
630 * @ingroup iface_zcr_remote_shell_v1
631 *
632 * Creates a notification_surface for the given surface, gives it the
633 * notification_surface role and associated it with a notification id.
634 */
635 static inline struct zcr_notification_surface_v1 *
zcr_remote_shell_v1_get_notification_surface(struct zcr_remote_shell_v1 * zcr_remote_shell_v1,struct wl_surface * surface,const char * notification_key)636 zcr_remote_shell_v1_get_notification_surface(struct zcr_remote_shell_v1 *zcr_remote_shell_v1, struct wl_surface *surface, const char *notification_key)
637 {
638 struct wl_proxy *id;
639
640 id = wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_shell_v1,
641 ZCR_REMOTE_SHELL_V1_GET_NOTIFICATION_SURFACE, &zcr_notification_surface_v1_interface, wl_proxy_get_version((struct wl_proxy *) zcr_remote_shell_v1), 0, NULL, surface, notification_key);
642
643 return (struct zcr_notification_surface_v1 *) id;
644 }
645
646 /**
647 * @ingroup iface_zcr_remote_shell_v1
648 *
649 * Creates an input_method_surface for the given surface, gives it
650 * the input_method_surface role.
651 */
652 static inline struct zcr_input_method_surface_v1 *
zcr_remote_shell_v1_get_input_method_surface(struct zcr_remote_shell_v1 * zcr_remote_shell_v1,struct wl_surface * surface)653 zcr_remote_shell_v1_get_input_method_surface(struct zcr_remote_shell_v1 *zcr_remote_shell_v1, struct wl_surface *surface)
654 {
655 struct wl_proxy *id;
656
657 id = wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_shell_v1,
658 ZCR_REMOTE_SHELL_V1_GET_INPUT_METHOD_SURFACE, &zcr_input_method_surface_v1_interface, wl_proxy_get_version((struct wl_proxy *) zcr_remote_shell_v1), 0, NULL, surface);
659
660 return (struct zcr_input_method_surface_v1 *) id;
661 }
662
663 /**
664 * @ingroup iface_zcr_remote_shell_v1
665 *
666 * Creates an toast_surface for the given surface, gives it
667 * the toast_surface role.
668 */
669 static inline struct zcr_toast_surface_v1 *
zcr_remote_shell_v1_get_toast_surface(struct zcr_remote_shell_v1 * zcr_remote_shell_v1,struct wl_surface * surface)670 zcr_remote_shell_v1_get_toast_surface(struct zcr_remote_shell_v1 *zcr_remote_shell_v1, struct wl_surface *surface)
671 {
672 struct wl_proxy *id;
673
674 id = wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_shell_v1,
675 ZCR_REMOTE_SHELL_V1_GET_TOAST_SURFACE, &zcr_toast_surface_v1_interface, wl_proxy_get_version((struct wl_proxy *) zcr_remote_shell_v1), 0, NULL, surface);
676
677 return (struct zcr_toast_surface_v1 *) id;
678 }
679
680 /**
681 * @ingroup iface_zcr_remote_shell_v1
682 *
683 * Instantiate an interface extension for the given wl_output to
684 * provide remote shell functionality.
685 */
686 static inline struct zcr_remote_output_v1 *
zcr_remote_shell_v1_get_remote_output(struct zcr_remote_shell_v1 * zcr_remote_shell_v1,struct wl_output * output)687 zcr_remote_shell_v1_get_remote_output(struct zcr_remote_shell_v1 *zcr_remote_shell_v1, struct wl_output *output)
688 {
689 struct wl_proxy *id;
690
691 id = wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_shell_v1,
692 ZCR_REMOTE_SHELL_V1_GET_REMOTE_OUTPUT, &zcr_remote_output_v1_interface, wl_proxy_get_version((struct wl_proxy *) zcr_remote_shell_v1), 0, NULL, output);
693
694 return (struct zcr_remote_output_v1 *) id;
695 }
696
697 /**
698 * @ingroup iface_zcr_remote_shell_v1
699 *
700 * Request the compositor to use the default_device_scale_factor to undo any
701 * scaling applied to the client's buffers. When this is disabled, the
702 * compositor will use the device_scale_factor of the display of the buffer to
703 * cancel any buffer scaling.
704 */
705 static inline void
zcr_remote_shell_v1_set_use_default_device_scale_cancellation(struct zcr_remote_shell_v1 * zcr_remote_shell_v1,int32_t use_default_device_scale_factor)706 zcr_remote_shell_v1_set_use_default_device_scale_cancellation(struct zcr_remote_shell_v1 *zcr_remote_shell_v1, int32_t use_default_device_scale_factor)
707 {
708 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_shell_v1,
709 ZCR_REMOTE_SHELL_V1_SET_USE_DEFAULT_DEVICE_SCALE_CANCELLATION, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_shell_v1), 0, use_default_device_scale_factor);
710 }
711
712 #ifndef ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_ENUM
713 #define ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_ENUM
714 /**
715 * @ingroup iface_zcr_remote_surface_v1
716 * systemui visibility behavior
717 *
718 * Determine the visibility behavior of the system UI.
719 */
720 enum zcr_remote_surface_v1_systemui_visibility_state {
721 /**
722 * system ui is visible
723 */
724 ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_VISIBLE = 1,
725 /**
726 * system ui autohides and is not sticky
727 */
728 ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_AUTOHIDE_NON_STICKY = 2,
729 /**
730 * system ui autohides and is sticky
731 */
732 ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_AUTOHIDE_STICKY = 3,
733 };
734 #endif /* ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_ENUM */
735
736 #ifndef ZCR_REMOTE_SURFACE_V1_ORIENTATION_ENUM
737 #define ZCR_REMOTE_SURFACE_V1_ORIENTATION_ENUM
738 /**
739 * @ingroup iface_zcr_remote_surface_v1
740 * window orientation
741 *
742 * The orientation of the window.
743 */
744 enum zcr_remote_surface_v1_orientation {
745 /**
746 * portrait
747 */
748 ZCR_REMOTE_SURFACE_V1_ORIENTATION_PORTRAIT = 1,
749 /**
750 * landscape
751 */
752 ZCR_REMOTE_SURFACE_V1_ORIENTATION_LANDSCAPE = 2,
753 };
754 #endif /* ZCR_REMOTE_SURFACE_V1_ORIENTATION_ENUM */
755
756 #ifndef ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_ENUM
757 #define ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_ENUM
758 /**
759 * @ingroup iface_zcr_remote_surface_v1
760 * window type
761 *
762 * The type of the window.
763 */
764 enum zcr_remote_surface_v1_window_type {
765 /**
766 * normal app window
767 */
768 ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_NORMAL = 1,
769 /**
770 * window is treated as systemui
771 */
772 ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_SYSTEM_UI = 2,
773 /**
774 * window is normal, but hidden in overview
775 */
776 ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_HIDDEN_IN_OVERVIEW = 3,
777 };
778 #endif /* ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_ENUM */
779
780 #ifndef ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_ENUM
781 #define ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_ENUM
782 /**
783 * @ingroup iface_zcr_remote_surface_v1
784 * bounds_change_reason
785 *
786 * Specifies the cause of the window bounds change event.
787 */
788 enum zcr_remote_surface_v1_bounds_change_reason {
789 /**
790 * the window is being moved by drag operation
791 */
792 ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_DRAG_MOVE = 1,
793 /**
794 * the window is being resized by drag operation.
795 */
796 ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_DRAG_RESIZE = 2,
797 /**
798 * the window is resized to left snapped state
799 */
800 ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_SNAP_TO_LEFT = 3,
801 /**
802 * the window is resized to right snapped state
803 */
804 ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_SNAP_TO_RIGHT = 4,
805 /**
806 * the window bounds is moved due to other WM operations
807 */
808 ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_MOVE = 5,
809 /**
810 * the window bounds is reiszed due to other WM operations
811 */
812 ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_RESIZE = 6,
813 /**
814 * the window bounds is resized or moved for PIP
815 */
816 ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_PIP = 7,
817 };
818 #endif /* ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_ENUM */
819
820 #ifndef ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_ENUM
821 #define ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_ENUM
822 /**
823 * @ingroup iface_zcr_remote_surface_v1
824 * resize direction
825 *
826 * The resize direction for drag operation
827 */
828 enum zcr_remote_surface_v1_resize_direction {
829 /**
830 * move only, no resize
831 */
832 ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_NONE = 0,
833 /**
834 * resize to the left
835 */
836 ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_LEFT = 1,
837 /**
838 * resize to the top left
839 */
840 ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_TOPLEFT = 2,
841 /**
842 * resize to the top
843 */
844 ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_TOP = 3,
845 /**
846 * resize to the top right
847 */
848 ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_TOPRIGHT = 4,
849 /**
850 * resize to the right
851 */
852 ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_RIGHT = 5,
853 /**
854 * resize to the buttom right
855 */
856 ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_BOTTOMRIGHT = 6,
857 /**
858 * resize to the bottom
859 */
860 ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_BOTTOM = 7,
861 /**
862 * resize to the bottom left
863 */
864 ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_BOTTOMLEFT = 8,
865 };
866 #endif /* ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_ENUM */
867
868 #ifndef ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_ENUM
869 #define ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_ENUM
870 /**
871 * @ingroup iface_zcr_remote_surface_v1
872 * frame types
873 *
874 * Frame type that can be used to decorate a surface.
875 */
876 enum zcr_remote_surface_v1_frame_type {
877 /**
878 * no frame
879 */
880 ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_NONE = 0,
881 /**
882 * caption with shadow
883 */
884 ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_NORMAL = 1,
885 /**
886 * shadow only
887 */
888 ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_SHADOW = 2,
889 /**
890 * autohide frame with shadow
891 */
892 ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_AUTOHIDE = 3,
893 /**
894 * overlay frame with shadow
895 */
896 ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_OVERLAY = 4,
897 };
898 #endif /* ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_ENUM */
899
900 #ifndef ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ENUM
901 #define ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ENUM
902 /**
903 * @ingroup iface_zcr_remote_surface_v1
904 * frame button types
905 *
906 * The mask that represents buttons on frame.
907 */
908 enum zcr_remote_surface_v1_frame_button_type {
909 /**
910 * a button to naviate backwards
911 */
912 ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_BACK = 1,
913 /**
914 * a button to minimize the window
915 */
916 ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_MINIMIZE = 2,
917 /**
918 * a button to maximize or restore
919 */
920 ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_MAXIMIZE_RESTORE = 4,
921 /**
922 * a button to activate application's menu
923 */
924 ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_MENU = 8,
925 /**
926 * a button to close the window
927 */
928 ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_CLOSE = 16,
929 /**
930 * a mask to turn the maximize_restore button to zoom button
931 */
932 ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ZOOM = 32,
933 /**
934 * a customizable, center-aligned button
935 */
936 ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_CENTER = 64,
937 };
938 #endif /* ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ENUM */
939
940 #ifndef ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_ENUM
941 #define ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_ENUM
942 /**
943 * @ingroup iface_zcr_remote_surface_v1
944 * orientation lock request for remote surfaces
945 *
946 * Defines orientation request when a remote surface is in foreground.
947 */
948 enum zcr_remote_surface_v1_orientation_lock {
949 /**
950 * no orientation lock
951 */
952 ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_NONE = 1,
953 /**
954 * primary or secondary portrait
955 */
956 ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_PORTRAIT = 2,
957 /**
958 * primary or secondary landscape
959 */
960 ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_LANDSCAPE = 3,
961 /**
962 * keep current orientation
963 */
964 ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_CURRENT = 4,
965 /**
966 * primary portrait
967 */
968 ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_PORTRAIT_PRIMARY = 5,
969 /**
970 * primary landscape
971 */
972 ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_LANDSCAPE_PRIMARY = 6,
973 /**
974 * secondary portrait
975 */
976 ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_PORTRAIT_SECONDARY = 7,
977 /**
978 * secondary landscape
979 */
980 ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_LANDSCAPE_SECONDARY = 8,
981 };
982 #endif /* ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_ENUM */
983
984 #ifndef ZCR_REMOTE_SURFACE_V1_ZOOM_CHANGE_ENUM
985 #define ZCR_REMOTE_SURFACE_V1_ZOOM_CHANGE_ENUM
986 /**
987 * @ingroup iface_zcr_remote_surface_v1
988 * zoom level change
989 *
990 * Zoom level change.
991 */
992 enum zcr_remote_surface_v1_zoom_change {
993 /**
994 * zoom in
995 */
996 ZCR_REMOTE_SURFACE_V1_ZOOM_CHANGE_IN = 0,
997 /**
998 * zoom out
999 */
1000 ZCR_REMOTE_SURFACE_V1_ZOOM_CHANGE_OUT = 1,
1001 /**
1002 * reset zoom level
1003 */
1004 ZCR_REMOTE_SURFACE_V1_ZOOM_CHANGE_RESET = 2,
1005 };
1006 #endif /* ZCR_REMOTE_SURFACE_V1_ZOOM_CHANGE_ENUM */
1007
1008 /**
1009 * @ingroup iface_zcr_remote_surface_v1
1010 * @struct zcr_remote_surface_v1_listener
1011 */
1012 struct zcr_remote_surface_v1_listener {
1013 /**
1014 * surface wants to be closed
1015 *
1016 * The close event is sent by the compositor when the user wants
1017 * the surface to be closed. This should be equivalent to the user
1018 * clicking the close button in client-side decorations, if your
1019 * application has any...
1020 *
1021 * This is only a request that the user intends to close your
1022 * window. The client may choose to ignore this request, or show a
1023 * dialog to ask the user to save their data...
1024 */
1025 void (*close)(void *data,
1026 struct zcr_remote_surface_v1 *zcr_remote_surface_v1);
1027 /**
1028 * surface state type changed
1029 *
1030 * [Deprecated] The state_type_changed event is sent by the
1031 * compositor when the surface state changed.
1032 *
1033 * This is an event to notify that the window state changed in
1034 * compositor. The state change may be triggered by a client's
1035 * request, or some user action directly handled by the compositor.
1036 * The client may choose to ignore this event.
1037 */
1038 void (*state_type_changed)(void *data,
1039 struct zcr_remote_surface_v1 *zcr_remote_surface_v1,
1040 uint32_t state_type);
1041 /**
1042 * suggest a surface change
1043 *
1044 * The configure event asks the client to change surface state.
1045 *
1046 * The client must apply the origin offset to window positions in
1047 * set_window_geometry requests.
1048 *
1049 * The states listed in the event are state_type values, and might
1050 * change due to a client request or an event directly handled by
1051 * the compositor.
1052 *
1053 * Clients should arrange their surface for the new state, and then
1054 * send an ack_configure request with the serial sent in this
1055 * configure event at some point before committing the new surface.
1056 *
1057 * If the client receives multiple configure events before it can
1058 * respond to one, it is free to discard all but the last event it
1059 * received.
1060 * @since 5
1061 */
1062 void (*configure)(void *data,
1063 struct zcr_remote_surface_v1 *zcr_remote_surface_v1,
1064 int32_t origin_offset_x,
1065 int32_t origin_offset_y,
1066 struct wl_array *states,
1067 uint32_t serial);
1068 /**
1069 * announce window geometry commit
1070 *
1071 * Notify the client of committed window geometry.
1072 *
1073 * The compositor sends this event when it commits window geometry.
1074 * The client may use this information to convert coordinates of
1075 * input events using the latest committed geometry.
1076 * @since 9
1077 */
1078 void (*window_geometry_changed)(void *data,
1079 struct zcr_remote_surface_v1 *zcr_remote_surface_v1,
1080 int32_t x,
1081 int32_t y,
1082 int32_t width,
1083 int32_t height);
1084 /**
1085 * The compositor requested to change the bounds
1086 *
1087 * [Deprecated] The compositor requested to change its bounds.
1088 * "bounds_change_reason" specifies the cause of the bounds change.
1089 * The client may apply the different move/resize strategy
1090 * depending on the reason.
1091 *
1092 * "display_id_hi", "display_id_lo" specifies in which workspace
1093 * the surface should live in.
1094 *
1095 * The client responds with set_window_geometry request, with the
1096 * bounds it is resized to (this may be different from the bounds
1097 * requested).
1098 *
1099 * The client may ignore move request depending on the state, e.g,
1100 * if it becomes resizable or other constrants.
1101 * @since 10
1102 */
1103 void (*bounds_changed)(void *data,
1104 struct zcr_remote_surface_v1 *zcr_remote_surface_v1,
1105 uint32_t display_id_hi,
1106 uint32_t display_id_lo,
1107 int32_t x,
1108 int32_t y,
1109 int32_t width,
1110 int32_t height,
1111 uint32_t bounds_change_reason);
1112 /**
1113 * Notifies that a drag to move/resize started.
1114 *
1115 * Notifies a client that the compositor started drag operation.
1116 * "direction" specifies which direction it is being resized.
1117 * "none" direction means just move but not resize.
1118 *
1119 * This will be followed by series of the "bounds_changed" event
1120 * with "drag_resize" or "drag_move" reasons to update the window
1121 * bounds druing the drag operation.
1122 * @since 10
1123 */
1124 void (*drag_started)(void *data,
1125 struct zcr_remote_surface_v1 *zcr_remote_surface_v1,
1126 uint32_t direction);
1127 /**
1128 * Notifies that a drag operation has finished.
1129 *
1130 * Called when the drag operation is finished. "x" and "y"
1131 * specifies the position of the pointer device used to drag.
1132 * "canceled" is true if the drag operation is aborted during drag
1133 * (e.g. by capture change or user action.)
1134 * @param canceled true if the operation was canceled
1135 * @since 10
1136 */
1137 void (*drag_finished)(void *data,
1138 struct zcr_remote_surface_v1 *zcr_remote_surface_v1,
1139 int32_t x,
1140 int32_t y,
1141 int32_t canceled);
1142 /**
1143 * change zoom level
1144 *
1145 * Request application zoom level change.
1146 * @param change zoom_change
1147 * @since 23
1148 */
1149 void (*change_zoom_level)(void *data,
1150 struct zcr_remote_surface_v1 *zcr_remote_surface_v1,
1151 int32_t change);
1152 /**
1153 * The compositor requested to change the bounds
1154 *
1155 * The compositor requested to change its bounds.
1156 * "bounds_change_reason" specifies the cause of the bounds change.
1157 * The client may apply the different move/resize strategy
1158 * depending on the reason.
1159 *
1160 * The "output" specifies the wayland output in which the suface
1161 * should live.
1162 *
1163 * The client responds with set_window_geometry request, with the
1164 * bounds it is resized to (this may be different from the bounds
1165 * requested).
1166 *
1167 * The client may ignore move request depending on the state, e.g,
1168 * if it becomes resizable or other constrants.
1169 * @param output the output
1170 * @since 33
1171 */
1172 void (*bounds_changed_in_output)(void *data,
1173 struct zcr_remote_surface_v1 *zcr_remote_surface_v1,
1174 struct wl_output *output,
1175 int32_t x,
1176 int32_t y,
1177 int32_t width,
1178 int32_t height,
1179 uint32_t bounds_change_reason);
1180 };
1181
1182 /**
1183 * @ingroup iface_zcr_remote_surface_v1
1184 */
1185 static inline int
zcr_remote_surface_v1_add_listener(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,const struct zcr_remote_surface_v1_listener * listener,void * data)1186 zcr_remote_surface_v1_add_listener(struct zcr_remote_surface_v1 *zcr_remote_surface_v1,
1187 const struct zcr_remote_surface_v1_listener *listener, void *data)
1188 {
1189 return wl_proxy_add_listener((struct wl_proxy *) zcr_remote_surface_v1,
1190 (void (**)(void)) listener, data);
1191 }
1192
1193 #define ZCR_REMOTE_SURFACE_V1_DESTROY 0
1194 #define ZCR_REMOTE_SURFACE_V1_SET_APP_ID 1
1195 #define ZCR_REMOTE_SURFACE_V1_SET_WINDOW_GEOMETRY 2
1196 #define ZCR_REMOTE_SURFACE_V1_SET_SCALE 3
1197 #define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW 4
1198 #define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW_BACKGROUND_OPACITY 5
1199 #define ZCR_REMOTE_SURFACE_V1_SET_TITLE 6
1200 #define ZCR_REMOTE_SURFACE_V1_SET_TOP_INSET 7
1201 #define ZCR_REMOTE_SURFACE_V1_ACTIVATE 8
1202 #define ZCR_REMOTE_SURFACE_V1_MAXIMIZE 9
1203 #define ZCR_REMOTE_SURFACE_V1_MINIMIZE 10
1204 #define ZCR_REMOTE_SURFACE_V1_RESTORE 11
1205 #define ZCR_REMOTE_SURFACE_V1_FULLSCREEN 12
1206 #define ZCR_REMOTE_SURFACE_V1_UNFULLSCREEN 13
1207 #define ZCR_REMOTE_SURFACE_V1_PIN 14
1208 #define ZCR_REMOTE_SURFACE_V1_UNPIN 15
1209 #define ZCR_REMOTE_SURFACE_V1_SET_SYSTEM_MODAL 16
1210 #define ZCR_REMOTE_SURFACE_V1_UNSET_SYSTEM_MODAL 17
1211 #define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SURFACE_SHADOW 18
1212 #define ZCR_REMOTE_SURFACE_V1_SET_SYSTEMUI_VISIBILITY 19
1213 #define ZCR_REMOTE_SURFACE_V1_SET_ALWAYS_ON_TOP 20
1214 #define ZCR_REMOTE_SURFACE_V1_UNSET_ALWAYS_ON_TOP 21
1215 #define ZCR_REMOTE_SURFACE_V1_ACK_CONFIGURE 22
1216 #define ZCR_REMOTE_SURFACE_V1_MOVE 23
1217 #define ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION 24
1218 #define ZCR_REMOTE_SURFACE_V1_SET_WINDOW_TYPE 25
1219 #define ZCR_REMOTE_SURFACE_V1_RESIZE 26
1220 #define ZCR_REMOTE_SURFACE_V1_SET_RESIZE_OUTSET 27
1221 #define ZCR_REMOTE_SURFACE_V1_START_MOVE 28
1222 #define ZCR_REMOTE_SURFACE_V1_SET_CAN_MAXIMIZE 29
1223 #define ZCR_REMOTE_SURFACE_V1_UNSET_CAN_MAXIMIZE 30
1224 #define ZCR_REMOTE_SURFACE_V1_SET_MIN_SIZE 31
1225 #define ZCR_REMOTE_SURFACE_V1_SET_MAX_SIZE 32
1226 #define ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_LEFT 33
1227 #define ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_RIGHT 34
1228 #define ZCR_REMOTE_SURFACE_V1_START_RESIZE 35
1229 #define ZCR_REMOTE_SURFACE_V1_SET_FRAME 36
1230 #define ZCR_REMOTE_SURFACE_V1_SET_FRAME_BUTTONS 37
1231 #define ZCR_REMOTE_SURFACE_V1_SET_EXTRA_TITLE 38
1232 #define ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION_LOCK 39
1233 #define ZCR_REMOTE_SURFACE_V1_PIP 40
1234 #define ZCR_REMOTE_SURFACE_V1_SET_BOUNDS 41
1235 #define ZCR_REMOTE_SURFACE_V1_SET_ASPECT_RATIO 42
1236 #define ZCR_REMOTE_SURFACE_V1_BLOCK_IME 43
1237 #define ZCR_REMOTE_SURFACE_V1_UNBLOCK_IME 44
1238 #define ZCR_REMOTE_SURFACE_V1_SET_ACCESSIBILITY_ID 45
1239 #define ZCR_REMOTE_SURFACE_V1_SET_PIP_ORIGINAL_WINDOW 46
1240 #define ZCR_REMOTE_SURFACE_V1_UNSET_PIP_ORIGINAL_WINDOW 47
1241 #define ZCR_REMOTE_SURFACE_V1_SET_SYSTEM_GESTURE_EXCLUSION 48
1242 #define ZCR_REMOTE_SURFACE_V1_SET_RESIZE_LOCK 49
1243 #define ZCR_REMOTE_SURFACE_V1_UNSET_RESIZE_LOCK 50
1244 #define ZCR_REMOTE_SURFACE_V1_SET_BOUNDS_IN_OUTPUT 51
1245
1246 /**
1247 * @ingroup iface_zcr_remote_surface_v1
1248 */
1249 #define ZCR_REMOTE_SURFACE_V1_CLOSE_SINCE_VERSION 1
1250 /**
1251 * @ingroup iface_zcr_remote_surface_v1
1252 */
1253 #define ZCR_REMOTE_SURFACE_V1_STATE_TYPE_CHANGED_SINCE_VERSION 1
1254 /**
1255 * @ingroup iface_zcr_remote_surface_v1
1256 */
1257 #define ZCR_REMOTE_SURFACE_V1_CONFIGURE_SINCE_VERSION 5
1258 /**
1259 * @ingroup iface_zcr_remote_surface_v1
1260 */
1261 #define ZCR_REMOTE_SURFACE_V1_WINDOW_GEOMETRY_CHANGED_SINCE_VERSION 9
1262 /**
1263 * @ingroup iface_zcr_remote_surface_v1
1264 */
1265 #define ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGED_SINCE_VERSION 10
1266 /**
1267 * @ingroup iface_zcr_remote_surface_v1
1268 */
1269 #define ZCR_REMOTE_SURFACE_V1_DRAG_STARTED_SINCE_VERSION 10
1270 /**
1271 * @ingroup iface_zcr_remote_surface_v1
1272 */
1273 #define ZCR_REMOTE_SURFACE_V1_DRAG_FINISHED_SINCE_VERSION 10
1274 /**
1275 * @ingroup iface_zcr_remote_surface_v1
1276 */
1277 #define ZCR_REMOTE_SURFACE_V1_CHANGE_ZOOM_LEVEL_SINCE_VERSION 23
1278 /**
1279 * @ingroup iface_zcr_remote_surface_v1
1280 */
1281 #define ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGED_IN_OUTPUT_SINCE_VERSION 33
1282
1283 /**
1284 * @ingroup iface_zcr_remote_surface_v1
1285 */
1286 #define ZCR_REMOTE_SURFACE_V1_DESTROY_SINCE_VERSION 1
1287 /**
1288 * @ingroup iface_zcr_remote_surface_v1
1289 */
1290 #define ZCR_REMOTE_SURFACE_V1_SET_APP_ID_SINCE_VERSION 1
1291 /**
1292 * @ingroup iface_zcr_remote_surface_v1
1293 */
1294 #define ZCR_REMOTE_SURFACE_V1_SET_WINDOW_GEOMETRY_SINCE_VERSION 1
1295 /**
1296 * @ingroup iface_zcr_remote_surface_v1
1297 */
1298 #define ZCR_REMOTE_SURFACE_V1_SET_SCALE_SINCE_VERSION 1
1299 /**
1300 * @ingroup iface_zcr_remote_surface_v1
1301 */
1302 #define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW_SINCE_VERSION 1
1303 /**
1304 * @ingroup iface_zcr_remote_surface_v1
1305 */
1306 #define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW_BACKGROUND_OPACITY_SINCE_VERSION 1
1307 /**
1308 * @ingroup iface_zcr_remote_surface_v1
1309 */
1310 #define ZCR_REMOTE_SURFACE_V1_SET_TITLE_SINCE_VERSION 1
1311 /**
1312 * @ingroup iface_zcr_remote_surface_v1
1313 */
1314 #define ZCR_REMOTE_SURFACE_V1_SET_TOP_INSET_SINCE_VERSION 1
1315 /**
1316 * @ingroup iface_zcr_remote_surface_v1
1317 */
1318 #define ZCR_REMOTE_SURFACE_V1_ACTIVATE_SINCE_VERSION 1
1319 /**
1320 * @ingroup iface_zcr_remote_surface_v1
1321 */
1322 #define ZCR_REMOTE_SURFACE_V1_MAXIMIZE_SINCE_VERSION 1
1323 /**
1324 * @ingroup iface_zcr_remote_surface_v1
1325 */
1326 #define ZCR_REMOTE_SURFACE_V1_MINIMIZE_SINCE_VERSION 1
1327 /**
1328 * @ingroup iface_zcr_remote_surface_v1
1329 */
1330 #define ZCR_REMOTE_SURFACE_V1_RESTORE_SINCE_VERSION 1
1331 /**
1332 * @ingroup iface_zcr_remote_surface_v1
1333 */
1334 #define ZCR_REMOTE_SURFACE_V1_FULLSCREEN_SINCE_VERSION 1
1335 /**
1336 * @ingroup iface_zcr_remote_surface_v1
1337 */
1338 #define ZCR_REMOTE_SURFACE_V1_UNFULLSCREEN_SINCE_VERSION 1
1339 /**
1340 * @ingroup iface_zcr_remote_surface_v1
1341 */
1342 #define ZCR_REMOTE_SURFACE_V1_PIN_SINCE_VERSION 1
1343 /**
1344 * @ingroup iface_zcr_remote_surface_v1
1345 */
1346 #define ZCR_REMOTE_SURFACE_V1_UNPIN_SINCE_VERSION 1
1347 /**
1348 * @ingroup iface_zcr_remote_surface_v1
1349 */
1350 #define ZCR_REMOTE_SURFACE_V1_SET_SYSTEM_MODAL_SINCE_VERSION 1
1351 /**
1352 * @ingroup iface_zcr_remote_surface_v1
1353 */
1354 #define ZCR_REMOTE_SURFACE_V1_UNSET_SYSTEM_MODAL_SINCE_VERSION 1
1355 /**
1356 * @ingroup iface_zcr_remote_surface_v1
1357 */
1358 #define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SURFACE_SHADOW_SINCE_VERSION 2
1359 /**
1360 * @ingroup iface_zcr_remote_surface_v1
1361 */
1362 #define ZCR_REMOTE_SURFACE_V1_SET_SYSTEMUI_VISIBILITY_SINCE_VERSION 3
1363 /**
1364 * @ingroup iface_zcr_remote_surface_v1
1365 */
1366 #define ZCR_REMOTE_SURFACE_V1_SET_ALWAYS_ON_TOP_SINCE_VERSION 4
1367 /**
1368 * @ingroup iface_zcr_remote_surface_v1
1369 */
1370 #define ZCR_REMOTE_SURFACE_V1_UNSET_ALWAYS_ON_TOP_SINCE_VERSION 4
1371 /**
1372 * @ingroup iface_zcr_remote_surface_v1
1373 */
1374 #define ZCR_REMOTE_SURFACE_V1_ACK_CONFIGURE_SINCE_VERSION 5
1375 /**
1376 * @ingroup iface_zcr_remote_surface_v1
1377 */
1378 #define ZCR_REMOTE_SURFACE_V1_MOVE_SINCE_VERSION 5
1379 /**
1380 * @ingroup iface_zcr_remote_surface_v1
1381 */
1382 #define ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION_SINCE_VERSION 6
1383 /**
1384 * @ingroup iface_zcr_remote_surface_v1
1385 */
1386 #define ZCR_REMOTE_SURFACE_V1_SET_WINDOW_TYPE_SINCE_VERSION 7
1387 /**
1388 * @ingroup iface_zcr_remote_surface_v1
1389 */
1390 #define ZCR_REMOTE_SURFACE_V1_RESIZE_SINCE_VERSION 9
1391 /**
1392 * @ingroup iface_zcr_remote_surface_v1
1393 */
1394 #define ZCR_REMOTE_SURFACE_V1_SET_RESIZE_OUTSET_SINCE_VERSION 9
1395 /**
1396 * @ingroup iface_zcr_remote_surface_v1
1397 */
1398 #define ZCR_REMOTE_SURFACE_V1_START_MOVE_SINCE_VERSION 10
1399 /**
1400 * @ingroup iface_zcr_remote_surface_v1
1401 */
1402 #define ZCR_REMOTE_SURFACE_V1_SET_CAN_MAXIMIZE_SINCE_VERSION 10
1403 /**
1404 * @ingroup iface_zcr_remote_surface_v1
1405 */
1406 #define ZCR_REMOTE_SURFACE_V1_UNSET_CAN_MAXIMIZE_SINCE_VERSION 10
1407 /**
1408 * @ingroup iface_zcr_remote_surface_v1
1409 */
1410 #define ZCR_REMOTE_SURFACE_V1_SET_MIN_SIZE_SINCE_VERSION 10
1411 /**
1412 * @ingroup iface_zcr_remote_surface_v1
1413 */
1414 #define ZCR_REMOTE_SURFACE_V1_SET_MAX_SIZE_SINCE_VERSION 10
1415 /**
1416 * @ingroup iface_zcr_remote_surface_v1
1417 */
1418 #define ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_LEFT_SINCE_VERSION 11
1419 /**
1420 * @ingroup iface_zcr_remote_surface_v1
1421 */
1422 #define ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_RIGHT_SINCE_VERSION 11
1423 /**
1424 * @ingroup iface_zcr_remote_surface_v1
1425 */
1426 #define ZCR_REMOTE_SURFACE_V1_START_RESIZE_SINCE_VERSION 12
1427 /**
1428 * @ingroup iface_zcr_remote_surface_v1
1429 */
1430 #define ZCR_REMOTE_SURFACE_V1_SET_FRAME_SINCE_VERSION 13
1431 /**
1432 * @ingroup iface_zcr_remote_surface_v1
1433 */
1434 #define ZCR_REMOTE_SURFACE_V1_SET_FRAME_BUTTONS_SINCE_VERSION 13
1435 /**
1436 * @ingroup iface_zcr_remote_surface_v1
1437 */
1438 #define ZCR_REMOTE_SURFACE_V1_SET_EXTRA_TITLE_SINCE_VERSION 13
1439 /**
1440 * @ingroup iface_zcr_remote_surface_v1
1441 */
1442 #define ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION_LOCK_SINCE_VERSION 14
1443 /**
1444 * @ingroup iface_zcr_remote_surface_v1
1445 */
1446 #define ZCR_REMOTE_SURFACE_V1_PIP_SINCE_VERSION 15
1447 /**
1448 * @ingroup iface_zcr_remote_surface_v1
1449 */
1450 #define ZCR_REMOTE_SURFACE_V1_SET_BOUNDS_SINCE_VERSION 18
1451 /**
1452 * @ingroup iface_zcr_remote_surface_v1
1453 */
1454 #define ZCR_REMOTE_SURFACE_V1_SET_ASPECT_RATIO_SINCE_VERSION 19
1455 /**
1456 * @ingroup iface_zcr_remote_surface_v1
1457 */
1458 #define ZCR_REMOTE_SURFACE_V1_BLOCK_IME_SINCE_VERSION 20
1459 /**
1460 * @ingroup iface_zcr_remote_surface_v1
1461 */
1462 #define ZCR_REMOTE_SURFACE_V1_UNBLOCK_IME_SINCE_VERSION 20
1463 /**
1464 * @ingroup iface_zcr_remote_surface_v1
1465 */
1466 #define ZCR_REMOTE_SURFACE_V1_SET_ACCESSIBILITY_ID_SINCE_VERSION 25
1467 /**
1468 * @ingroup iface_zcr_remote_surface_v1
1469 */
1470 #define ZCR_REMOTE_SURFACE_V1_SET_PIP_ORIGINAL_WINDOW_SINCE_VERSION 26
1471 /**
1472 * @ingroup iface_zcr_remote_surface_v1
1473 */
1474 #define ZCR_REMOTE_SURFACE_V1_UNSET_PIP_ORIGINAL_WINDOW_SINCE_VERSION 26
1475 /**
1476 * @ingroup iface_zcr_remote_surface_v1
1477 */
1478 #define ZCR_REMOTE_SURFACE_V1_SET_SYSTEM_GESTURE_EXCLUSION_SINCE_VERSION 27
1479 /**
1480 * @ingroup iface_zcr_remote_surface_v1
1481 */
1482 #define ZCR_REMOTE_SURFACE_V1_SET_RESIZE_LOCK_SINCE_VERSION 31
1483 /**
1484 * @ingroup iface_zcr_remote_surface_v1
1485 */
1486 #define ZCR_REMOTE_SURFACE_V1_UNSET_RESIZE_LOCK_SINCE_VERSION 31
1487 /**
1488 * @ingroup iface_zcr_remote_surface_v1
1489 */
1490 #define ZCR_REMOTE_SURFACE_V1_SET_BOUNDS_IN_OUTPUT_SINCE_VERSION 33
1491
1492 /** @ingroup iface_zcr_remote_surface_v1 */
1493 static inline void
zcr_remote_surface_v1_set_user_data(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,void * user_data)1494 zcr_remote_surface_v1_set_user_data(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, void *user_data)
1495 {
1496 wl_proxy_set_user_data((struct wl_proxy *) zcr_remote_surface_v1, user_data);
1497 }
1498
1499 /** @ingroup iface_zcr_remote_surface_v1 */
1500 static inline void *
zcr_remote_surface_v1_get_user_data(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)1501 zcr_remote_surface_v1_get_user_data(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
1502 {
1503 return wl_proxy_get_user_data((struct wl_proxy *) zcr_remote_surface_v1);
1504 }
1505
1506 static inline uint32_t
zcr_remote_surface_v1_get_version(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)1507 zcr_remote_surface_v1_get_version(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
1508 {
1509 return wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1);
1510 }
1511
1512 /**
1513 * @ingroup iface_zcr_remote_surface_v1
1514 *
1515 * Unmap and destroy the window. The window will be effectively
1516 * hidden from the user's point of view, and all state will be lost.
1517 */
1518 static inline void
zcr_remote_surface_v1_destroy(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)1519 zcr_remote_surface_v1_destroy(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
1520 {
1521 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1522 ZCR_REMOTE_SURFACE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), WL_MARSHAL_FLAG_DESTROY);
1523 }
1524
1525 /**
1526 * @ingroup iface_zcr_remote_surface_v1
1527 *
1528 * Set an application identifier for the surface.
1529 */
1530 static inline void
zcr_remote_surface_v1_set_app_id(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,const char * app_id)1531 zcr_remote_surface_v1_set_app_id(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, const char *app_id)
1532 {
1533 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1534 ZCR_REMOTE_SURFACE_V1_SET_APP_ID, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, app_id);
1535 }
1536
1537 /**
1538 * @ingroup iface_zcr_remote_surface_v1
1539 *
1540 * [Deprecated] The window geometry of a window is its "visible bounds"
1541 * from the user's perspective. Client-side decorations often have
1542 * invisible portions like drop-shadows which should be ignored for the
1543 * purposes of aligning, placing and constraining windows.
1544 *
1545 * The window geometry is double buffered, and will be applied at the
1546 * time wl_surface.commit of the corresponding wl_surface is called.
1547 *
1548 * Once the window geometry of the surface is set once, it is not
1549 * possible to unset it, and it will remain the same until
1550 * set_window_geometry is called again, even if a new subsurface or
1551 * buffer is attached.
1552 *
1553 * If never set, the value is the full bounds of the output. This
1554 * updates dynamically on every commit.
1555 *
1556 * The arguments are given in the output coordinate space.
1557 *
1558 * The width and height must be greater than zero.
1559 */
1560 static inline void
zcr_remote_surface_v1_set_window_geometry(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,int32_t x,int32_t y,int32_t width,int32_t height)1561 zcr_remote_surface_v1_set_window_geometry(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t x, int32_t y, int32_t width, int32_t height)
1562 {
1563 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1564 ZCR_REMOTE_SURFACE_V1_SET_WINDOW_GEOMETRY, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, x, y, width, height);
1565 }
1566
1567 /**
1568 * @ingroup iface_zcr_remote_surface_v1
1569 *
1570 * Set a scale factor that will be applied to surface and all descendants.
1571 */
1572 static inline void
zcr_remote_surface_v1_set_scale(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,wl_fixed_t scale)1573 zcr_remote_surface_v1_set_scale(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, wl_fixed_t scale)
1574 {
1575 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1576 ZCR_REMOTE_SURFACE_V1_SET_SCALE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, scale);
1577 }
1578
1579 /**
1580 * @ingroup iface_zcr_remote_surface_v1
1581 *
1582 * [Deprecated] Request that surface needs a rectangular shadow.
1583 *
1584 * This is only a request that the surface should have a rectangular
1585 * shadow. The compositor may choose to ignore this request.
1586 *
1587 * The arguments are given in the output coordinate space and specifies
1588 * the inner bounds of the shadow.
1589 *
1590 * The arguments are given in the output coordinate space.
1591 * Specifying zero width and height will disable the shadow.
1592 */
1593 static inline void
zcr_remote_surface_v1_set_rectangular_shadow(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,int32_t x,int32_t y,int32_t width,int32_t height)1594 zcr_remote_surface_v1_set_rectangular_shadow(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t x, int32_t y, int32_t width, int32_t height)
1595 {
1596 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1597 ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, x, y, width, height);
1598 }
1599
1600 /**
1601 * @ingroup iface_zcr_remote_surface_v1
1602 *
1603 * [Deprecated] Suggests the window's background opacity when the shadow is requested.
1604 */
1605 static inline void
zcr_remote_surface_v1_set_rectangular_shadow_background_opacity(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,wl_fixed_t opacity)1606 zcr_remote_surface_v1_set_rectangular_shadow_background_opacity(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, wl_fixed_t opacity)
1607 {
1608 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1609 ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW_BACKGROUND_OPACITY, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, opacity);
1610 }
1611
1612 /**
1613 * @ingroup iface_zcr_remote_surface_v1
1614 *
1615 * Set a short title for the surface.
1616 *
1617 * This string may be used to identify the surface in a task bar,
1618 * window list, or other user interface elements provided by the
1619 * compositor.
1620 *
1621 * The string must be encoded in UTF-8.
1622 */
1623 static inline void
zcr_remote_surface_v1_set_title(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,const char * title)1624 zcr_remote_surface_v1_set_title(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, const char *title)
1625 {
1626 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1627 ZCR_REMOTE_SURFACE_V1_SET_TITLE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, title);
1628 }
1629
1630 /**
1631 * @ingroup iface_zcr_remote_surface_v1
1632 *
1633 * Set distance from the top of the surface to the contents.
1634 *
1635 * This distance typically represents the size of the window caption.
1636 */
1637 static inline void
zcr_remote_surface_v1_set_top_inset(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,int32_t height)1638 zcr_remote_surface_v1_set_top_inset(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t height)
1639 {
1640 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1641 ZCR_REMOTE_SURFACE_V1_SET_TOP_INSET, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, height);
1642 }
1643
1644 /**
1645 * @ingroup iface_zcr_remote_surface_v1
1646 *
1647 * Make the surface active and bring it to the front.
1648 */
1649 static inline void
zcr_remote_surface_v1_activate(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,uint32_t serial)1650 zcr_remote_surface_v1_activate(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t serial)
1651 {
1652 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1653 ZCR_REMOTE_SURFACE_V1_ACTIVATE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, serial);
1654 }
1655
1656 /**
1657 * @ingroup iface_zcr_remote_surface_v1
1658 *
1659 * Request that surface is maximized. The window geometry will be updated
1660 * to whatever the compositor finds appropriate for a maximized window.
1661 *
1662 * This is only a request that the window should be maximized. The
1663 * compositor may choose to ignore this request. The client should
1664 * listen to set_maximized events to determine if the window was
1665 * maximized or not.
1666 */
1667 static inline void
zcr_remote_surface_v1_maximize(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)1668 zcr_remote_surface_v1_maximize(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
1669 {
1670 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1671 ZCR_REMOTE_SURFACE_V1_MAXIMIZE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
1672 }
1673
1674 /**
1675 * @ingroup iface_zcr_remote_surface_v1
1676 *
1677 * Request that surface is minimized.
1678 *
1679 * This is only a request that the window should be minimized. The
1680 * compositor may choose to ignore this request. The client should
1681 * listen to set_minimized events to determine if the window was
1682 * minimized or not.
1683 */
1684 static inline void
zcr_remote_surface_v1_minimize(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)1685 zcr_remote_surface_v1_minimize(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
1686 {
1687 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1688 ZCR_REMOTE_SURFACE_V1_MINIMIZE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
1689 }
1690
1691 /**
1692 * @ingroup iface_zcr_remote_surface_v1
1693 *
1694 * Request that surface is restored. This restores the window geometry
1695 * to what it was before the window was minimized, maximized or made
1696 * fullscreen.
1697 *
1698 * This is only a request that the window should be restored. The
1699 * compositor may choose to ignore this request. The client should
1700 * listen to unset_maximized, unset_minimize and unset_fullscreen
1701 * events to determine if the window was restored or not.
1702 */
1703 static inline void
zcr_remote_surface_v1_restore(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)1704 zcr_remote_surface_v1_restore(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
1705 {
1706 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1707 ZCR_REMOTE_SURFACE_V1_RESTORE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
1708 }
1709
1710 /**
1711 * @ingroup iface_zcr_remote_surface_v1
1712 *
1713 * Request that surface is made fullscreen.
1714 *
1715 * This is only a request that the window should be made fullscreen.
1716 * The compositor may choose to ignore this request. The client should
1717 * listen to set_fullscreen events to determine if the window was
1718 * made fullscreen or not.
1719 */
1720 static inline void
zcr_remote_surface_v1_fullscreen(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)1721 zcr_remote_surface_v1_fullscreen(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
1722 {
1723 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1724 ZCR_REMOTE_SURFACE_V1_FULLSCREEN, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
1725 }
1726
1727 /**
1728 * @ingroup iface_zcr_remote_surface_v1
1729 *
1730 * Request that surface is made unfullscreen.
1731 *
1732 * This is only a request that the window should be made unfullscreen.
1733 * The compositor may choose to ignore this request. The client should
1734 * listen to unset_fullscreen events to determine if the window was
1735 * made unfullscreen or not.
1736 */
1737 static inline void
zcr_remote_surface_v1_unfullscreen(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)1738 zcr_remote_surface_v1_unfullscreen(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
1739 {
1740 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1741 ZCR_REMOTE_SURFACE_V1_UNFULLSCREEN, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
1742 }
1743
1744 /**
1745 * @ingroup iface_zcr_remote_surface_v1
1746 *
1747 * Request that surface is pinned.
1748 *
1749 * This is only a request that the window should be pinned.
1750 * The compositor may choose to ignore this request. The client should
1751 * listen to state_changed events to determine if the window was
1752 * pinned or not. If trusted flag is non-zero, the app can prevent users
1753 * from exiting the pinned mode.
1754 */
1755 static inline void
zcr_remote_surface_v1_pin(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,int32_t trusted)1756 zcr_remote_surface_v1_pin(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t trusted)
1757 {
1758 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1759 ZCR_REMOTE_SURFACE_V1_PIN, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, trusted);
1760 }
1761
1762 /**
1763 * @ingroup iface_zcr_remote_surface_v1
1764 *
1765 * Request that surface is unpinned.
1766 *
1767 * This is only a request that the window should be unpinned.
1768 * The compositor may choose to ignore this request. The client should
1769 * listen to unset_pinned events to determine if the window was
1770 * unpinned or not.
1771 */
1772 static inline void
zcr_remote_surface_v1_unpin(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)1773 zcr_remote_surface_v1_unpin(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
1774 {
1775 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1776 ZCR_REMOTE_SURFACE_V1_UNPIN, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
1777 }
1778
1779 /**
1780 * @ingroup iface_zcr_remote_surface_v1
1781 *
1782 * Suggests a surface should become system modal.
1783 */
1784 static inline void
zcr_remote_surface_v1_set_system_modal(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)1785 zcr_remote_surface_v1_set_system_modal(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
1786 {
1787 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1788 ZCR_REMOTE_SURFACE_V1_SET_SYSTEM_MODAL, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
1789 }
1790
1791 /**
1792 * @ingroup iface_zcr_remote_surface_v1
1793 *
1794 * Suggests a surface should become non system modal.
1795 */
1796 static inline void
zcr_remote_surface_v1_unset_system_modal(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)1797 zcr_remote_surface_v1_unset_system_modal(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
1798 {
1799 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1800 ZCR_REMOTE_SURFACE_V1_UNSET_SYSTEM_MODAL, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
1801 }
1802
1803 /**
1804 * @ingroup iface_zcr_remote_surface_v1
1805 *
1806 * Request that surface needs a rectangular shadow.
1807 *
1808 * This is only a request that the surface should have a rectangular
1809 * shadow. The compositor may choose to ignore this request.
1810 *
1811 * The arguments are given in the remote surface coordinate space and
1812 * specifies inner bounds of the shadow. Specifying zero width and height
1813 * will disable the shadow.
1814 */
1815 static inline void
zcr_remote_surface_v1_set_rectangular_surface_shadow(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,int32_t x,int32_t y,int32_t width,int32_t height)1816 zcr_remote_surface_v1_set_rectangular_surface_shadow(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t x, int32_t y, int32_t width, int32_t height)
1817 {
1818 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1819 ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SURFACE_SHADOW, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, x, y, width, height);
1820 }
1821
1822 /**
1823 * @ingroup iface_zcr_remote_surface_v1
1824 *
1825 * Requests how the surface will change the visibility of the system UI when it is made active.
1826 */
1827 static inline void
zcr_remote_surface_v1_set_systemui_visibility(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,uint32_t visibility)1828 zcr_remote_surface_v1_set_systemui_visibility(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t visibility)
1829 {
1830 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1831 ZCR_REMOTE_SURFACE_V1_SET_SYSTEMUI_VISIBILITY, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, visibility);
1832 }
1833
1834 /**
1835 * @ingroup iface_zcr_remote_surface_v1
1836 *
1837 * Request that surface is made to be always on top.
1838 *
1839 * This is only a request that the window should be always on top.
1840 * The compositor may choose to ignore this request.
1841 *
1842 */
1843 static inline void
zcr_remote_surface_v1_set_always_on_top(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)1844 zcr_remote_surface_v1_set_always_on_top(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
1845 {
1846 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1847 ZCR_REMOTE_SURFACE_V1_SET_ALWAYS_ON_TOP, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
1848 }
1849
1850 /**
1851 * @ingroup iface_zcr_remote_surface_v1
1852 *
1853 * Request that surface is made to be not always on top.
1854 *
1855 * This is only a request that the window should be not always on top.
1856 * The compositor may choose to ignore this request.
1857 */
1858 static inline void
zcr_remote_surface_v1_unset_always_on_top(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)1859 zcr_remote_surface_v1_unset_always_on_top(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
1860 {
1861 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1862 ZCR_REMOTE_SURFACE_V1_UNSET_ALWAYS_ON_TOP, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
1863 }
1864
1865 /**
1866 * @ingroup iface_zcr_remote_surface_v1
1867 *
1868 * When a configure event is received, if a client commits the
1869 * surface in response to the configure event, then the client
1870 * must make an ack_configure request sometime before the commit
1871 * request, passing along the serial of the configure event.
1872 *
1873 * For instance, the compositor might use this information during display
1874 * configuration to change its coordinate space for set_window_geometry
1875 * requests only when the client has switched to the new coordinate space.
1876 *
1877 * If the client receives multiple configure events before it
1878 * can respond to one, it only has to ack the last configure event.
1879 *
1880 * A client is not required to commit immediately after sending
1881 * an ack_configure request - it may even ack_configure several times
1882 * before its next surface commit.
1883 *
1884 * A client may send multiple ack_configure requests before committing, but
1885 * only the last request sent before a commit indicates which configure
1886 * event the client really is responding to.
1887 */
1888 static inline void
zcr_remote_surface_v1_ack_configure(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,uint32_t serial)1889 zcr_remote_surface_v1_ack_configure(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t serial)
1890 {
1891 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1892 ZCR_REMOTE_SURFACE_V1_ACK_CONFIGURE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, serial);
1893 }
1894
1895 /**
1896 * @ingroup iface_zcr_remote_surface_v1
1897 *
1898 * [Deprecated] Start an interactive, user-driven move of the surface.
1899 *
1900 * The compositor responds to this request with a configure event that
1901 * transitions to the "moving" state. The client must only initiate motion
1902 * after acknowledging the state change. The compositor can assume that
1903 * subsequent set_window_geometry requests are position updates until the
1904 * next state transition is acknowledged.
1905 *
1906 * The compositor may ignore move requests depending on the state of the
1907 * surface, e.g. fullscreen or maximized.
1908 */
1909 static inline void
zcr_remote_surface_v1_move(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)1910 zcr_remote_surface_v1_move(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
1911 {
1912 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1913 ZCR_REMOTE_SURFACE_V1_MOVE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
1914 }
1915
1916 /**
1917 * @ingroup iface_zcr_remote_surface_v1
1918 *
1919 * Set an orientation for the surface.
1920 */
1921 static inline void
zcr_remote_surface_v1_set_orientation(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,int32_t orientation)1922 zcr_remote_surface_v1_set_orientation(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t orientation)
1923 {
1924 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1925 ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, orientation);
1926 }
1927
1928 /**
1929 * @ingroup iface_zcr_remote_surface_v1
1930 *
1931 * Set the type of window. This is only a hint to the compositor and the
1932 * compositor is free to ignore it.
1933 */
1934 static inline void
zcr_remote_surface_v1_set_window_type(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,uint32_t type)1935 zcr_remote_surface_v1_set_window_type(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t type)
1936 {
1937 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1938 ZCR_REMOTE_SURFACE_V1_SET_WINDOW_TYPE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, type);
1939 }
1940
1941 /**
1942 * @ingroup iface_zcr_remote_surface_v1
1943 *
1944 * [Deprecated] Start an interactive, user-driven resize of the surface.
1945 *
1946 * The compositor responds to this request with a configure event that
1947 * transitions to the "resizing" state. The client must only initiate
1948 * resizing after acknowledging the state change. The compositor can assume
1949 * that subsequent set_window_geometry requests are resizes until the next
1950 * state transition is acknowledged.
1951 *
1952 * The compositor may ignore resize requests depending on the state of the
1953 * surface, e.g. fullscreen or maximized.
1954 */
1955 static inline void
zcr_remote_surface_v1_resize(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)1956 zcr_remote_surface_v1_resize(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
1957 {
1958 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1959 ZCR_REMOTE_SURFACE_V1_RESIZE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
1960 }
1961
1962 /**
1963 * @ingroup iface_zcr_remote_surface_v1
1964 *
1965 * Expand input region of surface with resize outset.
1966 *
1967 * The compositor clips the input region of each surface to its bounds,
1968 * unless the client requests a resize outset. In that case, the input
1969 * region of the root surface is expanded to allow for some leeway around
1970 * visible bounds when starting a user-driven resize.
1971 */
1972 static inline void
zcr_remote_surface_v1_set_resize_outset(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,int32_t outset)1973 zcr_remote_surface_v1_set_resize_outset(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t outset)
1974 {
1975 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1976 ZCR_REMOTE_SURFACE_V1_SET_RESIZE_OUTSET, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, outset);
1977 }
1978
1979 /**
1980 * @ingroup iface_zcr_remote_surface_v1
1981 *
1982 * Request an interactive, user-driven move of the surface. "x"
1983 * and "y" specifies the starting point of the pointer device
1984 * that initiated the move.
1985 *
1986 * The compositor responds to this request with a drag_started
1987 * event with "none" direction. Please see drag_started event
1988 * for more details.
1989 *
1990 * The compositor may ignore move requests depending on the state of the
1991 * surface, e.g. fullscreen or maximized.
1992 */
1993 static inline void
zcr_remote_surface_v1_start_move(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,int32_t x,int32_t y)1994 zcr_remote_surface_v1_start_move(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t x, int32_t y)
1995 {
1996 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
1997 ZCR_REMOTE_SURFACE_V1_START_MOVE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, x, y);
1998 }
1999
2000 /**
2001 * @ingroup iface_zcr_remote_surface_v1
2002 *
2003 * Request that surface can be in maximzied state.
2004 */
2005 static inline void
zcr_remote_surface_v1_set_can_maximize(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)2006 zcr_remote_surface_v1_set_can_maximize(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
2007 {
2008 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2009 ZCR_REMOTE_SURFACE_V1_SET_CAN_MAXIMIZE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
2010 }
2011
2012 /**
2013 * @ingroup iface_zcr_remote_surface_v1
2014 *
2015 * Request that surface can not be in maximzied state.
2016 */
2017 static inline void
zcr_remote_surface_v1_unset_can_maximize(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)2018 zcr_remote_surface_v1_unset_can_maximize(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
2019 {
2020 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2021 ZCR_REMOTE_SURFACE_V1_UNSET_CAN_MAXIMIZE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
2022 }
2023
2024 /**
2025 * @ingroup iface_zcr_remote_surface_v1
2026 *
2027 * Set a minimum size of the surface.
2028 *
2029 * Values set in this way are double-buffered. They will get
2030 * applied on the next commit.
2031 */
2032 static inline void
zcr_remote_surface_v1_set_min_size(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,int32_t width,int32_t height)2033 zcr_remote_surface_v1_set_min_size(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t width, int32_t height)
2034 {
2035 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2036 ZCR_REMOTE_SURFACE_V1_SET_MIN_SIZE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, width, height);
2037 }
2038
2039 /**
2040 * @ingroup iface_zcr_remote_surface_v1
2041 *
2042 * Set a maximum size of the surface.
2043 *
2044 * Values set in this way are double-buffered. They will get
2045 * applied on the next commit.
2046 *
2047 * Setting the same size as minimum size makes the surface
2048 * unresizable.
2049 */
2050 static inline void
zcr_remote_surface_v1_set_max_size(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,int32_t width,int32_t height)2051 zcr_remote_surface_v1_set_max_size(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t width, int32_t height)
2052 {
2053 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2054 ZCR_REMOTE_SURFACE_V1_SET_MAX_SIZE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, width, height);
2055 }
2056
2057 /**
2058 * @ingroup iface_zcr_remote_surface_v1
2059 *
2060 * Request that surface is snapped to left.
2061 */
2062 static inline void
zcr_remote_surface_v1_set_snapped_to_left(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)2063 zcr_remote_surface_v1_set_snapped_to_left(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
2064 {
2065 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2066 ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_LEFT, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
2067 }
2068
2069 /**
2070 * @ingroup iface_zcr_remote_surface_v1
2071 *
2072 * Request that surface is snapped to right.
2073 */
2074 static inline void
zcr_remote_surface_v1_set_snapped_to_right(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)2075 zcr_remote_surface_v1_set_snapped_to_right(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
2076 {
2077 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2078 ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_RIGHT, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
2079 }
2080
2081 /**
2082 * @ingroup iface_zcr_remote_surface_v1
2083 *
2084 * Request to start an interactive, user-driven resize of the surface.
2085 * "x" and "y" specifies the starting point of the pointer device
2086 * that initiated the reize.
2087 *
2088 * The compositor responds to this request with a "drag_started"
2089 * event, followed by "bounds_changed" events, and ends the
2090 * resize operation with a "drag_finhsed" event. The compositor
2091 * determines the new bounds using the resize_direction and the
2092 * pointer event location.
2093 *
2094 * The compositor may ignore resize requests depending on the state of the
2095 * surface, e.g. fullscreen or maximized, or no drag event is in pregress.
2096 */
2097 static inline void
zcr_remote_surface_v1_start_resize(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,uint32_t resize_direction,int32_t x,int32_t y)2098 zcr_remote_surface_v1_start_resize(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t resize_direction, int32_t x, int32_t y)
2099 {
2100 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2101 ZCR_REMOTE_SURFACE_V1_START_RESIZE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, resize_direction, x, y);
2102 }
2103
2104 /**
2105 * @ingroup iface_zcr_remote_surface_v1
2106 *
2107 * Enables compositor side frame decoration. |type|
2108 * specifies the type of frame to use for the surface.
2109 */
2110 static inline void
zcr_remote_surface_v1_set_frame(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,uint32_t type)2111 zcr_remote_surface_v1_set_frame(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t type)
2112 {
2113 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2114 ZCR_REMOTE_SURFACE_V1_SET_FRAME, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, type);
2115 }
2116
2117 /**
2118 * @ingroup iface_zcr_remote_surface_v1
2119 *
2120 * Updates the frame's button state. |visible_buttons| and |enabled_buttons|
2121 * are the union of button mask defined in |frame_button_type| enum.
2122 *
2123 * The mask present in |enabled_buttons| but not in |visible_buttons| will
2124 * be ignored.
2125 */
2126 static inline void
zcr_remote_surface_v1_set_frame_buttons(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,uint32_t visible_buttons,uint32_t enabled_buttons)2127 zcr_remote_surface_v1_set_frame_buttons(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t visible_buttons, uint32_t enabled_buttons)
2128 {
2129 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2130 ZCR_REMOTE_SURFACE_V1_SET_FRAME_BUTTONS, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, visible_buttons, enabled_buttons);
2131 }
2132
2133 /**
2134 * @ingroup iface_zcr_remote_surface_v1
2135 *
2136 * The extra informational string about the surface. This can be
2137 * used to show the debug information in the title bar, or log
2138 * messages.
2139 *
2140 * This is different from "set_title" which is used to identify
2141 * the surface.
2142 *
2143 * The string must be encoded in UTF-8.
2144 */
2145 static inline void
zcr_remote_surface_v1_set_extra_title(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,const char * extra_title)2146 zcr_remote_surface_v1_set_extra_title(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, const char *extra_title)
2147 {
2148 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2149 ZCR_REMOTE_SURFACE_V1_SET_EXTRA_TITLE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, extra_title);
2150 }
2151
2152 /**
2153 * @ingroup iface_zcr_remote_surface_v1
2154 *
2155 * Request a specific orientation behavior when this surface is in foreground.
2156 */
2157 static inline void
zcr_remote_surface_v1_set_orientation_lock(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,uint32_t orientation_lock)2158 zcr_remote_surface_v1_set_orientation_lock(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t orientation_lock)
2159 {
2160 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2161 ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION_LOCK, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, orientation_lock);
2162 }
2163
2164 /**
2165 * @ingroup iface_zcr_remote_surface_v1
2166 *
2167 * Request that surface is set to Picture-in-Picture (PIP).
2168 */
2169 static inline void
zcr_remote_surface_v1_pip(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)2170 zcr_remote_surface_v1_pip(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
2171 {
2172 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2173 ZCR_REMOTE_SURFACE_V1_PIP, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
2174 }
2175
2176 /**
2177 * @ingroup iface_zcr_remote_surface_v1
2178 *
2179 * [Deprecated] Set the "visible bounds" of a window from the user's perspective.
2180 * Client-side decorations often have invisible portions like drop shadows
2181 * which should be ignored for the purposes of aligning, placing and
2182 * constraining windows.
2183 *
2184 * The bounds are double buffered, and will be applied at the
2185 * time wl_surface.commit of the corresponding wl_surface is called.
2186 *
2187 * Once the bounds are set, it is not possible to unset them, and they will
2188 * remain the same until set_bounds is called again, even if a new sub-
2189 * surface or buffer is attached.
2190 *
2191 * If never set, the value is the surface content bounds. This updates
2192 * dynamically on every commit.
2193 *
2194 * The bounds are relative to the given display. If the display is invalid,
2195 * they are assumed to be relative to the primary display.
2196 *
2197 * The width and height must be greater than zero.
2198 */
2199 static inline void
zcr_remote_surface_v1_set_bounds(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,uint32_t display_id_hi,uint32_t display_id_lo,int32_t x,int32_t y,int32_t width,int32_t height)2200 zcr_remote_surface_v1_set_bounds(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t display_id_hi, uint32_t display_id_lo, int32_t x, int32_t y, int32_t width, int32_t height)
2201 {
2202 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2203 ZCR_REMOTE_SURFACE_V1_SET_BOUNDS, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, display_id_hi, display_id_lo, x, y, width, height);
2204 }
2205
2206 /**
2207 * @ingroup iface_zcr_remote_surface_v1
2208 *
2209 * Set an aspect ratio of the surface.
2210 *
2211 * Values set in this way are double-buffered. They will get
2212 * applied on the next commit.
2213 *
2214 * Setting the aspect ratio of the surface. The ratio of the values is used
2215 * for the ratio of width to height of the surface. The size of surface is
2216 * restricted to the ratio. If any value is zero, the restriction on aspect
2217 * ratio is unset.
2218 */
2219 static inline void
zcr_remote_surface_v1_set_aspect_ratio(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,int32_t width,int32_t height)2220 zcr_remote_surface_v1_set_aspect_ratio(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t width, int32_t height)
2221 {
2222 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2223 ZCR_REMOTE_SURFACE_V1_SET_ASPECT_RATIO, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, width, height);
2224 }
2225
2226 /**
2227 * @ingroup iface_zcr_remote_surface_v1
2228 *
2229 * Block server side IME and always send key events through Wayland.
2230 *
2231 * For some client, it's possible that server side IME is connected to the
2232 * client through other mechanism e.g. ime.mojom. When set_ime_blocked
2233 * is requested, server side IME should give up handling key events and
2234 * forward those events through Wayland protocol.
2235 */
2236 static inline void
zcr_remote_surface_v1_block_ime(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)2237 zcr_remote_surface_v1_block_ime(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
2238 {
2239 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2240 ZCR_REMOTE_SURFACE_V1_BLOCK_IME, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
2241 }
2242
2243 /**
2244 * @ingroup iface_zcr_remote_surface_v1
2245 *
2246 * Unblock server side IME. Some events can be handled by server side IME,
2247 * while others can still be sent through Wayland protocol. See the
2248 * description of set_ime_blocked for detail.
2249 */
2250 static inline void
zcr_remote_surface_v1_unblock_ime(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)2251 zcr_remote_surface_v1_unblock_ime(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
2252 {
2253 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2254 ZCR_REMOTE_SURFACE_V1_UNBLOCK_IME, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
2255 }
2256
2257 /**
2258 * @ingroup iface_zcr_remote_surface_v1
2259 *
2260 * Set accessibility window ID to the surface
2261 */
2262 static inline void
zcr_remote_surface_v1_set_accessibility_id(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,int32_t id)2263 zcr_remote_surface_v1_set_accessibility_id(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t id)
2264 {
2265 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2266 ZCR_REMOTE_SURFACE_V1_SET_ACCESSIBILITY_ID, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, id);
2267 }
2268
2269 /**
2270 * @ingroup iface_zcr_remote_surface_v1
2271 *
2272 * Set this surface the original window for the current PIP window.
2273 */
2274 static inline void
zcr_remote_surface_v1_set_pip_original_window(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)2275 zcr_remote_surface_v1_set_pip_original_window(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
2276 {
2277 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2278 ZCR_REMOTE_SURFACE_V1_SET_PIP_ORIGINAL_WINDOW, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
2279 }
2280
2281 /**
2282 * @ingroup iface_zcr_remote_surface_v1
2283 *
2284 * Unset this surface the original window for the current PIP window.
2285 */
2286 static inline void
zcr_remote_surface_v1_unset_pip_original_window(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)2287 zcr_remote_surface_v1_unset_pip_original_window(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
2288 {
2289 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2290 ZCR_REMOTE_SURFACE_V1_UNSET_PIP_ORIGINAL_WINDOW, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
2291 }
2292
2293 /**
2294 * @ingroup iface_zcr_remote_surface_v1
2295 *
2296 * Set system gesture exclusion region in which system gestures e.g. back
2297 * gesture should not be triggered.
2298 */
2299 static inline void
zcr_remote_surface_v1_set_system_gesture_exclusion(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,struct wl_region * region)2300 zcr_remote_surface_v1_set_system_gesture_exclusion(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, struct wl_region *region)
2301 {
2302 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2303 ZCR_REMOTE_SURFACE_V1_SET_SYSTEM_GESTURE_EXCLUSION, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, region);
2304 }
2305
2306 /**
2307 * @ingroup iface_zcr_remote_surface_v1
2308 *
2309 * Enable the resize lock and put restrictions related to resizing on
2310 * the shell surface.
2311 *
2312 * The resize lock state is double buffered, and will be applied at the
2313 * time wl_surface.commit of the corresponding wl_surface is called.
2314 */
2315 static inline void
zcr_remote_surface_v1_set_resize_lock(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)2316 zcr_remote_surface_v1_set_resize_lock(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
2317 {
2318 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2319 ZCR_REMOTE_SURFACE_V1_SET_RESIZE_LOCK, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
2320 }
2321
2322 /**
2323 * @ingroup iface_zcr_remote_surface_v1
2324 *
2325 * Disable the resize lock and allow the shell surface to be resized
2326 * freely.
2327 *
2328 * The resize lock state is double buffered, and will be applied at the
2329 * time wl_surface.commit of the corresponding wl_surface is called.
2330 */
2331 static inline void
zcr_remote_surface_v1_unset_resize_lock(struct zcr_remote_surface_v1 * zcr_remote_surface_v1)2332 zcr_remote_surface_v1_unset_resize_lock(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
2333 {
2334 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2335 ZCR_REMOTE_SURFACE_V1_UNSET_RESIZE_LOCK, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0);
2336 }
2337
2338 /**
2339 * @ingroup iface_zcr_remote_surface_v1
2340 *
2341 * Set the "visible bounds" of a window from the user's perspective.
2342 * Client-side decorations often have invisible portions like drop shadows
2343 * which should be ignored for the purposes of aligning, placing and
2344 * constraining windows.
2345 *
2346 * The bounds are double buffered, and will be applied at the
2347 * time wl_surface.commit of the corresponding wl_surface is called.
2348 *
2349 * Once the bounds are set, it is not possible to unset them, and they will
2350 * remain the same until set_bounds is called again, even if a new sub-
2351 * surface or buffer is attached.
2352 *
2353 * If never set, the value is the surface content bounds. This updates
2354 * dynamically on every commit.
2355 *
2356 * The bounds are relative to the given display. If the display is invalid,
2357 * they are assumed to be relative to the primary display.
2358 *
2359 * The width and height must be greater than zero.
2360 */
2361 static inline void
zcr_remote_surface_v1_set_bounds_in_output(struct zcr_remote_surface_v1 * zcr_remote_surface_v1,struct wl_output * output,int32_t x,int32_t y,int32_t width,int32_t height)2362 zcr_remote_surface_v1_set_bounds_in_output(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, struct wl_output *output, int32_t x, int32_t y, int32_t width, int32_t height)
2363 {
2364 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_surface_v1,
2365 ZCR_REMOTE_SURFACE_V1_SET_BOUNDS_IN_OUTPUT, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1), 0, output, x, y, width, height);
2366 }
2367
2368 #define ZCR_NOTIFICATION_SURFACE_V1_DESTROY 0
2369 #define ZCR_NOTIFICATION_SURFACE_V1_SET_APP_ID 1
2370
2371
2372 /**
2373 * @ingroup iface_zcr_notification_surface_v1
2374 */
2375 #define ZCR_NOTIFICATION_SURFACE_V1_DESTROY_SINCE_VERSION 1
2376 /**
2377 * @ingroup iface_zcr_notification_surface_v1
2378 */
2379 #define ZCR_NOTIFICATION_SURFACE_V1_SET_APP_ID_SINCE_VERSION 16
2380
2381 /** @ingroup iface_zcr_notification_surface_v1 */
2382 static inline void
zcr_notification_surface_v1_set_user_data(struct zcr_notification_surface_v1 * zcr_notification_surface_v1,void * user_data)2383 zcr_notification_surface_v1_set_user_data(struct zcr_notification_surface_v1 *zcr_notification_surface_v1, void *user_data)
2384 {
2385 wl_proxy_set_user_data((struct wl_proxy *) zcr_notification_surface_v1, user_data);
2386 }
2387
2388 /** @ingroup iface_zcr_notification_surface_v1 */
2389 static inline void *
zcr_notification_surface_v1_get_user_data(struct zcr_notification_surface_v1 * zcr_notification_surface_v1)2390 zcr_notification_surface_v1_get_user_data(struct zcr_notification_surface_v1 *zcr_notification_surface_v1)
2391 {
2392 return wl_proxy_get_user_data((struct wl_proxy *) zcr_notification_surface_v1);
2393 }
2394
2395 static inline uint32_t
zcr_notification_surface_v1_get_version(struct zcr_notification_surface_v1 * zcr_notification_surface_v1)2396 zcr_notification_surface_v1_get_version(struct zcr_notification_surface_v1 *zcr_notification_surface_v1)
2397 {
2398 return wl_proxy_get_version((struct wl_proxy *) zcr_notification_surface_v1);
2399 }
2400
2401 /**
2402 * @ingroup iface_zcr_notification_surface_v1
2403 *
2404 * Unmap and destroy the notification surface.
2405 */
2406 static inline void
zcr_notification_surface_v1_destroy(struct zcr_notification_surface_v1 * zcr_notification_surface_v1)2407 zcr_notification_surface_v1_destroy(struct zcr_notification_surface_v1 *zcr_notification_surface_v1)
2408 {
2409 wl_proxy_marshal_flags((struct wl_proxy *) zcr_notification_surface_v1,
2410 ZCR_NOTIFICATION_SURFACE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_notification_surface_v1), WL_MARSHAL_FLAG_DESTROY);
2411 }
2412
2413 /**
2414 * @ingroup iface_zcr_notification_surface_v1
2415 *
2416 * Set an application identifier for the notification surface.
2417 */
2418 static inline void
zcr_notification_surface_v1_set_app_id(struct zcr_notification_surface_v1 * zcr_notification_surface_v1,const char * app_id)2419 zcr_notification_surface_v1_set_app_id(struct zcr_notification_surface_v1 *zcr_notification_surface_v1, const char *app_id)
2420 {
2421 wl_proxy_marshal_flags((struct wl_proxy *) zcr_notification_surface_v1,
2422 ZCR_NOTIFICATION_SURFACE_V1_SET_APP_ID, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_notification_surface_v1), 0, app_id);
2423 }
2424
2425 #define ZCR_INPUT_METHOD_SURFACE_V1_DESTROY 0
2426 #define ZCR_INPUT_METHOD_SURFACE_V1_SET_BOUNDS 1
2427 #define ZCR_INPUT_METHOD_SURFACE_V1_SET_BOUNDS_IN_OUTPUT 2
2428
2429
2430 /**
2431 * @ingroup iface_zcr_input_method_surface_v1
2432 */
2433 #define ZCR_INPUT_METHOD_SURFACE_V1_DESTROY_SINCE_VERSION 1
2434 /**
2435 * @ingroup iface_zcr_input_method_surface_v1
2436 */
2437 #define ZCR_INPUT_METHOD_SURFACE_V1_SET_BOUNDS_SINCE_VERSION 18
2438 /**
2439 * @ingroup iface_zcr_input_method_surface_v1
2440 */
2441 #define ZCR_INPUT_METHOD_SURFACE_V1_SET_BOUNDS_IN_OUTPUT_SINCE_VERSION 33
2442
2443 /** @ingroup iface_zcr_input_method_surface_v1 */
2444 static inline void
zcr_input_method_surface_v1_set_user_data(struct zcr_input_method_surface_v1 * zcr_input_method_surface_v1,void * user_data)2445 zcr_input_method_surface_v1_set_user_data(struct zcr_input_method_surface_v1 *zcr_input_method_surface_v1, void *user_data)
2446 {
2447 wl_proxy_set_user_data((struct wl_proxy *) zcr_input_method_surface_v1, user_data);
2448 }
2449
2450 /** @ingroup iface_zcr_input_method_surface_v1 */
2451 static inline void *
zcr_input_method_surface_v1_get_user_data(struct zcr_input_method_surface_v1 * zcr_input_method_surface_v1)2452 zcr_input_method_surface_v1_get_user_data(struct zcr_input_method_surface_v1 *zcr_input_method_surface_v1)
2453 {
2454 return wl_proxy_get_user_data((struct wl_proxy *) zcr_input_method_surface_v1);
2455 }
2456
2457 static inline uint32_t
zcr_input_method_surface_v1_get_version(struct zcr_input_method_surface_v1 * zcr_input_method_surface_v1)2458 zcr_input_method_surface_v1_get_version(struct zcr_input_method_surface_v1 *zcr_input_method_surface_v1)
2459 {
2460 return wl_proxy_get_version((struct wl_proxy *) zcr_input_method_surface_v1);
2461 }
2462
2463 /**
2464 * @ingroup iface_zcr_input_method_surface_v1
2465 *
2466 * Unmap and destroy the input mtehod surface.
2467 */
2468 static inline void
zcr_input_method_surface_v1_destroy(struct zcr_input_method_surface_v1 * zcr_input_method_surface_v1)2469 zcr_input_method_surface_v1_destroy(struct zcr_input_method_surface_v1 *zcr_input_method_surface_v1)
2470 {
2471 wl_proxy_marshal_flags((struct wl_proxy *) zcr_input_method_surface_v1,
2472 ZCR_INPUT_METHOD_SURFACE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_input_method_surface_v1), WL_MARSHAL_FLAG_DESTROY);
2473 }
2474
2475 /**
2476 * @ingroup iface_zcr_input_method_surface_v1
2477 *
2478 * [Deprecated] Set the "visible bounds" of a window from the user's perspective.
2479 *
2480 * The bounds are double buffered, and will be applied at the
2481 * time wl_surface.commit of the corresponding wl_surface is called.
2482 *
2483 * Once the bounds are set, it is not possible to unset them, and they will
2484 * remain the same until set_bounds is called again, even if a new sub-
2485 * surface or buffer is attached.
2486 *
2487 * If never set, the value is the surface content bounds. This updates
2488 * dynamically on every commit.
2489 *
2490 * The bounds are relative to the given display. If the display is invalid,
2491 * they are assumed to be relative to the primary display.
2492 *
2493 * The width and height must be greater than zero.
2494 */
2495 static inline void
zcr_input_method_surface_v1_set_bounds(struct zcr_input_method_surface_v1 * zcr_input_method_surface_v1,uint32_t display_id_hi,uint32_t display_id_lo,int32_t x,int32_t y,int32_t width,int32_t height)2496 zcr_input_method_surface_v1_set_bounds(struct zcr_input_method_surface_v1 *zcr_input_method_surface_v1, uint32_t display_id_hi, uint32_t display_id_lo, int32_t x, int32_t y, int32_t width, int32_t height)
2497 {
2498 wl_proxy_marshal_flags((struct wl_proxy *) zcr_input_method_surface_v1,
2499 ZCR_INPUT_METHOD_SURFACE_V1_SET_BOUNDS, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_input_method_surface_v1), 0, display_id_hi, display_id_lo, x, y, width, height);
2500 }
2501
2502 /**
2503 * @ingroup iface_zcr_input_method_surface_v1
2504 *
2505 * Set the "visible bounds" of a window from the user's perspective.
2506 *
2507 * The bounds are double buffered, and will be applied at the
2508 * time wl_surface.commit of the corresponding wl_surface is called.
2509 *
2510 * Once the bounds are set, it is not possible to unset them, and they will
2511 * remain the same until set_bounds is called again, even if a new sub-
2512 * surface or buffer is attached.
2513 *
2514 * If never set, the value is the surface content bounds. This updates
2515 * dynamically on every commit.
2516 *
2517 * The bounds are relative to the given display. If the display is invalid,
2518 * they are assumed to be relative to the primary display.
2519 *
2520 * The width and height must be greater than zero.
2521 */
2522 static inline void
zcr_input_method_surface_v1_set_bounds_in_output(struct zcr_input_method_surface_v1 * zcr_input_method_surface_v1,struct wl_output * output,int32_t x,int32_t y,int32_t width,int32_t height)2523 zcr_input_method_surface_v1_set_bounds_in_output(struct zcr_input_method_surface_v1 *zcr_input_method_surface_v1, struct wl_output *output, int32_t x, int32_t y, int32_t width, int32_t height)
2524 {
2525 wl_proxy_marshal_flags((struct wl_proxy *) zcr_input_method_surface_v1,
2526 ZCR_INPUT_METHOD_SURFACE_V1_SET_BOUNDS_IN_OUTPUT, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_input_method_surface_v1), 0, output, x, y, width, height);
2527 }
2528
2529 #define ZCR_TOAST_SURFACE_V1_DESTROY 0
2530 #define ZCR_TOAST_SURFACE_V1_SET_POSITION 1
2531 #define ZCR_TOAST_SURFACE_V1_SET_SIZE 2
2532 #define ZCR_TOAST_SURFACE_V1_SET_BOUNDS_IN_OUTPUT 3
2533
2534
2535 /**
2536 * @ingroup iface_zcr_toast_surface_v1
2537 */
2538 #define ZCR_TOAST_SURFACE_V1_DESTROY_SINCE_VERSION 1
2539 /**
2540 * @ingroup iface_zcr_toast_surface_v1
2541 */
2542 #define ZCR_TOAST_SURFACE_V1_SET_POSITION_SINCE_VERSION 1
2543 /**
2544 * @ingroup iface_zcr_toast_surface_v1
2545 */
2546 #define ZCR_TOAST_SURFACE_V1_SET_SIZE_SINCE_VERSION 1
2547 /**
2548 * @ingroup iface_zcr_toast_surface_v1
2549 */
2550 #define ZCR_TOAST_SURFACE_V1_SET_BOUNDS_IN_OUTPUT_SINCE_VERSION 33
2551
2552 /** @ingroup iface_zcr_toast_surface_v1 */
2553 static inline void
zcr_toast_surface_v1_set_user_data(struct zcr_toast_surface_v1 * zcr_toast_surface_v1,void * user_data)2554 zcr_toast_surface_v1_set_user_data(struct zcr_toast_surface_v1 *zcr_toast_surface_v1, void *user_data)
2555 {
2556 wl_proxy_set_user_data((struct wl_proxy *) zcr_toast_surface_v1, user_data);
2557 }
2558
2559 /** @ingroup iface_zcr_toast_surface_v1 */
2560 static inline void *
zcr_toast_surface_v1_get_user_data(struct zcr_toast_surface_v1 * zcr_toast_surface_v1)2561 zcr_toast_surface_v1_get_user_data(struct zcr_toast_surface_v1 *zcr_toast_surface_v1)
2562 {
2563 return wl_proxy_get_user_data((struct wl_proxy *) zcr_toast_surface_v1);
2564 }
2565
2566 static inline uint32_t
zcr_toast_surface_v1_get_version(struct zcr_toast_surface_v1 * zcr_toast_surface_v1)2567 zcr_toast_surface_v1_get_version(struct zcr_toast_surface_v1 *zcr_toast_surface_v1)
2568 {
2569 return wl_proxy_get_version((struct wl_proxy *) zcr_toast_surface_v1);
2570 }
2571
2572 /**
2573 * @ingroup iface_zcr_toast_surface_v1
2574 *
2575 * Unmap and destroy the toast surface.
2576 */
2577 static inline void
zcr_toast_surface_v1_destroy(struct zcr_toast_surface_v1 * zcr_toast_surface_v1)2578 zcr_toast_surface_v1_destroy(struct zcr_toast_surface_v1 *zcr_toast_surface_v1)
2579 {
2580 wl_proxy_marshal_flags((struct wl_proxy *) zcr_toast_surface_v1,
2581 ZCR_TOAST_SURFACE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_toast_surface_v1), WL_MARSHAL_FLAG_DESTROY);
2582 }
2583
2584 /**
2585 * @ingroup iface_zcr_toast_surface_v1
2586 *
2587 * [Deprecated] Set the position of bounds of a window from the user's perspective.
2588 *
2589 * The bounds are double buffered, and will be applied at the
2590 * time wl_surface.commit of the corresponding wl_surface is called.
2591 *
2592 * Once the bounds are set, it is not possible to unset them, and they will
2593 * remain the same until set_position is called again, even if a new sub-
2594 * surface or buffer is attached.
2595 *
2596 * If never set, the compositor will determine the toast position.
2597 *
2598 * The bounds are relative to the given display. If the display is invalid,
2599 * they are assumed to be relative to the primary display.
2600 */
2601 static inline void
zcr_toast_surface_v1_set_position(struct zcr_toast_surface_v1 * zcr_toast_surface_v1,uint32_t display_id_hi,uint32_t display_id_lo,int32_t x,int32_t y)2602 zcr_toast_surface_v1_set_position(struct zcr_toast_surface_v1 *zcr_toast_surface_v1, uint32_t display_id_hi, uint32_t display_id_lo, int32_t x, int32_t y)
2603 {
2604 wl_proxy_marshal_flags((struct wl_proxy *) zcr_toast_surface_v1,
2605 ZCR_TOAST_SURFACE_V1_SET_POSITION, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_toast_surface_v1), 0, display_id_hi, display_id_lo, x, y);
2606 }
2607
2608 /**
2609 * @ingroup iface_zcr_toast_surface_v1
2610 *
2611 * [Deprecated] Set the size of bounds of a window from the user's perspective.
2612 *
2613 * The bounds are double buffered, and will be applied at the
2614 * time wl_surface.commit of the corresponding wl_surface is called.
2615 *
2616 * Once the bounds are set, it is not possible to unset them, and they will
2617 * remain the same until set_size is called again, even if a new sub-
2618 * surface or buffer is attached.
2619 *
2620 * If never set, the value is the surface content bounds. This updates
2621 * dynamically on every commit.
2622 *
2623 * The width and height must be greater than zero.
2624 */
2625 static inline void
zcr_toast_surface_v1_set_size(struct zcr_toast_surface_v1 * zcr_toast_surface_v1,int32_t width,int32_t height)2626 zcr_toast_surface_v1_set_size(struct zcr_toast_surface_v1 *zcr_toast_surface_v1, int32_t width, int32_t height)
2627 {
2628 wl_proxy_marshal_flags((struct wl_proxy *) zcr_toast_surface_v1,
2629 ZCR_TOAST_SURFACE_V1_SET_SIZE, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_toast_surface_v1), 0, width, height);
2630 }
2631
2632 /**
2633 * @ingroup iface_zcr_toast_surface_v1
2634 *
2635 * Set the bounds of a toast window from the user's perspective.
2636 *
2637 * The bounds are double buffered, and will be applied at the
2638 * time wl_surface.commit of the corresponding wl_surface is called.
2639 *
2640 * Once the bounds are set, it is not possible to unset them, and they will
2641 * remain the same until set_bounds is called again, even if a new sub-
2642 * surface or buffer is attached.
2643 *
2644 * If never set, the compositor will determine the toast position.
2645 *
2646 * The bounds are relative to the given display. If the display is invalid,
2647 * they are assumed to be relative to the primary display.
2648 */
2649 static inline void
zcr_toast_surface_v1_set_bounds_in_output(struct zcr_toast_surface_v1 * zcr_toast_surface_v1,struct wl_output * output,int32_t x,int32_t y,int32_t width,int32_t height)2650 zcr_toast_surface_v1_set_bounds_in_output(struct zcr_toast_surface_v1 *zcr_toast_surface_v1, struct wl_output *output, int32_t x, int32_t y, int32_t width, int32_t height)
2651 {
2652 wl_proxy_marshal_flags((struct wl_proxy *) zcr_toast_surface_v1,
2653 ZCR_TOAST_SURFACE_V1_SET_BOUNDS_IN_OUTPUT, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_toast_surface_v1), 0, output, x, y, width, height);
2654 }
2655
2656 #ifndef ZCR_REMOTE_OUTPUT_V1_SYSTEMUI_BEHAVIOR_ENUM
2657 #define ZCR_REMOTE_OUTPUT_V1_SYSTEMUI_BEHAVIOR_ENUM
2658 /**
2659 * @ingroup iface_zcr_remote_output_v1
2660 * systemui behavior
2661 *
2662 * Determine the behavior of the system UI.
2663 */
2664 enum zcr_remote_output_v1_systemui_behavior {
2665 /**
2666 * system ui is visible
2667 */
2668 ZCR_REMOTE_OUTPUT_V1_SYSTEMUI_BEHAVIOR_VISIBLE = 1,
2669 /**
2670 * system ui is autohide or hidden
2671 */
2672 ZCR_REMOTE_OUTPUT_V1_SYSTEMUI_BEHAVIOR_HIDDEN = 2,
2673 };
2674 #endif /* ZCR_REMOTE_OUTPUT_V1_SYSTEMUI_BEHAVIOR_ENUM */
2675
2676 /**
2677 * @ingroup iface_zcr_remote_output_v1
2678 * @struct zcr_remote_output_v1_listener
2679 */
2680 struct zcr_remote_output_v1_listener {
2681 /**
2682 * the identifier for the display
2683 *
2684 * [Deprecated] Sends the display identifier used by the server
2685 * for the display.
2686 * @since 29
2687 */
2688 void (*display_id)(void *data,
2689 struct zcr_remote_output_v1 *zcr_remote_output_v1,
2690 uint32_t display_id_hi,
2691 uint32_t display_id_lo);
2692 /**
2693 * the port of the display
2694 *
2695 * Sends the port to which the display is connected for the
2696 * server.
2697 * @since 29
2698 */
2699 void (*port)(void *data,
2700 struct zcr_remote_output_v1 *zcr_remote_output_v1,
2701 uint32_t port);
2702 /**
2703 * the identification data for the display
2704 *
2705 * Sends the identification data for the display, typically in
2706 * the EDID format.
2707 * @since 29
2708 */
2709 void (*identification_data)(void *data,
2710 struct zcr_remote_output_v1 *zcr_remote_output_v1,
2711 struct wl_array *identification_data);
2712 /**
2713 * insets for the display in pixels
2714 *
2715 * Sends inset information about a particular display in the
2716 * display's native coordinates.
2717 * @since 29
2718 */
2719 void (*insets)(void *data,
2720 struct zcr_remote_output_v1 *zcr_remote_output_v1,
2721 int32_t inset_left,
2722 int32_t inset_top,
2723 int32_t inset_right,
2724 int32_t inset_bottom);
2725 /**
2726 * stable insets for a display in pixels
2727 *
2728 * Sends stable inset information about a particular display in
2729 * the display's native coordinates.
2730 * @since 29
2731 */
2732 void (*stable_insets)(void *data,
2733 struct zcr_remote_output_v1 *zcr_remote_output_v1,
2734 int32_t stable_inset_left,
2735 int32_t stable_inset_top,
2736 int32_t stable_inset_right,
2737 int32_t stable_inset_bottom);
2738 /**
2739 * systemui_visibility_state for a display
2740 *
2741 * [Deprecated] Sends information about whether the systemui is
2742 * visible. The "systemui_visibility" value is of enum type
2743 * "systemui_visibility_state".
2744 * @param systemui_visibility systemui_visibility_state enum
2745 * @since 29
2746 */
2747 void (*systemui_visibility)(void *data,
2748 struct zcr_remote_output_v1 *zcr_remote_output_v1,
2749 int32_t systemui_visibility);
2750 /**
2751 * systemui_behavior_state for a display
2752 *
2753 * Sends information about whether the systemui behavior is auto
2754 * hide. The "systemui_behavior" value is of enum type
2755 * "systemui_behavior".
2756 * @param systemui_behavior systemui_behavior enum
2757 * @since 32
2758 */
2759 void (*systemui_behavior)(void *data,
2760 struct zcr_remote_output_v1 *zcr_remote_output_v1,
2761 int32_t systemui_behavior);
2762 };
2763
2764 /**
2765 * @ingroup iface_zcr_remote_output_v1
2766 */
2767 static inline int
zcr_remote_output_v1_add_listener(struct zcr_remote_output_v1 * zcr_remote_output_v1,const struct zcr_remote_output_v1_listener * listener,void * data)2768 zcr_remote_output_v1_add_listener(struct zcr_remote_output_v1 *zcr_remote_output_v1,
2769 const struct zcr_remote_output_v1_listener *listener, void *data)
2770 {
2771 return wl_proxy_add_listener((struct wl_proxy *) zcr_remote_output_v1,
2772 (void (**)(void)) listener, data);
2773 }
2774
2775 #define ZCR_REMOTE_OUTPUT_V1_DESTROY 0
2776
2777 /**
2778 * @ingroup iface_zcr_remote_output_v1
2779 */
2780 #define ZCR_REMOTE_OUTPUT_V1_DISPLAY_ID_SINCE_VERSION 29
2781 /**
2782 * @ingroup iface_zcr_remote_output_v1
2783 */
2784 #define ZCR_REMOTE_OUTPUT_V1_PORT_SINCE_VERSION 29
2785 /**
2786 * @ingroup iface_zcr_remote_output_v1
2787 */
2788 #define ZCR_REMOTE_OUTPUT_V1_IDENTIFICATION_DATA_SINCE_VERSION 29
2789 /**
2790 * @ingroup iface_zcr_remote_output_v1
2791 */
2792 #define ZCR_REMOTE_OUTPUT_V1_INSETS_SINCE_VERSION 29
2793 /**
2794 * @ingroup iface_zcr_remote_output_v1
2795 */
2796 #define ZCR_REMOTE_OUTPUT_V1_STABLE_INSETS_SINCE_VERSION 29
2797 /**
2798 * @ingroup iface_zcr_remote_output_v1
2799 */
2800 #define ZCR_REMOTE_OUTPUT_V1_SYSTEMUI_VISIBILITY_SINCE_VERSION 29
2801 /**
2802 * @ingroup iface_zcr_remote_output_v1
2803 */
2804 #define ZCR_REMOTE_OUTPUT_V1_SYSTEMUI_BEHAVIOR_SINCE_VERSION 32
2805
2806 /**
2807 * @ingroup iface_zcr_remote_output_v1
2808 */
2809 #define ZCR_REMOTE_OUTPUT_V1_DESTROY_SINCE_VERSION 29
2810
2811 /** @ingroup iface_zcr_remote_output_v1 */
2812 static inline void
zcr_remote_output_v1_set_user_data(struct zcr_remote_output_v1 * zcr_remote_output_v1,void * user_data)2813 zcr_remote_output_v1_set_user_data(struct zcr_remote_output_v1 *zcr_remote_output_v1, void *user_data)
2814 {
2815 wl_proxy_set_user_data((struct wl_proxy *) zcr_remote_output_v1, user_data);
2816 }
2817
2818 /** @ingroup iface_zcr_remote_output_v1 */
2819 static inline void *
zcr_remote_output_v1_get_user_data(struct zcr_remote_output_v1 * zcr_remote_output_v1)2820 zcr_remote_output_v1_get_user_data(struct zcr_remote_output_v1 *zcr_remote_output_v1)
2821 {
2822 return wl_proxy_get_user_data((struct wl_proxy *) zcr_remote_output_v1);
2823 }
2824
2825 static inline uint32_t
zcr_remote_output_v1_get_version(struct zcr_remote_output_v1 * zcr_remote_output_v1)2826 zcr_remote_output_v1_get_version(struct zcr_remote_output_v1 *zcr_remote_output_v1)
2827 {
2828 return wl_proxy_get_version((struct wl_proxy *) zcr_remote_output_v1);
2829 }
2830
2831 /**
2832 * @ingroup iface_zcr_remote_output_v1
2833 *
2834 * Destroy this remote_output object.
2835 */
2836 static inline void
zcr_remote_output_v1_destroy(struct zcr_remote_output_v1 * zcr_remote_output_v1)2837 zcr_remote_output_v1_destroy(struct zcr_remote_output_v1 *zcr_remote_output_v1)
2838 {
2839 wl_proxy_marshal_flags((struct wl_proxy *) zcr_remote_output_v1,
2840 ZCR_REMOTE_OUTPUT_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_remote_output_v1), WL_MARSHAL_FLAG_DESTROY);
2841 }
2842
2843 #ifdef __cplusplus
2844 }
2845 #endif
2846
2847 #endif
2848