Wayland++  0.2.8
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 struct xdg_toplevel_resize_edge;
42 enum class xdg_toplevel_state : uint32_t;
43 class xdg_popup_t;
44 enum class xdg_popup_error : uint32_t;
45 
46 namespace detail
47 {
48  extern const wl_interface presentation_interface;
49  extern const wl_interface presentation_feedback_interface;
50  extern const wl_interface viewporter_interface;
51  extern const wl_interface viewport_interface;
52  extern const wl_interface xdg_wm_base_interface;
53  extern const wl_interface xdg_positioner_interface;
54  extern const wl_interface xdg_surface_interface;
55  extern const wl_interface xdg_toplevel_interface;
56  extern const wl_interface xdg_popup_interface;
57 }
58 
75 class presentation_t : public proxy_t
76 {
77 private:
78  struct events_t : public detail::events_base_t
79  {
80  std::function<void(uint32_t)> clock_id;
81  };
82 
83  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
84 
85  presentation_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
86 
87 public:
89  explicit presentation_t(const proxy_t &proxy);
90  presentation_t(wp_presentation *p, wrapper_type t = wrapper_type::standard);
91 
92  presentation_t proxy_create_wrapper();
93 
94  static const std::string interface_name;
95 
96  operator wp_presentation*() const;
97 
113 
116  static constexpr std::uint32_t feedback_since_version = 1;
117 
152  std::function<void(uint32_t)> &on_clock_id();
153 
154 };
155 
162 enum class presentation_error : uint32_t
163  {
165  invalid_timestamp = 0,
167  invalid_flag = 1
168 };
169 
170 
187 {
188 private:
189  struct events_t : public detail::events_base_t
190  {
191  std::function<void(output_t)> sync_output;
192  std::function<void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, presentation_feedback_kind)> presented;
193  std::function<void()> discarded;
194  };
195 
196  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
197 
198  presentation_feedback_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
199 
200 public:
202  explicit presentation_feedback_t(const proxy_t &proxy);
203  presentation_feedback_t(wp_presentation_feedback *p, wrapper_type t = wrapper_type::standard);
204 
205  presentation_feedback_t proxy_create_wrapper();
206 
207  static const std::string interface_name;
208 
209  operator wp_presentation_feedback*() const;
210 
224  std::function<void(output_t)> &on_sync_output();
225 
278  std::function<void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, presentation_feedback_kind)> &on_presented();
279 
285  std::function<void()> &on_discarded();
286 
287 };
288 
325 struct presentation_feedback_kind : public detail::bitfield<4, 1>
326 {
327  presentation_feedback_kind(const detail::bitfield<4, 1> &b)
328  : detail::bitfield<4, 1>(b) {}
329  presentation_feedback_kind(const uint32_t value)
330  : detail::bitfield<4, 1>(value) {}
332  static const detail::bitfield<4, 1> vsync;
334  static const detail::bitfield<4, 1> hw_clock;
336  static const detail::bitfield<4, 1> hw_completion;
338  static const detail::bitfield<4, 1> zero_copy;
339 };
340 
341 
352 class viewporter_t : public proxy_t
353 {
354 private:
355  struct events_t : public detail::events_base_t
356  {
357  };
358 
359  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
360 
361  viewporter_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
362 
363 public:
364  viewporter_t();
365  explicit viewporter_t(const proxy_t &proxy);
366  viewporter_t(wp_viewporter *p, wrapper_type t = wrapper_type::standard);
367 
368  viewporter_t proxy_create_wrapper();
369 
370  static const std::string interface_name;
371 
372  operator wp_viewporter*() const;
373 
384  viewport_t get_viewport(surface_t const& surface);
385 
388  static constexpr std::uint32_t get_viewport_since_version = 1;
389 
390 };
391 
395 enum class viewporter_error : uint32_t
396  {
398  viewport_exists = 0
399 };
400 
401 
467 class viewport_t : public proxy_t
468 {
469 private:
470  struct events_t : public detail::events_base_t
471  {
472  };
473 
474  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
475 
476  viewport_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
477 
478 public:
479  viewport_t();
480  explicit viewport_t(const proxy_t &proxy);
481  viewport_t(wp_viewport *p, wrapper_type t = wrapper_type::standard);
482 
483  viewport_t proxy_create_wrapper();
484 
485  static const std::string interface_name;
486 
487  operator wp_viewport*() const;
488 
508  void set_source(double x, double y, double width, double height);
509 
512  static constexpr std::uint32_t set_source_since_version = 1;
513 
531  void set_destination(int32_t width, int32_t height);
532 
535  static constexpr std::uint32_t set_destination_since_version = 1;
536 
537 };
538 
542 enum class viewport_error : uint32_t
543  {
545  bad_value = 0,
547  bad_size = 1,
549  out_of_buffer = 2,
551  no_surface = 3
552 };
553 
554 
564 class xdg_wm_base_t : public proxy_t
565 {
566 private:
567  struct events_t : public detail::events_base_t
568  {
569  std::function<void(uint32_t)> ping;
570  };
571 
572  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
573 
574  xdg_wm_base_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
575 
576 public:
577  xdg_wm_base_t();
578  explicit xdg_wm_base_t(const proxy_t &proxy);
580 
581  xdg_wm_base_t proxy_create_wrapper();
582 
583  static const std::string interface_name;
584 
585  operator xdg_wm_base*() const;
586 
595 
598  static constexpr std::uint32_t create_positioner_since_version = 1;
599 
616  xdg_surface_t get_xdg_surface(surface_t const& surface);
617 
620  static constexpr std::uint32_t get_xdg_surface_since_version = 1;
621 
629  void pong(uint32_t serial);
630 
633  static constexpr std::uint32_t pong_since_version = 1;
634 
651  std::function<void(uint32_t)> &on_ping();
652 
653 };
654 
658 enum class xdg_wm_base_error : uint32_t
659  {
661  role = 0,
663  defunct_surfaces = 1,
665  not_the_topmost_popup = 2,
667  invalid_popup_parent = 3,
669  invalid_surface_state = 4,
671  invalid_positioner = 5
672 };
673 
674 
698 class xdg_positioner_t : public proxy_t
699 {
700 private:
701  struct events_t : public detail::events_base_t
702  {
703  };
704 
705  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
706 
707  xdg_positioner_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
708 
709 public:
711  explicit xdg_positioner_t(const proxy_t &proxy);
712  xdg_positioner_t(xdg_positioner *p, wrapper_type t = wrapper_type::standard);
713 
714  xdg_positioner_t proxy_create_wrapper();
715 
716  static const std::string interface_name;
717 
718  operator xdg_positioner*() const;
719 
731  void set_size(int32_t width, int32_t height);
732 
735  static constexpr std::uint32_t set_size_since_version = 1;
736 
755  void set_anchor_rect(int32_t x, int32_t y, int32_t width, int32_t height);
756 
759  static constexpr std::uint32_t set_anchor_rect_since_version = 1;
760 
772  void set_anchor(xdg_positioner_anchor const& anchor);
773 
776  static constexpr std::uint32_t set_anchor_since_version = 1;
777 
789  void set_gravity(xdg_positioner_gravity const& gravity);
790 
793  static constexpr std::uint32_t set_gravity_since_version = 1;
794 
813  void set_constraint_adjustment(xdg_positioner_constraint_adjustment const& constraint_adjustment);
814 
817  static constexpr std::uint32_t set_constraint_adjustment_since_version = 1;
818 
836  void set_offset(int32_t x, int32_t y);
837 
840  static constexpr std::uint32_t set_offset_since_version = 1;
841 
852  void set_reactive();
853 
856  static constexpr std::uint32_t set_reactive_since_version = 3;
857 
861  bool can_set_reactive() const;
862 
876  void set_parent_size(int32_t parent_width, int32_t parent_height);
877 
880  static constexpr std::uint32_t set_parent_size_since_version = 3;
881 
885  bool can_set_parent_size() const;
886 
896  void set_parent_configure(uint32_t serial);
897 
900  static constexpr std::uint32_t set_parent_configure_since_version = 3;
901 
905  bool can_set_parent_configure() const;
906 
907 };
908 
912 enum class xdg_positioner_error : uint32_t
913  {
915  invalid_input = 0
916 };
917 
921 enum class xdg_positioner_anchor : uint32_t
922  {
923  none = 0,
924  top = 1,
925  bottom = 2,
926  left = 3,
927  right = 4,
928  top_left = 5,
929  bottom_left = 6,
930  top_right = 7,
931  bottom_right = 8
932 };
933 
937 enum class xdg_positioner_gravity : uint32_t
938  {
939  none = 0,
940  top = 1,
941  bottom = 2,
942  left = 3,
943  right = 4,
944  top_left = 5,
945  bottom_left = 6,
946  top_right = 7,
947  bottom_right = 8
948 };
949 
965 struct xdg_positioner_constraint_adjustment : public detail::bitfield<6, 8>
966 {
967  xdg_positioner_constraint_adjustment(const detail::bitfield<6, 8> &b)
968  : detail::bitfield<6, 8>(b) {}
969  xdg_positioner_constraint_adjustment(const uint32_t value)
970  : detail::bitfield<6, 8>(value) {}
971  static const detail::bitfield<6, 8> none;
972  static const detail::bitfield<6, 8> slide_x;
973  static const detail::bitfield<6, 8> slide_y;
974  static const detail::bitfield<6, 8> flip_x;
975  static const detail::bitfield<6, 8> flip_y;
976  static const detail::bitfield<6, 8> resize_x;
977  static const detail::bitfield<6, 8> resize_y;
978 };
979 
980 
1029 class xdg_surface_t : public proxy_t
1030 {
1031 private:
1032  struct events_t : public detail::events_base_t
1033  {
1034  std::function<void(uint32_t)> configure;
1035  };
1036 
1037  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
1038 
1039  xdg_surface_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
1040 
1041 public:
1042  xdg_surface_t();
1043  explicit xdg_surface_t(const proxy_t &proxy);
1044  xdg_surface_t(xdg_surface *p, wrapper_type t = wrapper_type::standard);
1045 
1046  xdg_surface_t proxy_create_wrapper();
1047 
1048  static const std::string interface_name;
1049 
1050  operator xdg_surface*() const;
1051 
1062 
1065  static constexpr std::uint32_t get_toplevel_since_version = 1;
1066 
1081  xdg_popup_t get_popup(xdg_surface_t const& parent, xdg_positioner_t const& positioner);
1082 
1085  static constexpr std::uint32_t get_popup_since_version = 1;
1086 
1124  void set_window_geometry(int32_t x, int32_t y, int32_t width, int32_t height);
1125 
1128  static constexpr std::uint32_t set_window_geometry_since_version = 1;
1129 
1154  void ack_configure(uint32_t serial);
1155 
1158  static constexpr std::uint32_t ack_configure_since_version = 1;
1159 
1181  std::function<void(uint32_t)> &on_configure();
1182 
1183 };
1184 
1188 enum class xdg_surface_error : uint32_t
1189  {
1190  not_constructed = 1,
1191  already_constructed = 2,
1192  unconfigured_buffer = 3
1193 };
1194 
1195 
1217 class xdg_toplevel_t : public proxy_t
1218 {
1219 private:
1220  struct events_t : public detail::events_base_t
1221  {
1222  std::function<void(int32_t, int32_t, array_t)> configure;
1223  std::function<void()> close;
1224  };
1225 
1226  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
1227 
1228  xdg_toplevel_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
1229 
1230 public:
1231  xdg_toplevel_t();
1232  explicit xdg_toplevel_t(const proxy_t &proxy);
1233  xdg_toplevel_t(xdg_toplevel *p, wrapper_type t = wrapper_type::standard);
1234 
1235  xdg_toplevel_t proxy_create_wrapper();
1236 
1237  static const std::string interface_name;
1238 
1239  operator xdg_toplevel*() const;
1240 
1262  void set_parent(xdg_toplevel_t const& parent);
1263 
1266  static constexpr std::uint32_t set_parent_since_version = 1;
1267 
1280  void set_title(std::string const& title);
1281 
1284  static constexpr std::uint32_t set_title_since_version = 1;
1285 
1314  void set_app_id(std::string const& app_id);
1315 
1318  static constexpr std::uint32_t set_app_id_since_version = 1;
1319 
1339  void show_window_menu(seat_t const& seat, uint32_t serial, int32_t x, int32_t y);
1340 
1343  static constexpr std::uint32_t show_window_menu_since_version = 1;
1344 
1367  void move(seat_t const& seat, uint32_t serial);
1368 
1371  static constexpr std::uint32_t move_since_version = 1;
1372 
1410  void resize(seat_t const& seat, uint32_t serial, xdg_toplevel_resize_edge const& edges);
1411 
1414  static constexpr std::uint32_t resize_since_version = 1;
1415 
1456  void set_max_size(int32_t width, int32_t height);
1457 
1460  static constexpr std::uint32_t set_max_size_since_version = 1;
1461 
1502  void set_min_size(int32_t width, int32_t height);
1503 
1506  static constexpr std::uint32_t set_min_size_since_version = 1;
1507 
1531  void set_maximized();
1532 
1535  static constexpr std::uint32_t set_maximized_since_version = 1;
1536 
1562  void unset_maximized();
1563 
1566  static constexpr std::uint32_t unset_maximized_since_version = 1;
1567 
1596  void set_fullscreen(output_t const& output);
1597 
1600  static constexpr std::uint32_t set_fullscreen_since_version = 1;
1601 
1623  void unset_fullscreen();
1624 
1627  static constexpr std::uint32_t unset_fullscreen_since_version = 1;
1628 
1641  void set_minimized();
1642 
1645  static constexpr std::uint32_t set_minimized_since_version = 1;
1646 
1673  std::function<void(int32_t, int32_t, array_t)> &on_configure();
1674 
1687  std::function<void()> &on_close();
1688 
1689 };
1690 
1697 struct xdg_toplevel_resize_edge : public detail::bitfield<4, 10>
1698 {
1699  xdg_toplevel_resize_edge(const detail::bitfield<4, 10> &b)
1700  : detail::bitfield<4, 10>(b) {}
1701  xdg_toplevel_resize_edge(const uint32_t value)
1702  : detail::bitfield<4, 10>(value) {}
1703  static const detail::bitfield<4, 10> none;
1704  static const detail::bitfield<4, 10> top;
1705  static const detail::bitfield<4, 10> bottom;
1706  static const detail::bitfield<4, 10> left;
1707  static const detail::bitfield<4, 10> top_left;
1708  static const detail::bitfield<4, 10> bottom_left;
1709  static const detail::bitfield<4, 10> right;
1710  static const detail::bitfield<4, 10> top_right;
1711  static const detail::bitfield<4, 10> bottom_right;
1712 };
1713 
1725 enum class xdg_toplevel_state : uint32_t
1726  {
1728  maximized = 1,
1730  fullscreen = 2,
1732  resizing = 3,
1734  activated = 4,
1735  tiled_left = 5,
1736  tiled_right = 6,
1737  tiled_top = 7,
1738  tiled_bottom = 8
1739 };
1740 
1741 
1770 class xdg_popup_t : public proxy_t
1771 {
1772 private:
1773  struct events_t : public detail::events_base_t
1774  {
1775  std::function<void(int32_t, int32_t, int32_t, int32_t)> configure;
1776  std::function<void()> popup_done;
1777  std::function<void(uint32_t)> repositioned;
1778  };
1779 
1780  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
1781 
1782  xdg_popup_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
1783 
1784 public:
1785  xdg_popup_t();
1786  explicit xdg_popup_t(const proxy_t &proxy);
1787  xdg_popup_t(xdg_popup *p, wrapper_type t = wrapper_type::standard);
1788 
1789  xdg_popup_t proxy_create_wrapper();
1790 
1791  static const std::string interface_name;
1792 
1793  operator xdg_popup*() const;
1794 
1842  void grab(seat_t const& seat, uint32_t serial);
1843 
1846  static constexpr std::uint32_t grab_since_version = 1;
1847 
1877  void reposition(xdg_positioner_t const& positioner, uint32_t token);
1878 
1881  static constexpr std::uint32_t reposition_since_version = 3;
1882 
1886  bool can_reposition() const;
1887 
1908  std::function<void(int32_t, int32_t, int32_t, int32_t)> &on_configure();
1909 
1917  std::function<void()> &on_popup_done();
1918 
1939  std::function<void(uint32_t)> &on_repositioned();
1940 
1941 };
1942 
1946 enum class xdg_popup_error : uint32_t
1947  {
1949  invalid_grab = 0
1950 };
1951 
1952 
1953 
1954 }
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
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
static const detail::bitfield< 4, 1 > hw_clock
hardware provided the presentation timestamp
static const detail::bitfield< 4, 1 > hw_completion
hardware signalled the start of the presentation
static const detail::bitfield< 4, 1 > vsync
presentation was vsync'd
static const detail::bitfield< 4, 1 > zero_copy
presentation was done zero-copy