Wayland++  0.2.10
C++ Bindings for Wayland
wayland-client-protocol-extra.hpp
1 #pragma once
2 
3 #include <array>
4 #include <functional>
5 #include <memory>
6 #include <string>
7 #include <vector>
8 
9 #include <wayland-client.hpp>
10 
11 struct wp_presentation;
12 struct wp_presentation_feedback;
13 struct wp_viewporter;
14 struct wp_viewport;
15 struct xdg_wm_base;
16 struct xdg_positioner;
17 struct xdg_surface;
18 struct xdg_toplevel;
19 struct xdg_popup;
20 
21 namespace wayland
22 {
23 class presentation_t;
24 enum class presentation_error : uint32_t;
25 class presentation_feedback_t;
26 struct presentation_feedback_kind;
27 class viewporter_t;
28 enum class viewporter_error : uint32_t;
29 class viewport_t;
30 enum class viewport_error : uint32_t;
31 class xdg_wm_base_t;
32 enum class xdg_wm_base_error : uint32_t;
33 class xdg_positioner_t;
34 enum class xdg_positioner_error : uint32_t;
35 enum class xdg_positioner_anchor : uint32_t;
36 enum class xdg_positioner_gravity : uint32_t;
37 struct xdg_positioner_constraint_adjustment;
38 class xdg_surface_t;
39 enum class xdg_surface_error : uint32_t;
40 class xdg_toplevel_t;
41 enum class xdg_toplevel_error : uint32_t;
42 struct xdg_toplevel_resize_edge;
43 enum class xdg_toplevel_state : uint32_t;
44 class xdg_popup_t;
45 enum class xdg_popup_error : uint32_t;
46 
47 namespace detail
48 {
49  extern const wl_interface presentation_interface;
50  extern const wl_interface presentation_feedback_interface;
51  extern const wl_interface viewporter_interface;
52  extern const wl_interface viewport_interface;
53  extern const wl_interface xdg_wm_base_interface;
54  extern const wl_interface xdg_positioner_interface;
55  extern const wl_interface xdg_surface_interface;
56  extern const wl_interface xdg_toplevel_interface;
57  extern const wl_interface xdg_popup_interface;
58 }
59 
76 class presentation_t : public proxy_t
77 {
78 private:
79  struct events_t : public detail::events_base_t
80  {
81  std::function<void(uint32_t)> clock_id;
82  };
83 
84  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
85 
86  presentation_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
87 
88 public:
90  explicit presentation_t(const proxy_t &proxy);
91  presentation_t(wp_presentation *p, wrapper_type t = wrapper_type::standard);
92 
93  presentation_t proxy_create_wrapper();
94 
95  static const std::string interface_name;
96 
97  operator wp_presentation*() const;
98 
114 
117  static constexpr std::uint32_t feedback_since_version = 1;
118 
153  std::function<void(uint32_t)> &on_clock_id();
154 
155 };
156 
163 enum class presentation_error : uint32_t
164  {
166  invalid_timestamp = 0,
168  invalid_flag = 1
169 };
170 
171 
188 {
189 private:
190  struct events_t : public detail::events_base_t
191  {
192  std::function<void(output_t)> sync_output;
193  std::function<void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, presentation_feedback_kind)> presented;
194  std::function<void()> discarded;
195  };
196 
197  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
198 
199  presentation_feedback_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
200 
201 public:
203  explicit presentation_feedback_t(const proxy_t &proxy);
204  presentation_feedback_t(wp_presentation_feedback *p, wrapper_type t = wrapper_type::standard);
205 
206  presentation_feedback_t proxy_create_wrapper();
207 
208  static const std::string interface_name;
209 
210  operator wp_presentation_feedback*() const;
211 
225  std::function<void(output_t)> &on_sync_output();
226 
279  std::function<void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, presentation_feedback_kind)> &on_presented();
280 
286  std::function<void()> &on_discarded();
287 
288 };
289 
298 struct presentation_feedback_kind : public detail::bitfield<4, 1>
299 {
300  presentation_feedback_kind(const detail::bitfield<4, 1> &b)
301  : detail::bitfield<4, 1>(b) {}
302  presentation_feedback_kind(const uint32_t value)
303  : detail::bitfield<4, 1>(value) {}
304  static const detail::bitfield<4, 1> vsync;
305  static const detail::bitfield<4, 1> hw_clock;
306  static const detail::bitfield<4, 1> hw_completion;
307  static const detail::bitfield<4, 1> zero_copy;
308 };
309 
310 
321 class viewporter_t : public proxy_t
322 {
323 private:
324  struct events_t : public detail::events_base_t
325  {
326  };
327 
328  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
329 
330  viewporter_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
331 
332 public:
333  viewporter_t();
334  explicit viewporter_t(const proxy_t &proxy);
335  viewporter_t(wp_viewporter *p, wrapper_type t = wrapper_type::standard);
336 
337  viewporter_t proxy_create_wrapper();
338 
339  static const std::string interface_name;
340 
341  operator wp_viewporter*() const;
342 
353  viewport_t get_viewport(surface_t const& surface);
354 
357  static constexpr std::uint32_t get_viewport_since_version = 1;
358 
359 };
360 
364 enum class viewporter_error : uint32_t
365  {
367  viewport_exists = 0
368 };
369 
370 
436 class viewport_t : public proxy_t
437 {
438 private:
439  struct events_t : public detail::events_base_t
440  {
441  };
442 
443  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
444 
445  viewport_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
446 
447 public:
448  viewport_t();
449  explicit viewport_t(const proxy_t &proxy);
450  viewport_t(wp_viewport *p, wrapper_type t = wrapper_type::standard);
451 
452  viewport_t proxy_create_wrapper();
453 
454  static const std::string interface_name;
455 
456  operator wp_viewport*() const;
457 
477  void set_source(double x, double y, double width, double height);
478 
481  static constexpr std::uint32_t set_source_since_version = 1;
482 
500  void set_destination(int32_t width, int32_t height);
501 
504  static constexpr std::uint32_t set_destination_since_version = 1;
505 
506 };
507 
511 enum class viewport_error : uint32_t
512  {
514  bad_value = 0,
516  bad_size = 1,
518  out_of_buffer = 2,
520  no_surface = 3
521 };
522 
523 
533 class xdg_wm_base_t : public proxy_t
534 {
535 private:
536  struct events_t : public detail::events_base_t
537  {
538  std::function<void(uint32_t)> ping;
539  };
540 
541  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
542 
543  xdg_wm_base_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
544 
545 public:
546  xdg_wm_base_t();
547  explicit xdg_wm_base_t(const proxy_t &proxy);
549 
550  xdg_wm_base_t proxy_create_wrapper();
551 
552  static const std::string interface_name;
553 
554  operator xdg_wm_base*() const;
555 
564 
567  static constexpr std::uint32_t create_positioner_since_version = 1;
568 
587  xdg_surface_t get_xdg_surface(surface_t const& surface);
588 
591  static constexpr std::uint32_t get_xdg_surface_since_version = 1;
592 
600  void pong(uint32_t serial);
601 
604  static constexpr std::uint32_t pong_since_version = 1;
605 
622  std::function<void(uint32_t)> &on_ping();
623 
624 };
625 
629 enum class xdg_wm_base_error : uint32_t
630  {
632  role = 0,
634  defunct_surfaces = 1,
636  not_the_topmost_popup = 2,
638  invalid_popup_parent = 3,
640  invalid_surface_state = 4,
642  invalid_positioner = 5
643 };
644 
645 
669 class xdg_positioner_t : public proxy_t
670 {
671 private:
672  struct events_t : public detail::events_base_t
673  {
674  };
675 
676  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
677 
678  xdg_positioner_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
679 
680 public:
682  explicit xdg_positioner_t(const proxy_t &proxy);
683  xdg_positioner_t(xdg_positioner *p, wrapper_type t = wrapper_type::standard);
684 
685  xdg_positioner_t proxy_create_wrapper();
686 
687  static const std::string interface_name;
688 
689  operator xdg_positioner*() const;
690 
702  void set_size(int32_t width, int32_t height);
703 
706  static constexpr std::uint32_t set_size_since_version = 1;
707 
726  void set_anchor_rect(int32_t x, int32_t y, int32_t width, int32_t height);
727 
730  static constexpr std::uint32_t set_anchor_rect_since_version = 1;
731 
743  void set_anchor(xdg_positioner_anchor const& anchor);
744 
747  static constexpr std::uint32_t set_anchor_since_version = 1;
748 
760  void set_gravity(xdg_positioner_gravity const& gravity);
761 
764  static constexpr std::uint32_t set_gravity_since_version = 1;
765 
784  void set_constraint_adjustment(xdg_positioner_constraint_adjustment const& constraint_adjustment);
785 
788  static constexpr std::uint32_t set_constraint_adjustment_since_version = 1;
789 
807  void set_offset(int32_t x, int32_t y);
808 
811  static constexpr std::uint32_t set_offset_since_version = 1;
812 
823  void set_reactive();
824 
827  static constexpr std::uint32_t set_reactive_since_version = 3;
828 
832  bool can_set_reactive() const;
833 
847  void set_parent_size(int32_t parent_width, int32_t parent_height);
848 
851  static constexpr std::uint32_t set_parent_size_since_version = 3;
852 
856  bool can_set_parent_size() const;
857 
867  void set_parent_configure(uint32_t serial);
868 
871  static constexpr std::uint32_t set_parent_configure_since_version = 3;
872 
876  bool can_set_parent_configure() const;
877 
878 };
879 
883 enum class xdg_positioner_error : uint32_t
884  {
886  invalid_input = 0
887 };
888 
892 enum class xdg_positioner_anchor : uint32_t
893  {
894  none = 0,
895  top = 1,
896  bottom = 2,
897  left = 3,
898  right = 4,
899  top_left = 5,
900  bottom_left = 6,
901  top_right = 7,
902  bottom_right = 8
903 };
904 
908 enum class xdg_positioner_gravity : uint32_t
909  {
910  none = 0,
911  top = 1,
912  bottom = 2,
913  left = 3,
914  right = 4,
915  top_left = 5,
916  bottom_left = 6,
917  top_right = 7,
918  bottom_right = 8
919 };
920 
936 struct xdg_positioner_constraint_adjustment : public detail::bitfield<2147483648, 8>
937 {
938  xdg_positioner_constraint_adjustment(const detail::bitfield<2147483648, 8> &b)
939  : detail::bitfield<2147483648, 8>(b) {}
940  xdg_positioner_constraint_adjustment(const uint32_t value)
941  : detail::bitfield<2147483648, 8>(value) {}
942  static const detail::bitfield<2147483648, 8> none;
943  static const detail::bitfield<2147483648, 8> slide_x;
944  static const detail::bitfield<2147483648, 8> slide_y;
945  static const detail::bitfield<2147483648, 8> flip_x;
946  static const detail::bitfield<2147483648, 8> flip_y;
947  static const detail::bitfield<2147483648, 8> resize_x;
948  static const detail::bitfield<2147483648, 8> resize_y;
949 };
950 
951 
1001 class xdg_surface_t : public proxy_t
1002 {
1003 private:
1004  struct events_t : public detail::events_base_t
1005  {
1006  std::function<void(uint32_t)> configure;
1007  };
1008 
1009  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
1010 
1011  xdg_surface_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
1012 
1013 public:
1014  xdg_surface_t();
1015  explicit xdg_surface_t(const proxy_t &proxy);
1016  xdg_surface_t(xdg_surface *p, wrapper_type t = wrapper_type::standard);
1017 
1018  xdg_surface_t proxy_create_wrapper();
1019 
1020  static const std::string interface_name;
1021 
1022  operator xdg_surface*() const;
1023 
1034 
1037  static constexpr std::uint32_t get_toplevel_since_version = 1;
1038 
1053  xdg_popup_t get_popup(xdg_surface_t const& parent, xdg_positioner_t const& positioner);
1054 
1057  static constexpr std::uint32_t get_popup_since_version = 1;
1058 
1096  void set_window_geometry(int32_t x, int32_t y, int32_t width, int32_t height);
1097 
1100  static constexpr std::uint32_t set_window_geometry_since_version = 1;
1101 
1126  void ack_configure(uint32_t serial);
1127 
1130  static constexpr std::uint32_t ack_configure_since_version = 1;
1131 
1153  std::function<void(uint32_t)> &on_configure();
1154 
1155 };
1156 
1160 enum class xdg_surface_error : uint32_t
1161  {
1162  not_constructed = 1,
1163  already_constructed = 2,
1164  unconfigured_buffer = 3
1165 };
1166 
1167 
1189 class xdg_toplevel_t : public proxy_t
1190 {
1191 private:
1192  struct events_t : public detail::events_base_t
1193  {
1194  std::function<void(int32_t, int32_t, array_t)> configure;
1195  std::function<void()> close;
1196  std::function<void(int32_t, int32_t)> configure_bounds;
1197  };
1198 
1199  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
1200 
1201  xdg_toplevel_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
1202 
1203 public:
1204  xdg_toplevel_t();
1205  explicit xdg_toplevel_t(const proxy_t &proxy);
1206  xdg_toplevel_t(xdg_toplevel *p, wrapper_type t = wrapper_type::standard);
1207 
1208  xdg_toplevel_t proxy_create_wrapper();
1209 
1210  static const std::string interface_name;
1211 
1212  operator xdg_toplevel*() const;
1213 
1235  void set_parent(xdg_toplevel_t const& parent);
1236 
1239  static constexpr std::uint32_t set_parent_since_version = 1;
1240 
1253  void set_title(std::string const& title);
1254 
1257  static constexpr std::uint32_t set_title_since_version = 1;
1258 
1287  void set_app_id(std::string const& app_id);
1288 
1291  static constexpr std::uint32_t set_app_id_since_version = 1;
1292 
1312  void show_window_menu(seat_t const& seat, uint32_t serial, int32_t x, int32_t y);
1313 
1316  static constexpr std::uint32_t show_window_menu_since_version = 1;
1317 
1340  void move(seat_t const& seat, uint32_t serial);
1341 
1344  static constexpr std::uint32_t move_since_version = 1;
1345 
1384  void resize(seat_t const& seat, uint32_t serial, xdg_toplevel_resize_edge const& edges);
1385 
1388  static constexpr std::uint32_t resize_since_version = 1;
1389 
1430  void set_max_size(int32_t width, int32_t height);
1431 
1434  static constexpr std::uint32_t set_max_size_since_version = 1;
1435 
1476  void set_min_size(int32_t width, int32_t height);
1477 
1480  static constexpr std::uint32_t set_min_size_since_version = 1;
1481 
1505  void set_maximized();
1506 
1509  static constexpr std::uint32_t set_maximized_since_version = 1;
1510 
1536  void unset_maximized();
1537 
1540  static constexpr std::uint32_t unset_maximized_since_version = 1;
1541 
1570  void set_fullscreen(output_t const& output);
1571 
1574  static constexpr std::uint32_t set_fullscreen_since_version = 1;
1575 
1597  void unset_fullscreen();
1598 
1601  static constexpr std::uint32_t unset_fullscreen_since_version = 1;
1602 
1615  void set_minimized();
1616 
1619  static constexpr std::uint32_t set_minimized_since_version = 1;
1620 
1647  std::function<void(int32_t, int32_t, array_t)> &on_configure();
1648 
1661  std::function<void()> &on_close();
1662 
1684  std::function<void(int32_t, int32_t)> &on_configure_bounds();
1685 
1686 };
1687 
1691 enum class xdg_toplevel_error : uint32_t
1692  {
1694  invalid_resize_edge = 0
1695 };
1696 
1703 struct xdg_toplevel_resize_edge : public detail::bitfield<2147483648, 11>
1704 {
1705  xdg_toplevel_resize_edge(const detail::bitfield<2147483648, 11> &b)
1706  : detail::bitfield<2147483648, 11>(b) {}
1707  xdg_toplevel_resize_edge(const uint32_t value)
1708  : detail::bitfield<2147483648, 11>(value) {}
1709  static const detail::bitfield<2147483648, 11> none;
1710  static const detail::bitfield<2147483648, 11> top;
1711  static const detail::bitfield<2147483648, 11> bottom;
1712  static const detail::bitfield<2147483648, 11> left;
1713  static const detail::bitfield<2147483648, 11> top_left;
1714  static const detail::bitfield<2147483648, 11> bottom_left;
1715  static const detail::bitfield<2147483648, 11> right;
1716  static const detail::bitfield<2147483648, 11> top_right;
1717  static const detail::bitfield<2147483648, 11> bottom_right;
1718 };
1719 
1731 enum class xdg_toplevel_state : uint32_t
1732  {
1734  maximized = 1,
1736  fullscreen = 2,
1738  resizing = 3,
1740  activated = 4,
1741  tiled_left = 5,
1742  tiled_right = 6,
1743  tiled_top = 7,
1744  tiled_bottom = 8
1745 };
1746 
1747 
1776 class xdg_popup_t : public proxy_t
1777 {
1778 private:
1779  struct events_t : public detail::events_base_t
1780  {
1781  std::function<void(int32_t, int32_t, int32_t, int32_t)> configure;
1782  std::function<void()> popup_done;
1783  std::function<void(uint32_t)> repositioned;
1784  };
1785 
1786  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
1787 
1788  xdg_popup_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
1789 
1790 public:
1791  xdg_popup_t();
1792  explicit xdg_popup_t(const proxy_t &proxy);
1793  xdg_popup_t(xdg_popup *p, wrapper_type t = wrapper_type::standard);
1794 
1795  xdg_popup_t proxy_create_wrapper();
1796 
1797  static const std::string interface_name;
1798 
1799  operator xdg_popup*() const;
1800 
1848  void grab(seat_t const& seat, uint32_t serial);
1849 
1852  static constexpr std::uint32_t grab_since_version = 1;
1853 
1883  void reposition(xdg_positioner_t const& positioner, uint32_t token);
1884 
1887  static constexpr std::uint32_t reposition_since_version = 3;
1888 
1892  bool can_reposition() const;
1893 
1914  std::function<void(int32_t, int32_t, int32_t, int32_t)> &on_configure();
1915 
1923  std::function<void()> &on_popup_done();
1924 
1945  std::function<void(uint32_t)> &on_repositioned();
1946 
1947 };
1948 
1952 enum class xdg_popup_error : uint32_t
1953  {
1955  invalid_grab = 0
1956 };
1957 
1958 
1959 
1960 }
compositor output region
std::function< void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, presentation_feedback_kind)> & on_presented()
the content update was displayed
std::function< void()> & on_discarded()
the content update was not displayed
std::function< void(output_t)> & on_sync_output()
presentation synchronized to this output
timed presentation related wl_surface requests
std::function< void(uint32_t)> & on_clock_id()
clock ID for timestamps
presentation_feedback_t feedback(surface_t const &surface)
request presentation feedback information
static constexpr std::uint32_t feedback_since_version
Minimum protocol version required for the feedback function.
Represents a protocol object on the client side.
group of input devices
crop and scale interface to a wl_surface
void set_source(double x, double y, double width, double height)
set the source rectangle for cropping
void set_destination(int32_t width, int32_t height)
set the surface size for scaling
static constexpr std::uint32_t set_source_since_version
Minimum protocol version required for the set_source function.
static constexpr std::uint32_t set_destination_since_version
Minimum protocol version required for the set_destination function.
surface cropping and scaling
static constexpr std::uint32_t get_viewport_since_version
Minimum protocol version required for the get_viewport function.
viewport_t get_viewport(surface_t const &surface)
extend surface interface for crop and scale
short-lived, popup surfaces for menus
std::function< void(int32_t, int32_t, int32_t, int32_t)> & on_configure()
configure the popup surface
std::function< void()> & on_popup_done()
popup interaction is done
void grab(seat_t const &seat, uint32_t serial)
make the popup take an explicit grab
void reposition(xdg_positioner_t const &positioner, uint32_t token)
recalculate the popup's location
static constexpr std::uint32_t grab_since_version
Minimum protocol version required for the grab function.
std::function< void(uint32_t)> & on_repositioned()
signal the completion of a repositioned request
bool can_reposition() const
Check whether the reposition function is available with the currently bound version of the protocol.
static constexpr std::uint32_t reposition_since_version
Minimum protocol version required for the reposition function.
static constexpr std::uint32_t set_size_since_version
Minimum protocol version required for the set_size function.
static constexpr std::uint32_t set_parent_configure_since_version
Minimum protocol version required for the set_parent_configure function.
void set_parent_configure(uint32_t serial)
set parent configure this is a response to
void set_reactive()
continuously reconstrain the surface
void set_offset(int32_t x, int32_t y)
set surface position offset
static constexpr std::uint32_t set_parent_size_since_version
Minimum protocol version required for the set_parent_size function.
static constexpr std::uint32_t set_anchor_rect_since_version
Minimum protocol version required for the set_anchor_rect function.
static constexpr std::uint32_t set_reactive_since_version
Minimum protocol version required for the set_reactive function.
void set_constraint_adjustment(xdg_positioner_constraint_adjustment const &constraint_adjustment)
set the adjustment to be done when constrained
static constexpr std::uint32_t set_gravity_since_version
Minimum protocol version required for the set_gravity function.
bool can_set_reactive() const
Check whether the set_reactive function is available with the currently bound version of the protocol...
static constexpr std::uint32_t set_offset_since_version
Minimum protocol version required for the set_offset function.
void set_size(int32_t width, int32_t height)
set the size of the to-be positioned rectangle
static constexpr std::uint32_t set_anchor_since_version
Minimum protocol version required for the set_anchor function.
void set_gravity(xdg_positioner_gravity const &gravity)
set child surface gravity
static constexpr std::uint32_t set_constraint_adjustment_since_version
Minimum protocol version required for the set_constraint_adjustment function.
bool can_set_parent_configure() const
Check whether the set_parent_configure function is available with the currently bound version of the ...
void set_anchor(xdg_positioner_anchor const &anchor)
set anchor rectangle anchor
void set_anchor_rect(int32_t x, int32_t y, int32_t width, int32_t height)
set the anchor rectangle within the parent surface
bool can_set_parent_size() const
Check whether the set_parent_size function is available with the currently bound version of the proto...
void set_parent_size(int32_t parent_width, int32_t parent_height)
desktop user interface surface base interface
static constexpr std::uint32_t set_window_geometry_since_version
Minimum protocol version required for the set_window_geometry function.
static constexpr std::uint32_t get_popup_since_version
Minimum protocol version required for the get_popup function.
std::function< void(uint32_t)> & on_configure()
suggest a surface change
xdg_toplevel_t get_toplevel()
assign the xdg_toplevel surface role
void ack_configure(uint32_t serial)
ack a configure event
static constexpr std::uint32_t ack_configure_since_version
Minimum protocol version required for the ack_configure function.
xdg_popup_t get_popup(xdg_surface_t const &parent, xdg_positioner_t const &positioner)
assign the xdg_popup surface role
static constexpr std::uint32_t get_toplevel_since_version
Minimum protocol version required for the get_toplevel function.
void set_window_geometry(int32_t x, int32_t y, int32_t width, int32_t height)
set the new window geometry
void set_title(std::string const &title)
set surface title
std::function< void()> & on_close()
surface wants to be closed
static constexpr std::uint32_t resize_since_version
Minimum protocol version required for the resize function.
static constexpr std::uint32_t set_max_size_since_version
Minimum protocol version required for the set_max_size function.
static constexpr std::uint32_t unset_maximized_since_version
Minimum protocol version required for the unset_maximized function.
void show_window_menu(seat_t const &seat, uint32_t serial, int32_t x, int32_t y)
show the window menu
void set_min_size(int32_t width, int32_t height)
set the minimum size
std::function< void(int32_t, int32_t, array_t)> & on_configure()
suggest a surface change
void set_maximized()
maximize the window
std::function< void(int32_t, int32_t)> & on_configure_bounds()
recommended window geometry bounds
static constexpr std::uint32_t set_fullscreen_since_version
Minimum protocol version required for the set_fullscreen function.
void set_max_size(int32_t width, int32_t height)
set the maximum size
static constexpr std::uint32_t set_min_size_since_version
Minimum protocol version required for the set_min_size function.
static constexpr std::uint32_t set_app_id_since_version
Minimum protocol version required for the set_app_id function.
static constexpr std::uint32_t show_window_menu_since_version
Minimum protocol version required for the show_window_menu function.
static constexpr std::uint32_t set_minimized_since_version
Minimum protocol version required for the set_minimized function.
void set_minimized()
set the window as minimized
void set_fullscreen(output_t const &output)
set the window as fullscreen on an output
void move(seat_t const &seat, uint32_t serial)
start an interactive move
static constexpr std::uint32_t move_since_version
Minimum protocol version required for the move function.
static constexpr std::uint32_t set_maximized_since_version
Minimum protocol version required for the set_maximized function.
static constexpr std::uint32_t unset_fullscreen_since_version
Minimum protocol version required for the unset_fullscreen function.
static constexpr std::uint32_t set_title_since_version
Minimum protocol version required for the set_title function.
void set_app_id(std::string const &app_id)
set application ID
static constexpr std::uint32_t set_parent_since_version
Minimum protocol version required for the set_parent function.
void unset_fullscreen()
unset the window as fullscreen
void set_parent(xdg_toplevel_t const &parent)
set the parent of this surface
void resize(seat_t const &seat, uint32_t serial, xdg_toplevel_resize_edge const &edges)
start an interactive resize
void unset_maximized()
unmaximize the window
create desktop-style surfaces
std::function< void(uint32_t)> & on_ping()
check if the client is alive
static constexpr std::uint32_t get_xdg_surface_since_version
Minimum protocol version required for the get_xdg_surface function.
static constexpr std::uint32_t create_positioner_since_version
Minimum protocol version required for the create_positioner function.
void pong(uint32_t serial)
respond to a ping event
static constexpr std::uint32_t pong_since_version
Minimum protocol version required for the pong function.
xdg_positioner_t create_positioner()
create a positioner object
xdg_surface_t get_xdg_surface(surface_t const &surface)
create a shell surface from a surface