1 #include <wayland-client-protocol-extra.hpp>
3 using namespace wayland;
4 using namespace detail;
6 const wl_interface* presentation_interface_destroy_request[0] = {
9 const wl_interface* presentation_interface_feedback_request[2] = {
11 &presentation_feedback_interface,
14 const wl_interface* presentation_interface_clock_id_event[1] = {
18 const wl_message presentation_interface_requests[2] = {
22 presentation_interface_destroy_request,
27 presentation_interface_feedback_request,
31 const wl_message presentation_interface_events[1] = {
35 presentation_interface_clock_id_event,
39 const wl_interface wayland::detail::presentation_interface =
44 presentation_interface_requests,
46 presentation_interface_events,
49 const wl_interface* presentation_feedback_interface_sync_output_event[1] = {
53 const wl_interface* presentation_feedback_interface_presented_event[7] = {
63 const wl_interface* presentation_feedback_interface_discarded_event[0] = {
66 const wl_message presentation_feedback_interface_requests[0] = {
69 const wl_message presentation_feedback_interface_events[3] = {
73 presentation_feedback_interface_sync_output_event,
78 presentation_feedback_interface_presented_event,
83 presentation_feedback_interface_discarded_event,
87 const wl_interface wayland::detail::presentation_feedback_interface =
89 "wp_presentation_feedback",
92 presentation_feedback_interface_requests,
94 presentation_feedback_interface_events,
97 const wl_interface* viewporter_interface_destroy_request[0] = {
100 const wl_interface* viewporter_interface_get_viewport_request[2] = {
105 const wl_message viewporter_interface_requests[2] = {
109 viewporter_interface_destroy_request,
114 viewporter_interface_get_viewport_request,
118 const wl_message viewporter_interface_events[0] = {
121 const wl_interface wayland::detail::viewporter_interface =
126 viewporter_interface_requests,
128 viewporter_interface_events,
131 const wl_interface* viewport_interface_destroy_request[0] = {
134 const wl_interface* viewport_interface_set_source_request[4] = {
141 const wl_interface* viewport_interface_set_destination_request[2] = {
146 const wl_message viewport_interface_requests[3] = {
150 viewport_interface_destroy_request,
155 viewport_interface_set_source_request,
160 viewport_interface_set_destination_request,
164 const wl_message viewport_interface_events[0] = {
167 const wl_interface wayland::detail::viewport_interface =
172 viewport_interface_requests,
174 viewport_interface_events,
177 const wl_interface* xdg_wm_base_interface_destroy_request[0] = {
180 const wl_interface* xdg_wm_base_interface_create_positioner_request[1] = {
181 &xdg_positioner_interface,
184 const wl_interface* xdg_wm_base_interface_get_xdg_surface_request[2] = {
185 &xdg_surface_interface,
189 const wl_interface* xdg_wm_base_interface_pong_request[1] = {
193 const wl_interface* xdg_wm_base_interface_ping_event[1] = {
197 const wl_message xdg_wm_base_interface_requests[4] = {
201 xdg_wm_base_interface_destroy_request,
206 xdg_wm_base_interface_create_positioner_request,
211 xdg_wm_base_interface_get_xdg_surface_request,
216 xdg_wm_base_interface_pong_request,
220 const wl_message xdg_wm_base_interface_events[1] = {
224 xdg_wm_base_interface_ping_event,
228 const wl_interface wayland::detail::xdg_wm_base_interface =
233 xdg_wm_base_interface_requests,
235 xdg_wm_base_interface_events,
238 const wl_interface* xdg_positioner_interface_destroy_request[0] = {
241 const wl_interface* xdg_positioner_interface_set_size_request[2] = {
246 const wl_interface* xdg_positioner_interface_set_anchor_rect_request[4] = {
253 const wl_interface* xdg_positioner_interface_set_anchor_request[1] = {
257 const wl_interface* xdg_positioner_interface_set_gravity_request[1] = {
261 const wl_interface* xdg_positioner_interface_set_constraint_adjustment_request[1] = {
265 const wl_interface* xdg_positioner_interface_set_offset_request[2] = {
270 const wl_message xdg_positioner_interface_requests[7] = {
274 xdg_positioner_interface_destroy_request,
279 xdg_positioner_interface_set_size_request,
284 xdg_positioner_interface_set_anchor_rect_request,
289 xdg_positioner_interface_set_anchor_request,
294 xdg_positioner_interface_set_gravity_request,
297 "set_constraint_adjustment",
299 xdg_positioner_interface_set_constraint_adjustment_request,
304 xdg_positioner_interface_set_offset_request,
308 const wl_message xdg_positioner_interface_events[0] = {
311 const wl_interface wayland::detail::xdg_positioner_interface =
316 xdg_positioner_interface_requests,
318 xdg_positioner_interface_events,
321 const wl_interface* xdg_surface_interface_destroy_request[0] = {
324 const wl_interface* xdg_surface_interface_get_toplevel_request[1] = {
325 &xdg_toplevel_interface,
328 const wl_interface* xdg_surface_interface_get_popup_request[3] = {
329 &xdg_popup_interface,
330 &xdg_surface_interface,
331 &xdg_positioner_interface,
334 const wl_interface* xdg_surface_interface_set_window_geometry_request[4] = {
341 const wl_interface* xdg_surface_interface_ack_configure_request[1] = {
345 const wl_interface* xdg_surface_interface_configure_event[1] = {
349 const wl_message xdg_surface_interface_requests[5] = {
353 xdg_surface_interface_destroy_request,
358 xdg_surface_interface_get_toplevel_request,
363 xdg_surface_interface_get_popup_request,
366 "set_window_geometry",
368 xdg_surface_interface_set_window_geometry_request,
373 xdg_surface_interface_ack_configure_request,
377 const wl_message xdg_surface_interface_events[1] = {
381 xdg_surface_interface_configure_event,
385 const wl_interface wayland::detail::xdg_surface_interface =
390 xdg_surface_interface_requests,
392 xdg_surface_interface_events,
395 const wl_interface* xdg_toplevel_interface_destroy_request[0] = {
398 const wl_interface* xdg_toplevel_interface_set_parent_request[1] = {
399 &xdg_toplevel_interface,
402 const wl_interface* xdg_toplevel_interface_set_title_request[1] = {
406 const wl_interface* xdg_toplevel_interface_set_app_id_request[1] = {
410 const wl_interface* xdg_toplevel_interface_show_window_menu_request[4] = {
417 const wl_interface* xdg_toplevel_interface_move_request[2] = {
422 const wl_interface* xdg_toplevel_interface_resize_request[3] = {
428 const wl_interface* xdg_toplevel_interface_set_max_size_request[2] = {
433 const wl_interface* xdg_toplevel_interface_set_min_size_request[2] = {
438 const wl_interface* xdg_toplevel_interface_set_maximized_request[0] = {
441 const wl_interface* xdg_toplevel_interface_unset_maximized_request[0] = {
444 const wl_interface* xdg_toplevel_interface_set_fullscreen_request[1] = {
448 const wl_interface* xdg_toplevel_interface_unset_fullscreen_request[0] = {
451 const wl_interface* xdg_toplevel_interface_set_minimized_request[0] = {
454 const wl_interface* xdg_toplevel_interface_configure_event[3] = {
460 const wl_interface* xdg_toplevel_interface_close_event[0] = {
463 const wl_message xdg_toplevel_interface_requests[14] = {
467 xdg_toplevel_interface_destroy_request,
472 xdg_toplevel_interface_set_parent_request,
477 xdg_toplevel_interface_set_title_request,
482 xdg_toplevel_interface_set_app_id_request,
487 xdg_toplevel_interface_show_window_menu_request,
492 xdg_toplevel_interface_move_request,
497 xdg_toplevel_interface_resize_request,
502 xdg_toplevel_interface_set_max_size_request,
507 xdg_toplevel_interface_set_min_size_request,
512 xdg_toplevel_interface_set_maximized_request,
517 xdg_toplevel_interface_unset_maximized_request,
522 xdg_toplevel_interface_set_fullscreen_request,
527 xdg_toplevel_interface_unset_fullscreen_request,
532 xdg_toplevel_interface_set_minimized_request,
536 const wl_message xdg_toplevel_interface_events[2] = {
540 xdg_toplevel_interface_configure_event,
545 xdg_toplevel_interface_close_event,
549 const wl_interface wayland::detail::xdg_toplevel_interface =
554 xdg_toplevel_interface_requests,
556 xdg_toplevel_interface_events,
559 const wl_interface* xdg_popup_interface_destroy_request[0] = {
562 const wl_interface* xdg_popup_interface_grab_request[2] = {
567 const wl_interface* xdg_popup_interface_configure_event[4] = {
574 const wl_interface* xdg_popup_interface_popup_done_event[0] = {
577 const wl_message xdg_popup_interface_requests[2] = {
581 xdg_popup_interface_destroy_request,
586 xdg_popup_interface_grab_request,
590 const wl_message xdg_popup_interface_events[2] = {
594 xdg_popup_interface_configure_event,
599 xdg_popup_interface_popup_done_event,
603 const wl_interface wayland::detail::xdg_popup_interface =
608 xdg_popup_interface_requests,
610 xdg_popup_interface_events,
613 presentation_t::presentation_t(
const proxy_t &p)
616 if(proxy_has_object() && get_wrapper_type() == wrapper_type::standard)
618 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
619 set_destroy_opcode(0u);
621 interface = &presentation_interface;
626 presentation_t::presentation_t()
628 interface = &presentation_interface;
633 presentation_t::presentation_t(wp_presentation *p, wrapper_type t)
634 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
635 if(proxy_has_object() && get_wrapper_type() == wrapper_type::standard)
637 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
638 set_destroy_opcode(0u);
640 interface = &presentation_interface;
645 presentation_t::presentation_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
646 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
647 interface = &presentation_interface;
654 return {*
this, construct_proxy_wrapper_tag()};
657 const std::string presentation_t::interface_name =
"wp_presentation";
659 presentation_t::operator wp_presentation*()
const
661 return reinterpret_cast<wp_presentation*> (c_ptr());
666 proxy_t p = marshal_constructor(1u, &presentation_feedback_interface, surface.
proxy_has_object() ? reinterpret_cast<wl_object*>(surface.
c_ptr()) :
nullptr,
nullptr);
672 return std::static_pointer_cast<events_t>(get_events())->clock_id;
675 int presentation_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
677 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
681 if(events->clock_id) events->clock_id(args[0].get<uint32_t>());
688 presentation_feedback_t::presentation_feedback_t(
const proxy_t &p)
693 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
695 interface = &presentation_feedback_interface;
700 presentation_feedback_t::presentation_feedback_t()
702 interface = &presentation_feedback_interface;
707 presentation_feedback_t::presentation_feedback_t(wp_presentation_feedback *p, wrapper_type t)
708 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
711 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
713 interface = &presentation_feedback_interface;
718 presentation_feedback_t::presentation_feedback_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
719 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
720 interface = &presentation_feedback_interface;
727 return {*
this, construct_proxy_wrapper_tag()};
730 const std::string presentation_feedback_t::interface_name =
"wp_presentation_feedback";
732 presentation_feedback_t::operator wp_presentation_feedback*()
const
734 return reinterpret_cast<wp_presentation_feedback*> (c_ptr());
739 return std::static_pointer_cast<events_t>(get_events())->sync_output;
744 return std::static_pointer_cast<events_t>(get_events())->presented;
749 return std::static_pointer_cast<events_t>(get_events())->discarded;
752 int presentation_feedback_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
754 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
758 if(events->sync_output) events->sync_output(
output_t(args[0].get<proxy_t>()));
761 if(events->presented) events->presented(args[0].get<uint32_t>(), args[1].get<uint32_t>(), args[2].get<uint32_t>(), args[3].get<uint32_t>(), args[4].get<uint32_t>(), args[5].get<uint32_t>(),
presentation_feedback_kind(args[6].get<uint32_t>()));
764 if(events->discarded) events->discarded();
775 viewporter_t::viewporter_t(
const proxy_t &p)
780 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
781 set_destroy_opcode(0u);
783 interface = &viewporter_interface;
788 viewporter_t::viewporter_t()
790 interface = &viewporter_interface;
795 viewporter_t::viewporter_t(wp_viewporter *p, wrapper_type t)
796 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
799 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
800 set_destroy_opcode(0u);
802 interface = &viewporter_interface;
807 viewporter_t::viewporter_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
808 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
809 interface = &viewporter_interface;
816 return {*
this, construct_proxy_wrapper_tag()};
819 const std::string viewporter_t::interface_name =
"wp_viewporter";
821 viewporter_t::operator wp_viewporter*()
const
823 return reinterpret_cast<wp_viewporter*> (c_ptr());
828 proxy_t p = marshal_constructor(1u, &viewport_interface,
nullptr, surface.
proxy_has_object() ? reinterpret_cast<wl_object*>(surface.
c_ptr()) :
nullptr);
832 int viewporter_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
838 viewport_t::viewport_t(
const proxy_t &p)
843 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
844 set_destroy_opcode(0u);
846 interface = &viewport_interface;
851 viewport_t::viewport_t()
853 interface = &viewport_interface;
858 viewport_t::viewport_t(wp_viewport *p, wrapper_type t)
859 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
862 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
863 set_destroy_opcode(0u);
865 interface = &viewport_interface;
870 viewport_t::viewport_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
871 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
872 interface = &viewport_interface;
879 return {*
this, construct_proxy_wrapper_tag()};
882 const std::string viewport_t::interface_name =
"wp_viewport";
884 viewport_t::operator wp_viewport*()
const
886 return reinterpret_cast<wp_viewport*> (c_ptr());
891 marshal(1u, x, y, width, height);
896 marshal(2u, width, height);
899 int viewport_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
905 xdg_wm_base_t::xdg_wm_base_t(
const proxy_t &p)
910 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
911 set_destroy_opcode(0u);
913 interface = &xdg_wm_base_interface;
918 xdg_wm_base_t::xdg_wm_base_t()
920 interface = &xdg_wm_base_interface;
925 xdg_wm_base_t::xdg_wm_base_t(xdg_wm_base *p, wrapper_type t)
926 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
929 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
930 set_destroy_opcode(0u);
932 interface = &xdg_wm_base_interface;
937 xdg_wm_base_t::xdg_wm_base_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
938 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
939 interface = &xdg_wm_base_interface;
946 return {*
this, construct_proxy_wrapper_tag()};
949 const std::string xdg_wm_base_t::interface_name =
"xdg_wm_base";
951 xdg_wm_base_t::operator xdg_wm_base*()
const
953 return reinterpret_cast<xdg_wm_base*> (c_ptr());
958 proxy_t p = marshal_constructor(1u, &xdg_positioner_interface,
nullptr);
964 proxy_t p = marshal_constructor(2u, &xdg_surface_interface,
nullptr, surface.
proxy_has_object() ? reinterpret_cast<wl_object*>(surface.
c_ptr()) :
nullptr);
975 return std::static_pointer_cast<events_t>(get_events())->ping;
978 int xdg_wm_base_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
980 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
984 if(events->ping) events->ping(args[0].get<uint32_t>());
991 xdg_positioner_t::xdg_positioner_t(
const proxy_t &p)
996 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
997 set_destroy_opcode(0u);
999 interface = &xdg_positioner_interface;
1004 xdg_positioner_t::xdg_positioner_t()
1006 interface = &xdg_positioner_interface;
1011 xdg_positioner_t::xdg_positioner_t(xdg_positioner *p, wrapper_type t)
1012 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1015 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1016 set_destroy_opcode(0u);
1018 interface = &xdg_positioner_interface;
1023 xdg_positioner_t::xdg_positioner_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
1024 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1025 interface = &xdg_positioner_interface;
1032 return {*
this, construct_proxy_wrapper_tag()};
1035 const std::string xdg_positioner_t::interface_name =
"xdg_positioner";
1037 xdg_positioner_t::operator xdg_positioner*()
const
1039 return reinterpret_cast<xdg_positioner*> (c_ptr());
1044 marshal(1u, width, height);
1049 marshal(2u, x, y, width, height);
1054 marshal(3u, static_cast<uint32_t>(anchor));
1059 marshal(4u, static_cast<uint32_t>(gravity));
1064 marshal(5u, static_cast<uint32_t>(constraint_adjustment));
1072 int xdg_positioner_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
1079 const bitfield<6, 8> xdg_positioner_constraint_adjustment::none{0};
1080 const bitfield<6, 8> xdg_positioner_constraint_adjustment::slide_x{1};
1081 const bitfield<6, 8> xdg_positioner_constraint_adjustment::slide_y{2};
1082 const bitfield<6, 8> xdg_positioner_constraint_adjustment::flip_x{4};
1083 const bitfield<6, 8> xdg_positioner_constraint_adjustment::flip_y{8};
1084 const bitfield<6, 8> xdg_positioner_constraint_adjustment::resize_x{16};
1085 const bitfield<6, 8> xdg_positioner_constraint_adjustment::resize_y{32};
1088 xdg_surface_t::xdg_surface_t(
const proxy_t &p)
1093 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1094 set_destroy_opcode(0u);
1096 interface = &xdg_surface_interface;
1101 xdg_surface_t::xdg_surface_t()
1103 interface = &xdg_surface_interface;
1108 xdg_surface_t::xdg_surface_t(xdg_surface *p, wrapper_type t)
1109 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1112 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1113 set_destroy_opcode(0u);
1115 interface = &xdg_surface_interface;
1120 xdg_surface_t::xdg_surface_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
1121 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1122 interface = &xdg_surface_interface;
1129 return {*
this, construct_proxy_wrapper_tag()};
1132 const std::string xdg_surface_t::interface_name =
"xdg_surface";
1134 xdg_surface_t::operator xdg_surface*()
const
1136 return reinterpret_cast<xdg_surface*> (c_ptr());
1141 proxy_t p = marshal_constructor(1u, &xdg_toplevel_interface,
nullptr);
1147 proxy_t p = marshal_constructor(2u, &xdg_popup_interface,
nullptr, parent.
proxy_has_object() ? reinterpret_cast<wl_object*>(parent.
c_ptr()) :
nullptr, positioner.
proxy_has_object() ? reinterpret_cast<wl_object*>(positioner.
c_ptr()) :
nullptr);
1153 marshal(3u, x, y, width, height);
1158 marshal(4u, serial);
1163 return std::static_pointer_cast<events_t>(get_events())->configure;
1166 int xdg_surface_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
1168 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1172 if(events->configure) events->configure(args[0].get<uint32_t>());
1179 xdg_toplevel_t::xdg_toplevel_t(
const proxy_t &p)
1184 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1185 set_destroy_opcode(0u);
1187 interface = &xdg_toplevel_interface;
1192 xdg_toplevel_t::xdg_toplevel_t()
1194 interface = &xdg_toplevel_interface;
1199 xdg_toplevel_t::xdg_toplevel_t(xdg_toplevel *p, wrapper_type t)
1200 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1203 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1204 set_destroy_opcode(0u);
1206 interface = &xdg_toplevel_interface;
1211 xdg_toplevel_t::xdg_toplevel_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
1212 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1213 interface = &xdg_toplevel_interface;
1220 return {*
this, construct_proxy_wrapper_tag()};
1223 const std::string xdg_toplevel_t::interface_name =
"xdg_toplevel";
1225 xdg_toplevel_t::operator xdg_toplevel*()
const
1227 return reinterpret_cast<xdg_toplevel*> (c_ptr());
1242 marshal(3u, app_id);
1247 marshal(4u, seat.
proxy_has_object() ? reinterpret_cast<wl_object*>(seat.
c_ptr()) :
nullptr, serial, x, y);
1252 marshal(5u, seat.
proxy_has_object() ? reinterpret_cast<wl_object*>(seat.
c_ptr()) :
nullptr, serial);
1257 marshal(6u, seat.
proxy_has_object() ? reinterpret_cast<wl_object*>(seat.
c_ptr()) :
nullptr, serial, static_cast<uint32_t>(edges));
1262 marshal(7u, width, height);
1267 marshal(8u, width, height);
1297 return std::static_pointer_cast<events_t>(get_events())->configure;
1302 return std::static_pointer_cast<events_t>(get_events())->close;
1305 int xdg_toplevel_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
1307 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1311 if(events->configure) events->configure(args[0].get<int32_t>(), args[1].get<int32_t>(), args[2].get<array_t>());
1314 if(events->close) events->close();
1319 const bitfield<4, 10> xdg_toplevel_resize_edge::none{0};
1320 const bitfield<4, 10> xdg_toplevel_resize_edge::top{1};
1321 const bitfield<4, 10> xdg_toplevel_resize_edge::bottom{2};
1322 const bitfield<4, 10> xdg_toplevel_resize_edge::left{4};
1323 const bitfield<4, 10> xdg_toplevel_resize_edge::top_left{5};
1324 const bitfield<4, 10> xdg_toplevel_resize_edge::bottom_left{6};
1325 const bitfield<4, 10> xdg_toplevel_resize_edge::right{8};
1326 const bitfield<4, 10> xdg_toplevel_resize_edge::top_right{9};
1327 const bitfield<4, 10> xdg_toplevel_resize_edge::bottom_right{10};
1331 xdg_popup_t::xdg_popup_t(
const proxy_t &p)
1336 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1337 set_destroy_opcode(0u);
1339 interface = &xdg_popup_interface;
1344 xdg_popup_t::xdg_popup_t()
1346 interface = &xdg_popup_interface;
1351 xdg_popup_t::xdg_popup_t(xdg_popup *p, wrapper_type t)
1352 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1355 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1356 set_destroy_opcode(0u);
1358 interface = &xdg_popup_interface;
1363 xdg_popup_t::xdg_popup_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
1364 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1365 interface = &xdg_popup_interface;
1372 return {*
this, construct_proxy_wrapper_tag()};
1375 const std::string xdg_popup_t::interface_name =
"xdg_popup";
1377 xdg_popup_t::operator xdg_popup*()
const
1379 return reinterpret_cast<xdg_popup*> (c_ptr());
1384 marshal(1u, seat.
proxy_has_object() ? reinterpret_cast<wl_object*>(seat.
c_ptr()) :
nullptr, serial);
1389 return std::static_pointer_cast<events_t>(get_events())->configure;
1394 return std::static_pointer_cast<events_t>(get_events())->popup_done;
1397 int xdg_popup_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
1399 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1403 if(events->configure) events->configure(args[0].get<int32_t>(), args[1].get<int32_t>(), args[2].get<int32_t>(), args[3].get<int32_t>());
1406 if(events->popup_done) events->popup_done();