6 #ifndef ZXDG_SHELL_V5_UNSTABLE_V5_CLIENT_PROTOCOL_H
7 #define ZXDG_SHELL_V5_UNSTABLE_V5_CLIENT_PROTOCOL_H
9 #include "wayland-client.h"
61 extern const struct wl_interface zxdg_shell_v5_interface;
111 extern const struct wl_interface zxdg_surface_v5_interface;
225 extern const struct wl_interface zxdg_popup_v5_interface;
227 #ifndef ZXDG_SHELL_V5_VERSION_ENUM
228 #define ZXDG_SHELL_V5_VERSION_ENUM
238 enum zxdg_shell_v5_version {
246 #ifndef ZXDG_SHELL_V5_ERROR_ENUM
247 #define ZXDG_SHELL_V5_ERROR_ENUM
248 enum zxdg_shell_v5_error {
252 ZXDG_SHELL_V5_ERROR_ROLE = 0,
256 ZXDG_SHELL_V5_ERROR_DEFUNCT_SURFACES = 1,
260 ZXDG_SHELL_V5_ERROR_NOT_THE_TOPMOST_POPUP = 2,
264 ZXDG_SHELL_V5_ERROR_INVALID_POPUP_PARENT = 3,
272 struct zxdg_shell_v5_listener {
289 void (*ping)(
void *data,
struct xdg_shell *xdg_shell, uint32_t serial);
295 static inline int zxdg_shell_v5_add_listener(
struct xdg_shell *xdg_shell,
const struct zxdg_shell_v5_listener *listener,
void *data)
297 return wl_proxy_add_listener((
struct wl_proxy *)xdg_shell, (
void (**)(
void))listener, data);
300 #define ZXDG_SHELL_V5_DESTROY 0
301 #define ZXDG_SHELL_V5_USE_UNSTABLE_VERSION 1
302 #define ZXDG_SHELL_V5_GET_ZXDG_SURFACE_V5 2
303 #define ZXDG_SHELL_V5_GET_ZXDG_POPUP_V5 3
304 #define ZXDG_SHELL_V5_PONG 4
309 #define ZXDG_SHELL_V5_PING_SINCE_VERSION 1
314 #define ZXDG_SHELL_V5_DESTROY_SINCE_VERSION 1
318 #define ZXDG_SHELL_V5_USE_UNSTABLE_VERSION_SINCE_VERSION 1
322 #define ZXDG_SHELL_V5_GET_ZXDG_SURFACE_V5_SINCE_VERSION 1
326 #define ZXDG_SHELL_V5_GET_ZXDG_POPUP_V5_SINCE_VERSION 1
330 #define ZXDG_SHELL_V5_PONG_SINCE_VERSION 1
333 static inline void zxdg_shell_v5_set_user_data(
struct xdg_shell *xdg_shell,
void *user_data)
335 wl_proxy_set_user_data((
struct wl_proxy *)xdg_shell, user_data);
339 static inline void *zxdg_shell_v5_get_user_data(
struct xdg_shell *xdg_shell)
341 return wl_proxy_get_user_data((
struct wl_proxy *)xdg_shell);
344 static inline uint32_t zxdg_shell_v5_get_version(
struct xdg_shell *xdg_shell)
346 return wl_proxy_get_version((
struct wl_proxy *)xdg_shell);
358 static inline void zxdg_shell_v5_destroy(
struct xdg_shell *xdg_shell)
360 wl_proxy_marshal((
struct wl_proxy *)xdg_shell, ZXDG_SHELL_V5_DESTROY);
362 wl_proxy_destroy((
struct wl_proxy *)xdg_shell);
374 static inline void zxdg_shell_v5_use_unstable_version(
struct xdg_shell *xdg_shell, int32_t version)
376 wl_proxy_marshal((
struct wl_proxy *)xdg_shell, ZXDG_SHELL_V5_USE_UNSTABLE_VERSION, version);
391 static inline struct xdg_surface *zxdg_shell_v5_get_xdg_surface(
struct xdg_shell *xdg_shell,
struct wl_surface *surface)
395 id = wl_proxy_marshal_constructor((
struct wl_proxy *)xdg_shell, ZXDG_SHELL_V5_GET_ZXDG_SURFACE_V5, &zxdg_surface_v5_interface, NULL, surface);
397 return (
struct xdg_surface *)id;
415 static inline struct xdg_popup *zxdg_shell_v5_get_xdg_popup(
struct xdg_shell *xdg_shell,
416 struct wl_surface *surface,
417 struct wl_surface *parent,
418 struct wl_seat *seat,
425 id = wl_proxy_marshal_constructor((
struct wl_proxy *)xdg_shell,
426 ZXDG_SHELL_V5_GET_ZXDG_POPUP_V5,
427 &zxdg_popup_v5_interface,
436 return (
struct xdg_popup *)id;
445 static inline void zxdg_shell_v5_pong(
struct xdg_shell *xdg_shell, uint32_t serial)
447 wl_proxy_marshal((
struct wl_proxy *)xdg_shell, ZXDG_SHELL_V5_PONG, serial);
450 #ifndef ZXDG_SURFACE_V5_RESIZE_EDGE_ENUM
451 #define ZXDG_SURFACE_V5_RESIZE_EDGE_ENUM
459 enum zxdg_surface_v5_resize_edge {
460 ZXDG_SURFACE_V5_RESIZE_EDGE_NONE = 0,
461 ZXDG_SURFACE_V5_RESIZE_EDGE_TOP = 1,
462 ZXDG_SURFACE_V5_RESIZE_EDGE_BOTTOM = 2,
463 ZXDG_SURFACE_V5_RESIZE_EDGE_LEFT = 4,
464 ZXDG_SURFACE_V5_RESIZE_EDGE_TOP_LEFT = 5,
465 ZXDG_SURFACE_V5_RESIZE_EDGE_BOTTOM_LEFT = 6,
466 ZXDG_SURFACE_V5_RESIZE_EDGE_RIGHT = 8,
467 ZXDG_SURFACE_V5_RESIZE_EDGE_TOP_RIGHT = 9,
468 ZXDG_SURFACE_V5_RESIZE_EDGE_BOTTOM_RIGHT = 10,
472 #ifndef ZXDG_SURFACE_V5_STATE_ENUM
473 #define ZXDG_SURFACE_V5_STATE_ENUM
482 enum zxdg_surface_v5_state {
506 struct zxdg_surface_v5_listener {
536 void (*
configure)(
void *data,
struct xdg_surface *xdg_surface, int32_t width, int32_t height,
struct wl_array *states, uint32_t serial);
549 void (*
close)(
void *data,
struct xdg_surface *xdg_surface);
555 static inline int zxdg_surface_v5_add_listener(
struct xdg_surface *xdg_surface,
const struct zxdg_surface_v5_listener *listener,
void *data)
557 return wl_proxy_add_listener((
struct wl_proxy *)xdg_surface, (
void (**)(
void))listener, data);
560 #define ZXDG_SURFACE_V5_DESTROY 0
561 #define ZXDG_SURFACE_V5_SET_PARENT 1
562 #define ZXDG_SURFACE_V5_SET_TITLE 2
563 #define ZXDG_SURFACE_V5_SET_APP_ID 3
564 #define ZXDG_SURFACE_V5_SHOW_WINDOW_MENU 4
565 #define ZXDG_SURFACE_V5_MOVE 5
566 #define ZXDG_SURFACE_V5_RESIZE 6
567 #define ZXDG_SURFACE_V5_ACK_CONFIGURE 7
568 #define ZXDG_SURFACE_V5_SET_WINDOW_GEOMETRY 8
569 #define ZXDG_SURFACE_V5_SET_MAXIMIZED 9
570 #define ZXDG_SURFACE_V5_UNSET_MAXIMIZED 10
571 #define ZXDG_SURFACE_V5_SET_FULLSCREEN 11
572 #define ZXDG_SURFACE_V5_UNSET_FULLSCREEN 12
573 #define ZXDG_SURFACE_V5_SET_MINIMIZED 13
578 #define ZXDG_SURFACE_V5_CONFIGURE_SINCE_VERSION 1
582 #define ZXDG_SURFACE_V5_CLOSE_SINCE_VERSION 1
587 #define ZXDG_SURFACE_V5_DESTROY_SINCE_VERSION 1
591 #define ZXDG_SURFACE_V5_SET_PARENT_SINCE_VERSION 1
595 #define ZXDG_SURFACE_V5_SET_TITLE_SINCE_VERSION 1
599 #define ZXDG_SURFACE_V5_SET_APP_ID_SINCE_VERSION 1
603 #define ZXDG_SURFACE_V5_SHOW_WINDOW_MENU_SINCE_VERSION 1
607 #define ZXDG_SURFACE_V5_MOVE_SINCE_VERSION 1
611 #define ZXDG_SURFACE_V5_RESIZE_SINCE_VERSION 1
615 #define ZXDG_SURFACE_V5_ACK_CONFIGURE_SINCE_VERSION 1
619 #define ZXDG_SURFACE_V5_SET_WINDOW_GEOMETRY_SINCE_VERSION 1
623 #define ZXDG_SURFACE_V5_SET_MAXIMIZED_SINCE_VERSION 1
627 #define ZXDG_SURFACE_V5_UNSET_MAXIMIZED_SINCE_VERSION 1
631 #define ZXDG_SURFACE_V5_SET_FULLSCREEN_SINCE_VERSION 1
635 #define ZXDG_SURFACE_V5_UNSET_FULLSCREEN_SINCE_VERSION 1
639 #define ZXDG_SURFACE_V5_SET_MINIMIZED_SINCE_VERSION 1
642 static inline void zxdg_surface_v5_set_user_data(
struct xdg_surface *xdg_surface,
void *user_data)
644 wl_proxy_set_user_data((
struct wl_proxy *)xdg_surface, user_data);
648 static inline void *zxdg_surface_v5_get_user_data(
struct xdg_surface *xdg_surface)
650 return wl_proxy_get_user_data((
struct wl_proxy *)xdg_surface);
653 static inline uint32_t zxdg_surface_v5_get_version(
struct xdg_surface *xdg_surface)
655 return wl_proxy_get_version((
struct wl_proxy *)xdg_surface);
665 static inline void zxdg_surface_v5_destroy(
struct xdg_surface *xdg_surface)
667 wl_proxy_marshal((
struct wl_proxy *)xdg_surface, ZXDG_SURFACE_V5_DESTROY);
669 wl_proxy_destroy((
struct wl_proxy *)xdg_surface);
683 static inline void zxdg_surface_v5_set_parent(
struct xdg_surface *xdg_surface,
struct xdg_surface *parent)
685 wl_proxy_marshal((
struct wl_proxy *)xdg_surface, ZXDG_SURFACE_V5_SET_PARENT, parent);
699 static inline void zxdg_surface_v5_set_title(
struct xdg_surface *xdg_surface,
const char *title)
701 wl_proxy_marshal((
struct wl_proxy *)xdg_surface, ZXDG_SURFACE_V5_SET_TITLE, title);
728 static inline void zxdg_surface_v5_set_app_id(
struct xdg_surface *xdg_surface,
const char *app_id)
730 wl_proxy_marshal((
struct wl_proxy *)xdg_surface, ZXDG_SURFACE_V5_SET_APP_ID, app_id);
748 static inline void zxdg_surface_v5_show_window_menu(
struct xdg_surface *xdg_surface,
struct wl_seat *seat, uint32_t serial, int32_t x, int32_t y)
750 wl_proxy_marshal((
struct wl_proxy *)xdg_surface, ZXDG_SURFACE_V5_SHOW_WINDOW_MENU, seat, serial, x, y);
773 static inline void zxdg_surface_v5_move(
struct xdg_surface *xdg_surface,
struct wl_seat *seat, uint32_t serial)
775 wl_proxy_marshal((
struct wl_proxy *)xdg_surface, ZXDG_SURFACE_V5_MOVE, seat, serial);
812 static inline void zxdg_surface_v5_resize(
struct xdg_surface *xdg_surface,
struct wl_seat *seat, uint32_t serial, uint32_t edges)
814 wl_proxy_marshal((
struct wl_proxy *)xdg_surface, ZXDG_SURFACE_V5_RESIZE, seat, serial, edges);
840 static inline void zxdg_surface_v5_ack_configure(
struct xdg_surface *xdg_surface, uint32_t serial)
842 wl_proxy_marshal((
struct wl_proxy *)xdg_surface, ZXDG_SURFACE_V5_ACK_CONFIGURE, serial);
874 static inline void zxdg_surface_v5_set_window_geometry(
struct xdg_surface *xdg_surface, int32_t x, int32_t y, int32_t width, int32_t height)
876 wl_proxy_marshal((
struct wl_proxy *)xdg_surface, ZXDG_SURFACE_V5_SET_WINDOW_GEOMETRY, x, y, width, height);
899 static inline void zxdg_surface_v5_set_maximized(
struct xdg_surface *xdg_surface)
901 wl_proxy_marshal((
struct wl_proxy *)xdg_surface, ZXDG_SURFACE_V5_SET_MAXIMIZED);
925 static inline void zxdg_surface_v5_unset_maximized(
struct xdg_surface *xdg_surface)
927 wl_proxy_marshal((
struct wl_proxy *)xdg_surface, ZXDG_SURFACE_V5_UNSET_MAXIMIZED);
943 static inline void zxdg_surface_v5_set_fullscreen(
struct xdg_surface *xdg_surface,
struct wl_output *output)
945 wl_proxy_marshal((
struct wl_proxy *)xdg_surface, ZXDG_SURFACE_V5_SET_FULLSCREEN, output);
951 static inline void zxdg_surface_v5_unset_fullscreen(
struct xdg_surface *xdg_surface)
953 wl_proxy_marshal((
struct wl_proxy *)xdg_surface, ZXDG_SURFACE_V5_UNSET_FULLSCREEN);
968 static inline void zxdg_surface_v5_set_minimized(
struct xdg_surface *xdg_surface)
970 wl_proxy_marshal((
struct wl_proxy *)xdg_surface, ZXDG_SURFACE_V5_SET_MINIMIZED);
977 struct zxdg_popup_v5_listener {
985 void (*popup_done)(
void *data,
struct xdg_popup *xdg_popup);
991 static inline int zxdg_popup_v5_add_listener(
struct xdg_popup *xdg_popup,
const struct zxdg_popup_v5_listener *listener,
void *data)
993 return wl_proxy_add_listener((
struct wl_proxy *)xdg_popup, (
void (**)(
void))listener, data);
996 #define ZXDG_POPUP_V5_DESTROY 0
1001 #define ZXDG_POPUP_V5_POPUP_DONE_SINCE_VERSION 1
1006 #define ZXDG_POPUP_V5_DESTROY_SINCE_VERSION 1
1009 static inline void zxdg_popup_v5_set_user_data(
struct xdg_popup *xdg_popup,
void *user_data)
1011 wl_proxy_set_user_data((
struct wl_proxy *)xdg_popup, user_data);
1015 static inline void *zxdg_popup_v5_get_user_data(
struct xdg_popup *xdg_popup)
1017 return wl_proxy_get_user_data((
struct wl_proxy *)xdg_popup);
1020 static inline uint32_t zxdg_popup_v5_get_version(
struct xdg_popup *xdg_popup)
1022 return wl_proxy_get_version((
struct wl_proxy *)xdg_popup);
1034 static inline void zxdg_popup_v5_destroy(
struct xdg_popup *xdg_popup)
1036 wl_proxy_marshal((
struct wl_proxy *)xdg_popup, ZXDG_POPUP_V5_DESTROY);
1038 wl_proxy_destroy((
struct wl_proxy *)xdg_popup);