1#include <wayland-client-protocol.hpp>
3using namespace wayland;
6const wl_interface* display_interface_sync_request[1] = {
10const wl_interface* display_interface_get_registry_request[1] = {
14const wl_interface* display_interface_error_event[3] = {
20const wl_interface* display_interface_delete_id_event[1] = {
24const wl_message display_interface_requests[2] = {
28 display_interface_sync_request,
33 display_interface_get_registry_request,
37const wl_message display_interface_events[2] = {
41 display_interface_error_event,
46 display_interface_delete_id_event,
50const wl_interface wayland::detail::display_interface =
55 display_interface_requests,
57 display_interface_events,
60const wl_interface* registry_interface_bind_request[2] = {
65const wl_interface* registry_interface_global_event[3] = {
71const wl_interface* registry_interface_global_remove_event[1] = {
75const wl_message registry_interface_requests[1] = {
79 registry_interface_bind_request,
83const wl_message registry_interface_events[2] = {
87 registry_interface_global_event,
92 registry_interface_global_remove_event,
96const wl_interface wayland::detail::registry_interface =
101 registry_interface_requests,
103 registry_interface_events,
106const wl_interface* callback_interface_done_event[1] = {
110const wl_message callback_interface_requests[0] = {
113const wl_message callback_interface_events[1] = {
117 callback_interface_done_event,
121const wl_interface wayland::detail::callback_interface =
126 callback_interface_requests,
128 callback_interface_events,
131const wl_interface* compositor_interface_create_surface_request[1] = {
135const wl_interface* compositor_interface_create_region_request[1] = {
139const wl_message compositor_interface_requests[2] = {
143 compositor_interface_create_surface_request,
148 compositor_interface_create_region_request,
152const wl_message compositor_interface_events[0] = {
155const wl_interface wayland::detail::compositor_interface =
160 compositor_interface_requests,
162 compositor_interface_events,
165const wl_interface* shm_pool_interface_create_buffer_request[6] = {
174const wl_interface* shm_pool_interface_destroy_request[0] = {
177const wl_interface* shm_pool_interface_resize_request[1] = {
181const wl_message shm_pool_interface_requests[3] = {
185 shm_pool_interface_create_buffer_request,
190 shm_pool_interface_destroy_request,
195 shm_pool_interface_resize_request,
199const wl_message shm_pool_interface_events[0] = {
202const wl_interface wayland::detail::shm_pool_interface =
207 shm_pool_interface_requests,
209 shm_pool_interface_events,
212const wl_interface* shm_interface_create_pool_request[3] = {
218const wl_interface* shm_interface_format_event[1] = {
222const wl_message shm_interface_requests[1] = {
226 shm_interface_create_pool_request,
230const wl_message shm_interface_events[1] = {
234 shm_interface_format_event,
238const wl_interface wayland::detail::shm_interface =
243 shm_interface_requests,
245 shm_interface_events,
248const wl_interface* buffer_interface_destroy_request[0] = {
251const wl_interface* buffer_interface_release_event[0] = {
254const wl_message buffer_interface_requests[1] = {
258 buffer_interface_destroy_request,
262const wl_message buffer_interface_events[1] = {
266 buffer_interface_release_event,
270const wl_interface wayland::detail::buffer_interface =
275 buffer_interface_requests,
277 buffer_interface_events,
280const wl_interface* data_offer_interface_accept_request[2] = {
285const wl_interface* data_offer_interface_receive_request[2] = {
290const wl_interface* data_offer_interface_destroy_request[0] = {
293const wl_interface* data_offer_interface_finish_request[0] = {
296const wl_interface* data_offer_interface_set_actions_request[2] = {
301const wl_interface* data_offer_interface_offer_event[1] = {
305const wl_interface* data_offer_interface_source_actions_event[1] = {
309const wl_interface* data_offer_interface_action_event[1] = {
313const wl_message data_offer_interface_requests[5] = {
317 data_offer_interface_accept_request,
322 data_offer_interface_receive_request,
327 data_offer_interface_destroy_request,
332 data_offer_interface_finish_request,
337 data_offer_interface_set_actions_request,
341const wl_message data_offer_interface_events[3] = {
345 data_offer_interface_offer_event,
350 data_offer_interface_source_actions_event,
355 data_offer_interface_action_event,
359const wl_interface wayland::detail::data_offer_interface =
364 data_offer_interface_requests,
366 data_offer_interface_events,
369const wl_interface* data_source_interface_offer_request[1] = {
373const wl_interface* data_source_interface_destroy_request[0] = {
376const wl_interface* data_source_interface_set_actions_request[1] = {
380const wl_interface* data_source_interface_target_event[1] = {
384const wl_interface* data_source_interface_send_event[2] = {
389const wl_interface* data_source_interface_cancelled_event[0] = {
392const wl_interface* data_source_interface_dnd_drop_performed_event[0] = {
395const wl_interface* data_source_interface_dnd_finished_event[0] = {
398const wl_interface* data_source_interface_action_event[1] = {
402const wl_message data_source_interface_requests[3] = {
406 data_source_interface_offer_request,
411 data_source_interface_destroy_request,
416 data_source_interface_set_actions_request,
420const wl_message data_source_interface_events[6] = {
424 data_source_interface_target_event,
429 data_source_interface_send_event,
434 data_source_interface_cancelled_event,
437 "dnd_drop_performed",
439 data_source_interface_dnd_drop_performed_event,
444 data_source_interface_dnd_finished_event,
449 data_source_interface_action_event,
453const wl_interface wayland::detail::data_source_interface =
458 data_source_interface_requests,
460 data_source_interface_events,
463const wl_interface* data_device_interface_start_drag_request[4] = {
464 &data_source_interface,
470const wl_interface* data_device_interface_set_selection_request[2] = {
471 &data_source_interface,
475const wl_interface* data_device_interface_release_request[0] = {
478const wl_interface* data_device_interface_data_offer_event[1] = {
479 &data_offer_interface,
482const wl_interface* data_device_interface_enter_event[5] = {
487 &data_offer_interface,
490const wl_interface* data_device_interface_leave_event[0] = {
493const wl_interface* data_device_interface_motion_event[3] = {
499const wl_interface* data_device_interface_drop_event[0] = {
502const wl_interface* data_device_interface_selection_event[1] = {
503 &data_offer_interface,
506const wl_message data_device_interface_requests[3] = {
510 data_device_interface_start_drag_request,
515 data_device_interface_set_selection_request,
520 data_device_interface_release_request,
524const wl_message data_device_interface_events[6] = {
528 data_device_interface_data_offer_event,
533 data_device_interface_enter_event,
538 data_device_interface_leave_event,
543 data_device_interface_motion_event,
548 data_device_interface_drop_event,
553 data_device_interface_selection_event,
557const wl_interface wayland::detail::data_device_interface =
562 data_device_interface_requests,
564 data_device_interface_events,
567const wl_interface* data_device_manager_interface_create_data_source_request[1] = {
568 &data_source_interface,
571const wl_interface* data_device_manager_interface_get_data_device_request[2] = {
572 &data_device_interface,
576const wl_message data_device_manager_interface_requests[2] = {
578 "create_data_source",
580 data_device_manager_interface_create_data_source_request,
585 data_device_manager_interface_get_data_device_request,
589const wl_message data_device_manager_interface_events[0] = {
592const wl_interface wayland::detail::data_device_manager_interface =
594 "wl_data_device_manager",
597 data_device_manager_interface_requests,
599 data_device_manager_interface_events,
602const wl_interface* shell_interface_get_shell_surface_request[2] = {
603 &shell_surface_interface,
607const wl_message shell_interface_requests[1] = {
611 shell_interface_get_shell_surface_request,
615const wl_message shell_interface_events[0] = {
618const wl_interface wayland::detail::shell_interface =
623 shell_interface_requests,
625 shell_interface_events,
628const wl_interface* shell_surface_interface_pong_request[1] = {
632const wl_interface* shell_surface_interface_move_request[2] = {
637const wl_interface* shell_surface_interface_resize_request[3] = {
643const wl_interface* shell_surface_interface_set_toplevel_request[0] = {
646const wl_interface* shell_surface_interface_set_transient_request[4] = {
653const wl_interface* shell_surface_interface_set_fullscreen_request[3] = {
659const wl_interface* shell_surface_interface_set_popup_request[6] = {
668const wl_interface* shell_surface_interface_set_maximized_request[1] = {
672const wl_interface* shell_surface_interface_set_title_request[1] = {
676const wl_interface* shell_surface_interface_set_class_request[1] = {
680const wl_interface* shell_surface_interface_ping_event[1] = {
684const wl_interface* shell_surface_interface_configure_event[3] = {
690const wl_interface* shell_surface_interface_popup_done_event[0] = {
693const wl_message shell_surface_interface_requests[10] = {
697 shell_surface_interface_pong_request,
702 shell_surface_interface_move_request,
707 shell_surface_interface_resize_request,
712 shell_surface_interface_set_toplevel_request,
717 shell_surface_interface_set_transient_request,
722 shell_surface_interface_set_fullscreen_request,
727 shell_surface_interface_set_popup_request,
732 shell_surface_interface_set_maximized_request,
737 shell_surface_interface_set_title_request,
742 shell_surface_interface_set_class_request,
746const wl_message shell_surface_interface_events[3] = {
750 shell_surface_interface_ping_event,
755 shell_surface_interface_configure_event,
760 shell_surface_interface_popup_done_event,
764const wl_interface wayland::detail::shell_surface_interface =
769 shell_surface_interface_requests,
771 shell_surface_interface_events,
774const wl_interface* surface_interface_destroy_request[0] = {
777const wl_interface* surface_interface_attach_request[3] = {
783const wl_interface* surface_interface_damage_request[4] = {
790const wl_interface* surface_interface_frame_request[1] = {
794const wl_interface* surface_interface_set_opaque_region_request[1] = {
798const wl_interface* surface_interface_set_input_region_request[1] = {
802const wl_interface* surface_interface_commit_request[0] = {
805const wl_interface* surface_interface_set_buffer_transform_request[1] = {
809const wl_interface* surface_interface_set_buffer_scale_request[1] = {
813const wl_interface* surface_interface_damage_buffer_request[4] = {
820const wl_interface* surface_interface_enter_event[1] = {
824const wl_interface* surface_interface_leave_event[1] = {
828const wl_message surface_interface_requests[10] = {
832 surface_interface_destroy_request,
837 surface_interface_attach_request,
842 surface_interface_damage_request,
847 surface_interface_frame_request,
852 surface_interface_set_opaque_region_request,
857 surface_interface_set_input_region_request,
862 surface_interface_commit_request,
865 "set_buffer_transform",
867 surface_interface_set_buffer_transform_request,
872 surface_interface_set_buffer_scale_request,
877 surface_interface_damage_buffer_request,
881const wl_message surface_interface_events[2] = {
885 surface_interface_enter_event,
890 surface_interface_leave_event,
894const wl_interface wayland::detail::surface_interface =
899 surface_interface_requests,
901 surface_interface_events,
904const wl_interface* seat_interface_get_pointer_request[1] = {
908const wl_interface* seat_interface_get_keyboard_request[1] = {
912const wl_interface* seat_interface_get_touch_request[1] = {
916const wl_interface* seat_interface_release_request[0] = {
919const wl_interface* seat_interface_capabilities_event[1] = {
923const wl_interface* seat_interface_name_event[1] = {
927const wl_message seat_interface_requests[4] = {
931 seat_interface_get_pointer_request,
936 seat_interface_get_keyboard_request,
941 seat_interface_get_touch_request,
946 seat_interface_release_request,
950const wl_message seat_interface_events[2] = {
954 seat_interface_capabilities_event,
959 seat_interface_name_event,
963const wl_interface wayland::detail::seat_interface =
968 seat_interface_requests,
970 seat_interface_events,
973const wl_interface* pointer_interface_set_cursor_request[4] = {
980const wl_interface* pointer_interface_release_request[0] = {
983const wl_interface* pointer_interface_enter_event[4] = {
990const wl_interface* pointer_interface_leave_event[2] = {
995const wl_interface* pointer_interface_motion_event[3] = {
1001const wl_interface* pointer_interface_button_event[4] = {
1008const wl_interface* pointer_interface_axis_event[3] = {
1014const wl_interface* pointer_interface_frame_event[0] = {
1017const wl_interface* pointer_interface_axis_source_event[1] = {
1021const wl_interface* pointer_interface_axis_stop_event[2] = {
1026const wl_interface* pointer_interface_axis_discrete_event[2] = {
1031const wl_message pointer_interface_requests[2] = {
1035 pointer_interface_set_cursor_request,
1040 pointer_interface_release_request,
1044const wl_message pointer_interface_events[9] = {
1048 pointer_interface_enter_event,
1053 pointer_interface_leave_event,
1058 pointer_interface_motion_event,
1063 pointer_interface_button_event,
1068 pointer_interface_axis_event,
1073 pointer_interface_frame_event,
1078 pointer_interface_axis_source_event,
1083 pointer_interface_axis_stop_event,
1088 pointer_interface_axis_discrete_event,
1092const wl_interface wayland::detail::pointer_interface =
1097 pointer_interface_requests,
1099 pointer_interface_events,
1102const wl_interface* keyboard_interface_release_request[0] = {
1105const wl_interface* keyboard_interface_keymap_event[3] = {
1111const wl_interface* keyboard_interface_enter_event[3] = {
1117const wl_interface* keyboard_interface_leave_event[2] = {
1122const wl_interface* keyboard_interface_key_event[4] = {
1129const wl_interface* keyboard_interface_modifiers_event[5] = {
1137const wl_interface* keyboard_interface_repeat_info_event[2] = {
1142const wl_message keyboard_interface_requests[1] = {
1146 keyboard_interface_release_request,
1150const wl_message keyboard_interface_events[6] = {
1154 keyboard_interface_keymap_event,
1159 keyboard_interface_enter_event,
1164 keyboard_interface_leave_event,
1169 keyboard_interface_key_event,
1174 keyboard_interface_modifiers_event,
1179 keyboard_interface_repeat_info_event,
1183const wl_interface wayland::detail::keyboard_interface =
1188 keyboard_interface_requests,
1190 keyboard_interface_events,
1193const wl_interface* touch_interface_release_request[0] = {
1196const wl_interface* touch_interface_down_event[6] = {
1205const wl_interface* touch_interface_up_event[3] = {
1211const wl_interface* touch_interface_motion_event[4] = {
1218const wl_interface* touch_interface_frame_event[0] = {
1221const wl_interface* touch_interface_cancel_event[0] = {
1224const wl_interface* touch_interface_shape_event[3] = {
1230const wl_interface* touch_interface_orientation_event[2] = {
1235const wl_message touch_interface_requests[1] = {
1239 touch_interface_release_request,
1243const wl_message touch_interface_events[7] = {
1247 touch_interface_down_event,
1252 touch_interface_up_event,
1257 touch_interface_motion_event,
1262 touch_interface_frame_event,
1267 touch_interface_cancel_event,
1272 touch_interface_shape_event,
1277 touch_interface_orientation_event,
1281const wl_interface wayland::detail::touch_interface =
1286 touch_interface_requests,
1288 touch_interface_events,
1291const wl_interface* output_interface_release_request[0] = {
1294const wl_interface* output_interface_geometry_event[8] = {
1305const wl_interface* output_interface_mode_event[4] = {
1312const wl_interface* output_interface_done_event[0] = {
1315const wl_interface* output_interface_scale_event[1] = {
1319const wl_message output_interface_requests[1] = {
1323 output_interface_release_request,
1327const wl_message output_interface_events[4] = {
1331 output_interface_geometry_event,
1336 output_interface_mode_event,
1341 output_interface_done_event,
1346 output_interface_scale_event,
1350const wl_interface wayland::detail::output_interface =
1355 output_interface_requests,
1357 output_interface_events,
1360const wl_interface* region_interface_destroy_request[0] = {
1363const wl_interface* region_interface_add_request[4] = {
1370const wl_interface* region_interface_subtract_request[4] = {
1377const wl_message region_interface_requests[3] = {
1381 region_interface_destroy_request,
1386 region_interface_add_request,
1391 region_interface_subtract_request,
1395const wl_message region_interface_events[0] = {
1398const wl_interface wayland::detail::region_interface =
1403 region_interface_requests,
1405 region_interface_events,
1408const wl_interface* subcompositor_interface_destroy_request[0] = {
1411const wl_interface* subcompositor_interface_get_subsurface_request[3] = {
1412 &subsurface_interface,
1417const wl_message subcompositor_interface_requests[2] = {
1421 subcompositor_interface_destroy_request,
1426 subcompositor_interface_get_subsurface_request,
1430const wl_message subcompositor_interface_events[0] = {
1433const wl_interface wayland::detail::subcompositor_interface =
1438 subcompositor_interface_requests,
1440 subcompositor_interface_events,
1443const wl_interface* subsurface_interface_destroy_request[0] = {
1446const wl_interface* subsurface_interface_set_position_request[2] = {
1451const wl_interface* subsurface_interface_place_above_request[1] = {
1455const wl_interface* subsurface_interface_place_below_request[1] = {
1459const wl_interface* subsurface_interface_set_sync_request[0] = {
1462const wl_interface* subsurface_interface_set_desync_request[0] = {
1465const wl_message subsurface_interface_requests[6] = {
1469 subsurface_interface_destroy_request,
1474 subsurface_interface_set_position_request,
1479 subsurface_interface_place_above_request,
1484 subsurface_interface_place_below_request,
1489 subsurface_interface_set_sync_request,
1494 subsurface_interface_set_desync_request,
1498const wl_message subsurface_interface_events[0] = {
1501const wl_interface wayland::detail::subsurface_interface =
1506 subsurface_interface_requests,
1508 subsurface_interface_events,
1511registry_t::registry_t(
const proxy_t &p)
1514 if(proxy_has_object() && get_wrapper_type() == wrapper_type::standard)
1516 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1518 set_interface(®istry_interface);
1523registry_t::registry_t()
1525 set_interface(®istry_interface);
1530registry_t::registry_t(wl_registry *p, wrapper_type t)
1531 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1532 if(proxy_has_object() && get_wrapper_type() == wrapper_type::standard)
1534 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1536 set_interface(®istry_interface);
1541registry_t::registry_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
1542 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1543 set_interface(®istry_interface);
1550 return {*
this, construct_proxy_wrapper_tag()};
1553const std::string registry_t::interface_name =
"wl_registry";
1555registry_t::operator wl_registry*()
const
1557 return reinterpret_cast<wl_registry*
> (c_ptr());
1562 proxy_t p = marshal_constructor_versioned(0U, interface.interface, version, name, std::string(interface.interface->name), version,
nullptr);
1563 interface = interface.copy_constructor(p);
1569 return std::static_pointer_cast<events_t>(get_events())->global;
1574 return std::static_pointer_cast<events_t>(get_events())->global_remove;
1577int registry_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
1579 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1583 if(events->global) events->global(args[0].get<uint32_t>(), args[1].get<std::string>(), args[2].get<uint32_t>());
1586 if(events->global_remove) events->global_remove(args[0].get<uint32_t>());
1592callback_t::callback_t(
const proxy_t &p)
1597 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1599 set_interface(&callback_interface);
1604callback_t::callback_t()
1606 set_interface(&callback_interface);
1611callback_t::callback_t(wl_callback *p, wrapper_type t)
1612 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1615 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1617 set_interface(&callback_interface);
1622callback_t::callback_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
1623 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1624 set_interface(&callback_interface);
1631 return {*
this, construct_proxy_wrapper_tag()};
1634const std::string callback_t::interface_name =
"wl_callback";
1636callback_t::operator wl_callback*()
const
1638 return reinterpret_cast<wl_callback*
> (c_ptr());
1643 return std::static_pointer_cast<events_t>(get_events())->done;
1646int callback_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
1648 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1652 if(events->done) events->done(args[0].get<uint32_t>());
1658compositor_t::compositor_t(
const proxy_t &p)
1663 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1665 set_interface(&compositor_interface);
1670compositor_t::compositor_t()
1672 set_interface(&compositor_interface);
1677compositor_t::compositor_t(wl_compositor *p, wrapper_type t)
1678 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1681 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1683 set_interface(&compositor_interface);
1688compositor_t::compositor_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
1689 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1690 set_interface(&compositor_interface);
1697 return {*
this, construct_proxy_wrapper_tag()};
1700const std::string compositor_t::interface_name =
"wl_compositor";
1702compositor_t::operator wl_compositor*()
const
1704 return reinterpret_cast<wl_compositor*
> (c_ptr());
1709 proxy_t p = marshal_constructor(0U, &surface_interface,
nullptr);
1715 proxy_t p = marshal_constructor(1U, ®ion_interface,
nullptr);
1719int compositor_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
1724shm_pool_t::shm_pool_t(
const proxy_t &p)
1729 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1730 set_destroy_opcode(1U);
1732 set_interface(&shm_pool_interface);
1737shm_pool_t::shm_pool_t()
1739 set_interface(&shm_pool_interface);
1744shm_pool_t::shm_pool_t(wl_shm_pool *p, wrapper_type t)
1745 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1748 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1749 set_destroy_opcode(1U);
1751 set_interface(&shm_pool_interface);
1756shm_pool_t::shm_pool_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
1757 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1758 set_interface(&shm_pool_interface);
1765 return {*
this, construct_proxy_wrapper_tag()};
1768const std::string shm_pool_t::interface_name =
"wl_shm_pool";
1770shm_pool_t::operator wl_shm_pool*()
const
1772 return reinterpret_cast<wl_shm_pool*
> (c_ptr());
1777 proxy_t p = marshal_constructor(0U, &buffer_interface,
nullptr, offset, width, height, stride,
static_cast<uint32_t
>(format));
1786int shm_pool_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
1796 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1798 set_interface(&shm_interface);
1800 {
return shm_t(p); });
1805 set_interface(&shm_interface);
1807 {
return shm_t(p); });
1810shm_t::shm_t(wl_shm *p, wrapper_type t)
1811 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1814 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1816 set_interface(&shm_interface);
1818 {
return shm_t(p); });
1821shm_t::shm_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
1822 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1823 set_interface(&shm_interface);
1825 {
return shm_t(p); });
1828shm_t shm_t::proxy_create_wrapper()
1830 return {*
this, construct_proxy_wrapper_tag()};
1833const std::string shm_t::interface_name =
"wl_shm";
1835shm_t::operator wl_shm*()
const
1837 return reinterpret_cast<wl_shm*
> (c_ptr());
1842 proxy_t p = marshal_constructor(0U, &shm_pool_interface,
nullptr, argument_t::fd(fd), size);
1848 return std::static_pointer_cast<events_t>(get_events())->format;
1851int shm_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
1853 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1857 if(events->format) events->format(shm_format(args[0].get<uint32_t>()));
1865buffer_t::buffer_t(
const proxy_t &p)
1870 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1871 set_destroy_opcode(0U);
1873 set_interface(&buffer_interface);
1880 set_interface(&buffer_interface);
1885buffer_t::buffer_t(wl_buffer *p, wrapper_type t)
1886 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1889 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1890 set_destroy_opcode(0U);
1892 set_interface(&buffer_interface);
1897buffer_t::buffer_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
1898 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1899 set_interface(&buffer_interface);
1904buffer_t buffer_t::proxy_create_wrapper()
1906 return {*
this, construct_proxy_wrapper_tag()};
1909const std::string buffer_t::interface_name =
"wl_buffer";
1911buffer_t::operator wl_buffer*()
const
1913 return reinterpret_cast<wl_buffer*
> (c_ptr());
1918 return std::static_pointer_cast<events_t>(get_events())->release;
1921int buffer_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
1923 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1927 if(events->release) events->release();
1933data_offer_t::data_offer_t(
const proxy_t &p)
1938 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1939 set_destroy_opcode(2U);
1941 set_interface(&data_offer_interface);
1946data_offer_t::data_offer_t()
1948 set_interface(&data_offer_interface);
1953data_offer_t::data_offer_t(wl_data_offer *p, wrapper_type t)
1954 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1957 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1958 set_destroy_opcode(2U);
1960 set_interface(&data_offer_interface);
1965data_offer_t::data_offer_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
1966 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1967 set_interface(&data_offer_interface);
1974 return {*
this, construct_proxy_wrapper_tag()};
1977const std::string data_offer_t::interface_name =
"wl_data_offer";
1979data_offer_t::operator wl_data_offer*()
const
1981 return reinterpret_cast<wl_data_offer*
> (c_ptr());
1986 marshal(0U, serial, mime_type);
1991 marshal(1U, mime_type, argument_t::fd(fd));
2005 marshal(4U,
static_cast<uint32_t
>(dnd_actions),
static_cast<uint32_t
>(preferred_action));
2014 return std::static_pointer_cast<events_t>(get_events())->offer;
2019 return std::static_pointer_cast<events_t>(get_events())->source_actions;
2024 return std::static_pointer_cast<events_t>(get_events())->action;
2027int data_offer_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
2029 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2033 if(events->offer) events->offer(args[0].get<std::string>());
2046data_source_t::data_source_t(
const proxy_t &p)
2051 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2052 set_destroy_opcode(1U);
2054 set_interface(&data_source_interface);
2059data_source_t::data_source_t()
2061 set_interface(&data_source_interface);
2066data_source_t::data_source_t(wl_data_source *p, wrapper_type t)
2067 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2070 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2071 set_destroy_opcode(1U);
2073 set_interface(&data_source_interface);
2078data_source_t::data_source_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
2079 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2080 set_interface(&data_source_interface);
2087 return {*
this, construct_proxy_wrapper_tag()};
2090const std::string data_source_t::interface_name =
"wl_data_source";
2092data_source_t::operator wl_data_source*()
const
2094 return reinterpret_cast<wl_data_source*
> (c_ptr());
2099 marshal(0U, mime_type);
2104 marshal(2U,
static_cast<uint32_t
>(dnd_actions));
2113 return std::static_pointer_cast<events_t>(get_events())->target;
2118 return std::static_pointer_cast<events_t>(get_events())->send;
2123 return std::static_pointer_cast<events_t>(get_events())->cancelled;
2128 return std::static_pointer_cast<events_t>(get_events())->dnd_drop_performed;
2133 return std::static_pointer_cast<events_t>(get_events())->dnd_finished;
2138 return std::static_pointer_cast<events_t>(get_events())->action;
2141int data_source_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
2143 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2147 if(events->target) events->target(args[0].get<std::string>());
2150 if(events->send) events->send(args[0].get<std::string>(), args[1].get<int>());
2153 if(events->cancelled) events->cancelled();
2156 if(events->dnd_drop_performed) events->dnd_drop_performed();
2159 if(events->dnd_finished) events->dnd_finished();
2169data_device_t::data_device_t(
const proxy_t &p)
2174 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2176 set_interface(&data_device_interface);
2181data_device_t::data_device_t()
2183 set_interface(&data_device_interface);
2188data_device_t::data_device_t(wl_data_device *p, wrapper_type t)
2189 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2192 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2194 set_interface(&data_device_interface);
2199data_device_t::data_device_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
2200 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2201 set_interface(&data_device_interface);
2208 return {*
this, construct_proxy_wrapper_tag()};
2211const std::string data_device_t::interface_name =
"wl_data_device";
2213data_device_t::operator wl_data_device*()
const
2215 return reinterpret_cast<wl_data_device*
> (c_ptr());
2225 marshal(1U, source.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(source.
c_ptr()) :
nullptr, serial);
2239 return std::static_pointer_cast<events_t>(get_events())->data_offer;
2244 return std::static_pointer_cast<events_t>(get_events())->enter;
2249 return std::static_pointer_cast<events_t>(get_events())->leave;
2254 return std::static_pointer_cast<events_t>(get_events())->motion;
2259 return std::static_pointer_cast<events_t>(get_events())->drop;
2264 return std::static_pointer_cast<events_t>(get_events())->selection;
2267int data_device_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
2269 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2273 if(events->data_offer) events->data_offer(
data_offer_t(args[0].get<proxy_t>()));
2276 if(events->enter) events->enter(args[0].get<uint32_t>(),
surface_t(args[1].get<proxy_t>()), args[2].get<double>(), args[3].get<double>(),
data_offer_t(args[4].get<proxy_t>()));
2279 if(events->leave) events->leave();
2282 if(events->motion) events->motion(args[0].get<uint32_t>(), args[1].get<double>(), args[2].get<double>());
2285 if(events->drop) events->drop();
2288 if(events->selection) events->selection(
data_offer_t(args[0].get<proxy_t>()));
2295data_device_manager_t::data_device_manager_t(
const proxy_t &p)
2300 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2302 set_interface(&data_device_manager_interface);
2307data_device_manager_t::data_device_manager_t()
2309 set_interface(&data_device_manager_interface);
2314data_device_manager_t::data_device_manager_t(wl_data_device_manager *p, wrapper_type t)
2315 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2318 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2320 set_interface(&data_device_manager_interface);
2325data_device_manager_t::data_device_manager_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
2326 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2327 set_interface(&data_device_manager_interface);
2334 return {*
this, construct_proxy_wrapper_tag()};
2337const std::string data_device_manager_t::interface_name =
"wl_data_device_manager";
2339data_device_manager_t::operator wl_data_device_manager*()
const
2341 return reinterpret_cast<wl_data_device_manager*
> (c_ptr());
2346 proxy_t p = marshal_constructor(0U, &data_source_interface,
nullptr);
2352 proxy_t p = marshal_constructor(1U, &data_device_interface,
nullptr, seat.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(seat.
c_ptr()) :
nullptr);
2356int data_device_manager_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
2366shell_t::shell_t(
const proxy_t &p)
2371 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2373 set_interface(&shell_interface);
2380 set_interface(&shell_interface);
2385shell_t::shell_t(wl_shell *p, wrapper_type t)
2386 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2389 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2391 set_interface(&shell_interface);
2396shell_t::shell_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
2397 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2398 set_interface(&shell_interface);
2403shell_t shell_t::proxy_create_wrapper()
2405 return {*
this, construct_proxy_wrapper_tag()};
2408const std::string shell_t::interface_name =
"wl_shell";
2410shell_t::operator wl_shell*()
const
2412 return reinterpret_cast<wl_shell*
> (c_ptr());
2417 proxy_t p = marshal_constructor(0U, &shell_surface_interface,
nullptr, surface.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(surface.
c_ptr()) :
nullptr);
2421int shell_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
2427shell_surface_t::shell_surface_t(
const proxy_t &p)
2432 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2434 set_interface(&shell_surface_interface);
2439shell_surface_t::shell_surface_t()
2441 set_interface(&shell_surface_interface);
2446shell_surface_t::shell_surface_t(wl_shell_surface *p, wrapper_type t)
2447 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2450 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2452 set_interface(&shell_surface_interface);
2457shell_surface_t::shell_surface_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
2458 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2459 set_interface(&shell_surface_interface);
2466 return {*
this, construct_proxy_wrapper_tag()};
2469const std::string shell_surface_t::interface_name =
"wl_shell_surface";
2471shell_surface_t::operator wl_shell_surface*()
const
2473 return reinterpret_cast<wl_shell_surface*
> (c_ptr());
2478 marshal(0U, serial);
2483 marshal(1U, seat.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(seat.
c_ptr()) :
nullptr, serial);
2488 marshal(2U, seat.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(seat.
c_ptr()) :
nullptr, serial,
static_cast<uint32_t
>(edges));
2498 marshal(4U, parent.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(parent.
c_ptr()) :
nullptr, x, y,
static_cast<uint32_t
>(flags));
2503 marshal(5U,
static_cast<uint32_t
>(method), framerate, output.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(output.
c_ptr()) :
nullptr);
2508 marshal(6U, seat.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(seat.
c_ptr()) :
nullptr, serial, parent.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(parent.
c_ptr()) :
nullptr, x, y,
static_cast<uint32_t
>(flags));
2523 marshal(9U, class_);
2528 return std::static_pointer_cast<events_t>(get_events())->ping;
2533 return std::static_pointer_cast<events_t>(get_events())->configure;
2538 return std::static_pointer_cast<events_t>(get_events())->popup_done;
2541int shell_surface_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
2543 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2547 if(events->ping) events->ping(args[0].get<uint32_t>());
2550 if(events->configure) events->configure(
shell_surface_resize(args[0].get<uint32_t>()), args[1].get<int32_t>(), args[2].get<int32_t>());
2553 if(events->popup_done) events->popup_done();
2572surface_t::surface_t(
const proxy_t &p)
2577 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2578 set_destroy_opcode(0U);
2580 set_interface(&surface_interface);
2585surface_t::surface_t()
2587 set_interface(&surface_interface);
2592surface_t::surface_t(wl_surface *p, wrapper_type t)
2593 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2596 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2597 set_destroy_opcode(0U);
2599 set_interface(&surface_interface);
2604surface_t::surface_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
2605 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2606 set_interface(&surface_interface);
2611surface_t surface_t::proxy_create_wrapper()
2613 return {*
this, construct_proxy_wrapper_tag()};
2616const std::string surface_t::interface_name =
"wl_surface";
2618surface_t::operator wl_surface*()
const
2620 return reinterpret_cast<wl_surface*
> (c_ptr());
2625 marshal(1U, buffer.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(buffer.
c_ptr()) :
nullptr, x, y);
2630 marshal(2U, x, y, width, height);
2635 proxy_t p = marshal_constructor(3U, &callback_interface,
nullptr);
2656 marshal(7U,
static_cast<int32_t
>(transform));
2674 marshal(9U, x, y, width, height);
2683 return std::static_pointer_cast<events_t>(get_events())->enter;
2688 return std::static_pointer_cast<events_t>(get_events())->leave;
2691int surface_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
2693 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2697 if(events->enter) events->enter(
output_t(args[0].get<proxy_t>()));
2700 if(events->leave) events->leave(
output_t(args[0].get<proxy_t>()));
2707seat_t::seat_t(
const proxy_t &p)
2712 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2714 set_interface(&seat_interface);
2721 set_interface(&seat_interface);
2726seat_t::seat_t(wl_seat *p, wrapper_type t)
2727 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2730 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2732 set_interface(&seat_interface);
2737seat_t::seat_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
2738 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2739 set_interface(&seat_interface);
2744seat_t seat_t::proxy_create_wrapper()
2746 return {*
this, construct_proxy_wrapper_tag()};
2749const std::string seat_t::interface_name =
"wl_seat";
2751seat_t::operator wl_seat*()
const
2753 return reinterpret_cast<wl_seat*
> (c_ptr());
2758 proxy_t p = marshal_constructor(0U, &pointer_interface,
nullptr);
2764 proxy_t p = marshal_constructor(1U, &keyboard_interface,
nullptr);
2770 proxy_t p = marshal_constructor(2U, &touch_interface,
nullptr);
2785 return std::static_pointer_cast<events_t>(get_events())->capabilities;
2790 return std::static_pointer_cast<events_t>(get_events())->name;
2793int seat_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
2795 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2799 if(events->capabilities) events->capabilities(
seat_capability(args[0].get<uint32_t>()));
2802 if(events->name) events->name(args[0].get<std::string>());
2813pointer_t::pointer_t(
const proxy_t &p)
2818 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2820 set_interface(&pointer_interface);
2825pointer_t::pointer_t()
2827 set_interface(&pointer_interface);
2832pointer_t::pointer_t(wl_pointer *p, wrapper_type t)
2833 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2836 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2838 set_interface(&pointer_interface);
2843pointer_t::pointer_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
2844 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2845 set_interface(&pointer_interface);
2850pointer_t pointer_t::proxy_create_wrapper()
2852 return {*
this, construct_proxy_wrapper_tag()};
2855const std::string pointer_t::interface_name =
"wl_pointer";
2857pointer_t::operator wl_pointer*()
const
2859 return reinterpret_cast<wl_pointer*
> (c_ptr());
2864 marshal(0U, serial, surface.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(surface.
c_ptr()) :
nullptr, hotspot_x, hotspot_y);
2878 return std::static_pointer_cast<events_t>(get_events())->enter;
2883 return std::static_pointer_cast<events_t>(get_events())->leave;
2888 return std::static_pointer_cast<events_t>(get_events())->motion;
2893 return std::static_pointer_cast<events_t>(get_events())->button;
2898 return std::static_pointer_cast<events_t>(get_events())->axis;
2903 return std::static_pointer_cast<events_t>(get_events())->frame;
2908 return std::static_pointer_cast<events_t>(get_events())->axis_source;
2913 return std::static_pointer_cast<events_t>(get_events())->axis_stop;
2918 return std::static_pointer_cast<events_t>(get_events())->axis_discrete;
2921int pointer_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
2923 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2927 if(events->enter) events->enter(args[0].get<uint32_t>(),
surface_t(args[1].get<proxy_t>()), args[2].get<double>(), args[3].get<double>());
2930 if(events->leave) events->leave(args[0].get<uint32_t>(),
surface_t(args[1].get<proxy_t>()));
2933 if(events->motion) events->motion(args[0].get<uint32_t>(), args[1].get<double>(), args[2].get<double>());
2936 if(events->button) events->button(args[0].get<uint32_t>(), args[1].get<uint32_t>(), args[2].get<uint32_t>(), pointer_button_state(args[3].get<uint32_t>()));
2939 if(events->axis) events->axis(args[0].get<uint32_t>(), pointer_axis(args[1].get<uint32_t>()), args[2].get<double>());
2942 if(events->frame) events->frame();
2945 if(events->axis_source) events->axis_source(pointer_axis_source(args[0].get<uint32_t>()));
2948 if(events->axis_stop) events->axis_stop(args[0].get<uint32_t>(), pointer_axis(args[1].get<uint32_t>()));
2951 if(events->axis_discrete) events->axis_discrete(pointer_axis(args[0].get<uint32_t>()), args[1].get<int32_t>());
2961keyboard_t::keyboard_t(
const proxy_t &p)
2966 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2968 set_interface(&keyboard_interface);
2973keyboard_t::keyboard_t()
2975 set_interface(&keyboard_interface);
2980keyboard_t::keyboard_t(wl_keyboard *p, wrapper_type t)
2981 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2984 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2986 set_interface(&keyboard_interface);
2991keyboard_t::keyboard_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
2992 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2993 set_interface(&keyboard_interface);
3000 return {*
this, construct_proxy_wrapper_tag()};
3003const std::string keyboard_t::interface_name =
"wl_keyboard";
3005keyboard_t::operator wl_keyboard*()
const
3007 return reinterpret_cast<wl_keyboard*
> (c_ptr());
3021 return std::static_pointer_cast<events_t>(get_events())->keymap;
3026 return std::static_pointer_cast<events_t>(get_events())->enter;
3031 return std::static_pointer_cast<events_t>(get_events())->leave;
3036 return std::static_pointer_cast<events_t>(get_events())->key;
3041 return std::static_pointer_cast<events_t>(get_events())->modifiers;
3046 return std::static_pointer_cast<events_t>(get_events())->repeat_info;
3049int keyboard_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
3051 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
3055 if(events->keymap) events->keymap(keyboard_keymap_format(args[0].get<uint32_t>()), args[1].get<int>(), args[2].get<uint32_t>());
3058 if(events->enter) events->enter(args[0].get<uint32_t>(),
surface_t(args[1].get<proxy_t>()), args[2].get<array_t>());
3061 if(events->leave) events->leave(args[0].get<uint32_t>(),
surface_t(args[1].get<proxy_t>()));
3064 if(events->key) events->key(args[0].get<uint32_t>(), args[1].get<uint32_t>(), args[2].get<uint32_t>(), keyboard_key_state(args[3].get<uint32_t>()));
3067 if(events->modifiers) events->modifiers(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>());
3070 if(events->repeat_info) events->repeat_info(args[0].get<int32_t>(), args[1].get<int32_t>());
3078touch_t::touch_t(
const proxy_t &p)
3083 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3085 set_interface(&touch_interface);
3092 set_interface(&touch_interface);
3097touch_t::touch_t(wl_touch *p, wrapper_type t)
3098 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3101 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3103 set_interface(&touch_interface);
3108touch_t::touch_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
3109 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
3110 set_interface(&touch_interface);
3115touch_t touch_t::proxy_create_wrapper()
3117 return {*
this, construct_proxy_wrapper_tag()};
3120const std::string touch_t::interface_name =
"wl_touch";
3122touch_t::operator wl_touch*()
const
3124 return reinterpret_cast<wl_touch*
> (c_ptr());
3138 return std::static_pointer_cast<events_t>(get_events())->down;
3143 return std::static_pointer_cast<events_t>(get_events())->up;
3148 return std::static_pointer_cast<events_t>(get_events())->motion;
3153 return std::static_pointer_cast<events_t>(get_events())->frame;
3158 return std::static_pointer_cast<events_t>(get_events())->cancel;
3163 return std::static_pointer_cast<events_t>(get_events())->shape;
3168 return std::static_pointer_cast<events_t>(get_events())->orientation;
3171int touch_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
3173 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
3177 if(events->down) events->down(args[0].get<uint32_t>(), args[1].get<uint32_t>(),
surface_t(args[2].get<proxy_t>()), args[3].get<int32_t>(), args[4].get<double>(), args[5].get<double>());
3180 if(events->up) events->up(args[0].get<uint32_t>(), args[1].get<uint32_t>(), args[2].get<int32_t>());
3183 if(events->motion) events->motion(args[0].get<uint32_t>(), args[1].get<int32_t>(), args[2].get<double>(), args[3].get<double>());
3186 if(events->frame) events->frame();
3189 if(events->cancel) events->cancel();
3192 if(events->shape) events->shape(args[0].get<int32_t>(), args[1].get<double>(), args[2].get<double>());
3195 if(events->orientation) events->orientation(args[0].get<int32_t>(), args[1].get<double>());
3201output_t::output_t(
const proxy_t &p)
3206 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3208 set_interface(&output_interface);
3215 set_interface(&output_interface);
3220output_t::output_t(wl_output *p, wrapper_type t)
3221 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3224 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3226 set_interface(&output_interface);
3231output_t::output_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
3232 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
3233 set_interface(&output_interface);
3238output_t output_t::proxy_create_wrapper()
3240 return {*
this, construct_proxy_wrapper_tag()};
3243const std::string output_t::interface_name =
"wl_output";
3245output_t::operator wl_output*()
const
3247 return reinterpret_cast<wl_output*
> (c_ptr());
3261 return std::static_pointer_cast<events_t>(get_events())->geometry;
3266 return std::static_pointer_cast<events_t>(get_events())->mode;
3271 return std::static_pointer_cast<events_t>(get_events())->done;
3276 return std::static_pointer_cast<events_t>(get_events())->scale;
3279int output_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
3281 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
3285 if(events->geometry) events->geometry(args[0].get<int32_t>(), args[1].get<int32_t>(), args[2].get<int32_t>(), args[3].get<int32_t>(), output_subpixel(args[4].get<int32_t>()), args[5].get<std::string>(), args[6].get<std::string>(),
output_transform(args[7].get<int32_t>()));
3288 if(events->mode) events->mode(
output_mode(args[0].get<uint32_t>()), args[1].get<int32_t>(), args[2].get<int32_t>(), args[3].get<int32_t>());
3291 if(events->done) events->done();
3294 if(events->scale) events->scale(args[0].get<int32_t>());
3313region_t::region_t(
const proxy_t &p)
3318 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3319 set_destroy_opcode(0U);
3321 set_interface(®ion_interface);
3328 set_interface(®ion_interface);
3333region_t::region_t(wl_region *p, wrapper_type t)
3334 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3337 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3338 set_destroy_opcode(0U);
3340 set_interface(®ion_interface);
3345region_t::region_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
3346 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
3347 set_interface(®ion_interface);
3352region_t region_t::proxy_create_wrapper()
3354 return {*
this, construct_proxy_wrapper_tag()};
3357const std::string region_t::interface_name =
"wl_region";
3359region_t::operator wl_region*()
const
3361 return reinterpret_cast<wl_region*
> (c_ptr());
3366 marshal(1U, x, y, width, height);
3371 marshal(2U, x, y, width, height);
3374int region_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
3379subcompositor_t::subcompositor_t(
const proxy_t &p)
3384 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3385 set_destroy_opcode(0U);
3387 set_interface(&subcompositor_interface);
3392subcompositor_t::subcompositor_t()
3394 set_interface(&subcompositor_interface);
3399subcompositor_t::subcompositor_t(wl_subcompositor *p, wrapper_type t)
3400 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3403 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3404 set_destroy_opcode(0U);
3406 set_interface(&subcompositor_interface);
3411subcompositor_t::subcompositor_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
3412 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
3413 set_interface(&subcompositor_interface);
3420 return {*
this, construct_proxy_wrapper_tag()};
3423const std::string subcompositor_t::interface_name =
"wl_subcompositor";
3425subcompositor_t::operator wl_subcompositor*()
const
3427 return reinterpret_cast<wl_subcompositor*
> (c_ptr());
3436int subcompositor_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
3442subsurface_t::subsurface_t(
const proxy_t &p)
3447 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3448 set_destroy_opcode(0U);
3450 set_interface(&subsurface_interface);
3455subsurface_t::subsurface_t()
3457 set_interface(&subsurface_interface);
3462subsurface_t::subsurface_t(wl_subsurface *p, wrapper_type t)
3463 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3466 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3467 set_destroy_opcode(0U);
3469 set_interface(&subsurface_interface);
3474subsurface_t::subsurface_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
3475 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
3476 set_interface(&subsurface_interface);
3483 return {*
this, construct_proxy_wrapper_tag()};
3486const std::string subsurface_t::interface_name =
"wl_subsurface";
3488subsurface_t::operator wl_subsurface*()
const
3490 return reinterpret_cast<wl_subsurface*
> (c_ptr());
3518int subsurface_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
std::function< void()> & on_release()
compositor releases buffer
std::function< void(uint32_t)> & on_done()
done event
region_t create_region()
create new region
surface_t create_surface()
create new surface
data_source_t create_data_source()
create a new data source
data_device_t get_data_device(seat_t const &seat)
create a new data device
bool can_release() const
Check whether the release function is available with the currently bound version of the protocol.
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
std::function< void(uint32_t, double, double)> & on_motion()
drag-and-drop session motion
std::function< void()> & on_leave()
end drag-and-drop session
std::function< void(data_offer_t)> & on_selection()
advertise new selection
void release()
destroy data device
std::function< void()> & on_drop()
end drag-and-drop session successfully
void set_selection(data_source_t const &source, uint32_t serial)
copy data to the selection
void start_drag(data_source_t const &source, surface_t const &origin, surface_t const &icon, uint32_t serial)
start drag-and-drop operation
std::function< void(uint32_t, surface_t, double, double, data_offer_t)> & on_enter()
initiate drag-and-drop session
std::function< void(data_offer_t)> & on_data_offer()
introduce a new wl_data_offer
std::function< void(std::string)> & on_offer()
advertise offered mime type
void set_actions(data_device_manager_dnd_action const &dnd_actions, data_device_manager_dnd_action const &preferred_action)
set the available/preferred drag-and-drop actions
std::function< void(data_device_manager_dnd_action)> & on_action()
notify the selected action
static constexpr std::uint32_t finish_since_version
Minimum protocol version required for the finish function.
bool can_finish() const
Check whether the finish function is available with the currently bound version of the protocol.
void receive(std::string const &mime_type, int fd)
request that the data is transferred
static constexpr std::uint32_t set_actions_since_version
Minimum protocol version required for the set_actions function.
std::function< void(data_device_manager_dnd_action)> & on_source_actions()
notify the source-side available actions
bool can_set_actions() const
Check whether the set_actions function is available with the currently bound version of the protocol.
void accept(uint32_t serial, std::string const &mime_type)
accept one of the offered mime types
void finish()
the offer will no longer be used
std::function< void()> & on_cancelled()
selection was cancelled
static constexpr std::uint32_t set_actions_since_version
Minimum protocol version required for the set_actions function.
std::function< void()> & on_dnd_finished()
the drag-and-drop operation concluded
std::function< void(std::string, int)> & on_send()
send the data
std::function< void()> & on_dnd_drop_performed()
the drag-and-drop operation physically finished
void offer(std::string const &mime_type)
add an offered mime type
std::function< void(data_device_manager_dnd_action)> & on_action()
notify the selected action
std::function< void(std::string)> & on_target()
a target accepts an offered mime type
void set_actions(data_device_manager_dnd_action const &dnd_actions)
set the available drag-and-drop actions
bool can_set_actions() const
Check whether the set_actions function is available with the currently bound version of the protocol.
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
std::function< void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)> & on_modifiers()
modifier and group state
bool can_release() const
Check whether the release function is available with the currently bound version of the protocol.
std::function< void(uint32_t, surface_t, array_t)> & on_enter()
enter event
std::function< void(keyboard_keymap_format, int, uint32_t)> & on_keymap()
keyboard mapping
std::function< void(uint32_t, surface_t)> & on_leave()
leave event
std::function< void(int32_t, int32_t)> & on_repeat_info()
repeat rate and delay
void release()
release the keyboard object
std::function< void(uint32_t, uint32_t, uint32_t, keyboard_key_state)> & on_key()
key event
bool can_release() const
Check whether the release function is available with the currently bound version of the protocol.
std::function< void(int32_t)> & on_scale()
output scaling properties
std::function< void()> & on_done()
sent all information about output
void release()
release the output object
std::function< void(int32_t, int32_t, int32_t, int32_t, output_subpixel, std::string, std::string, output_transform)> & on_geometry()
properties of the output
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
std::function< void(output_mode, int32_t, int32_t, int32_t)> & on_mode()
advertise available modes for the output
std::function< void(uint32_t, surface_t, double, double)> & on_enter()
enter event
std::function< void(uint32_t, pointer_axis, double)> & on_axis()
axis event
std::function< void(uint32_t, uint32_t, uint32_t, pointer_button_state)> & on_button()
pointer button event
std::function< void(uint32_t, surface_t)> & on_leave()
leave event
void release()
release the pointer object
std::function< void(pointer_axis, int32_t)> & on_axis_discrete()
axis click event
std::function< void()> & on_frame()
end of a pointer event sequence
bool can_release() const
Check whether the release function is available with the currently bound version of the protocol.
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
std::function< void(pointer_axis_source)> & on_axis_source()
axis source event
void set_cursor(uint32_t serial, surface_t const &surface, int32_t hotspot_x, int32_t hotspot_y)
set the pointer surface
std::function< void(uint32_t, pointer_axis)> & on_axis_stop()
axis stop event
std::function< void(uint32_t, double, double)> & on_motion()
pointer motion event
Represents a protocol object on the client side.
bool proxy_has_object() const
Check whether this wrapper actually wraps an object.
uint32_t get_version() const
Get the protocol object version of a proxy object.
wrapper_type get_wrapper_type() const
Get the type of a proxy object.
wl_proxy * c_ptr() const
Get a pointer to the underlying C struct.
void add(int32_t x, int32_t y, int32_t width, int32_t height)
add rectangle to region
void subtract(int32_t x, int32_t y, int32_t width, int32_t height)
subtract rectangle from region
std::function< void(uint32_t, std::string, uint32_t)> & on_global()
announce global object
proxy_t bind(uint32_t name, proxy_t &interface, uint32_t version)
bind an object to the display
std::function< void(uint32_t)> & on_global_remove()
announce removal of global object
std::function< void(std::string)> & on_name()
unique identifier for this seat
touch_t get_touch()
return touch object
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
bool can_release() const
Check whether the release function is available with the currently bound version of the protocol.
keyboard_t get_keyboard()
return keyboard object
pointer_t get_pointer()
return pointer object
void release()
release the seat object
std::function< void(seat_capability)> & on_capabilities()
seat capabilities changed
desktop-style metadata interface
void resize(seat_t const &seat, uint32_t serial, shell_surface_resize const &edges)
start an interactive resize
void set_fullscreen(shell_surface_fullscreen_method const &method, uint32_t framerate, output_t const &output)
make the surface a fullscreen surface
void move(seat_t const &seat, uint32_t serial)
start an interactive move
void set_class(std::string const &class_)
set surface class
void set_transient(surface_t const &parent, int32_t x, int32_t y, shell_surface_transient const &flags)
make the surface a transient surface
void set_toplevel()
make the surface a toplevel surface
std::function< void(shell_surface_resize, int32_t, int32_t)> & on_configure()
suggest resize
std::function< void(uint32_t)> & on_ping()
ping client
void set_popup(seat_t const &seat, uint32_t serial, surface_t const &parent, int32_t x, int32_t y, shell_surface_transient const &flags)
make the surface a popup surface
void pong(uint32_t serial)
respond to a ping event
void set_maximized(output_t const &output)
make the surface a maximized surface
std::function< void()> & on_popup_done()
popup interaction is done
void set_title(std::string const &title)
set surface title
create desktop-style surfaces
shell_surface_t get_shell_surface(surface_t const &surface)
create a shell surface from a surface
buffer_t create_buffer(int32_t offset, int32_t width, int32_t height, int32_t stride, shm_format const &format)
create a buffer from the pool
void resize(int32_t size)
change the size of the pool mapping
std::function< void(shm_format)> & on_format()
pixel format description
shm_pool_t create_pool(int fd, int32_t size)
create a shm pool
subsurface_t get_subsurface(surface_t const &surface, surface_t const &parent)
give a surface the role sub-surface
sub-surface interface to a wl_surface
void set_desync()
set sub-surface to desynchronized mode
void set_sync()
set sub-surface to synchronized mode
void set_position(int32_t x, int32_t y)
reposition the sub-surface
void place_below(surface_t const &sibling)
restack the sub-surface
void place_above(surface_t const &sibling)
restack the sub-surface
std::function< void(output_t)> & on_enter()
surface enters an output
void set_buffer_transform(output_transform const &transform)
sets the buffer transformation
void set_input_region(region_t const ®ion)
set input region
void commit()
commit pending surface state
void attach(buffer_t const &buffer, int32_t x, int32_t y)
set the surface contents
static constexpr std::uint32_t set_buffer_transform_since_version
Minimum protocol version required for the set_buffer_transform function.
bool can_set_buffer_scale() const
Check whether the set_buffer_scale function is available with the currently bound version of the prot...
void set_buffer_scale(int32_t scale)
sets the buffer scaling factor
static constexpr std::uint32_t damage_buffer_since_version
Minimum protocol version required for the damage_buffer function.
callback_t frame()
request a frame throttling hint
void damage(int32_t x, int32_t y, int32_t width, int32_t height)
mark part of the surface damaged
static constexpr std::uint32_t set_buffer_scale_since_version
Minimum protocol version required for the set_buffer_scale function.
bool can_damage_buffer() const
Check whether the damage_buffer function is available with the currently bound version of the protoco...
std::function< void(output_t)> & on_leave()
surface leaves an output
void damage_buffer(int32_t x, int32_t y, int32_t width, int32_t height)
mark part of the surface damaged using buffer coordinates
void set_opaque_region(region_t const ®ion)
set opaque region
bool can_set_buffer_transform() const
Check whether the set_buffer_transform function is available with the currently bound version of the ...
std::function< void(uint32_t, uint32_t, surface_t, int32_t, double, double)> & on_down()
touch down event and beginning of a touch sequence
std::function< void()> & on_cancel()
touch session cancelled
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
std::function< void(uint32_t, uint32_t, int32_t)> & on_up()
end of a touch event sequence
std::function< void(uint32_t, int32_t, double, double)> & on_motion()
update of touch point coordinates
std::function< void(int32_t, double)> & on_orientation()
update orientation of touch point
std::function< void()> & on_frame()
end of touch frame event
bool can_release() const
Check whether the release function is available with the currently bound version of the protocol.
std::function< void(int32_t, double, double)> & on_shape()
update shape of touch point
void release()
release the touch object
static const detail::bitfield< 3, 6 > ask
ask action
static const detail::bitfield< 3, 6 > none
no action
static const detail::bitfield< 3, 6 > move
move action
static const detail::bitfield< 3, 6 > copy
copy action
static const detail::bitfield< 2, 22 > current
indicates this is the current mode
static const detail::bitfield< 2, 22 > preferred
indicates this is the preferred mode
static const detail::bitfield< 3, 12 > touch
the seat has touch devices
static const detail::bitfield< 3, 12 > keyboard
the seat has one or more keyboards
static const detail::bitfield< 3, 12 > pointer
the seat has pointer devices
static const detail::bitfield< 4, 8 > bottom
bottom edge
static const detail::bitfield< 4, 8 > right
right edge
static const detail::bitfield< 4, 8 > bottom_right
bottom and right edges
static const detail::bitfield< 4, 8 > top
top edge
static const detail::bitfield< 4, 8 > none
no edge
static const detail::bitfield< 4, 8 > top_left
top and left edges
static const detail::bitfield< 4, 8 > top_right
top and right edges
static const detail::bitfield< 4, 8 > bottom_left
bottom and left edges
static const detail::bitfield< 4, 8 > left
left edge
details of transient behaviour
static const detail::bitfield< 1, 9 > inactive
do not set keyboard focus