3 #ifndef XDG_SHELL_CLIENT_PROTOCOL_H
4 #define XDG_SHELL_CLIENT_PROTOCOL_H
8 #include "wayland-client.h"
56 struct xdg_positioner;
61 #ifndef XDG_WM_BASE_INTERFACE
62 #define XDG_WM_BASE_INTERFACE
86 #ifndef XDG_POSITIONER_INTERFACE
87 #define XDG_POSITIONER_INTERFACE
139 #ifndef XDG_SURFACE_INTERFACE
140 #define XDG_SURFACE_INTERFACE
232 #ifndef XDG_TOPLEVEL_INTERFACE
233 #define XDG_TOPLEVEL_INTERFACE
273 #ifndef XDG_POPUP_INTERFACE
274 #define XDG_POPUP_INTERFACE
355 #ifndef XDG_WM_BASE_ERROR_ENUM
356 #define XDG_WM_BASE_ERROR_ENUM
408 struct xdg_wm_base *xdg_wm_base,
419 return wl_proxy_add_listener((
struct wl_proxy *) xdg_wm_base,
420 (
void (**)(
void)) listener,
data);
423 #define XDG_WM_BASE_DESTROY 0
424 #define XDG_WM_BASE_CREATE_POSITIONER 1
425 #define XDG_WM_BASE_GET_XDG_SURFACE 2
426 #define XDG_WM_BASE_PONG 3
431 #define XDG_WM_BASE_PING_SINCE_VERSION 1
436 #define XDG_WM_BASE_DESTROY_SINCE_VERSION 1
440 #define XDG_WM_BASE_CREATE_POSITIONER_SINCE_VERSION 1
444 #define XDG_WM_BASE_GET_XDG_SURFACE_SINCE_VERSION 1
448 #define XDG_WM_BASE_PONG_SINCE_VERSION 1
454 wl_proxy_set_user_data((
struct wl_proxy *) xdg_wm_base, user_data);
461 return wl_proxy_get_user_data((
struct wl_proxy *) xdg_wm_base);
467 return wl_proxy_get_version((
struct wl_proxy *) xdg_wm_base);
482 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_wm_base,
493 static inline struct xdg_positioner *
498 id = wl_proxy_marshal_flags((
struct wl_proxy *) xdg_wm_base,
501 return (
struct xdg_positioner *)
id;
519 static inline struct xdg_surface *
524 id = wl_proxy_marshal_flags((
struct wl_proxy *) xdg_wm_base,
527 return (
struct xdg_surface *)
id;
539 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_wm_base,
543 #ifndef XDG_POSITIONER_ERROR_ENUM
544 #define XDG_POSITIONER_ERROR_ENUM
553 #ifndef XDG_POSITIONER_ANCHOR_ENUM
554 #define XDG_POSITIONER_ANCHOR_ENUM
568 #ifndef XDG_POSITIONER_GRAVITY_ENUM
569 #define XDG_POSITIONER_GRAVITY_ENUM
583 #ifndef XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_ENUM
584 #define XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_ENUM
691 #define XDG_POSITIONER_DESTROY 0
692 #define XDG_POSITIONER_SET_SIZE 1
693 #define XDG_POSITIONER_SET_ANCHOR_RECT 2
694 #define XDG_POSITIONER_SET_ANCHOR 3
695 #define XDG_POSITIONER_SET_GRAVITY 4
696 #define XDG_POSITIONER_SET_CONSTRAINT_ADJUSTMENT 5
697 #define XDG_POSITIONER_SET_OFFSET 6
703 #define XDG_POSITIONER_DESTROY_SINCE_VERSION 1
707 #define XDG_POSITIONER_SET_SIZE_SINCE_VERSION 1
711 #define XDG_POSITIONER_SET_ANCHOR_RECT_SINCE_VERSION 1
715 #define XDG_POSITIONER_SET_ANCHOR_SINCE_VERSION 1
719 #define XDG_POSITIONER_SET_GRAVITY_SINCE_VERSION 1
723 #define XDG_POSITIONER_SET_CONSTRAINT_ADJUSTMENT_SINCE_VERSION 1
727 #define XDG_POSITIONER_SET_OFFSET_SINCE_VERSION 1
733 wl_proxy_set_user_data((
struct wl_proxy *) xdg_positioner, user_data);
740 return wl_proxy_get_user_data((
struct wl_proxy *) xdg_positioner);
746 return wl_proxy_get_version((
struct wl_proxy *) xdg_positioner);
757 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_positioner,
773 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_positioner,
794 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_positioner,
811 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_positioner,
828 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_positioner,
852 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_positioner,
874 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_positioner,
878 #ifndef XDG_SURFACE_ERROR_ENUM
879 #define XDG_SURFACE_ERROR_ENUM
917 struct xdg_surface *xdg_surface,
928 return wl_proxy_add_listener((
struct wl_proxy *) xdg_surface,
929 (
void (**)(
void)) listener,
data);
932 #define XDG_SURFACE_DESTROY 0
933 #define XDG_SURFACE_GET_TOPLEVEL 1
934 #define XDG_SURFACE_GET_POPUP 2
935 #define XDG_SURFACE_SET_WINDOW_GEOMETRY 3
936 #define XDG_SURFACE_ACK_CONFIGURE 4
941 #define XDG_SURFACE_CONFIGURE_SINCE_VERSION 1
946 #define XDG_SURFACE_DESTROY_SINCE_VERSION 1
950 #define XDG_SURFACE_GET_TOPLEVEL_SINCE_VERSION 1
954 #define XDG_SURFACE_GET_POPUP_SINCE_VERSION 1
958 #define XDG_SURFACE_SET_WINDOW_GEOMETRY_SINCE_VERSION 1
962 #define XDG_SURFACE_ACK_CONFIGURE_SINCE_VERSION 1
968 wl_proxy_set_user_data((
struct wl_proxy *) xdg_surface, user_data);
975 return wl_proxy_get_user_data((
struct wl_proxy *) xdg_surface);
981 return wl_proxy_get_version((
struct wl_proxy *) xdg_surface);
993 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_surface,
1006 static inline struct xdg_toplevel *
1009 struct wl_proxy *
id;
1011 id = wl_proxy_marshal_flags((
struct wl_proxy *) xdg_surface,
1014 return (
struct xdg_toplevel *)
id;
1029 static inline struct xdg_popup *
1032 struct wl_proxy *
id;
1034 id = wl_proxy_marshal_flags((
struct wl_proxy *) xdg_surface,
1037 return (
struct xdg_popup *)
id;
1076 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_surface,
1106 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_surface,
1110 #ifndef XDG_TOPLEVEL_RESIZE_EDGE_ENUM
1111 #define XDG_TOPLEVEL_RESIZE_EDGE_ENUM
1132 #ifndef XDG_TOPLEVEL_STATE_ENUM
1133 #define XDG_TOPLEVEL_STATE_ENUM
1219 struct xdg_toplevel *xdg_toplevel,
1222 struct wl_array *states);
1236 struct xdg_toplevel *xdg_toplevel);
1246 return wl_proxy_add_listener((
struct wl_proxy *) xdg_toplevel,
1247 (
void (**)(
void)) listener,
data);
1250 #define XDG_TOPLEVEL_DESTROY 0
1251 #define XDG_TOPLEVEL_SET_PARENT 1
1252 #define XDG_TOPLEVEL_SET_TITLE 2
1253 #define XDG_TOPLEVEL_SET_APP_ID 3
1254 #define XDG_TOPLEVEL_SHOW_WINDOW_MENU 4
1255 #define XDG_TOPLEVEL_MOVE 5
1256 #define XDG_TOPLEVEL_RESIZE 6
1257 #define XDG_TOPLEVEL_SET_MAX_SIZE 7
1258 #define XDG_TOPLEVEL_SET_MIN_SIZE 8
1259 #define XDG_TOPLEVEL_SET_MAXIMIZED 9
1260 #define XDG_TOPLEVEL_UNSET_MAXIMIZED 10
1261 #define XDG_TOPLEVEL_SET_FULLSCREEN 11
1262 #define XDG_TOPLEVEL_UNSET_FULLSCREEN 12
1263 #define XDG_TOPLEVEL_SET_MINIMIZED 13
1268 #define XDG_TOPLEVEL_CONFIGURE_SINCE_VERSION 1
1272 #define XDG_TOPLEVEL_CLOSE_SINCE_VERSION 1
1277 #define XDG_TOPLEVEL_DESTROY_SINCE_VERSION 1
1281 #define XDG_TOPLEVEL_SET_PARENT_SINCE_VERSION 1
1285 #define XDG_TOPLEVEL_SET_TITLE_SINCE_VERSION 1
1289 #define XDG_TOPLEVEL_SET_APP_ID_SINCE_VERSION 1
1293 #define XDG_TOPLEVEL_SHOW_WINDOW_MENU_SINCE_VERSION 1
1297 #define XDG_TOPLEVEL_MOVE_SINCE_VERSION 1
1301 #define XDG_TOPLEVEL_RESIZE_SINCE_VERSION 1
1305 #define XDG_TOPLEVEL_SET_MAX_SIZE_SINCE_VERSION 1
1309 #define XDG_TOPLEVEL_SET_MIN_SIZE_SINCE_VERSION 1
1313 #define XDG_TOPLEVEL_SET_MAXIMIZED_SINCE_VERSION 1
1317 #define XDG_TOPLEVEL_UNSET_MAXIMIZED_SINCE_VERSION 1
1321 #define XDG_TOPLEVEL_SET_FULLSCREEN_SINCE_VERSION 1
1325 #define XDG_TOPLEVEL_UNSET_FULLSCREEN_SINCE_VERSION 1
1329 #define XDG_TOPLEVEL_SET_MINIMIZED_SINCE_VERSION 1
1335 wl_proxy_set_user_data((
struct wl_proxy *) xdg_toplevel, user_data);
1339 static inline void *
1342 return wl_proxy_get_user_data((
struct wl_proxy *) xdg_toplevel);
1348 return wl_proxy_get_version((
struct wl_proxy *) xdg_toplevel);
1360 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_toplevel,
1387 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_toplevel,
1405 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_toplevel,
1436 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_toplevel,
1458 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_toplevel,
1485 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_toplevel,
1526 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_toplevel,
1571 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_toplevel,
1616 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_toplevel,
1647 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_toplevel,
1679 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_toplevel,
1713 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_toplevel,
1740 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_toplevel,
1759 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_toplevel,
1763 #ifndef XDG_POPUP_ERROR_ENUM
1764 #define XDG_POPUP_ERROR_ENUM
1794 struct xdg_popup *xdg_popup,
1807 struct xdg_popup *xdg_popup);
1817 return wl_proxy_add_listener((
struct wl_proxy *) xdg_popup,
1818 (
void (**)(
void)) listener,
data);
1821 #define XDG_POPUP_DESTROY 0
1822 #define XDG_POPUP_GRAB 1
1827 #define XDG_POPUP_CONFIGURE_SINCE_VERSION 1
1831 #define XDG_POPUP_POPUP_DONE_SINCE_VERSION 1
1836 #define XDG_POPUP_DESTROY_SINCE_VERSION 1
1840 #define XDG_POPUP_GRAB_SINCE_VERSION 1
1846 wl_proxy_set_user_data((
struct wl_proxy *) xdg_popup, user_data);
1850 static inline void *
1853 return wl_proxy_get_user_data((
struct wl_proxy *) xdg_popup);
1859 return wl_proxy_get_version((
struct wl_proxy *) xdg_popup);
1874 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_popup,
1875 XDG_POPUP_DESTROY,
NULL, wl_proxy_get_version((
struct wl_proxy *) xdg_popup), WL_MARSHAL_FLAG_DESTROY);
1926 wl_proxy_marshal_flags((
struct wl_proxy *) xdg_popup,
1927 XDG_POPUP_GRAB,
NULL, wl_proxy_get_version((
struct wl_proxy *) xdg_popup), 0, seat, serial);