Wayland++  1.0.0
C++ Bindings for Wayland
wayland-client-protocol-extra.hpp
1 #pragma once
2 
3 #include <array>
4 #include <cstdint>
5 #include <functional>
6 #include <memory>
7 #include <string>
8 #include <vector>
9 
10 #include <wayland-client.hpp>
11 
12 struct wp_presentation;
13 struct wp_presentation_feedback;
14 struct wp_viewporter;
15 struct wp_viewport;
16 struct xdg_wm_base;
17 struct xdg_positioner;
18 struct xdg_surface;
19 struct xdg_toplevel;
20 struct xdg_popup;
21 
22 namespace wayland
23 {
24 class presentation_t;
25 enum class presentation_error : uint32_t;
26 class presentation_feedback_t;
27 struct presentation_feedback_kind;
28 class viewporter_t;
29 enum class viewporter_error : uint32_t;
30 class viewport_t;
31 enum class viewport_error : uint32_t;
32 class xdg_wm_base_t;
33 enum class xdg_wm_base_error : uint32_t;
34 class xdg_positioner_t;
35 enum class xdg_positioner_error : uint32_t;
36 enum class xdg_positioner_anchor : uint32_t;
37 enum class xdg_positioner_gravity : uint32_t;
38 struct xdg_positioner_constraint_adjustment;
39 class xdg_surface_t;
40 enum class xdg_surface_error : uint32_t;
41 class xdg_toplevel_t;
42 enum class xdg_toplevel_error : uint32_t;
43 struct xdg_toplevel_resize_edge;
44 enum class xdg_toplevel_state : uint32_t;
45 class xdg_popup_t;
46 enum class xdg_popup_error : uint32_t;
47 
48 namespace detail
49 {
50  extern const wl_interface presentation_interface;
51  extern const wl_interface presentation_feedback_interface;
52  extern const wl_interface viewporter_interface;
53  extern const wl_interface viewport_interface;
54  extern const wl_interface xdg_wm_base_interface;
55  extern const wl_interface xdg_positioner_interface;
56  extern const wl_interface xdg_surface_interface;
57  extern const wl_interface xdg_toplevel_interface;
58  extern const wl_interface xdg_popup_interface;
59 }
60 
77 class presentation_t : public proxy_t
78 {
79 private:
80  struct events_t : public detail::events_base_t
81  {
82  std::function<void(uint32_t)> clock_id;
83  };
84 
85  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
86 
87  presentation_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
88 
89 public:
91  explicit presentation_t(const proxy_t &proxy);
92  presentation_t(wp_presentation *p, wrapper_type t = wrapper_type::standard);
93 
94  presentation_t proxy_create_wrapper();
95 
96  static const std::string interface_name;
97 
98  operator wp_presentation*() const;
99 
115 
118  static constexpr std::uint32_t feedback_since_version = 1;
119 
154  std::function<void(uint32_t)> &on_clock_id();
155 
156 };
157 
164 enum class presentation_error : uint32_t
165  {
167  invalid_timestamp = 0,
169  invalid_flag = 1
170 };
171 
172 
189 {
190 private:
191  struct events_t : public detail::events_base_t
192  {
193  std::function<void(output_t)> sync_output;
194  std::function<void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, presentation_feedback_kind)> presented;
195  std::function<void()> discarded;
196  };
197 
198  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
199 
200  presentation_feedback_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
201 
202 public:
204  explicit presentation_feedback_t(const proxy_t &proxy);
205  presentation_feedback_t(wp_presentation_feedback *p, wrapper_type t = wrapper_type::standard);
206 
207  presentation_feedback_t proxy_create_wrapper();
208 
209  static const std::string interface_name;
210 
211  operator wp_presentation_feedback*() const;
212 
226  std::function<void(output_t)> &on_sync_output();
227 
280  std::function<void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, presentation_feedback_kind)> &on_presented();
281 
287  std::function<void()> &on_discarded();
288 
289 };
290 
299 struct presentation_feedback_kind : public wayland::detail::bitfield<4, 1>
300 {
301  presentation_feedback_kind(const wayland::detail::bitfield<4, 1> &b)
302  : wayland::detail::bitfield<4, 1>(b) {}
303  presentation_feedback_kind(const uint32_t value)
304  : wayland::detail::bitfield<4, 1>(value) {}
305  static const wayland::detail::bitfield<4, 1> vsync;
306  static const wayland::detail::bitfield<4, 1> hw_clock;
307  static const wayland::detail::bitfield<4, 1> hw_completion;
308  static const wayland::detail::bitfield<4, 1> zero_copy;
309 };
310 
311 
322 class viewporter_t : public proxy_t
323 {
324 private:
325  struct events_t : public detail::events_base_t
326  {
327  };
328 
329  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
330 
331  viewporter_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
332 
333 public:
334  viewporter_t();
335  explicit viewporter_t(const proxy_t &proxy);
336  viewporter_t(wp_viewporter *p, wrapper_type t = wrapper_type::standard);
337 
338  viewporter_t proxy_create_wrapper();
339 
340  static const std::string interface_name;
341 
342  operator wp_viewporter*() const;
343 
354  viewport_t get_viewport(surface_t const& surface);
355 
358  static constexpr std::uint32_t get_viewport_since_version = 1;
359 
360 };
361 
365 enum class viewporter_error : uint32_t
366  {
368  viewport_exists = 0
369 };
370 
371 
437 class viewport_t : public proxy_t
438 {
439 private:
440  struct events_t : public detail::events_base_t
441  {
442  };
443 
444  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
445 
446  viewport_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
447 
448 public:
449  viewport_t();
450  explicit viewport_t(const proxy_t &proxy);
451  viewport_t(wp_viewport *p, wrapper_type t = wrapper_type::standard);
452 
453  viewport_t proxy_create_wrapper();
454 
455  static const std::string interface_name;
456 
457  operator wp_viewport*() const;
458 
478  void set_source(double x, double y, double width, double height);
479 
482  static constexpr std::uint32_t set_source_since_version = 1;
483 
501  void set_destination(int32_t width, int32_t height);
502 
505  static constexpr std::uint32_t set_destination_since_version = 1;
506 
507 };
508 
512 enum class viewport_error : uint32_t
513  {
515  bad_value = 0,
517  bad_size = 1,
519  out_of_buffer = 2,
521  no_surface = 3
522 };
523 
524 
534 class xdg_wm_base_t : public proxy_t
535 {
536 private:
537  struct events_t : public detail::events_base_t
538  {
539  std::function<void(uint32_t)> ping;
540  };
541 
542  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
543 
544  xdg_wm_base_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
545 
546 public:
547  xdg_wm_base_t();
548  explicit xdg_wm_base_t(const proxy_t &proxy);
550 
551  xdg_wm_base_t proxy_create_wrapper();
552 
553  static const std::string interface_name;
554 
555  operator xdg_wm_base*() const;
556 
565 
568  static constexpr std::uint32_t create_positioner_since_version = 1;
569 
588  xdg_surface_t get_xdg_surface(surface_t const& surface);
589 
592  static constexpr std::uint32_t get_xdg_surface_since_version = 1;
593 
601  void pong(uint32_t serial);
602 
605  static constexpr std::uint32_t pong_since_version = 1;
606 
623  std::function<void(uint32_t)> &on_ping();
624 
625 };
626 
630 enum class xdg_wm_base_error : uint32_t
631  {
633  role = 0,
635  defunct_surfaces = 1,
637  not_the_topmost_popup = 2,
639  invalid_popup_parent = 3,
641  invalid_surface_state = 4,
643  invalid_positioner = 5
644 };
645 
646 
670 class xdg_positioner_t : public proxy_t
671 {
672 private:
673  struct events_t : public detail::events_base_t
674  {
675  };
676 
677  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
678 
679  xdg_positioner_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
680 
681 public:
683  explicit xdg_positioner_t(const proxy_t &proxy);
684  xdg_positioner_t(xdg_positioner *p, wrapper_type t = wrapper_type::standard);
685 
686  xdg_positioner_t proxy_create_wrapper();
687 
688  static const std::string interface_name;
689 
690  operator xdg_positioner*() const;
691 
703  void set_size(int32_t width, int32_t height);
704 
707  static constexpr std::uint32_t set_size_since_version = 1;
708 
727  void set_anchor_rect(int32_t x, int32_t y, int32_t width, int32_t height);
728 
731  static constexpr std::uint32_t set_anchor_rect_since_version = 1;
732 
744  void set_anchor(xdg_positioner_anchor const& anchor);
745 
748  static constexpr std::uint32_t set_anchor_since_version = 1;
749 
761  void set_gravity(xdg_positioner_gravity const& gravity);
762 
765  static constexpr std::uint32_t set_gravity_since_version = 1;
766 
785  void set_constraint_adjustment(xdg_positioner_constraint_adjustment const& constraint_adjustment);
786 
789  static constexpr std::uint32_t set_constraint_adjustment_since_version = 1;
790 
808  void set_offset(int32_t x, int32_t y);
809 
812  static constexpr std::uint32_t set_offset_since_version = 1;
813 
824  void set_reactive();
825 
828  static constexpr std::uint32_t set_reactive_since_version = 3;
829 
833  bool can_set_reactive() const;
834 
848  void set_parent_size(int32_t parent_width, int32_t parent_height);
849 
852  static constexpr std::uint32_t set_parent_size_since_version = 3;
853 
857  bool can_set_parent_size() const;
858 
868  void set_parent_configure(uint32_t serial);
869 
872  static constexpr std::uint32_t set_parent_configure_since_version = 3;
873 
877  bool can_set_parent_configure() const;
878 
879 };
880 
884 enum class xdg_positioner_error : uint32_t
885  {
887  invalid_input = 0
888 };
889 
893 enum class xdg_positioner_anchor : uint32_t
894  {
895  none = 0,
896  top = 1,
897  bottom = 2,
898  left = 3,
899  right = 4,
900  top_left = 5,
901  bottom_left = 6,
902  top_right = 7,
903  bottom_right = 8
904 };
905 
909 enum class xdg_positioner_gravity : uint32_t
910  {
911  none = 0,
912  top = 1,
913  bottom = 2,
914  left = 3,
915  right = 4,
916  top_left = 5,
917  bottom_left = 6,
918  top_right = 7,
919  bottom_right = 8
920 };
921 
937 struct xdg_positioner_constraint_adjustment : public wayland::detail::bitfield<6, 8>
938 {
939  xdg_positioner_constraint_adjustment(const wayland::detail::bitfield<6, 8> &b)
940  : wayland::detail::bitfield<6, 8>(b) {}
941  xdg_positioner_constraint_adjustment(const uint32_t value)
942  : wayland::detail::bitfield<6, 8>(value) {}
943  static const wayland::detail::bitfield<6, 8> none;
944  static const wayland::detail::bitfield<6, 8> slide_x;
945  static const wayland::detail::bitfield<6, 8> slide_y;
946  static const wayland::detail::bitfield<6, 8> flip_x;
947  static const wayland::detail::bitfield<6, 8> flip_y;
948  static const wayland::detail::bitfield<6, 8> resize_x;
949  static const wayland::detail::bitfield<6, 8> resize_y;
950 };
951 
952 
1002 class xdg_surface_t : public proxy_t
1003 {
1004 private:
1005  struct events_t : public detail::events_base_t
1006  {
1007  std::function<void(uint32_t)> configure;
1008  };
1009 
1010  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
1011 
1012  xdg_surface_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
1013 
1014 public:
1015  xdg_surface_t();
1016  explicit xdg_surface_t(const proxy_t &proxy);
1017  xdg_surface_t(xdg_surface *p, wrapper_type t = wrapper_type::standard);
1018 
1019  xdg_surface_t proxy_create_wrapper();
1020 
1021  static const std::string interface_name;
1022 
1023  operator xdg_surface*() const;
1024 
1035 
1038  static constexpr std::uint32_t get_toplevel_since_version = 1;
1039 
1054  xdg_popup_t get_popup(xdg_surface_t const& parent, xdg_positioner_t const& positioner);
1055 
1058  static constexpr std::uint32_t get_popup_since_version = 1;
1059 
1097  void set_window_geometry(int32_t x, int32_t y, int32_t width, int32_t height);
1098 
1101  static constexpr std::uint32_t set_window_geometry_since_version = 1;
1102 
1127  void ack_configure(uint32_t serial);
1128 
1131  static constexpr std::uint32_t ack_configure_since_version = 1;
1132 
1154  std::function<void(uint32_t)> &on_configure();
1155 
1156 };
1157 
1161 enum class xdg_surface_error : uint32_t
1162  {
1163  not_constructed = 1,
1164  already_constructed = 2,
1165  unconfigured_buffer = 3
1166 };
1167 
1168 
1190 class xdg_toplevel_t : public proxy_t
1191 {
1192 private:
1193  struct events_t : public detail::events_base_t
1194  {
1195  std::function<void(int32_t, int32_t, array_t)> configure;
1196  std::function<void()> close;
1197  std::function<void(int32_t, int32_t)> configure_bounds;
1198  };
1199 
1200  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
1201 
1202  xdg_toplevel_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
1203 
1204 public:
1205  xdg_toplevel_t();
1206  explicit xdg_toplevel_t(const proxy_t &proxy);
1207  xdg_toplevel_t(xdg_toplevel *p, wrapper_type t = wrapper_type::standard);
1208 
1209  xdg_toplevel_t proxy_create_wrapper();
1210 
1211  static const std::string interface_name;
1212 
1213  operator xdg_toplevel*() const;
1214 
1236  void set_parent(xdg_toplevel_t const& parent);
1237 
1240  static constexpr std::uint32_t set_parent_since_version = 1;
1241 
1254  void set_title(std::string const& title);
1255 
1258  static constexpr std::uint32_t set_title_since_version = 1;
1259 
1288  void set_app_id(std::string const& app_id);
1289 
1292  static constexpr std::uint32_t set_app_id_since_version = 1;
1293 
1313  void show_window_menu(seat_t const& seat, uint32_t serial, int32_t x, int32_t y);
1314 
1317  static constexpr std::uint32_t show_window_menu_since_version = 1;
1318 
1341  void move(seat_t const& seat, uint32_t serial);
1342 
1345  static constexpr std::uint32_t move_since_version = 1;
1346 
1385  void resize(seat_t const& seat, uint32_t serial, xdg_toplevel_resize_edge const& edges);
1386 
1389  static constexpr std::uint32_t resize_since_version = 1;
1390 
1431  void set_max_size(int32_t width, int32_t height);
1432 
1435  static constexpr std::uint32_t set_max_size_since_version = 1;
1436 
1477  void set_min_size(int32_t width, int32_t height);
1478 
1481  static constexpr std::uint32_t set_min_size_since_version = 1;
1482 
1506  void set_maximized();
1507 
1510  static constexpr std::uint32_t set_maximized_since_version = 1;
1511 
1537  void unset_maximized();
1538 
1541  static constexpr std::uint32_t unset_maximized_since_version = 1;
1542 
1571  void set_fullscreen(output_t const& output);
1572 
1575  static constexpr std::uint32_t set_fullscreen_since_version = 1;
1576 
1598  void unset_fullscreen();
1599 
1602  static constexpr std::uint32_t unset_fullscreen_since_version = 1;
1603 
1616  void set_minimized();
1617 
1620  static constexpr std::uint32_t set_minimized_since_version = 1;
1621 
1648  std::function<void(int32_t, int32_t, array_t)> &on_configure();
1649 
1662  std::function<void()> &on_close();
1663 
1685  std::function<void(int32_t, int32_t)> &on_configure_bounds();
1686 
1687 };
1688 
1692 enum class xdg_toplevel_error : uint32_t
1693  {
1695  invalid_resize_edge = 0
1696 };
1697 
1704 struct xdg_toplevel_resize_edge : public wayland::detail::bitfield<4, 11>
1705 {
1706  xdg_toplevel_resize_edge(const wayland::detail::bitfield<4, 11> &b)
1707  : wayland::detail::bitfield<4, 11>(b) {}
1708  xdg_toplevel_resize_edge(const uint32_t value)
1709  : wayland::detail::bitfield<4, 11>(value) {}
1710  static const wayland::detail::bitfield<4, 11> none;
1711  static const wayland::detail::bitfield<4, 11> top;
1712  static const wayland::detail::bitfield<4, 11> bottom;
1713  static const wayland::detail::bitfield<4, 11> left;
1714  static const wayland::detail::bitfield<4, 11> top_left;
1715  static const wayland::detail::bitfield<4, 11> bottom_left;
1716  static const wayland::detail::bitfield<4, 11> right;
1717  static const wayland::detail::bitfield<4, 11> top_right;
1718  static const wayland::detail::bitfield<4, 11> bottom_right;
1719 };
1720 
1732 enum class xdg_toplevel_state : uint32_t
1733  {
1735  maximized = 1,
1737  fullscreen = 2,
1739  resizing = 3,
1741  activated = 4,
1742  tiled_left = 5,
1743  tiled_right = 6,
1744  tiled_top = 7,
1745  tiled_bottom = 8
1746 };
1747 
1748 
1777 class xdg_popup_t : public proxy_t
1778 {
1779 private:
1780  struct events_t : public detail::events_base_t
1781  {
1782  std::function<void(int32_t, int32_t, int32_t, int32_t)> configure;
1783  std::function<void()> popup_done;
1784  std::function<void(uint32_t)> repositioned;
1785  };
1786 
1787  static int dispatcher(uint32_t opcode, const std::vector<detail::any>& args, const std::shared_ptr<detail::events_base_t>& e);
1788 
1789  xdg_popup_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/);
1790 
1791 public:
1792  xdg_popup_t();
1793  explicit xdg_popup_t(const proxy_t &proxy);
1794  xdg_popup_t(xdg_popup *p, wrapper_type t = wrapper_type::standard);
1795 
1796  xdg_popup_t proxy_create_wrapper();
1797 
1798  static const std::string interface_name;
1799 
1800  operator xdg_popup*() const;
1801 
1849  void grab(seat_t const& seat, uint32_t serial);
1850 
1853  static constexpr std::uint32_t grab_since_version = 1;
1854 
1884  void reposition(xdg_positioner_t const& positioner, uint32_t token);
1885 
1888  static constexpr std::uint32_t reposition_since_version = 3;
1889 
1893  bool can_reposition() const;
1894 
1915  std::function<void(int32_t, int32_t, int32_t, int32_t)> &on_configure();
1916 
1924  std::function<void()> &on_popup_done();
1925 
1946  std::function<void(uint32_t)> &on_repositioned();
1947 
1948 };
1949 
1953 enum class xdg_popup_error : uint32_t
1954  {
1956  invalid_grab = 0
1957 };
1958 
1959 
1960 
1961 }
create desktop-style surfaces
static constexpr std::uint32_t grab_since_version
Minimum protocol version required for the grab function.
static constexpr std::uint32_t set_min_size_since_version
Minimum protocol version required for the set_min_size function.
void set_constraint_adjustment(xdg_positioner_constraint_adjustment const &constraint_adjustment)
set the adjustment to be done when constrained
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 pong_since_version
Minimum protocol version required for the pong function.
void resize(seat_t const &seat, uint32_t serial, xdg_toplevel_resize_edge const &edges)
start an interactive resize
bitmask of flags in presented event
void show_window_menu(seat_t const &seat, uint32_t serial, int32_t x, int32_t y)
show the window menu
std::function< void(uint32_t)> & on_clock_id()
clock ID for timestamps
xdg_positioner_t create_positioner()
create a positioner object
group of input devices
void set_size(int32_t width, int32_t height)
set the size of the to-be positioned rectangle
static constexpr std::uint32_t get_viewport_since_version
Minimum protocol version required for the get_viewport function.
desktop user interface surface base interface
static constexpr std::uint32_t set_source_since_version
Minimum protocol version required for the set_source function.
std::function< void(uint32_t)> & on_ping()
check if the client is alive
std::function< void()> & on_popup_done()
popup interaction is done
void set_anchor(xdg_positioner_anchor const &anchor)
set anchor rectangle anchor
static constexpr std::uint32_t resize_since_version
Minimum protocol version required for the resize function.
static constexpr std::uint32_t set_anchor_since_version
Minimum protocol version required for the set_anchor function.
std::function< void()> & on_close()
surface wants to be closed
void move(seat_t const &seat, uint32_t serial)
start an interactive move
compositor output region
static constexpr std::uint32_t set_app_id_since_version
Minimum protocol version required for the set_app_id function.
void reposition(xdg_positioner_t const &positioner, uint32_t token)
recalculate the popup's location
void set_anchor_rect(int32_t x, int32_t y, int32_t width, int32_t height)
set the anchor rectangle within the parent surface
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
void set_fullscreen(output_t const &output)
set the window as fullscreen on an output
void set_offset(int32_t x, int32_t y)
set surface position offset
static constexpr std::uint32_t set_reactive_since_version
Minimum protocol version required for the set_reactive function.
void pong(uint32_t serial)
respond to a ping event
void set_minimized()
set the window as minimized
static constexpr std::uint32_t set_parent_configure_since_version
Minimum protocol version required for the set_parent_configure function.
static constexpr std::uint32_t set_minimized_since_version
Minimum protocol version required for the set_minimized function.
std::function< void(int32_t, int32_t, int32_t, int32_t)> & on_configure()
configure the popup surface
short-lived, popup surfaces for menus
static constexpr std::uint32_t get_popup_since_version
Minimum protocol version required for the get_popup function.
std::function< void(uint32_t)> & on_repositioned()
signal the completion of a repositioned request
void set_maximized()
maximize the window
static constexpr std::uint32_t unset_fullscreen_since_version
Minimum protocol version required for the unset_fullscreen function.
void set_parent_configure(uint32_t serial)
set parent configure this is a response to
static constexpr std::uint32_t set_max_size_since_version
Minimum protocol version required for the set_max_size function.
void set_reactive()
continuously reconstrain the surface
void set_max_size(int32_t width, int32_t height)
set the maximum size
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.
void set_min_size(int32_t width, int32_t height)
set the minimum size
static constexpr std::uint32_t create_positioner_since_version
Minimum protocol version required for the create_positioner 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 feedback_since_version
Minimum protocol version required for the feedback function.
Represents a protocol object on the client side.
xdg_surface_t get_xdg_surface(surface_t const &surface)
create a shell surface from a surface
static constexpr std::uint32_t move_since_version
Minimum protocol version required for the move function.
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_toplevel_since_version
Minimum protocol version required for the get_toplevel function.
std::function< void(output_t)> & on_sync_output()
presentation synchronized to this output
void grab(seat_t const &seat, uint32_t serial)
make the popup take an explicit grab
void set_window_geometry(int32_t x, int32_t y, int32_t width, int32_t height)
set the new window geometry
surface cropping and scaling
static constexpr std::uint32_t set_constraint_adjustment_since_version
Minimum protocol version required for the set_constraint_adjustment function.
xdg_toplevel_t get_toplevel()
assign the xdg_toplevel surface role
crop and scale interface to a wl_surface
viewport_t get_viewport(surface_t const &surface)
extend surface interface for crop and scale
std::function< void(int32_t, int32_t, array_t)> & on_configure()
suggest a surface change
std::function< void()> & on_discarded()
the content update was not displayed
static constexpr std::uint32_t set_destination_since_version
Minimum protocol version required for the set_destination function.
void unset_fullscreen()
unset the window as fullscreen
static constexpr std::uint32_t set_gravity_since_version
Minimum protocol version required for the set_gravity function.
std::function< void(int32_t, int32_t)> & on_configure_bounds()
recommended window geometry bounds
bool can_set_parent_size() const
Check whether the set_parent_size function is available with the currently bound version of the proto...
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_size_since_version
Minimum protocol version required for the set_size function.
static constexpr std::uint32_t reposition_since_version
Minimum protocol version required for the reposition function.
static constexpr std::uint32_t set_parent_since_version
Minimum protocol version required for the set_parent function.
static constexpr std::uint32_t set_offset_since_version
Minimum protocol version required for the set_offset function.
std::function< void(uint32_t)> & on_configure()
suggest a surface change
void set_gravity(xdg_positioner_gravity const &gravity)
set child surface gravity
void set_parent(xdg_toplevel_t const &parent)
set the parent of this surface
timed presentation related wl_surface requests
static constexpr std::uint32_t unset_maximized_since_version
Minimum protocol version required for the unset_maximized function.
void set_destination(int32_t width, int32_t height)
set the surface size for scaling
presentation_feedback_t feedback(surface_t const &surface)
request presentation feedback information
void unset_maximized()
unmaximize the window
bool can_set_parent_configure() const
Check whether the set_parent_configure function is available with the currently bound version of the ...
static constexpr std::uint32_t set_title_since_version
Minimum protocol version required for the set_title function.
xdg_popup_t get_popup(xdg_surface_t const &parent, xdg_positioner_t const &positioner)
assign the xdg_popup surface role
void set_parent_size(int32_t parent_width, int32_t parent_height)
static constexpr std::uint32_t set_fullscreen_since_version
Minimum protocol version required for the set_fullscreen function.
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 set_maximized_since_version
Minimum protocol version required for the set_maximized function.
void set_app_id(std::string const &app_id)
set application ID
bool can_reposition() const
Check whether the reposition function is available with the currently bound version of the protocol...
static constexpr std::uint32_t set_anchor_rect_since_version
Minimum protocol version required for the set_anchor_rect function.
void set_title(std::string const &title)
set surface title
void set_source(double x, double y, double width, double height)
set the source rectangle for cropping