1#include <wayland-client-protocol.hpp>
3using namespace wayland;
4using namespace wayland::detail;
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_offset_request[2] = {
825const wl_interface* surface_interface_enter_event[1] = {
829const wl_interface* surface_interface_leave_event[1] = {
833const wl_message surface_interface_requests[11] = {
837 surface_interface_destroy_request,
842 surface_interface_attach_request,
847 surface_interface_damage_request,
852 surface_interface_frame_request,
857 surface_interface_set_opaque_region_request,
862 surface_interface_set_input_region_request,
867 surface_interface_commit_request,
870 "set_buffer_transform",
872 surface_interface_set_buffer_transform_request,
877 surface_interface_set_buffer_scale_request,
882 surface_interface_damage_buffer_request,
887 surface_interface_offset_request,
891const wl_message surface_interface_events[2] = {
895 surface_interface_enter_event,
900 surface_interface_leave_event,
904const wl_interface wayland::detail::surface_interface =
909 surface_interface_requests,
911 surface_interface_events,
914const wl_interface* seat_interface_get_pointer_request[1] = {
918const wl_interface* seat_interface_get_keyboard_request[1] = {
922const wl_interface* seat_interface_get_touch_request[1] = {
926const wl_interface* seat_interface_release_request[0] = {
929const wl_interface* seat_interface_capabilities_event[1] = {
933const wl_interface* seat_interface_name_event[1] = {
937const wl_message seat_interface_requests[4] = {
941 seat_interface_get_pointer_request,
946 seat_interface_get_keyboard_request,
951 seat_interface_get_touch_request,
956 seat_interface_release_request,
960const wl_message seat_interface_events[2] = {
964 seat_interface_capabilities_event,
969 seat_interface_name_event,
973const wl_interface wayland::detail::seat_interface =
978 seat_interface_requests,
980 seat_interface_events,
983const wl_interface* pointer_interface_set_cursor_request[4] = {
990const wl_interface* pointer_interface_release_request[0] = {
993const wl_interface* pointer_interface_enter_event[4] = {
1000const wl_interface* pointer_interface_leave_event[2] = {
1005const wl_interface* pointer_interface_motion_event[3] = {
1011const wl_interface* pointer_interface_button_event[4] = {
1018const wl_interface* pointer_interface_axis_event[3] = {
1024const wl_interface* pointer_interface_frame_event[0] = {
1027const wl_interface* pointer_interface_axis_source_event[1] = {
1031const wl_interface* pointer_interface_axis_stop_event[2] = {
1036const wl_interface* pointer_interface_axis_discrete_event[2] = {
1041const wl_interface* pointer_interface_axis_value120_event[2] = {
1046const wl_message pointer_interface_requests[2] = {
1050 pointer_interface_set_cursor_request,
1055 pointer_interface_release_request,
1059const wl_message pointer_interface_events[10] = {
1063 pointer_interface_enter_event,
1068 pointer_interface_leave_event,
1073 pointer_interface_motion_event,
1078 pointer_interface_button_event,
1083 pointer_interface_axis_event,
1088 pointer_interface_frame_event,
1093 pointer_interface_axis_source_event,
1098 pointer_interface_axis_stop_event,
1103 pointer_interface_axis_discrete_event,
1108 pointer_interface_axis_value120_event,
1112const wl_interface wayland::detail::pointer_interface =
1117 pointer_interface_requests,
1119 pointer_interface_events,
1122const wl_interface* keyboard_interface_release_request[0] = {
1125const wl_interface* keyboard_interface_keymap_event[3] = {
1131const wl_interface* keyboard_interface_enter_event[3] = {
1137const wl_interface* keyboard_interface_leave_event[2] = {
1142const wl_interface* keyboard_interface_key_event[4] = {
1149const wl_interface* keyboard_interface_modifiers_event[5] = {
1157const wl_interface* keyboard_interface_repeat_info_event[2] = {
1162const wl_message keyboard_interface_requests[1] = {
1166 keyboard_interface_release_request,
1170const wl_message keyboard_interface_events[6] = {
1174 keyboard_interface_keymap_event,
1179 keyboard_interface_enter_event,
1184 keyboard_interface_leave_event,
1189 keyboard_interface_key_event,
1194 keyboard_interface_modifiers_event,
1199 keyboard_interface_repeat_info_event,
1203const wl_interface wayland::detail::keyboard_interface =
1208 keyboard_interface_requests,
1210 keyboard_interface_events,
1213const wl_interface* touch_interface_release_request[0] = {
1216const wl_interface* touch_interface_down_event[6] = {
1225const wl_interface* touch_interface_up_event[3] = {
1231const wl_interface* touch_interface_motion_event[4] = {
1238const wl_interface* touch_interface_frame_event[0] = {
1241const wl_interface* touch_interface_cancel_event[0] = {
1244const wl_interface* touch_interface_shape_event[3] = {
1250const wl_interface* touch_interface_orientation_event[2] = {
1255const wl_message touch_interface_requests[1] = {
1259 touch_interface_release_request,
1263const wl_message touch_interface_events[7] = {
1267 touch_interface_down_event,
1272 touch_interface_up_event,
1277 touch_interface_motion_event,
1282 touch_interface_frame_event,
1287 touch_interface_cancel_event,
1292 touch_interface_shape_event,
1297 touch_interface_orientation_event,
1301const wl_interface wayland::detail::touch_interface =
1306 touch_interface_requests,
1308 touch_interface_events,
1311const wl_interface* output_interface_release_request[0] = {
1314const wl_interface* output_interface_geometry_event[8] = {
1325const wl_interface* output_interface_mode_event[4] = {
1332const wl_interface* output_interface_done_event[0] = {
1335const wl_interface* output_interface_scale_event[1] = {
1339const wl_interface* output_interface_name_event[1] = {
1343const wl_interface* output_interface_description_event[1] = {
1347const wl_message output_interface_requests[1] = {
1351 output_interface_release_request,
1355const wl_message output_interface_events[6] = {
1359 output_interface_geometry_event,
1364 output_interface_mode_event,
1369 output_interface_done_event,
1374 output_interface_scale_event,
1379 output_interface_name_event,
1384 output_interface_description_event,
1388const wl_interface wayland::detail::output_interface =
1393 output_interface_requests,
1395 output_interface_events,
1398const wl_interface* region_interface_destroy_request[0] = {
1401const wl_interface* region_interface_add_request[4] = {
1408const wl_interface* region_interface_subtract_request[4] = {
1415const wl_message region_interface_requests[3] = {
1419 region_interface_destroy_request,
1424 region_interface_add_request,
1429 region_interface_subtract_request,
1433const wl_message region_interface_events[0] = {
1436const wl_interface wayland::detail::region_interface =
1441 region_interface_requests,
1443 region_interface_events,
1446const wl_interface* subcompositor_interface_destroy_request[0] = {
1449const wl_interface* subcompositor_interface_get_subsurface_request[3] = {
1450 &subsurface_interface,
1455const wl_message subcompositor_interface_requests[2] = {
1459 subcompositor_interface_destroy_request,
1464 subcompositor_interface_get_subsurface_request,
1468const wl_message subcompositor_interface_events[0] = {
1471const wl_interface wayland::detail::subcompositor_interface =
1476 subcompositor_interface_requests,
1478 subcompositor_interface_events,
1481const wl_interface* subsurface_interface_destroy_request[0] = {
1484const wl_interface* subsurface_interface_set_position_request[2] = {
1489const wl_interface* subsurface_interface_place_above_request[1] = {
1493const wl_interface* subsurface_interface_place_below_request[1] = {
1497const wl_interface* subsurface_interface_set_sync_request[0] = {
1500const wl_interface* subsurface_interface_set_desync_request[0] = {
1503const wl_message subsurface_interface_requests[6] = {
1507 subsurface_interface_destroy_request,
1512 subsurface_interface_set_position_request,
1517 subsurface_interface_place_above_request,
1522 subsurface_interface_place_below_request,
1527 subsurface_interface_set_sync_request,
1532 subsurface_interface_set_desync_request,
1536const wl_message subsurface_interface_events[0] = {
1539const wl_interface wayland::detail::subsurface_interface =
1544 subsurface_interface_requests,
1546 subsurface_interface_events,
1549registry_t::registry_t(
const proxy_t &p)
1552 if(proxy_has_object() && get_wrapper_type() == wrapper_type::standard)
1554 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1556 set_interface(®istry_interface);
1561registry_t::registry_t()
1563 set_interface(®istry_interface);
1564 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1565 {
return registry_t(p); });
1568registry_t::registry_t(wl_registry *p, wrapper_type t)
1569 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1570 if(proxy_has_object() && get_wrapper_type() == wrapper_type::standard)
1572 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1574 set_interface(®istry_interface);
1579registry_t::registry_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
1580 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1581 set_interface(®istry_interface);
1588 return {*
this, construct_proxy_wrapper_tag()};
1591const std::string registry_t::interface_name =
"wl_registry";
1593registry_t::operator wl_registry*()
const
1595 return reinterpret_cast<wl_registry*
> (c_ptr());
1600 proxy_t p = marshal_constructor_versioned(0U, interface.interface, version, name, std::string(interface.interface->name), version,
nullptr);
1601 interface = interface.copy_constructor(p);
1608 return std::static_pointer_cast<events_t>(get_events())->global;
1613 return std::static_pointer_cast<events_t>(get_events())->global_remove;
1616int registry_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
1618 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1622 if(events->global) events->global(args[0].get<uint32_t>(), args[1].get<std::string>(), args[2].get<uint32_t>());
1625 if(events->global_remove) events->global_remove(args[0].get<uint32_t>());
1631callback_t::callback_t(
const proxy_t &p)
1636 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1638 set_interface(&callback_interface);
1639 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1640 {
return callback_t(p); });
1643callback_t::callback_t()
1645 set_interface(&callback_interface);
1646 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1647 {
return callback_t(p); });
1650callback_t::callback_t(wl_callback *p, wrapper_type t)
1651 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1654 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1656 set_interface(&callback_interface);
1657 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1658 {
return callback_t(p); });
1661callback_t::callback_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
1662 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1663 set_interface(&callback_interface);
1664 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1665 {
return callback_t(p); });
1670 return {*
this, construct_proxy_wrapper_tag()};
1673const std::string callback_t::interface_name =
"wl_callback";
1675callback_t::operator wl_callback*()
const
1677 return reinterpret_cast<wl_callback*
> (c_ptr());
1682 return std::static_pointer_cast<events_t>(get_events())->done;
1685int callback_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
1687 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1691 if(events->done) events->done(args[0].get<uint32_t>());
1697compositor_t::compositor_t(
const proxy_t &p)
1702 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1704 set_interface(&compositor_interface);
1705 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1706 {
return compositor_t(p); });
1709compositor_t::compositor_t()
1711 set_interface(&compositor_interface);
1712 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1713 {
return compositor_t(p); });
1716compositor_t::compositor_t(wl_compositor *p, wrapper_type t)
1717 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1720 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1722 set_interface(&compositor_interface);
1723 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1724 {
return compositor_t(p); });
1727compositor_t::compositor_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
1728 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1729 set_interface(&compositor_interface);
1730 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1731 {
return compositor_t(p); });
1736 return {*
this, construct_proxy_wrapper_tag()};
1739const std::string compositor_t::interface_name =
"wl_compositor";
1741compositor_t::operator wl_compositor*()
const
1743 return reinterpret_cast<wl_compositor*
> (c_ptr());
1748 proxy_t p = marshal_constructor(0U, &surface_interface,
nullptr);
1755 proxy_t p = marshal_constructor(1U, ®ion_interface,
nullptr);
1760int compositor_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
1765shm_pool_t::shm_pool_t(
const proxy_t &p)
1770 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1771 set_destroy_opcode(1U);
1773 set_interface(&shm_pool_interface);
1774 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1775 {
return shm_pool_t(p); });
1778shm_pool_t::shm_pool_t()
1780 set_interface(&shm_pool_interface);
1781 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1782 {
return shm_pool_t(p); });
1785shm_pool_t::shm_pool_t(wl_shm_pool *p, wrapper_type t)
1786 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1789 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1790 set_destroy_opcode(1U);
1792 set_interface(&shm_pool_interface);
1793 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1794 {
return shm_pool_t(p); });
1797shm_pool_t::shm_pool_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
1798 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1799 set_interface(&shm_pool_interface);
1800 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1801 {
return shm_pool_t(p); });
1806 return {*
this, construct_proxy_wrapper_tag()};
1809const std::string shm_pool_t::interface_name =
"wl_shm_pool";
1811shm_pool_t::operator wl_shm_pool*()
const
1813 return reinterpret_cast<wl_shm_pool*
> (c_ptr());
1818 proxy_t p = marshal_constructor(0U, &buffer_interface,
nullptr, offset, width, height, stride,
static_cast<uint32_t
>(format));
1829int shm_pool_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
1839 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1841 set_interface(&shm_interface);
1842 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1843 {
return shm_t(p); });
1848 set_interface(&shm_interface);
1849 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1850 {
return shm_t(p); });
1853shm_t::shm_t(wl_shm *p, wrapper_type t)
1854 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1857 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1859 set_interface(&shm_interface);
1860 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1861 {
return shm_t(p); });
1864shm_t::shm_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
1865 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1866 set_interface(&shm_interface);
1867 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1868 {
return shm_t(p); });
1871shm_t shm_t::proxy_create_wrapper()
1873 return {*
this, construct_proxy_wrapper_tag()};
1876const std::string shm_t::interface_name =
"wl_shm";
1878shm_t::operator wl_shm*()
const
1880 return reinterpret_cast<wl_shm*
> (c_ptr());
1885 proxy_t p = marshal_constructor(0U, &shm_pool_interface,
nullptr, argument_t::fd(fd), size);
1892 return std::static_pointer_cast<events_t>(get_events())->format;
1895int shm_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
1897 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1901 if(events->format) events->format(shm_format(args[0].get<uint32_t>()));
1909buffer_t::buffer_t(
const proxy_t &p)
1914 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1915 set_destroy_opcode(0U);
1917 set_interface(&buffer_interface);
1918 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1919 {
return buffer_t(p); });
1924 set_interface(&buffer_interface);
1925 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1926 {
return buffer_t(p); });
1929buffer_t::buffer_t(wl_buffer *p, wrapper_type t)
1930 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1933 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1934 set_destroy_opcode(0U);
1936 set_interface(&buffer_interface);
1937 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1938 {
return buffer_t(p); });
1941buffer_t::buffer_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
1942 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1943 set_interface(&buffer_interface);
1944 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1945 {
return buffer_t(p); });
1948buffer_t buffer_t::proxy_create_wrapper()
1950 return {*
this, construct_proxy_wrapper_tag()};
1953const std::string buffer_t::interface_name =
"wl_buffer";
1955buffer_t::operator wl_buffer*()
const
1957 return reinterpret_cast<wl_buffer*
> (c_ptr());
1962 return std::static_pointer_cast<events_t>(get_events())->release;
1965int buffer_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
1967 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1971 if(events->release) events->release();
1977data_offer_t::data_offer_t(
const proxy_t &p)
1982 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
1983 set_destroy_opcode(2U);
1985 set_interface(&data_offer_interface);
1986 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1987 {
return data_offer_t(p); });
1990data_offer_t::data_offer_t()
1992 set_interface(&data_offer_interface);
1993 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
1994 {
return data_offer_t(p); });
1997data_offer_t::data_offer_t(wl_data_offer *p, wrapper_type t)
1998 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2001 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2002 set_destroy_opcode(2U);
2004 set_interface(&data_offer_interface);
2005 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2006 {
return data_offer_t(p); });
2009data_offer_t::data_offer_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
2010 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2011 set_interface(&data_offer_interface);
2012 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2013 {
return data_offer_t(p); });
2018 return {*
this, construct_proxy_wrapper_tag()};
2021const std::string data_offer_t::interface_name =
"wl_data_offer";
2023data_offer_t::operator wl_data_offer*()
const
2025 return reinterpret_cast<wl_data_offer*
> (c_ptr());
2030 marshal(0U, serial, mime_type);
2036 marshal(1U, mime_type, argument_t::fd(fd));
2053 marshal(4U,
static_cast<uint32_t
>(dnd_actions),
static_cast<uint32_t
>(preferred_action));
2064 return std::static_pointer_cast<events_t>(get_events())->offer;
2069 return std::static_pointer_cast<events_t>(get_events())->source_actions;
2074 return std::static_pointer_cast<events_t>(get_events())->action;
2077int data_offer_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
2079 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2083 if(events->offer) events->offer(args[0].get<std::string>());
2096data_source_t::data_source_t(
const proxy_t &p)
2101 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2102 set_destroy_opcode(1U);
2104 set_interface(&data_source_interface);
2105 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2106 {
return data_source_t(p); });
2109data_source_t::data_source_t()
2111 set_interface(&data_source_interface);
2112 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2113 {
return data_source_t(p); });
2116data_source_t::data_source_t(wl_data_source *p, wrapper_type t)
2117 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2120 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2121 set_destroy_opcode(1U);
2123 set_interface(&data_source_interface);
2124 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2125 {
return data_source_t(p); });
2128data_source_t::data_source_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
2129 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2130 set_interface(&data_source_interface);
2131 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2132 {
return data_source_t(p); });
2137 return {*
this, construct_proxy_wrapper_tag()};
2140const std::string data_source_t::interface_name =
"wl_data_source";
2142data_source_t::operator wl_data_source*()
const
2144 return reinterpret_cast<wl_data_source*
> (c_ptr());
2149 marshal(0U, mime_type);
2155 marshal(2U,
static_cast<uint32_t
>(dnd_actions));
2166 return std::static_pointer_cast<events_t>(get_events())->target;
2171 return std::static_pointer_cast<events_t>(get_events())->send;
2176 return std::static_pointer_cast<events_t>(get_events())->cancelled;
2181 return std::static_pointer_cast<events_t>(get_events())->dnd_drop_performed;
2186 return std::static_pointer_cast<events_t>(get_events())->dnd_finished;
2191 return std::static_pointer_cast<events_t>(get_events())->action;
2194int data_source_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
2196 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2200 if(events->target) events->target(args[0].get<std::string>());
2203 if(events->send) events->send(args[0].get<std::string>(), args[1].get<int>());
2206 if(events->cancelled) events->cancelled();
2209 if(events->dnd_drop_performed) events->dnd_drop_performed();
2212 if(events->dnd_finished) events->dnd_finished();
2222data_device_t::data_device_t(
const proxy_t &p)
2227 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2229 set_interface(&data_device_interface);
2230 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2231 {
return data_device_t(p); });
2234data_device_t::data_device_t()
2236 set_interface(&data_device_interface);
2237 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2238 {
return data_device_t(p); });
2241data_device_t::data_device_t(wl_data_device *p, wrapper_type t)
2242 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2245 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2247 set_interface(&data_device_interface);
2248 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2249 {
return data_device_t(p); });
2252data_device_t::data_device_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
2253 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2254 set_interface(&data_device_interface);
2255 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2256 {
return data_device_t(p); });
2261 return {*
this, construct_proxy_wrapper_tag()};
2264const std::string data_device_t::interface_name =
"wl_data_device";
2266data_device_t::operator wl_data_device*()
const
2268 return reinterpret_cast<wl_data_device*
> (c_ptr());
2279 marshal(1U, source.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(source.
c_ptr()) :
nullptr, serial);
2296 return std::static_pointer_cast<events_t>(get_events())->data_offer;
2301 return std::static_pointer_cast<events_t>(get_events())->enter;
2306 return std::static_pointer_cast<events_t>(get_events())->leave;
2311 return std::static_pointer_cast<events_t>(get_events())->motion;
2316 return std::static_pointer_cast<events_t>(get_events())->drop;
2321 return std::static_pointer_cast<events_t>(get_events())->selection;
2324int data_device_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
2326 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2330 if(events->data_offer) events->data_offer(
data_offer_t(args[0].get<proxy_t>()));
2333 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>()));
2336 if(events->leave) events->leave();
2339 if(events->motion) events->motion(args[0].get<uint32_t>(), args[1].get<double>(), args[2].get<double>());
2342 if(events->drop) events->drop();
2345 if(events->selection) events->selection(
data_offer_t(args[0].get<proxy_t>()));
2352data_device_manager_t::data_device_manager_t(
const proxy_t &p)
2357 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2359 set_interface(&data_device_manager_interface);
2360 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2361 {
return data_device_manager_t(p); });
2364data_device_manager_t::data_device_manager_t()
2366 set_interface(&data_device_manager_interface);
2367 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2368 {
return data_device_manager_t(p); });
2371data_device_manager_t::data_device_manager_t(wl_data_device_manager *p, wrapper_type t)
2372 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2375 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2377 set_interface(&data_device_manager_interface);
2378 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2379 {
return data_device_manager_t(p); });
2382data_device_manager_t::data_device_manager_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
2383 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2384 set_interface(&data_device_manager_interface);
2385 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2386 {
return data_device_manager_t(p); });
2391 return {*
this, construct_proxy_wrapper_tag()};
2394const std::string data_device_manager_t::interface_name =
"wl_data_device_manager";
2396data_device_manager_t::operator wl_data_device_manager*()
const
2398 return reinterpret_cast<wl_data_device_manager*
> (c_ptr());
2403 proxy_t p = marshal_constructor(0U, &data_source_interface,
nullptr);
2410 proxy_t p = marshal_constructor(1U, &data_device_interface,
nullptr, seat.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(seat.
c_ptr()) :
nullptr);
2415int data_device_manager_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
2425shell_t::shell_t(
const proxy_t &p)
2430 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2432 set_interface(&shell_interface);
2433 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2434 {
return shell_t(p); });
2439 set_interface(&shell_interface);
2440 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2441 {
return shell_t(p); });
2444shell_t::shell_t(wl_shell *p, wrapper_type t)
2445 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2448 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2450 set_interface(&shell_interface);
2451 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2452 {
return shell_t(p); });
2455shell_t::shell_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
2456 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2457 set_interface(&shell_interface);
2458 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2459 {
return shell_t(p); });
2462shell_t shell_t::proxy_create_wrapper()
2464 return {*
this, construct_proxy_wrapper_tag()};
2467const std::string shell_t::interface_name =
"wl_shell";
2469shell_t::operator wl_shell*()
const
2471 return reinterpret_cast<wl_shell*
> (c_ptr());
2476 proxy_t p = marshal_constructor(0U, &shell_surface_interface,
nullptr, surface.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(surface.
c_ptr()) :
nullptr);
2481int shell_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
2487shell_surface_t::shell_surface_t(
const proxy_t &p)
2492 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2494 set_interface(&shell_surface_interface);
2495 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2496 {
return shell_surface_t(p); });
2499shell_surface_t::shell_surface_t()
2501 set_interface(&shell_surface_interface);
2502 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2503 {
return shell_surface_t(p); });
2506shell_surface_t::shell_surface_t(wl_shell_surface *p, wrapper_type t)
2507 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2510 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2512 set_interface(&shell_surface_interface);
2513 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2514 {
return shell_surface_t(p); });
2517shell_surface_t::shell_surface_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
2518 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2519 set_interface(&shell_surface_interface);
2520 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2521 {
return shell_surface_t(p); });
2526 return {*
this, construct_proxy_wrapper_tag()};
2529const std::string shell_surface_t::interface_name =
"wl_shell_surface";
2531shell_surface_t::operator wl_shell_surface*()
const
2533 return reinterpret_cast<wl_shell_surface*
> (c_ptr());
2538 marshal(0U, serial);
2544 marshal(1U, seat.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(seat.
c_ptr()) :
nullptr, serial);
2550 marshal(2U, seat.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(seat.
c_ptr()) :
nullptr, serial,
static_cast<uint32_t
>(edges));
2562 marshal(4U, parent.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(parent.
c_ptr()) :
nullptr, x, y,
static_cast<uint32_t
>(flags));
2568 marshal(5U,
static_cast<uint32_t
>(method), framerate, output.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(output.
c_ptr()) :
nullptr);
2574 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));
2592 marshal(9U, class_);
2598 return std::static_pointer_cast<events_t>(get_events())->ping;
2603 return std::static_pointer_cast<events_t>(get_events())->configure;
2608 return std::static_pointer_cast<events_t>(get_events())->popup_done;
2611int shell_surface_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
2613 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2617 if(events->ping) events->ping(args[0].get<uint32_t>());
2620 if(events->configure) events->configure(
shell_surface_resize(args[0].get<uint32_t>()), args[1].get<int32_t>(), args[2].get<int32_t>());
2623 if(events->popup_done) events->popup_done();
2642surface_t::surface_t(
const proxy_t &p)
2647 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2648 set_destroy_opcode(0U);
2650 set_interface(&surface_interface);
2651 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2652 {
return surface_t(p); });
2655surface_t::surface_t()
2657 set_interface(&surface_interface);
2658 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2659 {
return surface_t(p); });
2662surface_t::surface_t(wl_surface *p, wrapper_type t)
2663 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2666 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2667 set_destroy_opcode(0U);
2669 set_interface(&surface_interface);
2670 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2671 {
return surface_t(p); });
2674surface_t::surface_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
2675 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2676 set_interface(&surface_interface);
2677 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2678 {
return surface_t(p); });
2681surface_t surface_t::proxy_create_wrapper()
2683 return {*
this, construct_proxy_wrapper_tag()};
2686const std::string surface_t::interface_name =
"wl_surface";
2688surface_t::operator wl_surface*()
const
2690 return reinterpret_cast<wl_surface*
> (c_ptr());
2695 marshal(1U, buffer.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(buffer.
c_ptr()) :
nullptr, x, y);
2701 marshal(2U, x, y, width, height);
2707 proxy_t p = marshal_constructor(3U, &callback_interface,
nullptr);
2732 marshal(7U,
static_cast<int32_t
>(transform));
2754 marshal(9U, x, y, width, height);
2776 return std::static_pointer_cast<events_t>(get_events())->enter;
2781 return std::static_pointer_cast<events_t>(get_events())->leave;
2784int surface_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
2786 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2790 if(events->enter) events->enter(
output_t(args[0].get<proxy_t>()));
2793 if(events->leave) events->leave(
output_t(args[0].get<proxy_t>()));
2800seat_t::seat_t(
const proxy_t &p)
2805 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2807 set_interface(&seat_interface);
2808 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2809 {
return seat_t(p); });
2814 set_interface(&seat_interface);
2815 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2816 {
return seat_t(p); });
2819seat_t::seat_t(wl_seat *p, wrapper_type t)
2820 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2823 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2825 set_interface(&seat_interface);
2826 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2827 {
return seat_t(p); });
2830seat_t::seat_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
2831 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2832 set_interface(&seat_interface);
2833 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2834 {
return seat_t(p); });
2837seat_t seat_t::proxy_create_wrapper()
2839 return {*
this, construct_proxy_wrapper_tag()};
2842const std::string seat_t::interface_name =
"wl_seat";
2844seat_t::operator wl_seat*()
const
2846 return reinterpret_cast<wl_seat*
> (c_ptr());
2851 proxy_t p = marshal_constructor(0U, &pointer_interface,
nullptr);
2858 proxy_t p = marshal_constructor(1U, &keyboard_interface,
nullptr);
2865 proxy_t p = marshal_constructor(2U, &touch_interface,
nullptr);
2883 return std::static_pointer_cast<events_t>(get_events())->capabilities;
2888 return std::static_pointer_cast<events_t>(get_events())->name;
2891int seat_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
2893 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2897 if(events->capabilities) events->capabilities(
seat_capability(args[0].get<uint32_t>()));
2900 if(events->name) events->name(args[0].get<std::string>());
2911pointer_t::pointer_t(
const proxy_t &p)
2916 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2918 set_interface(&pointer_interface);
2919 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2920 {
return pointer_t(p); });
2923pointer_t::pointer_t()
2925 set_interface(&pointer_interface);
2926 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2927 {
return pointer_t(p); });
2930pointer_t::pointer_t(wl_pointer *p, wrapper_type t)
2931 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2934 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
2936 set_interface(&pointer_interface);
2937 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2938 {
return pointer_t(p); });
2941pointer_t::pointer_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
2942 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2943 set_interface(&pointer_interface);
2944 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
2945 {
return pointer_t(p); });
2948pointer_t pointer_t::proxy_create_wrapper()
2950 return {*
this, construct_proxy_wrapper_tag()};
2953const std::string pointer_t::interface_name =
"wl_pointer";
2955pointer_t::operator wl_pointer*()
const
2957 return reinterpret_cast<wl_pointer*
> (c_ptr());
2962 marshal(0U, serial, surface.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(surface.
c_ptr()) :
nullptr, hotspot_x, hotspot_y);
2979 return std::static_pointer_cast<events_t>(get_events())->enter;
2984 return std::static_pointer_cast<events_t>(get_events())->leave;
2989 return std::static_pointer_cast<events_t>(get_events())->motion;
2994 return std::static_pointer_cast<events_t>(get_events())->button;
2999 return std::static_pointer_cast<events_t>(get_events())->axis;
3004 return std::static_pointer_cast<events_t>(get_events())->frame;
3009 return std::static_pointer_cast<events_t>(get_events())->axis_source;
3014 return std::static_pointer_cast<events_t>(get_events())->axis_stop;
3019 return std::static_pointer_cast<events_t>(get_events())->axis_discrete;
3024 return std::static_pointer_cast<events_t>(get_events())->axis_value120;
3027int pointer_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
3029 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
3033 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>());
3036 if(events->leave) events->leave(args[0].get<uint32_t>(),
surface_t(args[1].get<proxy_t>()));
3039 if(events->motion) events->motion(args[0].get<uint32_t>(), args[1].get<double>(), args[2].get<double>());
3042 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>()));
3045 if(events->axis) events->axis(args[0].get<uint32_t>(), pointer_axis(args[1].get<uint32_t>()), args[2].get<double>());
3048 if(events->frame) events->frame();
3051 if(events->axis_source) events->axis_source(pointer_axis_source(args[0].get<uint32_t>()));
3054 if(events->axis_stop) events->axis_stop(args[0].get<uint32_t>(), pointer_axis(args[1].get<uint32_t>()));
3057 if(events->axis_discrete) events->axis_discrete(pointer_axis(args[0].get<uint32_t>()), args[1].get<int32_t>());
3060 if(events->axis_value120) events->axis_value120(pointer_axis(args[0].get<uint32_t>()), args[1].get<int32_t>());
3070keyboard_t::keyboard_t(
const proxy_t &p)
3075 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3077 set_interface(&keyboard_interface);
3078 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3079 {
return keyboard_t(p); });
3082keyboard_t::keyboard_t()
3084 set_interface(&keyboard_interface);
3085 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3086 {
return keyboard_t(p); });
3089keyboard_t::keyboard_t(wl_keyboard *p, wrapper_type t)
3090 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3093 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3095 set_interface(&keyboard_interface);
3096 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3097 {
return keyboard_t(p); });
3100keyboard_t::keyboard_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
3101 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
3102 set_interface(&keyboard_interface);
3103 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3104 {
return keyboard_t(p); });
3109 return {*
this, construct_proxy_wrapper_tag()};
3112const std::string keyboard_t::interface_name =
"wl_keyboard";
3114keyboard_t::operator wl_keyboard*()
const
3116 return reinterpret_cast<wl_keyboard*
> (c_ptr());
3132 return std::static_pointer_cast<events_t>(get_events())->keymap;
3137 return std::static_pointer_cast<events_t>(get_events())->enter;
3142 return std::static_pointer_cast<events_t>(get_events())->leave;
3147 return std::static_pointer_cast<events_t>(get_events())->key;
3152 return std::static_pointer_cast<events_t>(get_events())->modifiers;
3157 return std::static_pointer_cast<events_t>(get_events())->repeat_info;
3160int keyboard_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
3162 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
3166 if(events->keymap) events->keymap(keyboard_keymap_format(args[0].get<uint32_t>()), args[1].get<int>(), args[2].get<uint32_t>());
3169 if(events->enter) events->enter(args[0].get<uint32_t>(),
surface_t(args[1].get<proxy_t>()), args[2].get<array_t>());
3172 if(events->leave) events->leave(args[0].get<uint32_t>(),
surface_t(args[1].get<proxy_t>()));
3175 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>()));
3178 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>());
3181 if(events->repeat_info) events->repeat_info(args[0].get<int32_t>(), args[1].get<int32_t>());
3189touch_t::touch_t(
const proxy_t &p)
3194 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3196 set_interface(&touch_interface);
3197 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3198 {
return touch_t(p); });
3203 set_interface(&touch_interface);
3204 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3205 {
return touch_t(p); });
3208touch_t::touch_t(wl_touch *p, wrapper_type t)
3209 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3212 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3214 set_interface(&touch_interface);
3215 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3216 {
return touch_t(p); });
3219touch_t::touch_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
3220 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
3221 set_interface(&touch_interface);
3222 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3223 {
return touch_t(p); });
3226touch_t touch_t::proxy_create_wrapper()
3228 return {*
this, construct_proxy_wrapper_tag()};
3231const std::string touch_t::interface_name =
"wl_touch";
3233touch_t::operator wl_touch*()
const
3235 return reinterpret_cast<wl_touch*
> (c_ptr());
3251 return std::static_pointer_cast<events_t>(get_events())->down;
3256 return std::static_pointer_cast<events_t>(get_events())->up;
3261 return std::static_pointer_cast<events_t>(get_events())->motion;
3266 return std::static_pointer_cast<events_t>(get_events())->frame;
3271 return std::static_pointer_cast<events_t>(get_events())->cancel;
3276 return std::static_pointer_cast<events_t>(get_events())->shape;
3281 return std::static_pointer_cast<events_t>(get_events())->orientation;
3284int touch_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
3286 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
3290 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>());
3293 if(events->up) events->up(args[0].get<uint32_t>(), args[1].get<uint32_t>(), args[2].get<int32_t>());
3296 if(events->motion) events->motion(args[0].get<uint32_t>(), args[1].get<int32_t>(), args[2].get<double>(), args[3].get<double>());
3299 if(events->frame) events->frame();
3302 if(events->cancel) events->cancel();
3305 if(events->shape) events->shape(args[0].get<int32_t>(), args[1].get<double>(), args[2].get<double>());
3308 if(events->orientation) events->orientation(args[0].get<int32_t>(), args[1].get<double>());
3314output_t::output_t(
const proxy_t &p)
3319 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3321 set_interface(&output_interface);
3322 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3323 {
return output_t(p); });
3328 set_interface(&output_interface);
3329 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3330 {
return output_t(p); });
3333output_t::output_t(wl_output *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);
3339 set_interface(&output_interface);
3340 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3341 {
return output_t(p); });
3344output_t::output_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
3345 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
3346 set_interface(&output_interface);
3347 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3348 {
return output_t(p); });
3351output_t output_t::proxy_create_wrapper()
3353 return {*
this, construct_proxy_wrapper_tag()};
3356const std::string output_t::interface_name =
"wl_output";
3358output_t::operator wl_output*()
const
3360 return reinterpret_cast<wl_output*
> (c_ptr());
3376 return std::static_pointer_cast<events_t>(get_events())->geometry;
3381 return std::static_pointer_cast<events_t>(get_events())->mode;
3386 return std::static_pointer_cast<events_t>(get_events())->done;
3391 return std::static_pointer_cast<events_t>(get_events())->scale;
3396 return std::static_pointer_cast<events_t>(get_events())->name;
3401 return std::static_pointer_cast<events_t>(get_events())->description;
3404int output_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
3406 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
3410 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>()));
3413 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>());
3416 if(events->done) events->done();
3419 if(events->scale) events->scale(args[0].get<int32_t>());
3422 if(events->name) events->name(args[0].get<std::string>());
3425 if(events->description) events->description(args[0].get<std::string>());
3444region_t::region_t(
const proxy_t &p)
3449 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3450 set_destroy_opcode(0U);
3452 set_interface(®ion_interface);
3453 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3454 {
return region_t(p); });
3459 set_interface(®ion_interface);
3460 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3461 {
return region_t(p); });
3464region_t::region_t(wl_region *p, wrapper_type t)
3465 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3468 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3469 set_destroy_opcode(0U);
3471 set_interface(®ion_interface);
3472 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3473 {
return region_t(p); });
3476region_t::region_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
3477 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
3478 set_interface(®ion_interface);
3479 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3480 {
return region_t(p); });
3483region_t region_t::proxy_create_wrapper()
3485 return {*
this, construct_proxy_wrapper_tag()};
3488const std::string region_t::interface_name =
"wl_region";
3490region_t::operator wl_region*()
const
3492 return reinterpret_cast<wl_region*
> (c_ptr());
3497 marshal(1U, x, y, width, height);
3503 marshal(2U, x, y, width, height);
3507int region_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
3512subcompositor_t::subcompositor_t(
const proxy_t &p)
3517 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3518 set_destroy_opcode(0U);
3520 set_interface(&subcompositor_interface);
3521 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3522 {
return subcompositor_t(p); });
3525subcompositor_t::subcompositor_t()
3527 set_interface(&subcompositor_interface);
3528 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3529 {
return subcompositor_t(p); });
3532subcompositor_t::subcompositor_t(wl_subcompositor *p, wrapper_type t)
3533 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3536 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3537 set_destroy_opcode(0U);
3539 set_interface(&subcompositor_interface);
3540 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3541 {
return subcompositor_t(p); });
3544subcompositor_t::subcompositor_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
3545 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
3546 set_interface(&subcompositor_interface);
3547 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3548 {
return subcompositor_t(p); });
3553 return {*
this, construct_proxy_wrapper_tag()};
3556const std::string subcompositor_t::interface_name =
"wl_subcompositor";
3558subcompositor_t::operator wl_subcompositor*()
const
3560 return reinterpret_cast<wl_subcompositor*
> (c_ptr());
3565 proxy_t p = marshal_constructor(1U, &subsurface_interface,
nullptr, surface.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(surface.
c_ptr()) :
nullptr, parent.
proxy_has_object() ?
reinterpret_cast<wl_object*
>(parent.
c_ptr()) :
nullptr);
3570int subcompositor_t::dispatcher(uint32_t opcode,
const std::vector<any>& args,
const std::shared_ptr<detail::events_base_t>& e)
3576subsurface_t::subsurface_t(
const proxy_t &p)
3581 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3582 set_destroy_opcode(0U);
3584 set_interface(&subsurface_interface);
3585 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3586 {
return subsurface_t(p); });
3589subsurface_t::subsurface_t()
3591 set_interface(&subsurface_interface);
3592 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3593 {
return subsurface_t(p); });
3596subsurface_t::subsurface_t(wl_subsurface *p, wrapper_type t)
3597 :
proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3600 set_events(std::shared_ptr<detail::events_base_t>(
new events_t), dispatcher);
3601 set_destroy_opcode(0U);
3603 set_interface(&subsurface_interface);
3604 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3605 {
return subsurface_t(p); });
3608subsurface_t::subsurface_t(
proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag )
3609 :
proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
3610 set_interface(&subsurface_interface);
3611 set_copy_constructor([] (
const proxy_t &p) -> proxy_t
3612 {
return subsurface_t(p); });
3617 return {*
this, construct_proxy_wrapper_tag()};
3620const std::string subsurface_t::interface_name =
"wl_subsurface";
3622subsurface_t::operator wl_subsurface*()
const
3624 return reinterpret_cast<wl_subsurface*
> (c_ptr());
3657int 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
std::function< void(std::string)> & on_name()
name of this output
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(std::string)> & on_description()
human-readable description of this output
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(pointer_axis, int32_t)> & on_axis_value120()
axis high-resolution scroll 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
void offset(int32_t x, int32_t y)
set the surface contents offset
bool can_offset() const
Check whether the offset function is available with the currently bound version of the protocol.
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 offset_since_version
Minimum protocol version required for the offset function.
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 wayland::detail::bitfield< 2147483649, 6 > none
no action
static const wayland::detail::bitfield< 2147483649, 6 > ask
ask action
static const wayland::detail::bitfield< 2147483649, 6 > move
move action
static const wayland::detail::bitfield< 2147483649, 6 > copy
copy action
static const wayland::detail::bitfield< 2, 22 > current
indicates this is the current mode
static const wayland::detail::bitfield< 2, 22 > preferred
indicates this is the preferred mode
static const wayland::detail::bitfield< 3, 12 > touch
the seat has touch devices
static const wayland::detail::bitfield< 3, 12 > keyboard
the seat has one or more keyboards
static const wayland::detail::bitfield< 3, 12 > pointer
the seat has pointer devices
static const wayland::detail::bitfield< 2147483649, 8 > top
top edge
static const wayland::detail::bitfield< 2147483649, 8 > top_left
top and left edges
static const wayland::detail::bitfield< 2147483649, 8 > none
no edge
static const wayland::detail::bitfield< 2147483649, 8 > left
left edge
static const wayland::detail::bitfield< 2147483649, 8 > top_right
top and right edges
static const wayland::detail::bitfield< 2147483649, 8 > bottom_right
bottom and right edges
static const wayland::detail::bitfield< 2147483649, 8 > right
right edge
static const wayland::detail::bitfield< 2147483649, 8 > bottom
bottom edge
static const wayland::detail::bitfield< 2147483649, 8 > bottom_left
bottom and left edges
details of transient behaviour
static const wayland::detail::bitfield< 1, 9 > inactive
do not set keyboard focus