EHS
xdg-shell-client-protocol.h
Go to the documentation of this file.
1/* Generated by wayland-scanner 1.22.0 */
2
3#ifndef XDG_SHELL_CLIENT_PROTOCOL_H
4#define XDG_SHELL_CLIENT_PROTOCOL_H
5
6#include <cstdint>
7#include <cstddef>
8#include "wayland-client.h"
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
52struct wl_output;
53struct wl_seat;
54struct wl_surface;
55struct xdg_popup;
56struct xdg_positioner;
57struct xdg_surface;
58struct xdg_toplevel;
59struct xdg_wm_base;
60
61#ifndef XDG_WM_BASE_INTERFACE
62#define XDG_WM_BASE_INTERFACE
84extern const struct wl_interface xdg_wm_base_interface;
85#endif
86#ifndef XDG_POSITIONER_INTERFACE
87#define XDG_POSITIONER_INTERFACE
137extern const struct wl_interface xdg_positioner_interface;
138#endif
139#ifndef XDG_SURFACE_INTERFACE
140#define XDG_SURFACE_INTERFACE
246extern const struct wl_interface xdg_surface_interface;
247#endif
248#ifndef XDG_TOPLEVEL_INTERFACE
249#define XDG_TOPLEVEL_INTERFACE
295extern const struct wl_interface xdg_toplevel_interface;
296#endif
297#ifndef XDG_POPUP_INTERFACE
298#define XDG_POPUP_INTERFACE
358extern const struct wl_interface xdg_popup_interface;
359#endif
360
361#ifndef XDG_WM_BASE_ERROR_ENUM
362#define XDG_WM_BASE_ERROR_ENUM
392};
393#endif /* XDG_WM_BASE_ERROR_ENUM */
394
419 void (*ping)(void *data,
420 struct xdg_wm_base *xdg_wm_base,
421 uint32_t serial);
422};
423
427static inline int
428xdg_wm_base_add_listener(struct xdg_wm_base *xdg_wm_base,
429 const struct xdg_wm_base_listener *listener, void *data)
430{
431 return wl_proxy_add_listener((struct wl_proxy *) xdg_wm_base,
432 (void (**)(void)) listener, data);
433}
434
435#define XDG_WM_BASE_DESTROY 0
436#define XDG_WM_BASE_CREATE_POSITIONER 1
437#define XDG_WM_BASE_GET_XDG_SURFACE 2
438#define XDG_WM_BASE_PONG 3
439
443#define XDG_WM_BASE_PING_SINCE_VERSION 1
444
448#define XDG_WM_BASE_DESTROY_SINCE_VERSION 1
452#define XDG_WM_BASE_CREATE_POSITIONER_SINCE_VERSION 1
456#define XDG_WM_BASE_GET_XDG_SURFACE_SINCE_VERSION 1
460#define XDG_WM_BASE_PONG_SINCE_VERSION 1
461
463static inline void
464xdg_wm_base_set_user_data(struct xdg_wm_base *xdg_wm_base, void *user_data)
465{
466 wl_proxy_set_user_data((struct wl_proxy *) xdg_wm_base, user_data);
467}
468
470static inline void *
471xdg_wm_base_get_user_data(struct xdg_wm_base *xdg_wm_base)
472{
473 return wl_proxy_get_user_data((struct wl_proxy *) xdg_wm_base);
474}
475
476static inline uint32_t
477xdg_wm_base_get_version(struct xdg_wm_base *xdg_wm_base)
478{
479 return wl_proxy_get_version((struct wl_proxy *) xdg_wm_base);
480}
481
491static inline void
492xdg_wm_base_destroy(struct xdg_wm_base *xdg_wm_base)
493{
494 wl_proxy_marshal_flags((struct wl_proxy *) xdg_wm_base,
495 XDG_WM_BASE_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_wm_base), WL_MARSHAL_FLAG_DESTROY);
496}
497
505static inline struct xdg_positioner *
506xdg_wm_base_create_positioner(struct xdg_wm_base *xdg_wm_base)
507{
508 struct wl_proxy *id;
509
510 id = wl_proxy_marshal_flags((struct wl_proxy *) xdg_wm_base,
511 XDG_WM_BASE_CREATE_POSITIONER, &xdg_positioner_interface, wl_proxy_get_version((struct wl_proxy *) xdg_wm_base), 0, NULL);
512
513 return (struct xdg_positioner *) id;
514}
515
533static inline struct xdg_surface *
534xdg_wm_base_get_xdg_surface(struct xdg_wm_base *xdg_wm_base, struct wl_surface *surface)
535{
536 struct wl_proxy *id;
537
538 id = wl_proxy_marshal_flags((struct wl_proxy *) xdg_wm_base,
539 XDG_WM_BASE_GET_XDG_SURFACE, &xdg_surface_interface, wl_proxy_get_version((struct wl_proxy *) xdg_wm_base), 0, NULL, surface);
540
541 return (struct xdg_surface *) id;
542}
543
551static inline void
552xdg_wm_base_pong(struct xdg_wm_base *xdg_wm_base, uint32_t serial)
553{
554 wl_proxy_marshal_flags((struct wl_proxy *) xdg_wm_base,
555 XDG_WM_BASE_PONG, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_wm_base), 0, serial);
556}
557
558#ifndef XDG_POSITIONER_ERROR_ENUM
559#define XDG_POSITIONER_ERROR_ENUM
565};
566#endif /* XDG_POSITIONER_ERROR_ENUM */
567
568#ifndef XDG_POSITIONER_ANCHOR_ENUM
569#define XDG_POSITIONER_ANCHOR_ENUM
580};
581#endif /* XDG_POSITIONER_ANCHOR_ENUM */
582
583#ifndef XDG_POSITIONER_GRAVITY_ENUM
584#define XDG_POSITIONER_GRAVITY_ENUM
595};
596#endif /* XDG_POSITIONER_GRAVITY_ENUM */
597
598#ifndef XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_ENUM
599#define XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_ENUM
703};
704#endif /* XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_ENUM */
705
706#define XDG_POSITIONER_DESTROY 0
707#define XDG_POSITIONER_SET_SIZE 1
708#define XDG_POSITIONER_SET_ANCHOR_RECT 2
709#define XDG_POSITIONER_SET_ANCHOR 3
710#define XDG_POSITIONER_SET_GRAVITY 4
711#define XDG_POSITIONER_SET_CONSTRAINT_ADJUSTMENT 5
712#define XDG_POSITIONER_SET_OFFSET 6
713#define XDG_POSITIONER_SET_REACTIVE 7
714#define XDG_POSITIONER_SET_PARENT_SIZE 8
715#define XDG_POSITIONER_SET_PARENT_CONFIGURE 9
716
717
721#define XDG_POSITIONER_DESTROY_SINCE_VERSION 1
725#define XDG_POSITIONER_SET_SIZE_SINCE_VERSION 1
729#define XDG_POSITIONER_SET_ANCHOR_RECT_SINCE_VERSION 1
733#define XDG_POSITIONER_SET_ANCHOR_SINCE_VERSION 1
737#define XDG_POSITIONER_SET_GRAVITY_SINCE_VERSION 1
741#define XDG_POSITIONER_SET_CONSTRAINT_ADJUSTMENT_SINCE_VERSION 1
745#define XDG_POSITIONER_SET_OFFSET_SINCE_VERSION 1
749#define XDG_POSITIONER_SET_REACTIVE_SINCE_VERSION 3
753#define XDG_POSITIONER_SET_PARENT_SIZE_SINCE_VERSION 3
757#define XDG_POSITIONER_SET_PARENT_CONFIGURE_SINCE_VERSION 3
758
760static inline void
761xdg_positioner_set_user_data(struct xdg_positioner *xdg_positioner, void *user_data)
762{
763 wl_proxy_set_user_data((struct wl_proxy *) xdg_positioner, user_data);
764}
765
767static inline void *
768xdg_positioner_get_user_data(struct xdg_positioner *xdg_positioner)
769{
770 return wl_proxy_get_user_data((struct wl_proxy *) xdg_positioner);
771}
772
773static inline uint32_t
774xdg_positioner_get_version(struct xdg_positioner *xdg_positioner)
775{
776 return wl_proxy_get_version((struct wl_proxy *) xdg_positioner);
777}
778
784static inline void
785xdg_positioner_destroy(struct xdg_positioner *xdg_positioner)
786{
787 wl_proxy_marshal_flags((struct wl_proxy *) xdg_positioner,
788 XDG_POSITIONER_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), WL_MARSHAL_FLAG_DESTROY);
789}
790
800static inline void
801xdg_positioner_set_size(struct xdg_positioner *xdg_positioner, int32_t width, int32_t height)
802{
803 wl_proxy_marshal_flags((struct wl_proxy *) xdg_positioner,
804 XDG_POSITIONER_SET_SIZE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), 0, width, height);
805}
806
821static inline void
822xdg_positioner_set_anchor_rect(struct xdg_positioner *xdg_positioner, int32_t x, int32_t y, int32_t width, int32_t height)
823{
824 wl_proxy_marshal_flags((struct wl_proxy *) xdg_positioner,
825 XDG_POSITIONER_SET_ANCHOR_RECT, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), 0, x, y, width, height);
826}
827
838static inline void
839xdg_positioner_set_anchor(struct xdg_positioner *xdg_positioner, uint32_t anchor)
840{
841 wl_proxy_marshal_flags((struct wl_proxy *) xdg_positioner,
842 XDG_POSITIONER_SET_ANCHOR, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), 0, anchor);
843}
844
856static inline void
857xdg_positioner_set_gravity(struct xdg_positioner *xdg_positioner, uint32_t gravity)
858{
859 wl_proxy_marshal_flags((struct wl_proxy *) xdg_positioner,
860 XDG_POSITIONER_SET_GRAVITY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), 0, gravity);
861}
862
880static inline void
881xdg_positioner_set_constraint_adjustment(struct xdg_positioner *xdg_positioner, uint32_t constraint_adjustment)
882{
883 wl_proxy_marshal_flags((struct wl_proxy *) xdg_positioner,
884 XDG_POSITIONER_SET_CONSTRAINT_ADJUSTMENT, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), 0, constraint_adjustment);
885}
886
902static inline void
903xdg_positioner_set_offset(struct xdg_positioner *xdg_positioner, int32_t x, int32_t y)
904{
905 wl_proxy_marshal_flags((struct wl_proxy *) xdg_positioner,
906 XDG_POSITIONER_SET_OFFSET, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), 0, x, y);
907}
908
919static inline void
920xdg_positioner_set_reactive(struct xdg_positioner *xdg_positioner)
921{
922 wl_proxy_marshal_flags((struct wl_proxy *) xdg_positioner,
923 XDG_POSITIONER_SET_REACTIVE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), 0);
924}
925
937static inline void
938xdg_positioner_set_parent_size(struct xdg_positioner *xdg_positioner, int32_t parent_width, int32_t parent_height)
939{
940 wl_proxy_marshal_flags((struct wl_proxy *) xdg_positioner,
941 XDG_POSITIONER_SET_PARENT_SIZE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), 0, parent_width, parent_height);
942}
943
952static inline void
953xdg_positioner_set_parent_configure(struct xdg_positioner *xdg_positioner, uint32_t serial)
954{
955 wl_proxy_marshal_flags((struct wl_proxy *) xdg_positioner,
956 XDG_POSITIONER_SET_PARENT_CONFIGURE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_positioner), 0, serial);
957}
958
959#ifndef XDG_SURFACE_ERROR_ENUM
960#define XDG_SURFACE_ERROR_ENUM
986};
987#endif /* XDG_SURFACE_ERROR_ENUM */
988
1018 void (*configure)(void *data,
1019 struct xdg_surface *xdg_surface,
1020 uint32_t serial);
1021};
1022
1026static inline int
1027xdg_surface_add_listener(struct xdg_surface *xdg_surface,
1028 const struct xdg_surface_listener *listener, void *data)
1029{
1030 return wl_proxy_add_listener((struct wl_proxy *) xdg_surface,
1031 (void (**)(void)) listener, data);
1032}
1033
1034#define XDG_SURFACE_DESTROY 0
1035#define XDG_SURFACE_GET_TOPLEVEL 1
1036#define XDG_SURFACE_GET_POPUP 2
1037#define XDG_SURFACE_SET_WINDOW_GEOMETRY 3
1038#define XDG_SURFACE_ACK_CONFIGURE 4
1039
1043#define XDG_SURFACE_CONFIGURE_SINCE_VERSION 1
1044
1048#define XDG_SURFACE_DESTROY_SINCE_VERSION 1
1052#define XDG_SURFACE_GET_TOPLEVEL_SINCE_VERSION 1
1056#define XDG_SURFACE_GET_POPUP_SINCE_VERSION 1
1060#define XDG_SURFACE_SET_WINDOW_GEOMETRY_SINCE_VERSION 1
1064#define XDG_SURFACE_ACK_CONFIGURE_SINCE_VERSION 1
1065
1067static inline void
1068xdg_surface_set_user_data(struct xdg_surface *xdg_surface, void *user_data)
1069{
1070 wl_proxy_set_user_data((struct wl_proxy *) xdg_surface, user_data);
1071}
1072
1074static inline void *
1075xdg_surface_get_user_data(struct xdg_surface *xdg_surface)
1076{
1077 return wl_proxy_get_user_data((struct wl_proxy *) xdg_surface);
1078}
1079
1080static inline uint32_t
1081xdg_surface_get_version(struct xdg_surface *xdg_surface)
1082{
1083 return wl_proxy_get_version((struct wl_proxy *) xdg_surface);
1084}
1085
1093static inline void
1094xdg_surface_destroy(struct xdg_surface *xdg_surface)
1095{
1096 wl_proxy_marshal_flags((struct wl_proxy *) xdg_surface,
1097 XDG_SURFACE_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_surface), WL_MARSHAL_FLAG_DESTROY);
1098}
1099
1109static inline struct xdg_toplevel *
1110xdg_surface_get_toplevel(struct xdg_surface *xdg_surface)
1111{
1112 struct wl_proxy *id;
1113
1114 id = wl_proxy_marshal_flags((struct wl_proxy *) xdg_surface,
1115 XDG_SURFACE_GET_TOPLEVEL, &xdg_toplevel_interface, wl_proxy_get_version((struct wl_proxy *) xdg_surface), 0, NULL);
1116
1117 return (struct xdg_toplevel *) id;
1118}
1119
1132static inline struct xdg_popup *
1133xdg_surface_get_popup(struct xdg_surface *xdg_surface, struct xdg_surface *parent, struct xdg_positioner *positioner)
1134{
1135 struct wl_proxy *id;
1136
1137 id = wl_proxy_marshal_flags((struct wl_proxy *) xdg_surface,
1138 XDG_SURFACE_GET_POPUP, &xdg_popup_interface, wl_proxy_get_version((struct wl_proxy *) xdg_surface), 0, NULL, parent, positioner);
1139
1140 return (struct xdg_popup *) id;
1141}
1142
1185static inline void
1186xdg_surface_set_window_geometry(struct xdg_surface *xdg_surface, int32_t x, int32_t y, int32_t width, int32_t height)
1187{
1188 wl_proxy_marshal_flags((struct wl_proxy *) xdg_surface,
1189 XDG_SURFACE_SET_WINDOW_GEOMETRY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_surface), 0, x, y, width, height);
1190}
1191
1228static inline void
1229xdg_surface_ack_configure(struct xdg_surface *xdg_surface, uint32_t serial)
1230{
1231 wl_proxy_marshal_flags((struct wl_proxy *) xdg_surface,
1232 XDG_SURFACE_ACK_CONFIGURE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_surface), 0, serial);
1233}
1234
1235#ifndef XDG_TOPLEVEL_ERROR_ENUM
1236#define XDG_TOPLEVEL_ERROR_ENUM
1250};
1251#endif /* XDG_TOPLEVEL_ERROR_ENUM */
1252
1253#ifndef XDG_TOPLEVEL_RESIZE_EDGE_ENUM
1254#define XDG_TOPLEVEL_RESIZE_EDGE_ENUM
1272};
1273#endif /* XDG_TOPLEVEL_RESIZE_EDGE_ENUM */
1274
1275#ifndef XDG_TOPLEVEL_STATE_ENUM
1276#define XDG_TOPLEVEL_STATE_ENUM
1373};
1377#define XDG_TOPLEVEL_STATE_TILED_LEFT_SINCE_VERSION 2
1381#define XDG_TOPLEVEL_STATE_TILED_RIGHT_SINCE_VERSION 2
1385#define XDG_TOPLEVEL_STATE_TILED_TOP_SINCE_VERSION 2
1389#define XDG_TOPLEVEL_STATE_TILED_BOTTOM_SINCE_VERSION 2
1393#define XDG_TOPLEVEL_STATE_SUSPENDED_SINCE_VERSION 6
1394#endif /* XDG_TOPLEVEL_STATE_ENUM */
1395
1396#ifndef XDG_TOPLEVEL_WM_CAPABILITIES_ENUM
1397#define XDG_TOPLEVEL_WM_CAPABILITIES_ENUM
1415};
1416#endif /* XDG_TOPLEVEL_WM_CAPABILITIES_ENUM */
1417
1448 void (*configure)(void *data,
1449 struct xdg_toplevel *xdg_toplevel,
1450 int32_t width,
1451 int32_t height,
1452 struct wl_array *states);
1465 void (*close)(void *data,
1466 struct xdg_toplevel *xdg_toplevel);
1488 void (*configure_bounds)(void *data,
1489 struct xdg_toplevel *xdg_toplevel,
1490 int32_t width,
1491 int32_t height);
1519 void (*wm_capabilities)(void *data,
1520 struct xdg_toplevel *xdg_toplevel,
1521 struct wl_array *capabilities);
1522};
1523
1527static inline int
1528xdg_toplevel_add_listener(struct xdg_toplevel *xdg_toplevel,
1529 const struct xdg_toplevel_listener *listener, void *data)
1530{
1531 return wl_proxy_add_listener((struct wl_proxy *) xdg_toplevel,
1532 (void (**)(void)) listener, data);
1533}
1534
1535#define XDG_TOPLEVEL_DESTROY 0
1536#define XDG_TOPLEVEL_SET_PARENT 1
1537#define XDG_TOPLEVEL_SET_TITLE 2
1538#define XDG_TOPLEVEL_SET_APP_ID 3
1539#define XDG_TOPLEVEL_SHOW_WINDOW_MENU 4
1540#define XDG_TOPLEVEL_MOVE 5
1541#define XDG_TOPLEVEL_RESIZE 6
1542#define XDG_TOPLEVEL_SET_MAX_SIZE 7
1543#define XDG_TOPLEVEL_SET_MIN_SIZE 8
1544#define XDG_TOPLEVEL_SET_MAXIMIZED 9
1545#define XDG_TOPLEVEL_UNSET_MAXIMIZED 10
1546#define XDG_TOPLEVEL_SET_FULLSCREEN 11
1547#define XDG_TOPLEVEL_UNSET_FULLSCREEN 12
1548#define XDG_TOPLEVEL_SET_MINIMIZED 13
1549
1553#define XDG_TOPLEVEL_CONFIGURE_SINCE_VERSION 1
1557#define XDG_TOPLEVEL_CLOSE_SINCE_VERSION 1
1561#define XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION 4
1565#define XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION 5
1566
1570#define XDG_TOPLEVEL_DESTROY_SINCE_VERSION 1
1574#define XDG_TOPLEVEL_SET_PARENT_SINCE_VERSION 1
1578#define XDG_TOPLEVEL_SET_TITLE_SINCE_VERSION 1
1582#define XDG_TOPLEVEL_SET_APP_ID_SINCE_VERSION 1
1586#define XDG_TOPLEVEL_SHOW_WINDOW_MENU_SINCE_VERSION 1
1590#define XDG_TOPLEVEL_MOVE_SINCE_VERSION 1
1594#define XDG_TOPLEVEL_RESIZE_SINCE_VERSION 1
1598#define XDG_TOPLEVEL_SET_MAX_SIZE_SINCE_VERSION 1
1602#define XDG_TOPLEVEL_SET_MIN_SIZE_SINCE_VERSION 1
1606#define XDG_TOPLEVEL_SET_MAXIMIZED_SINCE_VERSION 1
1610#define XDG_TOPLEVEL_UNSET_MAXIMIZED_SINCE_VERSION 1
1614#define XDG_TOPLEVEL_SET_FULLSCREEN_SINCE_VERSION 1
1618#define XDG_TOPLEVEL_UNSET_FULLSCREEN_SINCE_VERSION 1
1622#define XDG_TOPLEVEL_SET_MINIMIZED_SINCE_VERSION 1
1623
1625static inline void
1626xdg_toplevel_set_user_data(struct xdg_toplevel *xdg_toplevel, void *user_data)
1627{
1628 wl_proxy_set_user_data((struct wl_proxy *) xdg_toplevel, user_data);
1629}
1630
1632static inline void *
1633xdg_toplevel_get_user_data(struct xdg_toplevel *xdg_toplevel)
1634{
1635 return wl_proxy_get_user_data((struct wl_proxy *) xdg_toplevel);
1636}
1637
1638static inline uint32_t
1639xdg_toplevel_get_version(struct xdg_toplevel *xdg_toplevel)
1640{
1641 return wl_proxy_get_version((struct wl_proxy *) xdg_toplevel);
1642}
1643
1650static inline void
1651xdg_toplevel_destroy(struct xdg_toplevel *xdg_toplevel)
1652{
1653 wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel,
1654 XDG_TOPLEVEL_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), WL_MARSHAL_FLAG_DESTROY);
1655}
1656
1681static inline void
1682xdg_toplevel_set_parent(struct xdg_toplevel *xdg_toplevel, struct xdg_toplevel *parent)
1683{
1684 wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel,
1685 XDG_TOPLEVEL_SET_PARENT, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0, parent);
1686}
1687
1699static inline void
1700xdg_toplevel_set_title(struct xdg_toplevel *xdg_toplevel, const char *title)
1701{
1702 wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel,
1703 XDG_TOPLEVEL_SET_TITLE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0, title);
1704}
1705
1733static inline void
1734xdg_toplevel_set_app_id(struct xdg_toplevel *xdg_toplevel, const char *app_id)
1735{
1736 wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel,
1737 XDG_TOPLEVEL_SET_APP_ID, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0, app_id);
1738}
1739
1756static inline void
1757xdg_toplevel_show_window_menu(struct xdg_toplevel *xdg_toplevel, struct wl_seat *seat, uint32_t serial, int32_t x, int32_t y)
1758{
1759 wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel,
1760 XDG_TOPLEVEL_SHOW_WINDOW_MENU, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0, seat, serial, x, y);
1761}
1762
1783static inline void
1784xdg_toplevel_move(struct xdg_toplevel *xdg_toplevel, struct wl_seat *seat, uint32_t serial)
1785{
1786 wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel,
1787 XDG_TOPLEVEL_MOVE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0, seat, serial);
1788}
1789
1825static inline void
1826xdg_toplevel_resize(struct xdg_toplevel *xdg_toplevel, struct wl_seat *seat, uint32_t serial, uint32_t edges)
1827{
1828 wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel,
1829 XDG_TOPLEVEL_RESIZE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0, seat, serial, edges);
1830}
1831
1870static inline void
1871xdg_toplevel_set_max_size(struct xdg_toplevel *xdg_toplevel, int32_t width, int32_t height)
1872{
1873 wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel,
1874 XDG_TOPLEVEL_SET_MAX_SIZE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0, width, height);
1875}
1876
1915static inline void
1916xdg_toplevel_set_min_size(struct xdg_toplevel *xdg_toplevel, int32_t width, int32_t height)
1917{
1918 wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel,
1919 XDG_TOPLEVEL_SET_MIN_SIZE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0, width, height);
1920}
1921
1945static inline void
1946xdg_toplevel_set_maximized(struct xdg_toplevel *xdg_toplevel)
1947{
1948 wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel,
1949 XDG_TOPLEVEL_SET_MAXIMIZED, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0);
1950}
1951
1977static inline void
1978xdg_toplevel_unset_maximized(struct xdg_toplevel *xdg_toplevel)
1979{
1980 wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel,
1981 XDG_TOPLEVEL_UNSET_MAXIMIZED, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0);
1982}
1983
2011static inline void
2012xdg_toplevel_set_fullscreen(struct xdg_toplevel *xdg_toplevel, struct wl_output *output)
2013{
2014 wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel,
2015 XDG_TOPLEVEL_SET_FULLSCREEN, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0, output);
2016}
2017
2039static inline void
2040xdg_toplevel_unset_fullscreen(struct xdg_toplevel *xdg_toplevel)
2041{
2042 wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel,
2043 XDG_TOPLEVEL_UNSET_FULLSCREEN, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0);
2044}
2045
2058static inline void
2059xdg_toplevel_set_minimized(struct xdg_toplevel *xdg_toplevel)
2060{
2061 wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel,
2062 XDG_TOPLEVEL_SET_MINIMIZED, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel), 0);
2063}
2064
2065#ifndef XDG_POPUP_ERROR_ENUM
2066#define XDG_POPUP_ERROR_ENUM
2072};
2073#endif /* XDG_POPUP_ERROR_ENUM */
2074
2101 void (*configure)(void *data,
2102 struct xdg_popup *xdg_popup,
2103 int32_t x,
2104 int32_t y,
2105 int32_t width,
2106 int32_t height);
2114 void (*popup_done)(void *data,
2115 struct xdg_popup *xdg_popup);
2139 void (*repositioned)(void *data,
2140 struct xdg_popup *xdg_popup,
2141 uint32_t token);
2142};
2143
2147static inline int
2148xdg_popup_add_listener(struct xdg_popup *xdg_popup,
2149 const struct xdg_popup_listener *listener, void *data)
2150{
2151 return wl_proxy_add_listener((struct wl_proxy *) xdg_popup,
2152 (void (**)(void)) listener, data);
2153}
2154
2155#define XDG_POPUP_DESTROY 0
2156#define XDG_POPUP_GRAB 1
2157#define XDG_POPUP_REPOSITION 2
2158
2162#define XDG_POPUP_CONFIGURE_SINCE_VERSION 1
2166#define XDG_POPUP_POPUP_DONE_SINCE_VERSION 1
2170#define XDG_POPUP_REPOSITIONED_SINCE_VERSION 3
2171
2175#define XDG_POPUP_DESTROY_SINCE_VERSION 1
2179#define XDG_POPUP_GRAB_SINCE_VERSION 1
2183#define XDG_POPUP_REPOSITION_SINCE_VERSION 3
2184
2186static inline void
2187xdg_popup_set_user_data(struct xdg_popup *xdg_popup, void *user_data)
2188{
2189 wl_proxy_set_user_data((struct wl_proxy *) xdg_popup, user_data);
2190}
2191
2193static inline void *
2194xdg_popup_get_user_data(struct xdg_popup *xdg_popup)
2195{
2196 return wl_proxy_get_user_data((struct wl_proxy *) xdg_popup);
2197}
2198
2199static inline uint32_t
2200xdg_popup_get_version(struct xdg_popup *xdg_popup)
2201{
2202 return wl_proxy_get_version((struct wl_proxy *) xdg_popup);
2203}
2204
2214static inline void
2215xdg_popup_destroy(struct xdg_popup *xdg_popup)
2216{
2217 wl_proxy_marshal_flags((struct wl_proxy *) xdg_popup,
2218 XDG_POPUP_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_popup), WL_MARSHAL_FLAG_DESTROY);
2219}
2220
2262static inline void
2263xdg_popup_grab(struct xdg_popup *xdg_popup, struct wl_seat *seat, uint32_t serial)
2264{
2265 wl_proxy_marshal_flags((struct wl_proxy *) xdg_popup,
2266 XDG_POPUP_GRAB, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_popup), 0, seat, serial);
2267}
2268
2296static inline void
2297xdg_popup_reposition(struct xdg_popup *xdg_popup, struct xdg_positioner *positioner, uint32_t token)
2298{
2299 wl_proxy_marshal_flags((struct wl_proxy *) xdg_popup,
2300 XDG_POPUP_REPOSITION, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_popup), 0, positioner, token);
2301}
2302
2303#ifdef __cplusplus
2304}
2305#endif
2306
2307#endif
xdg_positioner_constraint_adjustment
Definition: xdg-shell-client-protocol.h:616
@ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_Y
Definition: xdg-shell-client-protocol.h:657
@ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X
Definition: xdg-shell-client-protocol.h:640
@ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_X
Definition: xdg-shell-client-protocol.h:695
@ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y
Definition: xdg-shell-client-protocol.h:688
@ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_NONE
Definition: xdg-shell-client-protocol.h:623
@ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_X
Definition: xdg-shell-client-protocol.h:670
@ XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_Y
Definition: xdg-shell-client-protocol.h:702
xdg_toplevel_resize_edge
Definition: xdg-shell-client-protocol.h:1262
xdg_toplevel_state
Definition: xdg-shell-client-protocol.h:1289
@ XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM
Definition: xdg-shell-client-protocol.h:1265
@ XDG_TOPLEVEL_RESIZE_EDGE_RIGHT
Definition: xdg-shell-client-protocol.h:1269
@ XDG_TOPLEVEL_RESIZE_EDGE_TOP_RIGHT
Definition: xdg-shell-client-protocol.h:1270
@ XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM_RIGHT
Definition: xdg-shell-client-protocol.h:1271
@ XDG_TOPLEVEL_RESIZE_EDGE_TOP_LEFT
Definition: xdg-shell-client-protocol.h:1267
@ XDG_TOPLEVEL_RESIZE_EDGE_NONE
Definition: xdg-shell-client-protocol.h:1263
@ XDG_TOPLEVEL_RESIZE_EDGE_LEFT
Definition: xdg-shell-client-protocol.h:1266
@ XDG_TOPLEVEL_RESIZE_EDGE_TOP
Definition: xdg-shell-client-protocol.h:1264
@ XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM_LEFT
Definition: xdg-shell-client-protocol.h:1268
@ XDG_TOPLEVEL_STATE_MAXIMIZED
Definition: xdg-shell-client-protocol.h:1301
@ XDG_TOPLEVEL_STATE_TILED_RIGHT
Definition: xdg-shell-client-protocol.h:1347
@ XDG_TOPLEVEL_STATE_TILED_LEFT
Definition: xdg-shell-client-protocol.h:1339
@ XDG_TOPLEVEL_STATE_SUSPENDED
Definition: xdg-shell-client-protocol.h:1372
@ XDG_TOPLEVEL_STATE_TILED_BOTTOM
Definition: xdg-shell-client-protocol.h:1363
@ XDG_TOPLEVEL_STATE_TILED_TOP
Definition: xdg-shell-client-protocol.h:1355
@ XDG_TOPLEVEL_STATE_ACTIVATED
Definition: xdg-shell-client-protocol.h:1331
@ XDG_TOPLEVEL_STATE_FULLSCREEN
Definition: xdg-shell-client-protocol.h:1312
@ XDG_TOPLEVEL_STATE_RESIZING
Definition: xdg-shell-client-protocol.h:1322
Definition: xdg-shell-client-protocol.h:2079
void(* configure)(void *data, struct xdg_popup *xdg_popup, int32_t x, int32_t y, int32_t width, int32_t height)
Definition: xdg-shell-client-protocol.h:2101
void(* repositioned)(void *data, struct xdg_popup *xdg_popup, uint32_t token)
Definition: xdg-shell-client-protocol.h:2139
void(* popup_done)(void *data, struct xdg_popup *xdg_popup)
Definition: xdg-shell-client-protocol.h:2114
Definition: xdg-shell-client-protocol.h:993
void(* configure)(void *data, struct xdg_surface *xdg_surface, uint32_t serial)
Definition: xdg-shell-client-protocol.h:1018
Definition: xdg-shell-client-protocol.h:1422
void(* wm_capabilities)(void *data, struct xdg_toplevel *xdg_toplevel, struct wl_array *capabilities)
Definition: xdg-shell-client-protocol.h:1519
void(* configure_bounds)(void *data, struct xdg_toplevel *xdg_toplevel, int32_t width, int32_t height)
Definition: xdg-shell-client-protocol.h:1488
void(* configure)(void *data, struct xdg_toplevel *xdg_toplevel, int32_t width, int32_t height, struct wl_array *states)
Definition: xdg-shell-client-protocol.h:1448
void(* close)(void *data, struct xdg_toplevel *xdg_toplevel)
Definition: xdg-shell-client-protocol.h:1465
Definition: xdg-shell-client-protocol.h:399
void(* ping)(void *data, struct xdg_wm_base *xdg_wm_base, uint32_t serial)
Definition: xdg-shell-client-protocol.h:419
#define XDG_TOPLEVEL_RESIZE
Definition: xdg-shell-client-protocol.h:1541
#define XDG_TOPLEVEL_UNSET_MAXIMIZED
Definition: xdg-shell-client-protocol.h:1545
#define XDG_POSITIONER_SET_ANCHOR
Definition: xdg-shell-client-protocol.h:709
xdg_surface_error
Definition: xdg-shell-client-protocol.h:961
@ XDG_SURFACE_ERROR_INVALID_SERIAL
Definition: xdg-shell-client-protocol.h:977
@ XDG_SURFACE_ERROR_NOT_CONSTRUCTED
Definition: xdg-shell-client-protocol.h:965
@ XDG_SURFACE_ERROR_DEFUNCT_ROLE_OBJECT
Definition: xdg-shell-client-protocol.h:985
@ XDG_SURFACE_ERROR_ALREADY_CONSTRUCTED
Definition: xdg-shell-client-protocol.h:969
@ XDG_SURFACE_ERROR_UNCONFIGURED_BUFFER
Definition: xdg-shell-client-protocol.h:973
@ XDG_SURFACE_ERROR_INVALID_SIZE
Definition: xdg-shell-client-protocol.h:981
#define XDG_SURFACE_GET_TOPLEVEL
Definition: xdg-shell-client-protocol.h:1035
const struct wl_interface xdg_positioner_interface
Definition: xdg-shell-protocol.c:112
#define XDG_POSITIONER_SET_GRAVITY
Definition: xdg-shell-client-protocol.h:710
#define XDG_TOPLEVEL_UNSET_FULLSCREEN
Definition: xdg-shell-client-protocol.h:1547
#define XDG_POPUP_DESTROY
Definition: xdg-shell-client-protocol.h:2155
#define XDG_POSITIONER_DESTROY
Definition: xdg-shell-client-protocol.h:706
#define XDG_POPUP_GRAB
Definition: xdg-shell-client-protocol.h:2156
#define XDG_TOPLEVEL_SET_PARENT
Definition: xdg-shell-client-protocol.h:1536
const struct wl_interface xdg_wm_base_interface
Definition: xdg-shell-protocol.c:93
#define XDG_TOPLEVEL_SET_MINIMIZED
Definition: xdg-shell-client-protocol.h:1548
#define XDG_TOPLEVEL_SET_APP_ID
Definition: xdg-shell-client-protocol.h:1538
xdg_positioner_anchor
Definition: xdg-shell-client-protocol.h:570
@ XDG_POSITIONER_ANCHOR_TOP_RIGHT
Definition: xdg-shell-client-protocol.h:578
@ XDG_POSITIONER_ANCHOR_BOTTOM
Definition: xdg-shell-client-protocol.h:573
@ XDG_POSITIONER_ANCHOR_TOP_LEFT
Definition: xdg-shell-client-protocol.h:576
@ XDG_POSITIONER_ANCHOR_RIGHT
Definition: xdg-shell-client-protocol.h:575
@ XDG_POSITIONER_ANCHOR_TOP
Definition: xdg-shell-client-protocol.h:572
@ XDG_POSITIONER_ANCHOR_LEFT
Definition: xdg-shell-client-protocol.h:574
@ XDG_POSITIONER_ANCHOR_BOTTOM_LEFT
Definition: xdg-shell-client-protocol.h:577
@ XDG_POSITIONER_ANCHOR_BOTTOM_RIGHT
Definition: xdg-shell-client-protocol.h:579
@ XDG_POSITIONER_ANCHOR_NONE
Definition: xdg-shell-client-protocol.h:571
#define XDG_WM_BASE_GET_XDG_SURFACE
Definition: xdg-shell-client-protocol.h:437
const struct wl_interface xdg_toplevel_interface
Definition: xdg-shell-protocol.c:160
xdg_toplevel_wm_capabilities
Definition: xdg-shell-client-protocol.h:1398
@ XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN
Definition: xdg-shell-client-protocol.h:1410
@ XDG_TOPLEVEL_WM_CAPABILITIES_MAXIMIZE
Definition: xdg-shell-client-protocol.h:1406
@ XDG_TOPLEVEL_WM_CAPABILITIES_MINIMIZE
Definition: xdg-shell-client-protocol.h:1414
@ XDG_TOPLEVEL_WM_CAPABILITIES_WINDOW_MENU
Definition: xdg-shell-client-protocol.h:1402
#define XDG_POSITIONER_SET_CONSTRAINT_ADJUSTMENT
Definition: xdg-shell-client-protocol.h:711
xdg_wm_base_error
Definition: xdg-shell-client-protocol.h:363
@ XDG_WM_BASE_ERROR_INVALID_POSITIONER
Definition: xdg-shell-client-protocol.h:387
@ XDG_WM_BASE_ERROR_INVALID_POPUP_PARENT
Definition: xdg-shell-client-protocol.h:379
@ XDG_WM_BASE_ERROR_DEFUNCT_SURFACES
Definition: xdg-shell-client-protocol.h:371
@ XDG_WM_BASE_ERROR_UNRESPONSIVE
Definition: xdg-shell-client-protocol.h:391
@ XDG_WM_BASE_ERROR_INVALID_SURFACE_STATE
Definition: xdg-shell-client-protocol.h:383
@ XDG_WM_BASE_ERROR_NOT_THE_TOPMOST_POPUP
Definition: xdg-shell-client-protocol.h:375
@ XDG_WM_BASE_ERROR_ROLE
Definition: xdg-shell-client-protocol.h:367
const struct wl_interface xdg_surface_interface
Definition: xdg-shell-protocol.c:130
#define XDG_POSITIONER_SET_SIZE
Definition: xdg-shell-client-protocol.h:707
#define XDG_TOPLEVEL_DESTROY
Definition: xdg-shell-client-protocol.h:1535
#define XDG_TOPLEVEL_SET_MAXIMIZED
Definition: xdg-shell-client-protocol.h:1544
#define XDG_TOPLEVEL_SET_TITLE
Definition: xdg-shell-client-protocol.h:1537
xdg_popup_error
Definition: xdg-shell-client-protocol.h:2067
@ XDG_POPUP_ERROR_INVALID_GRAB
Definition: xdg-shell-client-protocol.h:2071
#define XDG_TOPLEVEL_SET_MAX_SIZE
Definition: xdg-shell-client-protocol.h:1542
#define XDG_SURFACE_SET_WINDOW_GEOMETRY
Definition: xdg-shell-client-protocol.h:1037
#define XDG_POSITIONER_SET_ANCHOR_RECT
Definition: xdg-shell-client-protocol.h:708
xdg_toplevel_error
Definition: xdg-shell-client-protocol.h:1237
@ XDG_TOPLEVEL_ERROR_INVALID_PARENT
Definition: xdg-shell-client-protocol.h:1245
@ XDG_TOPLEVEL_ERROR_INVALID_SIZE
Definition: xdg-shell-client-protocol.h:1249
@ XDG_TOPLEVEL_ERROR_INVALID_RESIZE_EDGE
Definition: xdg-shell-client-protocol.h:1241
xdg_positioner_gravity
Definition: xdg-shell-client-protocol.h:585
@ XDG_POSITIONER_GRAVITY_LEFT
Definition: xdg-shell-client-protocol.h:589
@ XDG_POSITIONER_GRAVITY_BOTTOM_RIGHT
Definition: xdg-shell-client-protocol.h:594
@ XDG_POSITIONER_GRAVITY_NONE
Definition: xdg-shell-client-protocol.h:586
@ XDG_POSITIONER_GRAVITY_RIGHT
Definition: xdg-shell-client-protocol.h:590
@ XDG_POSITIONER_GRAVITY_BOTTOM_LEFT
Definition: xdg-shell-client-protocol.h:592
@ XDG_POSITIONER_GRAVITY_TOP
Definition: xdg-shell-client-protocol.h:587
@ XDG_POSITIONER_GRAVITY_BOTTOM
Definition: xdg-shell-client-protocol.h:588
@ XDG_POSITIONER_GRAVITY_TOP_LEFT
Definition: xdg-shell-client-protocol.h:591
@ XDG_POSITIONER_GRAVITY_TOP_RIGHT
Definition: xdg-shell-client-protocol.h:593
#define XDG_POPUP_REPOSITION
Definition: xdg-shell-client-protocol.h:2157
#define XDG_TOPLEVEL_MOVE
Definition: xdg-shell-client-protocol.h:1540
#define XDG_POSITIONER_SET_REACTIVE
Definition: xdg-shell-client-protocol.h:713
#define XDG_SURFACE_ACK_CONFIGURE
Definition: xdg-shell-client-protocol.h:1038
const struct wl_interface xdg_popup_interface
Definition: xdg-shell-protocol.c:178
#define XDG_POSITIONER_SET_PARENT_CONFIGURE
Definition: xdg-shell-client-protocol.h:715
xdg_positioner_error
Definition: xdg-shell-client-protocol.h:560
@ XDG_POSITIONER_ERROR_INVALID_INPUT
Definition: xdg-shell-client-protocol.h:564
#define XDG_TOPLEVEL_SET_FULLSCREEN
Definition: xdg-shell-client-protocol.h:1546
#define XDG_WM_BASE_PONG
Definition: xdg-shell-client-protocol.h:438
#define XDG_POSITIONER_SET_OFFSET
Definition: xdg-shell-client-protocol.h:712
#define XDG_TOPLEVEL_SHOW_WINDOW_MENU
Definition: xdg-shell-client-protocol.h:1539
#define XDG_SURFACE_GET_POPUP
Definition: xdg-shell-client-protocol.h:1036
#define XDG_TOPLEVEL_SET_MIN_SIZE
Definition: xdg-shell-client-protocol.h:1543
#define XDG_SURFACE_DESTROY
Definition: xdg-shell-client-protocol.h:1034
#define XDG_WM_BASE_CREATE_POSITIONER
Definition: xdg-shell-client-protocol.h:436
#define XDG_WM_BASE_DESTROY
Definition: xdg-shell-client-protocol.h:435
#define XDG_POSITIONER_SET_PARENT_SIZE
Definition: xdg-shell-client-protocol.h:714