Wayland++ 1.0.0
C++ Bindings for Wayland
Loading...
Searching...
No Matches
wayland-client-protocol.cpp
1#include <wayland-client-protocol.hpp>
2
3using namespace wayland;
4using namespace wayland::detail;
5
6const wl_interface* display_interface_sync_request[1] = {
7 &callback_interface,
8};
9
10const wl_interface* display_interface_get_registry_request[1] = {
11 &registry_interface,
12};
13
14const wl_interface* display_interface_error_event[3] = {
15 nullptr,
16 nullptr,
17 nullptr,
18};
19
20const wl_interface* display_interface_delete_id_event[1] = {
21 nullptr,
22};
23
24const wl_message display_interface_requests[2] = {
25 {
26 "sync",
27 "n",
28 display_interface_sync_request,
29 },
30 {
31 "get_registry",
32 "n",
33 display_interface_get_registry_request,
34 },
35};
36
37const wl_message display_interface_events[2] = {
38 {
39 "error",
40 "ous",
41 display_interface_error_event,
42 },
43 {
44 "delete_id",
45 "u",
46 display_interface_delete_id_event,
47 },
48};
49
50const wl_interface wayland::detail::display_interface =
51 {
52 "wl_display",
53 1,
54 2,
55 display_interface_requests,
56 2,
57 display_interface_events,
58 };
59
60const wl_interface* registry_interface_bind_request[2] = {
61 nullptr,
62 nullptr,
63};
64
65const wl_interface* registry_interface_global_event[3] = {
66 nullptr,
67 nullptr,
68 nullptr,
69};
70
71const wl_interface* registry_interface_global_remove_event[1] = {
72 nullptr,
73};
74
75const wl_message registry_interface_requests[1] = {
76 {
77 "bind",
78 "usun",
79 registry_interface_bind_request,
80 },
81};
82
83const wl_message registry_interface_events[2] = {
84 {
85 "global",
86 "usu",
87 registry_interface_global_event,
88 },
89 {
90 "global_remove",
91 "u",
92 registry_interface_global_remove_event,
93 },
94};
95
96const wl_interface wayland::detail::registry_interface =
97 {
98 "wl_registry",
99 1,
100 1,
101 registry_interface_requests,
102 2,
103 registry_interface_events,
104 };
105
106const wl_interface* callback_interface_done_event[1] = {
107 nullptr,
108};
109
110const wl_message callback_interface_requests[0] = {
111};
112
113const wl_message callback_interface_events[1] = {
114 {
115 "done",
116 "u",
117 callback_interface_done_event,
118 },
119};
120
121const wl_interface wayland::detail::callback_interface =
122 {
123 "wl_callback",
124 1,
125 0,
126 callback_interface_requests,
127 1,
128 callback_interface_events,
129 };
130
131const wl_interface* compositor_interface_create_surface_request[1] = {
132 &surface_interface,
133};
134
135const wl_interface* compositor_interface_create_region_request[1] = {
136 &region_interface,
137};
138
139const wl_message compositor_interface_requests[2] = {
140 {
141 "create_surface",
142 "n",
143 compositor_interface_create_surface_request,
144 },
145 {
146 "create_region",
147 "n",
148 compositor_interface_create_region_request,
149 },
150};
151
152const wl_message compositor_interface_events[0] = {
153};
154
155const wl_interface wayland::detail::compositor_interface =
156 {
157 "wl_compositor",
158 5,
159 2,
160 compositor_interface_requests,
161 0,
162 compositor_interface_events,
163 };
164
165const wl_interface* shm_pool_interface_create_buffer_request[6] = {
166 &buffer_interface,
167 nullptr,
168 nullptr,
169 nullptr,
170 nullptr,
171 nullptr,
172};
173
174const wl_interface* shm_pool_interface_destroy_request[0] = {
175};
176
177const wl_interface* shm_pool_interface_resize_request[1] = {
178 nullptr,
179};
180
181const wl_message shm_pool_interface_requests[3] = {
182 {
183 "create_buffer",
184 "niiiiu",
185 shm_pool_interface_create_buffer_request,
186 },
187 {
188 "destroy",
189 "",
190 shm_pool_interface_destroy_request,
191 },
192 {
193 "resize",
194 "i",
195 shm_pool_interface_resize_request,
196 },
197};
198
199const wl_message shm_pool_interface_events[0] = {
200};
201
202const wl_interface wayland::detail::shm_pool_interface =
203 {
204 "wl_shm_pool",
205 1,
206 3,
207 shm_pool_interface_requests,
208 0,
209 shm_pool_interface_events,
210 };
211
212const wl_interface* shm_interface_create_pool_request[3] = {
213 &shm_pool_interface,
214 nullptr,
215 nullptr,
216};
217
218const wl_interface* shm_interface_format_event[1] = {
219 nullptr,
220};
221
222const wl_message shm_interface_requests[1] = {
223 {
224 "create_pool",
225 "nhi",
226 shm_interface_create_pool_request,
227 },
228};
229
230const wl_message shm_interface_events[1] = {
231 {
232 "format",
233 "u",
234 shm_interface_format_event,
235 },
236};
237
238const wl_interface wayland::detail::shm_interface =
239 {
240 "wl_shm",
241 1,
242 1,
243 shm_interface_requests,
244 1,
245 shm_interface_events,
246 };
247
248const wl_interface* buffer_interface_destroy_request[0] = {
249};
250
251const wl_interface* buffer_interface_release_event[0] = {
252};
253
254const wl_message buffer_interface_requests[1] = {
255 {
256 "destroy",
257 "",
258 buffer_interface_destroy_request,
259 },
260};
261
262const wl_message buffer_interface_events[1] = {
263 {
264 "release",
265 "",
266 buffer_interface_release_event,
267 },
268};
269
270const wl_interface wayland::detail::buffer_interface =
271 {
272 "wl_buffer",
273 1,
274 1,
275 buffer_interface_requests,
276 1,
277 buffer_interface_events,
278 };
279
280const wl_interface* data_offer_interface_accept_request[2] = {
281 nullptr,
282 nullptr,
283};
284
285const wl_interface* data_offer_interface_receive_request[2] = {
286 nullptr,
287 nullptr,
288};
289
290const wl_interface* data_offer_interface_destroy_request[0] = {
291};
292
293const wl_interface* data_offer_interface_finish_request[0] = {
294};
295
296const wl_interface* data_offer_interface_set_actions_request[2] = {
297 nullptr,
298 nullptr,
299};
300
301const wl_interface* data_offer_interface_offer_event[1] = {
302 nullptr,
303};
304
305const wl_interface* data_offer_interface_source_actions_event[1] = {
306 nullptr,
307};
308
309const wl_interface* data_offer_interface_action_event[1] = {
310 nullptr,
311};
312
313const wl_message data_offer_interface_requests[5] = {
314 {
315 "accept",
316 "u?s",
317 data_offer_interface_accept_request,
318 },
319 {
320 "receive",
321 "sh",
322 data_offer_interface_receive_request,
323 },
324 {
325 "destroy",
326 "",
327 data_offer_interface_destroy_request,
328 },
329 {
330 "finish",
331 "3",
332 data_offer_interface_finish_request,
333 },
334 {
335 "set_actions",
336 "3uu",
337 data_offer_interface_set_actions_request,
338 },
339};
340
341const wl_message data_offer_interface_events[3] = {
342 {
343 "offer",
344 "s",
345 data_offer_interface_offer_event,
346 },
347 {
348 "source_actions",
349 "3u",
350 data_offer_interface_source_actions_event,
351 },
352 {
353 "action",
354 "3u",
355 data_offer_interface_action_event,
356 },
357};
358
359const wl_interface wayland::detail::data_offer_interface =
360 {
361 "wl_data_offer",
362 3,
363 5,
364 data_offer_interface_requests,
365 3,
366 data_offer_interface_events,
367 };
368
369const wl_interface* data_source_interface_offer_request[1] = {
370 nullptr,
371};
372
373const wl_interface* data_source_interface_destroy_request[0] = {
374};
375
376const wl_interface* data_source_interface_set_actions_request[1] = {
377 nullptr,
378};
379
380const wl_interface* data_source_interface_target_event[1] = {
381 nullptr,
382};
383
384const wl_interface* data_source_interface_send_event[2] = {
385 nullptr,
386 nullptr,
387};
388
389const wl_interface* data_source_interface_cancelled_event[0] = {
390};
391
392const wl_interface* data_source_interface_dnd_drop_performed_event[0] = {
393};
394
395const wl_interface* data_source_interface_dnd_finished_event[0] = {
396};
397
398const wl_interface* data_source_interface_action_event[1] = {
399 nullptr,
400};
401
402const wl_message data_source_interface_requests[3] = {
403 {
404 "offer",
405 "s",
406 data_source_interface_offer_request,
407 },
408 {
409 "destroy",
410 "",
411 data_source_interface_destroy_request,
412 },
413 {
414 "set_actions",
415 "3u",
416 data_source_interface_set_actions_request,
417 },
418};
419
420const wl_message data_source_interface_events[6] = {
421 {
422 "target",
423 "?s",
424 data_source_interface_target_event,
425 },
426 {
427 "send",
428 "sh",
429 data_source_interface_send_event,
430 },
431 {
432 "cancelled",
433 "",
434 data_source_interface_cancelled_event,
435 },
436 {
437 "dnd_drop_performed",
438 "3",
439 data_source_interface_dnd_drop_performed_event,
440 },
441 {
442 "dnd_finished",
443 "3",
444 data_source_interface_dnd_finished_event,
445 },
446 {
447 "action",
448 "3u",
449 data_source_interface_action_event,
450 },
451};
452
453const wl_interface wayland::detail::data_source_interface =
454 {
455 "wl_data_source",
456 3,
457 3,
458 data_source_interface_requests,
459 6,
460 data_source_interface_events,
461 };
462
463const wl_interface* data_device_interface_start_drag_request[4] = {
464 &data_source_interface,
465 &surface_interface,
466 &surface_interface,
467 nullptr,
468};
469
470const wl_interface* data_device_interface_set_selection_request[2] = {
471 &data_source_interface,
472 nullptr,
473};
474
475const wl_interface* data_device_interface_release_request[0] = {
476};
477
478const wl_interface* data_device_interface_data_offer_event[1] = {
479 &data_offer_interface,
480};
481
482const wl_interface* data_device_interface_enter_event[5] = {
483 nullptr,
484 &surface_interface,
485 nullptr,
486 nullptr,
487 &data_offer_interface,
488};
489
490const wl_interface* data_device_interface_leave_event[0] = {
491};
492
493const wl_interface* data_device_interface_motion_event[3] = {
494 nullptr,
495 nullptr,
496 nullptr,
497};
498
499const wl_interface* data_device_interface_drop_event[0] = {
500};
501
502const wl_interface* data_device_interface_selection_event[1] = {
503 &data_offer_interface,
504};
505
506const wl_message data_device_interface_requests[3] = {
507 {
508 "start_drag",
509 "?oo?ou",
510 data_device_interface_start_drag_request,
511 },
512 {
513 "set_selection",
514 "?ou",
515 data_device_interface_set_selection_request,
516 },
517 {
518 "release",
519 "2",
520 data_device_interface_release_request,
521 },
522};
523
524const wl_message data_device_interface_events[6] = {
525 {
526 "data_offer",
527 "n",
528 data_device_interface_data_offer_event,
529 },
530 {
531 "enter",
532 "uoff?o",
533 data_device_interface_enter_event,
534 },
535 {
536 "leave",
537 "",
538 data_device_interface_leave_event,
539 },
540 {
541 "motion",
542 "uff",
543 data_device_interface_motion_event,
544 },
545 {
546 "drop",
547 "",
548 data_device_interface_drop_event,
549 },
550 {
551 "selection",
552 "?o",
553 data_device_interface_selection_event,
554 },
555};
556
557const wl_interface wayland::detail::data_device_interface =
558 {
559 "wl_data_device",
560 3,
561 3,
562 data_device_interface_requests,
563 6,
564 data_device_interface_events,
565 };
566
567const wl_interface* data_device_manager_interface_create_data_source_request[1] = {
568 &data_source_interface,
569};
570
571const wl_interface* data_device_manager_interface_get_data_device_request[2] = {
572 &data_device_interface,
573 &seat_interface,
574};
575
576const wl_message data_device_manager_interface_requests[2] = {
577 {
578 "create_data_source",
579 "n",
580 data_device_manager_interface_create_data_source_request,
581 },
582 {
583 "get_data_device",
584 "no",
585 data_device_manager_interface_get_data_device_request,
586 },
587};
588
589const wl_message data_device_manager_interface_events[0] = {
590};
591
592const wl_interface wayland::detail::data_device_manager_interface =
593 {
594 "wl_data_device_manager",
595 3,
596 2,
597 data_device_manager_interface_requests,
598 0,
599 data_device_manager_interface_events,
600 };
601
602const wl_interface* shell_interface_get_shell_surface_request[2] = {
603 &shell_surface_interface,
604 &surface_interface,
605};
606
607const wl_message shell_interface_requests[1] = {
608 {
609 "get_shell_surface",
610 "no",
611 shell_interface_get_shell_surface_request,
612 },
613};
614
615const wl_message shell_interface_events[0] = {
616};
617
618const wl_interface wayland::detail::shell_interface =
619 {
620 "wl_shell",
621 1,
622 1,
623 shell_interface_requests,
624 0,
625 shell_interface_events,
626 };
627
628const wl_interface* shell_surface_interface_pong_request[1] = {
629 nullptr,
630};
631
632const wl_interface* shell_surface_interface_move_request[2] = {
633 &seat_interface,
634 nullptr,
635};
636
637const wl_interface* shell_surface_interface_resize_request[3] = {
638 &seat_interface,
639 nullptr,
640 nullptr,
641};
642
643const wl_interface* shell_surface_interface_set_toplevel_request[0] = {
644};
645
646const wl_interface* shell_surface_interface_set_transient_request[4] = {
647 &surface_interface,
648 nullptr,
649 nullptr,
650 nullptr,
651};
652
653const wl_interface* shell_surface_interface_set_fullscreen_request[3] = {
654 nullptr,
655 nullptr,
656 &output_interface,
657};
658
659const wl_interface* shell_surface_interface_set_popup_request[6] = {
660 &seat_interface,
661 nullptr,
662 &surface_interface,
663 nullptr,
664 nullptr,
665 nullptr,
666};
667
668const wl_interface* shell_surface_interface_set_maximized_request[1] = {
669 &output_interface,
670};
671
672const wl_interface* shell_surface_interface_set_title_request[1] = {
673 nullptr,
674};
675
676const wl_interface* shell_surface_interface_set_class_request[1] = {
677 nullptr,
678};
679
680const wl_interface* shell_surface_interface_ping_event[1] = {
681 nullptr,
682};
683
684const wl_interface* shell_surface_interface_configure_event[3] = {
685 nullptr,
686 nullptr,
687 nullptr,
688};
689
690const wl_interface* shell_surface_interface_popup_done_event[0] = {
691};
692
693const wl_message shell_surface_interface_requests[10] = {
694 {
695 "pong",
696 "u",
697 shell_surface_interface_pong_request,
698 },
699 {
700 "move",
701 "ou",
702 shell_surface_interface_move_request,
703 },
704 {
705 "resize",
706 "ouu",
707 shell_surface_interface_resize_request,
708 },
709 {
710 "set_toplevel",
711 "",
712 shell_surface_interface_set_toplevel_request,
713 },
714 {
715 "set_transient",
716 "oiiu",
717 shell_surface_interface_set_transient_request,
718 },
719 {
720 "set_fullscreen",
721 "uu?o",
722 shell_surface_interface_set_fullscreen_request,
723 },
724 {
725 "set_popup",
726 "ouoiiu",
727 shell_surface_interface_set_popup_request,
728 },
729 {
730 "set_maximized",
731 "?o",
732 shell_surface_interface_set_maximized_request,
733 },
734 {
735 "set_title",
736 "s",
737 shell_surface_interface_set_title_request,
738 },
739 {
740 "set_class",
741 "s",
742 shell_surface_interface_set_class_request,
743 },
744};
745
746const wl_message shell_surface_interface_events[3] = {
747 {
748 "ping",
749 "u",
750 shell_surface_interface_ping_event,
751 },
752 {
753 "configure",
754 "uii",
755 shell_surface_interface_configure_event,
756 },
757 {
758 "popup_done",
759 "",
760 shell_surface_interface_popup_done_event,
761 },
762};
763
764const wl_interface wayland::detail::shell_surface_interface =
765 {
766 "wl_shell_surface",
767 1,
768 10,
769 shell_surface_interface_requests,
770 3,
771 shell_surface_interface_events,
772 };
773
774const wl_interface* surface_interface_destroy_request[0] = {
775};
776
777const wl_interface* surface_interface_attach_request[3] = {
778 &buffer_interface,
779 nullptr,
780 nullptr,
781};
782
783const wl_interface* surface_interface_damage_request[4] = {
784 nullptr,
785 nullptr,
786 nullptr,
787 nullptr,
788};
789
790const wl_interface* surface_interface_frame_request[1] = {
791 &callback_interface,
792};
793
794const wl_interface* surface_interface_set_opaque_region_request[1] = {
795 &region_interface,
796};
797
798const wl_interface* surface_interface_set_input_region_request[1] = {
799 &region_interface,
800};
801
802const wl_interface* surface_interface_commit_request[0] = {
803};
804
805const wl_interface* surface_interface_set_buffer_transform_request[1] = {
806 nullptr,
807};
808
809const wl_interface* surface_interface_set_buffer_scale_request[1] = {
810 nullptr,
811};
812
813const wl_interface* surface_interface_damage_buffer_request[4] = {
814 nullptr,
815 nullptr,
816 nullptr,
817 nullptr,
818};
819
820const wl_interface* surface_interface_offset_request[2] = {
821 nullptr,
822 nullptr,
823};
824
825const wl_interface* surface_interface_enter_event[1] = {
826 &output_interface,
827};
828
829const wl_interface* surface_interface_leave_event[1] = {
830 &output_interface,
831};
832
833const wl_message surface_interface_requests[11] = {
834 {
835 "destroy",
836 "",
837 surface_interface_destroy_request,
838 },
839 {
840 "attach",
841 "?oii",
842 surface_interface_attach_request,
843 },
844 {
845 "damage",
846 "iiii",
847 surface_interface_damage_request,
848 },
849 {
850 "frame",
851 "n",
852 surface_interface_frame_request,
853 },
854 {
855 "set_opaque_region",
856 "?o",
857 surface_interface_set_opaque_region_request,
858 },
859 {
860 "set_input_region",
861 "?o",
862 surface_interface_set_input_region_request,
863 },
864 {
865 "commit",
866 "",
867 surface_interface_commit_request,
868 },
869 {
870 "set_buffer_transform",
871 "2i",
872 surface_interface_set_buffer_transform_request,
873 },
874 {
875 "set_buffer_scale",
876 "3i",
877 surface_interface_set_buffer_scale_request,
878 },
879 {
880 "damage_buffer",
881 "4iiii",
882 surface_interface_damage_buffer_request,
883 },
884 {
885 "offset",
886 "5ii",
887 surface_interface_offset_request,
888 },
889};
890
891const wl_message surface_interface_events[2] = {
892 {
893 "enter",
894 "o",
895 surface_interface_enter_event,
896 },
897 {
898 "leave",
899 "o",
900 surface_interface_leave_event,
901 },
902};
903
904const wl_interface wayland::detail::surface_interface =
905 {
906 "wl_surface",
907 5,
908 11,
909 surface_interface_requests,
910 2,
911 surface_interface_events,
912 };
913
914const wl_interface* seat_interface_get_pointer_request[1] = {
915 &pointer_interface,
916};
917
918const wl_interface* seat_interface_get_keyboard_request[1] = {
919 &keyboard_interface,
920};
921
922const wl_interface* seat_interface_get_touch_request[1] = {
923 &touch_interface,
924};
925
926const wl_interface* seat_interface_release_request[0] = {
927};
928
929const wl_interface* seat_interface_capabilities_event[1] = {
930 nullptr,
931};
932
933const wl_interface* seat_interface_name_event[1] = {
934 nullptr,
935};
936
937const wl_message seat_interface_requests[4] = {
938 {
939 "get_pointer",
940 "n",
941 seat_interface_get_pointer_request,
942 },
943 {
944 "get_keyboard",
945 "n",
946 seat_interface_get_keyboard_request,
947 },
948 {
949 "get_touch",
950 "n",
951 seat_interface_get_touch_request,
952 },
953 {
954 "release",
955 "5",
956 seat_interface_release_request,
957 },
958};
959
960const wl_message seat_interface_events[2] = {
961 {
962 "capabilities",
963 "u",
964 seat_interface_capabilities_event,
965 },
966 {
967 "name",
968 "2s",
969 seat_interface_name_event,
970 },
971};
972
973const wl_interface wayland::detail::seat_interface =
974 {
975 "wl_seat",
976 8,
977 4,
978 seat_interface_requests,
979 2,
980 seat_interface_events,
981 };
982
983const wl_interface* pointer_interface_set_cursor_request[4] = {
984 nullptr,
985 &surface_interface,
986 nullptr,
987 nullptr,
988};
989
990const wl_interface* pointer_interface_release_request[0] = {
991};
992
993const wl_interface* pointer_interface_enter_event[4] = {
994 nullptr,
995 &surface_interface,
996 nullptr,
997 nullptr,
998};
999
1000const wl_interface* pointer_interface_leave_event[2] = {
1001 nullptr,
1002 &surface_interface,
1003};
1004
1005const wl_interface* pointer_interface_motion_event[3] = {
1006 nullptr,
1007 nullptr,
1008 nullptr,
1009};
1010
1011const wl_interface* pointer_interface_button_event[4] = {
1012 nullptr,
1013 nullptr,
1014 nullptr,
1015 nullptr,
1016};
1017
1018const wl_interface* pointer_interface_axis_event[3] = {
1019 nullptr,
1020 nullptr,
1021 nullptr,
1022};
1023
1024const wl_interface* pointer_interface_frame_event[0] = {
1025};
1026
1027const wl_interface* pointer_interface_axis_source_event[1] = {
1028 nullptr,
1029};
1030
1031const wl_interface* pointer_interface_axis_stop_event[2] = {
1032 nullptr,
1033 nullptr,
1034};
1035
1036const wl_interface* pointer_interface_axis_discrete_event[2] = {
1037 nullptr,
1038 nullptr,
1039};
1040
1041const wl_interface* pointer_interface_axis_value120_event[2] = {
1042 nullptr,
1043 nullptr,
1044};
1045
1046const wl_message pointer_interface_requests[2] = {
1047 {
1048 "set_cursor",
1049 "u?oii",
1050 pointer_interface_set_cursor_request,
1051 },
1052 {
1053 "release",
1054 "3",
1055 pointer_interface_release_request,
1056 },
1057};
1058
1059const wl_message pointer_interface_events[10] = {
1060 {
1061 "enter",
1062 "uoff",
1063 pointer_interface_enter_event,
1064 },
1065 {
1066 "leave",
1067 "uo",
1068 pointer_interface_leave_event,
1069 },
1070 {
1071 "motion",
1072 "uff",
1073 pointer_interface_motion_event,
1074 },
1075 {
1076 "button",
1077 "uuuu",
1078 pointer_interface_button_event,
1079 },
1080 {
1081 "axis",
1082 "uuf",
1083 pointer_interface_axis_event,
1084 },
1085 {
1086 "frame",
1087 "5",
1088 pointer_interface_frame_event,
1089 },
1090 {
1091 "axis_source",
1092 "5u",
1093 pointer_interface_axis_source_event,
1094 },
1095 {
1096 "axis_stop",
1097 "5uu",
1098 pointer_interface_axis_stop_event,
1099 },
1100 {
1101 "axis_discrete",
1102 "5ui",
1103 pointer_interface_axis_discrete_event,
1104 },
1105 {
1106 "axis_value120",
1107 "8ui",
1108 pointer_interface_axis_value120_event,
1109 },
1110};
1111
1112const wl_interface wayland::detail::pointer_interface =
1113 {
1114 "wl_pointer",
1115 8,
1116 2,
1117 pointer_interface_requests,
1118 10,
1119 pointer_interface_events,
1120 };
1121
1122const wl_interface* keyboard_interface_release_request[0] = {
1123};
1124
1125const wl_interface* keyboard_interface_keymap_event[3] = {
1126 nullptr,
1127 nullptr,
1128 nullptr,
1129};
1130
1131const wl_interface* keyboard_interface_enter_event[3] = {
1132 nullptr,
1133 &surface_interface,
1134 nullptr,
1135};
1136
1137const wl_interface* keyboard_interface_leave_event[2] = {
1138 nullptr,
1139 &surface_interface,
1140};
1141
1142const wl_interface* keyboard_interface_key_event[4] = {
1143 nullptr,
1144 nullptr,
1145 nullptr,
1146 nullptr,
1147};
1148
1149const wl_interface* keyboard_interface_modifiers_event[5] = {
1150 nullptr,
1151 nullptr,
1152 nullptr,
1153 nullptr,
1154 nullptr,
1155};
1156
1157const wl_interface* keyboard_interface_repeat_info_event[2] = {
1158 nullptr,
1159 nullptr,
1160};
1161
1162const wl_message keyboard_interface_requests[1] = {
1163 {
1164 "release",
1165 "3",
1166 keyboard_interface_release_request,
1167 },
1168};
1169
1170const wl_message keyboard_interface_events[6] = {
1171 {
1172 "keymap",
1173 "uhu",
1174 keyboard_interface_keymap_event,
1175 },
1176 {
1177 "enter",
1178 "uoa",
1179 keyboard_interface_enter_event,
1180 },
1181 {
1182 "leave",
1183 "uo",
1184 keyboard_interface_leave_event,
1185 },
1186 {
1187 "key",
1188 "uuuu",
1189 keyboard_interface_key_event,
1190 },
1191 {
1192 "modifiers",
1193 "uuuuu",
1194 keyboard_interface_modifiers_event,
1195 },
1196 {
1197 "repeat_info",
1198 "4ii",
1199 keyboard_interface_repeat_info_event,
1200 },
1201};
1202
1203const wl_interface wayland::detail::keyboard_interface =
1204 {
1205 "wl_keyboard",
1206 8,
1207 1,
1208 keyboard_interface_requests,
1209 6,
1210 keyboard_interface_events,
1211 };
1212
1213const wl_interface* touch_interface_release_request[0] = {
1214};
1215
1216const wl_interface* touch_interface_down_event[6] = {
1217 nullptr,
1218 nullptr,
1219 &surface_interface,
1220 nullptr,
1221 nullptr,
1222 nullptr,
1223};
1224
1225const wl_interface* touch_interface_up_event[3] = {
1226 nullptr,
1227 nullptr,
1228 nullptr,
1229};
1230
1231const wl_interface* touch_interface_motion_event[4] = {
1232 nullptr,
1233 nullptr,
1234 nullptr,
1235 nullptr,
1236};
1237
1238const wl_interface* touch_interface_frame_event[0] = {
1239};
1240
1241const wl_interface* touch_interface_cancel_event[0] = {
1242};
1243
1244const wl_interface* touch_interface_shape_event[3] = {
1245 nullptr,
1246 nullptr,
1247 nullptr,
1248};
1249
1250const wl_interface* touch_interface_orientation_event[2] = {
1251 nullptr,
1252 nullptr,
1253};
1254
1255const wl_message touch_interface_requests[1] = {
1256 {
1257 "release",
1258 "3",
1259 touch_interface_release_request,
1260 },
1261};
1262
1263const wl_message touch_interface_events[7] = {
1264 {
1265 "down",
1266 "uuoiff",
1267 touch_interface_down_event,
1268 },
1269 {
1270 "up",
1271 "uui",
1272 touch_interface_up_event,
1273 },
1274 {
1275 "motion",
1276 "uiff",
1277 touch_interface_motion_event,
1278 },
1279 {
1280 "frame",
1281 "",
1282 touch_interface_frame_event,
1283 },
1284 {
1285 "cancel",
1286 "",
1287 touch_interface_cancel_event,
1288 },
1289 {
1290 "shape",
1291 "6iff",
1292 touch_interface_shape_event,
1293 },
1294 {
1295 "orientation",
1296 "6if",
1297 touch_interface_orientation_event,
1298 },
1299};
1300
1301const wl_interface wayland::detail::touch_interface =
1302 {
1303 "wl_touch",
1304 8,
1305 1,
1306 touch_interface_requests,
1307 7,
1308 touch_interface_events,
1309 };
1310
1311const wl_interface* output_interface_release_request[0] = {
1312};
1313
1314const wl_interface* output_interface_geometry_event[8] = {
1315 nullptr,
1316 nullptr,
1317 nullptr,
1318 nullptr,
1319 nullptr,
1320 nullptr,
1321 nullptr,
1322 nullptr,
1323};
1324
1325const wl_interface* output_interface_mode_event[4] = {
1326 nullptr,
1327 nullptr,
1328 nullptr,
1329 nullptr,
1330};
1331
1332const wl_interface* output_interface_done_event[0] = {
1333};
1334
1335const wl_interface* output_interface_scale_event[1] = {
1336 nullptr,
1337};
1338
1339const wl_interface* output_interface_name_event[1] = {
1340 nullptr,
1341};
1342
1343const wl_interface* output_interface_description_event[1] = {
1344 nullptr,
1345};
1346
1347const wl_message output_interface_requests[1] = {
1348 {
1349 "release",
1350 "3",
1351 output_interface_release_request,
1352 },
1353};
1354
1355const wl_message output_interface_events[6] = {
1356 {
1357 "geometry",
1358 "iiiiissi",
1359 output_interface_geometry_event,
1360 },
1361 {
1362 "mode",
1363 "uiii",
1364 output_interface_mode_event,
1365 },
1366 {
1367 "done",
1368 "2",
1369 output_interface_done_event,
1370 },
1371 {
1372 "scale",
1373 "2i",
1374 output_interface_scale_event,
1375 },
1376 {
1377 "name",
1378 "4s",
1379 output_interface_name_event,
1380 },
1381 {
1382 "description",
1383 "4s",
1384 output_interface_description_event,
1385 },
1386};
1387
1388const wl_interface wayland::detail::output_interface =
1389 {
1390 "wl_output",
1391 4,
1392 1,
1393 output_interface_requests,
1394 6,
1395 output_interface_events,
1396 };
1397
1398const wl_interface* region_interface_destroy_request[0] = {
1399};
1400
1401const wl_interface* region_interface_add_request[4] = {
1402 nullptr,
1403 nullptr,
1404 nullptr,
1405 nullptr,
1406};
1407
1408const wl_interface* region_interface_subtract_request[4] = {
1409 nullptr,
1410 nullptr,
1411 nullptr,
1412 nullptr,
1413};
1414
1415const wl_message region_interface_requests[3] = {
1416 {
1417 "destroy",
1418 "",
1419 region_interface_destroy_request,
1420 },
1421 {
1422 "add",
1423 "iiii",
1424 region_interface_add_request,
1425 },
1426 {
1427 "subtract",
1428 "iiii",
1429 region_interface_subtract_request,
1430 },
1431};
1432
1433const wl_message region_interface_events[0] = {
1434};
1435
1436const wl_interface wayland::detail::region_interface =
1437 {
1438 "wl_region",
1439 1,
1440 3,
1441 region_interface_requests,
1442 0,
1443 region_interface_events,
1444 };
1445
1446const wl_interface* subcompositor_interface_destroy_request[0] = {
1447};
1448
1449const wl_interface* subcompositor_interface_get_subsurface_request[3] = {
1450 &subsurface_interface,
1451 &surface_interface,
1452 &surface_interface,
1453};
1454
1455const wl_message subcompositor_interface_requests[2] = {
1456 {
1457 "destroy",
1458 "",
1459 subcompositor_interface_destroy_request,
1460 },
1461 {
1462 "get_subsurface",
1463 "noo",
1464 subcompositor_interface_get_subsurface_request,
1465 },
1466};
1467
1468const wl_message subcompositor_interface_events[0] = {
1469};
1470
1471const wl_interface wayland::detail::subcompositor_interface =
1472 {
1473 "wl_subcompositor",
1474 1,
1475 2,
1476 subcompositor_interface_requests,
1477 0,
1478 subcompositor_interface_events,
1479 };
1480
1481const wl_interface* subsurface_interface_destroy_request[0] = {
1482};
1483
1484const wl_interface* subsurface_interface_set_position_request[2] = {
1485 nullptr,
1486 nullptr,
1487};
1488
1489const wl_interface* subsurface_interface_place_above_request[1] = {
1490 &surface_interface,
1491};
1492
1493const wl_interface* subsurface_interface_place_below_request[1] = {
1494 &surface_interface,
1495};
1496
1497const wl_interface* subsurface_interface_set_sync_request[0] = {
1498};
1499
1500const wl_interface* subsurface_interface_set_desync_request[0] = {
1501};
1502
1503const wl_message subsurface_interface_requests[6] = {
1504 {
1505 "destroy",
1506 "",
1507 subsurface_interface_destroy_request,
1508 },
1509 {
1510 "set_position",
1511 "ii",
1512 subsurface_interface_set_position_request,
1513 },
1514 {
1515 "place_above",
1516 "o",
1517 subsurface_interface_place_above_request,
1518 },
1519 {
1520 "place_below",
1521 "o",
1522 subsurface_interface_place_below_request,
1523 },
1524 {
1525 "set_sync",
1526 "",
1527 subsurface_interface_set_sync_request,
1528 },
1529 {
1530 "set_desync",
1531 "",
1532 subsurface_interface_set_desync_request,
1533 },
1534};
1535
1536const wl_message subsurface_interface_events[0] = {
1537};
1538
1539const wl_interface wayland::detail::subsurface_interface =
1540 {
1541 "wl_subsurface",
1542 1,
1543 6,
1544 subsurface_interface_requests,
1545 0,
1546 subsurface_interface_events,
1547 };
1548
1549registry_t::registry_t(const proxy_t &p)
1550 : proxy_t(p)
1551{
1552 if(proxy_has_object() && get_wrapper_type() == wrapper_type::standard)
1553 {
1554 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1555 }
1556 set_interface(&registry_interface);
1557 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1558 { return registry_t(p); });
1559}
1560
1561registry_t::registry_t()
1562{
1563 set_interface(&registry_interface);
1564 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1565 { return registry_t(p); });
1566}
1567
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)
1571 {
1572 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1573 }
1574 set_interface(&registry_interface);
1575 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1576 { return registry_t(p); });
1577}
1578
1579registry_t::registry_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1580 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1581 set_interface(&registry_interface);
1582 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1583 { return registry_t(p); });
1584}
1585
1586registry_t registry_t::proxy_create_wrapper()
1587{
1588 return {*this, construct_proxy_wrapper_tag()};
1589}
1590
1591const std::string registry_t::interface_name = "wl_registry";
1592
1593registry_t::operator wl_registry*() const
1594{
1595 return reinterpret_cast<wl_registry*> (c_ptr());
1596}
1597
1598proxy_t registry_t::bind(uint32_t name, proxy_t &interface, uint32_t version)
1599{
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);
1602 return interface;
1603}
1604
1605
1606std::function<void(uint32_t, std::string, uint32_t)> &registry_t::on_global()
1607{
1608 return std::static_pointer_cast<events_t>(get_events())->global;
1609}
1610
1611std::function<void(uint32_t)> &registry_t::on_global_remove()
1612{
1613 return std::static_pointer_cast<events_t>(get_events())->global_remove;
1614}
1615
1616int registry_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1617{
1618 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1619 switch(opcode)
1620 {
1621 case 0:
1622 if(events->global) events->global(args[0].get<uint32_t>(), args[1].get<std::string>(), args[2].get<uint32_t>());
1623 break;
1624 case 1:
1625 if(events->global_remove) events->global_remove(args[0].get<uint32_t>());
1626 break;
1627 }
1628 return 0;
1629}
1630
1631callback_t::callback_t(const proxy_t &p)
1632 : proxy_t(p)
1633{
1635 {
1636 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1637 }
1638 set_interface(&callback_interface);
1639 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1640 { return callback_t(p); });
1641}
1642
1643callback_t::callback_t()
1644{
1645 set_interface(&callback_interface);
1646 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1647 { return callback_t(p); });
1648}
1649
1650callback_t::callback_t(wl_callback *p, wrapper_type t)
1651 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1653 {
1654 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1655 }
1656 set_interface(&callback_interface);
1657 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1658 { return callback_t(p); });
1659}
1660
1661callback_t::callback_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
1666}
1667
1668callback_t callback_t::proxy_create_wrapper()
1669{
1670 return {*this, construct_proxy_wrapper_tag()};
1671}
1672
1673const std::string callback_t::interface_name = "wl_callback";
1674
1675callback_t::operator wl_callback*() const
1676{
1677 return reinterpret_cast<wl_callback*> (c_ptr());
1678}
1679
1680std::function<void(uint32_t)> &callback_t::on_done()
1681{
1682 return std::static_pointer_cast<events_t>(get_events())->done;
1683}
1684
1685int callback_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1686{
1687 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1688 switch(opcode)
1689 {
1690 case 0:
1691 if(events->done) events->done(args[0].get<uint32_t>());
1692 break;
1693 }
1694 return 0;
1695}
1696
1697compositor_t::compositor_t(const proxy_t &p)
1698 : proxy_t(p)
1699{
1701 {
1702 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1703 }
1704 set_interface(&compositor_interface);
1705 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1706 { return compositor_t(p); });
1707}
1708
1709compositor_t::compositor_t()
1710{
1711 set_interface(&compositor_interface);
1712 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1713 { return compositor_t(p); });
1714}
1715
1716compositor_t::compositor_t(wl_compositor *p, wrapper_type t)
1717 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1719 {
1720 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1721 }
1722 set_interface(&compositor_interface);
1723 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1724 { return compositor_t(p); });
1725}
1726
1727compositor_t::compositor_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
1732}
1733
1734compositor_t compositor_t::proxy_create_wrapper()
1735{
1736 return {*this, construct_proxy_wrapper_tag()};
1737}
1738
1739const std::string compositor_t::interface_name = "wl_compositor";
1740
1741compositor_t::operator wl_compositor*() const
1742{
1743 return reinterpret_cast<wl_compositor*> (c_ptr());
1744}
1745
1747{
1748 proxy_t p = marshal_constructor(0U, &surface_interface, nullptr);
1749 return surface_t(p);
1750}
1751
1752
1754{
1755 proxy_t p = marshal_constructor(1U, &region_interface, nullptr);
1756 return region_t(p);
1757}
1758
1759
1760int compositor_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1761{
1762 return 0;
1763}
1764
1765shm_pool_t::shm_pool_t(const proxy_t &p)
1766 : proxy_t(p)
1767{
1769 {
1770 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1771 set_destroy_opcode(1U);
1772 }
1773 set_interface(&shm_pool_interface);
1774 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1775 { return shm_pool_t(p); });
1776}
1777
1778shm_pool_t::shm_pool_t()
1779{
1780 set_interface(&shm_pool_interface);
1781 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1782 { return shm_pool_t(p); });
1783}
1784
1785shm_pool_t::shm_pool_t(wl_shm_pool *p, wrapper_type t)
1786 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1788 {
1789 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1790 set_destroy_opcode(1U);
1791 }
1792 set_interface(&shm_pool_interface);
1793 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1794 { return shm_pool_t(p); });
1795}
1796
1797shm_pool_t::shm_pool_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
1802}
1803
1804shm_pool_t shm_pool_t::proxy_create_wrapper()
1805{
1806 return {*this, construct_proxy_wrapper_tag()};
1807}
1808
1809const std::string shm_pool_t::interface_name = "wl_shm_pool";
1810
1811shm_pool_t::operator wl_shm_pool*() const
1812{
1813 return reinterpret_cast<wl_shm_pool*> (c_ptr());
1814}
1815
1816buffer_t shm_pool_t::create_buffer(int32_t offset, int32_t width, int32_t height, int32_t stride, shm_format const& format)
1817{
1818 proxy_t p = marshal_constructor(0U, &buffer_interface, nullptr, offset, width, height, stride, static_cast<uint32_t>(format));
1819 return buffer_t(p);
1820}
1821
1822
1823void shm_pool_t::resize(int32_t size)
1824{
1825 marshal(2U, size);
1826}
1827
1828
1829int shm_pool_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1830{
1831 return 0;
1832}
1833
1834shm_t::shm_t(const proxy_t &p)
1835 : proxy_t(p)
1836{
1838 {
1839 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1840 }
1841 set_interface(&shm_interface);
1842 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1843 { return shm_t(p); });
1844}
1845
1846shm_t::shm_t()
1847{
1848 set_interface(&shm_interface);
1849 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1850 { return shm_t(p); });
1851}
1852
1853shm_t::shm_t(wl_shm *p, wrapper_type t)
1854 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1856 {
1857 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1858 }
1859 set_interface(&shm_interface);
1860 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1861 { return shm_t(p); });
1862}
1863
1864shm_t::shm_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
1869}
1870
1871shm_t shm_t::proxy_create_wrapper()
1872{
1873 return {*this, construct_proxy_wrapper_tag()};
1874}
1875
1876const std::string shm_t::interface_name = "wl_shm";
1877
1878shm_t::operator wl_shm*() const
1879{
1880 return reinterpret_cast<wl_shm*> (c_ptr());
1881}
1882
1883shm_pool_t shm_t::create_pool(int fd, int32_t size)
1884{
1885 proxy_t p = marshal_constructor(0U, &shm_pool_interface, nullptr, argument_t::fd(fd), size);
1886 return shm_pool_t(p);
1887}
1888
1889
1890std::function<void(shm_format)> &shm_t::on_format()
1891{
1892 return std::static_pointer_cast<events_t>(get_events())->format;
1893}
1894
1895int shm_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1896{
1897 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1898 switch(opcode)
1899 {
1900 case 0:
1901 if(events->format) events->format(shm_format(args[0].get<uint32_t>()));
1902 break;
1903 }
1904 return 0;
1905}
1906
1907
1908
1909buffer_t::buffer_t(const proxy_t &p)
1910 : proxy_t(p)
1911{
1913 {
1914 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1915 set_destroy_opcode(0U);
1916 }
1917 set_interface(&buffer_interface);
1918 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1919 { return buffer_t(p); });
1920}
1921
1922buffer_t::buffer_t()
1923{
1924 set_interface(&buffer_interface);
1925 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1926 { return buffer_t(p); });
1927}
1928
1929buffer_t::buffer_t(wl_buffer *p, wrapper_type t)
1930 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1932 {
1933 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1934 set_destroy_opcode(0U);
1935 }
1936 set_interface(&buffer_interface);
1937 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1938 { return buffer_t(p); });
1939}
1940
1941buffer_t::buffer_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
1946}
1947
1948buffer_t buffer_t::proxy_create_wrapper()
1949{
1950 return {*this, construct_proxy_wrapper_tag()};
1951}
1952
1953const std::string buffer_t::interface_name = "wl_buffer";
1954
1955buffer_t::operator wl_buffer*() const
1956{
1957 return reinterpret_cast<wl_buffer*> (c_ptr());
1958}
1959
1960std::function<void()> &buffer_t::on_release()
1961{
1962 return std::static_pointer_cast<events_t>(get_events())->release;
1963}
1964
1965int buffer_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1966{
1967 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1968 switch(opcode)
1969 {
1970 case 0:
1971 if(events->release) events->release();
1972 break;
1973 }
1974 return 0;
1975}
1976
1977data_offer_t::data_offer_t(const proxy_t &p)
1978 : proxy_t(p)
1979{
1981 {
1982 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1983 set_destroy_opcode(2U);
1984 }
1985 set_interface(&data_offer_interface);
1986 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1987 { return data_offer_t(p); });
1988}
1989
1990data_offer_t::data_offer_t()
1991{
1992 set_interface(&data_offer_interface);
1993 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1994 { return data_offer_t(p); });
1995}
1996
1997data_offer_t::data_offer_t(wl_data_offer *p, wrapper_type t)
1998 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2000 {
2001 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2002 set_destroy_opcode(2U);
2003 }
2004 set_interface(&data_offer_interface);
2005 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2006 { return data_offer_t(p); });
2007}
2008
2009data_offer_t::data_offer_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
2014}
2015
2016data_offer_t data_offer_t::proxy_create_wrapper()
2017{
2018 return {*this, construct_proxy_wrapper_tag()};
2019}
2020
2021const std::string data_offer_t::interface_name = "wl_data_offer";
2022
2023data_offer_t::operator wl_data_offer*() const
2024{
2025 return reinterpret_cast<wl_data_offer*> (c_ptr());
2026}
2027
2028void data_offer_t::accept(uint32_t serial, std::string const& mime_type)
2029{
2030 marshal(0U, serial, mime_type);
2031}
2032
2033
2034void data_offer_t::receive(std::string const& mime_type, int fd)
2035{
2036 marshal(1U, mime_type, argument_t::fd(fd));
2037}
2038
2039
2041{
2042 marshal(3U);
2043}
2044
2046{
2047 return (get_version() >= finish_since_version);
2048}
2049
2050
2052{
2053 marshal(4U, static_cast<uint32_t>(dnd_actions), static_cast<uint32_t>(preferred_action));
2054}
2055
2057{
2059}
2060
2061
2062std::function<void(std::string)> &data_offer_t::on_offer()
2063{
2064 return std::static_pointer_cast<events_t>(get_events())->offer;
2065}
2066
2068{
2069 return std::static_pointer_cast<events_t>(get_events())->source_actions;
2070}
2071
2073{
2074 return std::static_pointer_cast<events_t>(get_events())->action;
2075}
2076
2077int data_offer_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
2078{
2079 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2080 switch(opcode)
2081 {
2082 case 0:
2083 if(events->offer) events->offer(args[0].get<std::string>());
2084 break;
2085 case 1:
2086 if(events->source_actions) events->source_actions(data_device_manager_dnd_action(args[0].get<uint32_t>()));
2087 break;
2088 case 2:
2089 if(events->action) events->action(data_device_manager_dnd_action(args[0].get<uint32_t>()));
2090 break;
2091 }
2092 return 0;
2093}
2094
2095
2096data_source_t::data_source_t(const proxy_t &p)
2097 : proxy_t(p)
2098{
2100 {
2101 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2102 set_destroy_opcode(1U);
2103 }
2104 set_interface(&data_source_interface);
2105 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2106 { return data_source_t(p); });
2107}
2108
2109data_source_t::data_source_t()
2110{
2111 set_interface(&data_source_interface);
2112 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2113 { return data_source_t(p); });
2114}
2115
2116data_source_t::data_source_t(wl_data_source *p, wrapper_type t)
2117 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2119 {
2120 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2121 set_destroy_opcode(1U);
2122 }
2123 set_interface(&data_source_interface);
2124 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2125 { return data_source_t(p); });
2126}
2127
2128data_source_t::data_source_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
2133}
2134
2135data_source_t data_source_t::proxy_create_wrapper()
2136{
2137 return {*this, construct_proxy_wrapper_tag()};
2138}
2139
2140const std::string data_source_t::interface_name = "wl_data_source";
2141
2142data_source_t::operator wl_data_source*() const
2143{
2144 return reinterpret_cast<wl_data_source*> (c_ptr());
2145}
2146
2147void data_source_t::offer(std::string const& mime_type)
2148{
2149 marshal(0U, mime_type);
2150}
2151
2152
2154{
2155 marshal(2U, static_cast<uint32_t>(dnd_actions));
2156}
2157
2159{
2161}
2162
2163
2164std::function<void(std::string)> &data_source_t::on_target()
2165{
2166 return std::static_pointer_cast<events_t>(get_events())->target;
2167}
2168
2169std::function<void(std::string, int)> &data_source_t::on_send()
2170{
2171 return std::static_pointer_cast<events_t>(get_events())->send;
2172}
2173
2174std::function<void()> &data_source_t::on_cancelled()
2175{
2176 return std::static_pointer_cast<events_t>(get_events())->cancelled;
2177}
2178
2180{
2181 return std::static_pointer_cast<events_t>(get_events())->dnd_drop_performed;
2182}
2183
2184std::function<void()> &data_source_t::on_dnd_finished()
2185{
2186 return std::static_pointer_cast<events_t>(get_events())->dnd_finished;
2187}
2188
2190{
2191 return std::static_pointer_cast<events_t>(get_events())->action;
2192}
2193
2194int data_source_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
2195{
2196 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2197 switch(opcode)
2198 {
2199 case 0:
2200 if(events->target) events->target(args[0].get<std::string>());
2201 break;
2202 case 1:
2203 if(events->send) events->send(args[0].get<std::string>(), args[1].get<int>());
2204 break;
2205 case 2:
2206 if(events->cancelled) events->cancelled();
2207 break;
2208 case 3:
2209 if(events->dnd_drop_performed) events->dnd_drop_performed();
2210 break;
2211 case 4:
2212 if(events->dnd_finished) events->dnd_finished();
2213 break;
2214 case 5:
2215 if(events->action) events->action(data_device_manager_dnd_action(args[0].get<uint32_t>()));
2216 break;
2217 }
2218 return 0;
2219}
2220
2221
2222data_device_t::data_device_t(const proxy_t &p)
2223 : proxy_t(p)
2224{
2226 {
2227 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2228 }
2229 set_interface(&data_device_interface);
2230 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2231 { return data_device_t(p); });
2232}
2233
2234data_device_t::data_device_t()
2235{
2236 set_interface(&data_device_interface);
2237 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2238 { return data_device_t(p); });
2239}
2240
2241data_device_t::data_device_t(wl_data_device *p, wrapper_type t)
2242 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2244 {
2245 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2246 }
2247 set_interface(&data_device_interface);
2248 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2249 { return data_device_t(p); });
2250}
2251
2252data_device_t::data_device_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
2257}
2258
2259data_device_t data_device_t::proxy_create_wrapper()
2260{
2261 return {*this, construct_proxy_wrapper_tag()};
2262}
2263
2264const std::string data_device_t::interface_name = "wl_data_device";
2265
2266data_device_t::operator wl_data_device*() const
2267{
2268 return reinterpret_cast<wl_data_device*> (c_ptr());
2269}
2270
2271void data_device_t::start_drag(data_source_t const& source, surface_t const& origin, surface_t const& icon, uint32_t serial)
2272{
2273 marshal(0U, source.proxy_has_object() ? reinterpret_cast<wl_object*>(source.c_ptr()) : nullptr, origin.proxy_has_object() ? reinterpret_cast<wl_object*>(origin.c_ptr()) : nullptr, icon.proxy_has_object() ? reinterpret_cast<wl_object*>(icon.c_ptr()) : nullptr, serial);
2274}
2275
2276
2277void data_device_t::set_selection(data_source_t const& source, uint32_t serial)
2278{
2279 marshal(1U, source.proxy_has_object() ? reinterpret_cast<wl_object*>(source.c_ptr()) : nullptr, serial);
2280}
2281
2282
2284{
2285 marshal(2U);
2286}
2287
2289{
2290 return (get_version() >= release_since_version);
2291}
2292
2293
2295{
2296 return std::static_pointer_cast<events_t>(get_events())->data_offer;
2297}
2298
2299std::function<void(uint32_t, surface_t, double, double, data_offer_t)> &data_device_t::on_enter()
2300{
2301 return std::static_pointer_cast<events_t>(get_events())->enter;
2302}
2303
2304std::function<void()> &data_device_t::on_leave()
2305{
2306 return std::static_pointer_cast<events_t>(get_events())->leave;
2307}
2308
2309std::function<void(uint32_t, double, double)> &data_device_t::on_motion()
2310{
2311 return std::static_pointer_cast<events_t>(get_events())->motion;
2312}
2313
2314std::function<void()> &data_device_t::on_drop()
2315{
2316 return std::static_pointer_cast<events_t>(get_events())->drop;
2317}
2318
2320{
2321 return std::static_pointer_cast<events_t>(get_events())->selection;
2322}
2323
2324int data_device_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
2325{
2326 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2327 switch(opcode)
2328 {
2329 case 0:
2330 if(events->data_offer) events->data_offer(data_offer_t(args[0].get<proxy_t>()));
2331 break;
2332 case 1:
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>()));
2334 break;
2335 case 2:
2336 if(events->leave) events->leave();
2337 break;
2338 case 3:
2339 if(events->motion) events->motion(args[0].get<uint32_t>(), args[1].get<double>(), args[2].get<double>());
2340 break;
2341 case 4:
2342 if(events->drop) events->drop();
2343 break;
2344 case 5:
2345 if(events->selection) events->selection(data_offer_t(args[0].get<proxy_t>()));
2346 break;
2347 }
2348 return 0;
2349}
2350
2351
2352data_device_manager_t::data_device_manager_t(const proxy_t &p)
2353 : proxy_t(p)
2354{
2356 {
2357 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2358 }
2359 set_interface(&data_device_manager_interface);
2360 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2361 { return data_device_manager_t(p); });
2362}
2363
2364data_device_manager_t::data_device_manager_t()
2365{
2366 set_interface(&data_device_manager_interface);
2367 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2368 { return data_device_manager_t(p); });
2369}
2370
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){
2374 {
2375 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2376 }
2377 set_interface(&data_device_manager_interface);
2378 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2379 { return data_device_manager_t(p); });
2380}
2381
2382data_device_manager_t::data_device_manager_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
2387}
2388
2389data_device_manager_t data_device_manager_t::proxy_create_wrapper()
2390{
2391 return {*this, construct_proxy_wrapper_tag()};
2392}
2393
2394const std::string data_device_manager_t::interface_name = "wl_data_device_manager";
2395
2396data_device_manager_t::operator wl_data_device_manager*() const
2397{
2398 return reinterpret_cast<wl_data_device_manager*> (c_ptr());
2399}
2400
2402{
2403 proxy_t p = marshal_constructor(0U, &data_source_interface, nullptr);
2404 return data_source_t(p);
2405}
2406
2407
2409{
2410 proxy_t p = marshal_constructor(1U, &data_device_interface, nullptr, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr);
2411 return data_device_t(p);
2412}
2413
2414
2415int data_device_manager_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
2416{
2417 return 0;
2418}
2419const bitfield<2147483649, 6> data_device_manager_dnd_action::none{0};
2420const bitfield<2147483649, 6> data_device_manager_dnd_action::copy{1};
2421const bitfield<2147483649, 6> data_device_manager_dnd_action::move{2};
2422const bitfield<2147483649, 6> data_device_manager_dnd_action::ask{4};
2423
2424
2425shell_t::shell_t(const proxy_t &p)
2426 : proxy_t(p)
2427{
2429 {
2430 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2431 }
2432 set_interface(&shell_interface);
2433 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2434 { return shell_t(p); });
2435}
2436
2437shell_t::shell_t()
2438{
2439 set_interface(&shell_interface);
2440 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2441 { return shell_t(p); });
2442}
2443
2444shell_t::shell_t(wl_shell *p, wrapper_type t)
2445 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2447 {
2448 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2449 }
2450 set_interface(&shell_interface);
2451 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2452 { return shell_t(p); });
2453}
2454
2455shell_t::shell_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
2460}
2461
2462shell_t shell_t::proxy_create_wrapper()
2463{
2464 return {*this, construct_proxy_wrapper_tag()};
2465}
2466
2467const std::string shell_t::interface_name = "wl_shell";
2468
2469shell_t::operator wl_shell*() const
2470{
2471 return reinterpret_cast<wl_shell*> (c_ptr());
2472}
2473
2475{
2476 proxy_t p = marshal_constructor(0U, &shell_surface_interface, nullptr, surface.proxy_has_object() ? reinterpret_cast<wl_object*>(surface.c_ptr()) : nullptr);
2477 return shell_surface_t(p);
2478}
2479
2480
2481int shell_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
2482{
2483 return 0;
2484}
2485
2486
2487shell_surface_t::shell_surface_t(const proxy_t &p)
2488 : proxy_t(p)
2489{
2491 {
2492 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2493 }
2494 set_interface(&shell_surface_interface);
2495 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2496 { return shell_surface_t(p); });
2497}
2498
2499shell_surface_t::shell_surface_t()
2500{
2501 set_interface(&shell_surface_interface);
2502 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2503 { return shell_surface_t(p); });
2504}
2505
2506shell_surface_t::shell_surface_t(wl_shell_surface *p, wrapper_type t)
2507 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2509 {
2510 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2511 }
2512 set_interface(&shell_surface_interface);
2513 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2514 { return shell_surface_t(p); });
2515}
2516
2517shell_surface_t::shell_surface_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
2522}
2523
2524shell_surface_t shell_surface_t::proxy_create_wrapper()
2525{
2526 return {*this, construct_proxy_wrapper_tag()};
2527}
2528
2529const std::string shell_surface_t::interface_name = "wl_shell_surface";
2530
2531shell_surface_t::operator wl_shell_surface*() const
2532{
2533 return reinterpret_cast<wl_shell_surface*> (c_ptr());
2534}
2535
2536void shell_surface_t::pong(uint32_t serial)
2537{
2538 marshal(0U, serial);
2539}
2540
2541
2542void shell_surface_t::move(seat_t const& seat, uint32_t serial)
2543{
2544 marshal(1U, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr, serial);
2545}
2546
2547
2548void shell_surface_t::resize(seat_t const& seat, uint32_t serial, shell_surface_resize const& edges)
2549{
2550 marshal(2U, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr, serial, static_cast<uint32_t>(edges));
2551}
2552
2553
2555{
2556 marshal(3U);
2557}
2558
2559
2560void shell_surface_t::set_transient(surface_t const& parent, int32_t x, int32_t y, shell_surface_transient const& flags)
2561{
2562 marshal(4U, parent.proxy_has_object() ? reinterpret_cast<wl_object*>(parent.c_ptr()) : nullptr, x, y, static_cast<uint32_t>(flags));
2563}
2564
2565
2566void shell_surface_t::set_fullscreen(shell_surface_fullscreen_method const& method, uint32_t framerate, output_t const& output)
2567{
2568 marshal(5U, static_cast<uint32_t>(method), framerate, output.proxy_has_object() ? reinterpret_cast<wl_object*>(output.c_ptr()) : nullptr);
2569}
2570
2571
2572void shell_surface_t::set_popup(seat_t const& seat, uint32_t serial, surface_t const& parent, int32_t x, int32_t y, shell_surface_transient const& flags)
2573{
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));
2575}
2576
2577
2579{
2580 marshal(7U, output.proxy_has_object() ? reinterpret_cast<wl_object*>(output.c_ptr()) : nullptr);
2581}
2582
2583
2584void shell_surface_t::set_title(std::string const& title)
2585{
2586 marshal(8U, title);
2587}
2588
2589
2590void shell_surface_t::set_class(std::string const& class_)
2591{
2592 marshal(9U, class_);
2593}
2594
2595
2596std::function<void(uint32_t)> &shell_surface_t::on_ping()
2597{
2598 return std::static_pointer_cast<events_t>(get_events())->ping;
2599}
2600
2601std::function<void(shell_surface_resize, int32_t, int32_t)> &shell_surface_t::on_configure()
2602{
2603 return std::static_pointer_cast<events_t>(get_events())->configure;
2604}
2605
2606std::function<void()> &shell_surface_t::on_popup_done()
2607{
2608 return std::static_pointer_cast<events_t>(get_events())->popup_done;
2609}
2610
2611int shell_surface_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
2612{
2613 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2614 switch(opcode)
2615 {
2616 case 0:
2617 if(events->ping) events->ping(args[0].get<uint32_t>());
2618 break;
2619 case 1:
2620 if(events->configure) events->configure(shell_surface_resize(args[0].get<uint32_t>()), args[1].get<int32_t>(), args[2].get<int32_t>());
2621 break;
2622 case 2:
2623 if(events->popup_done) events->popup_done();
2624 break;
2625 }
2626 return 0;
2627}
2628const bitfield<2147483649, 8> shell_surface_resize::none{0};
2629const bitfield<2147483649, 8> shell_surface_resize::top{1};
2630const bitfield<2147483649, 8> shell_surface_resize::bottom{2};
2631const bitfield<2147483649, 8> shell_surface_resize::left{4};
2632const bitfield<2147483649, 8> shell_surface_resize::top_left{5};
2633const bitfield<2147483649, 8> shell_surface_resize::bottom_left{6};
2634const bitfield<2147483649, 8> shell_surface_resize::right{8};
2635const bitfield<2147483649, 8> shell_surface_resize::top_right{9};
2636const bitfield<2147483649, 8> shell_surface_resize::bottom_right{10};
2637
2638const bitfield<1, 9> shell_surface_transient::inactive{0x1};
2639
2640
2641
2642surface_t::surface_t(const proxy_t &p)
2643 : proxy_t(p)
2644{
2646 {
2647 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2648 set_destroy_opcode(0U);
2649 }
2650 set_interface(&surface_interface);
2651 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2652 { return surface_t(p); });
2653}
2654
2655surface_t::surface_t()
2656{
2657 set_interface(&surface_interface);
2658 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2659 { return surface_t(p); });
2660}
2661
2662surface_t::surface_t(wl_surface *p, wrapper_type t)
2663 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2665 {
2666 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2667 set_destroy_opcode(0U);
2668 }
2669 set_interface(&surface_interface);
2670 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2671 { return surface_t(p); });
2672}
2673
2674surface_t::surface_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
2679}
2680
2681surface_t surface_t::proxy_create_wrapper()
2682{
2683 return {*this, construct_proxy_wrapper_tag()};
2684}
2685
2686const std::string surface_t::interface_name = "wl_surface";
2687
2688surface_t::operator wl_surface*() const
2689{
2690 return reinterpret_cast<wl_surface*> (c_ptr());
2691}
2692
2693void surface_t::attach(buffer_t const& buffer, int32_t x, int32_t y)
2694{
2695 marshal(1U, buffer.proxy_has_object() ? reinterpret_cast<wl_object*>(buffer.c_ptr()) : nullptr, x, y);
2696}
2697
2698
2699void surface_t::damage(int32_t x, int32_t y, int32_t width, int32_t height)
2700{
2701 marshal(2U, x, y, width, height);
2702}
2703
2704
2706{
2707 proxy_t p = marshal_constructor(3U, &callback_interface, nullptr);
2708 return callback_t(p);
2709}
2710
2711
2713{
2714 marshal(4U, region.proxy_has_object() ? reinterpret_cast<wl_object*>(region.c_ptr()) : nullptr);
2715}
2716
2717
2719{
2720 marshal(5U, region.proxy_has_object() ? reinterpret_cast<wl_object*>(region.c_ptr()) : nullptr);
2721}
2722
2723
2725{
2726 marshal(6U);
2727}
2728
2729
2731{
2732 marshal(7U, static_cast<int32_t>(transform));
2733}
2734
2739
2740
2742{
2743 marshal(8U, scale);
2744}
2745
2750
2751
2752void surface_t::damage_buffer(int32_t x, int32_t y, int32_t width, int32_t height)
2753{
2754 marshal(9U, x, y, width, height);
2755}
2756
2758{
2760}
2761
2762
2763void surface_t::offset(int32_t x, int32_t y)
2764{
2765 marshal(10U, x, y);
2766}
2767
2769{
2770 return (get_version() >= offset_since_version);
2771}
2772
2773
2774std::function<void(output_t)> &surface_t::on_enter()
2775{
2776 return std::static_pointer_cast<events_t>(get_events())->enter;
2777}
2778
2779std::function<void(output_t)> &surface_t::on_leave()
2780{
2781 return std::static_pointer_cast<events_t>(get_events())->leave;
2782}
2783
2784int surface_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
2785{
2786 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2787 switch(opcode)
2788 {
2789 case 0:
2790 if(events->enter) events->enter(output_t(args[0].get<proxy_t>()));
2791 break;
2792 case 1:
2793 if(events->leave) events->leave(output_t(args[0].get<proxy_t>()));
2794 break;
2795 }
2796 return 0;
2797}
2798
2799
2800seat_t::seat_t(const proxy_t &p)
2801 : proxy_t(p)
2802{
2804 {
2805 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2806 }
2807 set_interface(&seat_interface);
2808 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2809 { return seat_t(p); });
2810}
2811
2812seat_t::seat_t()
2813{
2814 set_interface(&seat_interface);
2815 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2816 { return seat_t(p); });
2817}
2818
2819seat_t::seat_t(wl_seat *p, wrapper_type t)
2820 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2822 {
2823 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2824 }
2825 set_interface(&seat_interface);
2826 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2827 { return seat_t(p); });
2828}
2829
2830seat_t::seat_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
2835}
2836
2837seat_t seat_t::proxy_create_wrapper()
2838{
2839 return {*this, construct_proxy_wrapper_tag()};
2840}
2841
2842const std::string seat_t::interface_name = "wl_seat";
2843
2844seat_t::operator wl_seat*() const
2845{
2846 return reinterpret_cast<wl_seat*> (c_ptr());
2847}
2848
2850{
2851 proxy_t p = marshal_constructor(0U, &pointer_interface, nullptr);
2852 return pointer_t(p);
2853}
2854
2855
2857{
2858 proxy_t p = marshal_constructor(1U, &keyboard_interface, nullptr);
2859 return keyboard_t(p);
2860}
2861
2862
2864{
2865 proxy_t p = marshal_constructor(2U, &touch_interface, nullptr);
2866 return touch_t(p);
2867}
2868
2869
2871{
2872 marshal(3U);
2873}
2874
2876{
2877 return (get_version() >= release_since_version);
2878}
2879
2880
2882{
2883 return std::static_pointer_cast<events_t>(get_events())->capabilities;
2884}
2885
2886std::function<void(std::string)> &seat_t::on_name()
2887{
2888 return std::static_pointer_cast<events_t>(get_events())->name;
2889}
2890
2891int seat_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
2892{
2893 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2894 switch(opcode)
2895 {
2896 case 0:
2897 if(events->capabilities) events->capabilities(seat_capability(args[0].get<uint32_t>()));
2898 break;
2899 case 1:
2900 if(events->name) events->name(args[0].get<std::string>());
2901 break;
2902 }
2903 return 0;
2904}
2905const bitfield<3, 12> seat_capability::pointer{1};
2906const bitfield<3, 12> seat_capability::keyboard{2};
2907const bitfield<3, 12> seat_capability::touch{4};
2908
2909
2910
2911pointer_t::pointer_t(const proxy_t &p)
2912 : proxy_t(p)
2913{
2915 {
2916 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2917 }
2918 set_interface(&pointer_interface);
2919 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2920 { return pointer_t(p); });
2921}
2922
2923pointer_t::pointer_t()
2924{
2925 set_interface(&pointer_interface);
2926 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2927 { return pointer_t(p); });
2928}
2929
2930pointer_t::pointer_t(wl_pointer *p, wrapper_type t)
2931 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2933 {
2934 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2935 }
2936 set_interface(&pointer_interface);
2937 set_copy_constructor([] (const proxy_t &p) -> proxy_t
2938 { return pointer_t(p); });
2939}
2940
2941pointer_t::pointer_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
2946}
2947
2948pointer_t pointer_t::proxy_create_wrapper()
2949{
2950 return {*this, construct_proxy_wrapper_tag()};
2951}
2952
2953const std::string pointer_t::interface_name = "wl_pointer";
2954
2955pointer_t::operator wl_pointer*() const
2956{
2957 return reinterpret_cast<wl_pointer*> (c_ptr());
2958}
2959
2960void pointer_t::set_cursor(uint32_t serial, surface_t const& surface, int32_t hotspot_x, int32_t hotspot_y)
2961{
2962 marshal(0U, serial, surface.proxy_has_object() ? reinterpret_cast<wl_object*>(surface.c_ptr()) : nullptr, hotspot_x, hotspot_y);
2963}
2964
2965
2967{
2968 marshal(1U);
2969}
2970
2972{
2973 return (get_version() >= release_since_version);
2974}
2975
2976
2977std::function<void(uint32_t, surface_t, double, double)> &pointer_t::on_enter()
2978{
2979 return std::static_pointer_cast<events_t>(get_events())->enter;
2980}
2981
2982std::function<void(uint32_t, surface_t)> &pointer_t::on_leave()
2983{
2984 return std::static_pointer_cast<events_t>(get_events())->leave;
2985}
2986
2987std::function<void(uint32_t, double, double)> &pointer_t::on_motion()
2988{
2989 return std::static_pointer_cast<events_t>(get_events())->motion;
2990}
2991
2992std::function<void(uint32_t, uint32_t, uint32_t, pointer_button_state)> &pointer_t::on_button()
2993{
2994 return std::static_pointer_cast<events_t>(get_events())->button;
2995}
2996
2997std::function<void(uint32_t, pointer_axis, double)> &pointer_t::on_axis()
2998{
2999 return std::static_pointer_cast<events_t>(get_events())->axis;
3000}
3001
3002std::function<void()> &pointer_t::on_frame()
3003{
3004 return std::static_pointer_cast<events_t>(get_events())->frame;
3005}
3006
3007std::function<void(pointer_axis_source)> &pointer_t::on_axis_source()
3008{
3009 return std::static_pointer_cast<events_t>(get_events())->axis_source;
3010}
3011
3012std::function<void(uint32_t, pointer_axis)> &pointer_t::on_axis_stop()
3013{
3014 return std::static_pointer_cast<events_t>(get_events())->axis_stop;
3015}
3016
3017std::function<void(pointer_axis, int32_t)> &pointer_t::on_axis_discrete()
3018{
3019 return std::static_pointer_cast<events_t>(get_events())->axis_discrete;
3020}
3021
3022std::function<void(pointer_axis, int32_t)> &pointer_t::on_axis_value120()
3023{
3024 return std::static_pointer_cast<events_t>(get_events())->axis_value120;
3025}
3026
3027int pointer_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
3028{
3029 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
3030 switch(opcode)
3031 {
3032 case 0:
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>());
3034 break;
3035 case 1:
3036 if(events->leave) events->leave(args[0].get<uint32_t>(), surface_t(args[1].get<proxy_t>()));
3037 break;
3038 case 2:
3039 if(events->motion) events->motion(args[0].get<uint32_t>(), args[1].get<double>(), args[2].get<double>());
3040 break;
3041 case 3:
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>()));
3043 break;
3044 case 4:
3045 if(events->axis) events->axis(args[0].get<uint32_t>(), pointer_axis(args[1].get<uint32_t>()), args[2].get<double>());
3046 break;
3047 case 5:
3048 if(events->frame) events->frame();
3049 break;
3050 case 6:
3051 if(events->axis_source) events->axis_source(pointer_axis_source(args[0].get<uint32_t>()));
3052 break;
3053 case 7:
3054 if(events->axis_stop) events->axis_stop(args[0].get<uint32_t>(), pointer_axis(args[1].get<uint32_t>()));
3055 break;
3056 case 8:
3057 if(events->axis_discrete) events->axis_discrete(pointer_axis(args[0].get<uint32_t>()), args[1].get<int32_t>());
3058 break;
3059 case 9:
3060 if(events->axis_value120) events->axis_value120(pointer_axis(args[0].get<uint32_t>()), args[1].get<int32_t>());
3061 break;
3062 }
3063 return 0;
3064}
3065
3066
3067
3068
3069
3070keyboard_t::keyboard_t(const proxy_t &p)
3071 : proxy_t(p)
3072{
3074 {
3075 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3076 }
3077 set_interface(&keyboard_interface);
3078 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3079 { return keyboard_t(p); });
3080}
3081
3082keyboard_t::keyboard_t()
3083{
3084 set_interface(&keyboard_interface);
3085 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3086 { return keyboard_t(p); });
3087}
3088
3089keyboard_t::keyboard_t(wl_keyboard *p, wrapper_type t)
3090 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3092 {
3093 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3094 }
3095 set_interface(&keyboard_interface);
3096 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3097 { return keyboard_t(p); });
3098}
3099
3100keyboard_t::keyboard_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
3105}
3106
3107keyboard_t keyboard_t::proxy_create_wrapper()
3108{
3109 return {*this, construct_proxy_wrapper_tag()};
3110}
3111
3112const std::string keyboard_t::interface_name = "wl_keyboard";
3113
3114keyboard_t::operator wl_keyboard*() const
3115{
3116 return reinterpret_cast<wl_keyboard*> (c_ptr());
3117}
3118
3120{
3121 marshal(0U);
3122}
3123
3125{
3126 return (get_version() >= release_since_version);
3127}
3128
3129
3130std::function<void(keyboard_keymap_format, int, uint32_t)> &keyboard_t::on_keymap()
3131{
3132 return std::static_pointer_cast<events_t>(get_events())->keymap;
3133}
3134
3135std::function<void(uint32_t, surface_t, array_t)> &keyboard_t::on_enter()
3136{
3137 return std::static_pointer_cast<events_t>(get_events())->enter;
3138}
3139
3140std::function<void(uint32_t, surface_t)> &keyboard_t::on_leave()
3141{
3142 return std::static_pointer_cast<events_t>(get_events())->leave;
3143}
3144
3145std::function<void(uint32_t, uint32_t, uint32_t, keyboard_key_state)> &keyboard_t::on_key()
3146{
3147 return std::static_pointer_cast<events_t>(get_events())->key;
3148}
3149
3150std::function<void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)> &keyboard_t::on_modifiers()
3151{
3152 return std::static_pointer_cast<events_t>(get_events())->modifiers;
3153}
3154
3155std::function<void(int32_t, int32_t)> &keyboard_t::on_repeat_info()
3156{
3157 return std::static_pointer_cast<events_t>(get_events())->repeat_info;
3158}
3159
3160int keyboard_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
3161{
3162 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
3163 switch(opcode)
3164 {
3165 case 0:
3166 if(events->keymap) events->keymap(keyboard_keymap_format(args[0].get<uint32_t>()), args[1].get<int>(), args[2].get<uint32_t>());
3167 break;
3168 case 1:
3169 if(events->enter) events->enter(args[0].get<uint32_t>(), surface_t(args[1].get<proxy_t>()), args[2].get<array_t>());
3170 break;
3171 case 2:
3172 if(events->leave) events->leave(args[0].get<uint32_t>(), surface_t(args[1].get<proxy_t>()));
3173 break;
3174 case 3:
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>()));
3176 break;
3177 case 4:
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>());
3179 break;
3180 case 5:
3181 if(events->repeat_info) events->repeat_info(args[0].get<int32_t>(), args[1].get<int32_t>());
3182 break;
3183 }
3184 return 0;
3185}
3186
3187
3188
3189touch_t::touch_t(const proxy_t &p)
3190 : proxy_t(p)
3191{
3193 {
3194 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3195 }
3196 set_interface(&touch_interface);
3197 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3198 { return touch_t(p); });
3199}
3200
3201touch_t::touch_t()
3202{
3203 set_interface(&touch_interface);
3204 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3205 { return touch_t(p); });
3206}
3207
3208touch_t::touch_t(wl_touch *p, wrapper_type t)
3209 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3211 {
3212 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3213 }
3214 set_interface(&touch_interface);
3215 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3216 { return touch_t(p); });
3217}
3218
3219touch_t::touch_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
3224}
3225
3226touch_t touch_t::proxy_create_wrapper()
3227{
3228 return {*this, construct_proxy_wrapper_tag()};
3229}
3230
3231const std::string touch_t::interface_name = "wl_touch";
3232
3233touch_t::operator wl_touch*() const
3234{
3235 return reinterpret_cast<wl_touch*> (c_ptr());
3236}
3237
3239{
3240 marshal(0U);
3241}
3242
3244{
3245 return (get_version() >= release_since_version);
3246}
3247
3248
3249std::function<void(uint32_t, uint32_t, surface_t, int32_t, double, double)> &touch_t::on_down()
3250{
3251 return std::static_pointer_cast<events_t>(get_events())->down;
3252}
3253
3254std::function<void(uint32_t, uint32_t, int32_t)> &touch_t::on_up()
3255{
3256 return std::static_pointer_cast<events_t>(get_events())->up;
3257}
3258
3259std::function<void(uint32_t, int32_t, double, double)> &touch_t::on_motion()
3260{
3261 return std::static_pointer_cast<events_t>(get_events())->motion;
3262}
3263
3264std::function<void()> &touch_t::on_frame()
3265{
3266 return std::static_pointer_cast<events_t>(get_events())->frame;
3267}
3268
3269std::function<void()> &touch_t::on_cancel()
3270{
3271 return std::static_pointer_cast<events_t>(get_events())->cancel;
3272}
3273
3274std::function<void(int32_t, double, double)> &touch_t::on_shape()
3275{
3276 return std::static_pointer_cast<events_t>(get_events())->shape;
3277}
3278
3279std::function<void(int32_t, double)> &touch_t::on_orientation()
3280{
3281 return std::static_pointer_cast<events_t>(get_events())->orientation;
3282}
3283
3284int touch_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
3285{
3286 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
3287 switch(opcode)
3288 {
3289 case 0:
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>());
3291 break;
3292 case 1:
3293 if(events->up) events->up(args[0].get<uint32_t>(), args[1].get<uint32_t>(), args[2].get<int32_t>());
3294 break;
3295 case 2:
3296 if(events->motion) events->motion(args[0].get<uint32_t>(), args[1].get<int32_t>(), args[2].get<double>(), args[3].get<double>());
3297 break;
3298 case 3:
3299 if(events->frame) events->frame();
3300 break;
3301 case 4:
3302 if(events->cancel) events->cancel();
3303 break;
3304 case 5:
3305 if(events->shape) events->shape(args[0].get<int32_t>(), args[1].get<double>(), args[2].get<double>());
3306 break;
3307 case 6:
3308 if(events->orientation) events->orientation(args[0].get<int32_t>(), args[1].get<double>());
3309 break;
3310 }
3311 return 0;
3312}
3313
3314output_t::output_t(const proxy_t &p)
3315 : proxy_t(p)
3316{
3318 {
3319 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3320 }
3321 set_interface(&output_interface);
3322 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3323 { return output_t(p); });
3324}
3325
3326output_t::output_t()
3327{
3328 set_interface(&output_interface);
3329 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3330 { return output_t(p); });
3331}
3332
3333output_t::output_t(wl_output *p, wrapper_type t)
3334 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3336 {
3337 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3338 }
3339 set_interface(&output_interface);
3340 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3341 { return output_t(p); });
3342}
3343
3344output_t::output_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
3349}
3350
3351output_t output_t::proxy_create_wrapper()
3352{
3353 return {*this, construct_proxy_wrapper_tag()};
3354}
3355
3356const std::string output_t::interface_name = "wl_output";
3357
3358output_t::operator wl_output*() const
3359{
3360 return reinterpret_cast<wl_output*> (c_ptr());
3361}
3362
3364{
3365 marshal(0U);
3366}
3367
3369{
3370 return (get_version() >= release_since_version);
3371}
3372
3373
3374std::function<void(int32_t, int32_t, int32_t, int32_t, output_subpixel, std::string, std::string, output_transform)> &output_t::on_geometry()
3375{
3376 return std::static_pointer_cast<events_t>(get_events())->geometry;
3377}
3378
3379std::function<void(output_mode, int32_t, int32_t, int32_t)> &output_t::on_mode()
3380{
3381 return std::static_pointer_cast<events_t>(get_events())->mode;
3382}
3383
3384std::function<void()> &output_t::on_done()
3385{
3386 return std::static_pointer_cast<events_t>(get_events())->done;
3387}
3388
3389std::function<void(int32_t)> &output_t::on_scale()
3390{
3391 return std::static_pointer_cast<events_t>(get_events())->scale;
3392}
3393
3394std::function<void(std::string)> &output_t::on_name()
3395{
3396 return std::static_pointer_cast<events_t>(get_events())->name;
3397}
3398
3399std::function<void(std::string)> &output_t::on_description()
3400{
3401 return std::static_pointer_cast<events_t>(get_events())->description;
3402}
3403
3404int output_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
3405{
3406 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
3407 switch(opcode)
3408 {
3409 case 0:
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>()));
3411 break;
3412 case 1:
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>());
3414 break;
3415 case 2:
3416 if(events->done) events->done();
3417 break;
3418 case 3:
3419 if(events->scale) events->scale(args[0].get<int32_t>());
3420 break;
3421 case 4:
3422 if(events->name) events->name(args[0].get<std::string>());
3423 break;
3424 case 5:
3425 if(events->description) events->description(args[0].get<std::string>());
3426 break;
3427 }
3428 return 0;
3429}
3430
3431const bitfield<2147483649, 21> output_transform::normal{0};
3432const bitfield<2147483649, 21> output_transform::_90{1};
3433const bitfield<2147483649, 21> output_transform::_180{2};
3434const bitfield<2147483649, 21> output_transform::_270{3};
3435const bitfield<2147483649, 21> output_transform::flipped{4};
3436const bitfield<2147483649, 21> output_transform::flipped_90{5};
3437const bitfield<2147483649, 21> output_transform::flipped_180{6};
3438const bitfield<2147483649, 21> output_transform::flipped_270{7};
3439
3440const bitfield<2, 22> output_mode::current{0x1};
3441const bitfield<2, 22> output_mode::preferred{0x2};
3442
3443
3444region_t::region_t(const proxy_t &p)
3445 : proxy_t(p)
3446{
3448 {
3449 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3450 set_destroy_opcode(0U);
3451 }
3452 set_interface(&region_interface);
3453 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3454 { return region_t(p); });
3455}
3456
3457region_t::region_t()
3458{
3459 set_interface(&region_interface);
3460 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3461 { return region_t(p); });
3462}
3463
3464region_t::region_t(wl_region *p, wrapper_type t)
3465 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3467 {
3468 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3469 set_destroy_opcode(0U);
3470 }
3471 set_interface(&region_interface);
3472 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3473 { return region_t(p); });
3474}
3475
3476region_t::region_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
3477 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
3478 set_interface(&region_interface);
3479 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3480 { return region_t(p); });
3481}
3482
3483region_t region_t::proxy_create_wrapper()
3484{
3485 return {*this, construct_proxy_wrapper_tag()};
3486}
3487
3488const std::string region_t::interface_name = "wl_region";
3489
3490region_t::operator wl_region*() const
3491{
3492 return reinterpret_cast<wl_region*> (c_ptr());
3493}
3494
3495void region_t::add(int32_t x, int32_t y, int32_t width, int32_t height)
3496{
3497 marshal(1U, x, y, width, height);
3498}
3499
3500
3501void region_t::subtract(int32_t x, int32_t y, int32_t width, int32_t height)
3502{
3503 marshal(2U, x, y, width, height);
3504}
3505
3506
3507int region_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
3508{
3509 return 0;
3510}
3511
3512subcompositor_t::subcompositor_t(const proxy_t &p)
3513 : proxy_t(p)
3514{
3516 {
3517 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3518 set_destroy_opcode(0U);
3519 }
3520 set_interface(&subcompositor_interface);
3521 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3522 { return subcompositor_t(p); });
3523}
3524
3525subcompositor_t::subcompositor_t()
3526{
3527 set_interface(&subcompositor_interface);
3528 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3529 { return subcompositor_t(p); });
3530}
3531
3532subcompositor_t::subcompositor_t(wl_subcompositor *p, wrapper_type t)
3533 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3535 {
3536 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3537 set_destroy_opcode(0U);
3538 }
3539 set_interface(&subcompositor_interface);
3540 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3541 { return subcompositor_t(p); });
3542}
3543
3544subcompositor_t::subcompositor_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
3549}
3550
3551subcompositor_t subcompositor_t::proxy_create_wrapper()
3552{
3553 return {*this, construct_proxy_wrapper_tag()};
3554}
3555
3556const std::string subcompositor_t::interface_name = "wl_subcompositor";
3557
3558subcompositor_t::operator wl_subcompositor*() const
3559{
3560 return reinterpret_cast<wl_subcompositor*> (c_ptr());
3561}
3562
3564{
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);
3566 return subsurface_t(p);
3567}
3568
3569
3570int subcompositor_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
3571{
3572 return 0;
3573}
3574
3575
3576subsurface_t::subsurface_t(const proxy_t &p)
3577 : proxy_t(p)
3578{
3580 {
3581 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3582 set_destroy_opcode(0U);
3583 }
3584 set_interface(&subsurface_interface);
3585 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3586 { return subsurface_t(p); });
3587}
3588
3589subsurface_t::subsurface_t()
3590{
3591 set_interface(&subsurface_interface);
3592 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3593 { return subsurface_t(p); });
3594}
3595
3596subsurface_t::subsurface_t(wl_subsurface *p, wrapper_type t)
3597 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3599 {
3600 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3601 set_destroy_opcode(0U);
3602 }
3603 set_interface(&subsurface_interface);
3604 set_copy_constructor([] (const proxy_t &p) -> proxy_t
3605 { return subsurface_t(p); });
3606}
3607
3608subsurface_t::subsurface_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
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); });
3613}
3614
3615subsurface_t subsurface_t::proxy_create_wrapper()
3616{
3617 return {*this, construct_proxy_wrapper_tag()};
3618}
3619
3620const std::string subsurface_t::interface_name = "wl_subsurface";
3621
3622subsurface_t::operator wl_subsurface*() const
3623{
3624 return reinterpret_cast<wl_subsurface*> (c_ptr());
3625}
3626
3627void subsurface_t::set_position(int32_t x, int32_t y)
3628{
3629 marshal(1U, x, y);
3630}
3631
3632
3634{
3635 marshal(2U, sibling.proxy_has_object() ? reinterpret_cast<wl_object*>(sibling.c_ptr()) : nullptr);
3636}
3637
3638
3640{
3641 marshal(3U, sibling.proxy_has_object() ? reinterpret_cast<wl_object*>(sibling.c_ptr()) : nullptr);
3642}
3643
3644
3646{
3647 marshal(4U);
3648}
3649
3650
3652{
3653 marshal(5U);
3654}
3655
3656
3657int subsurface_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
3658{
3659 return 0;
3660}
3661
3662
3663
content for a wl_surface
std::function< void()> & on_release()
compositor releases buffer
std::function< void(uint32_t)> & on_done()
done event
the compositor singleton
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
compositor output region
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
group of input devices
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
shared memory support
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 &region)
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 &region)
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 ...
touchscreen input device
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
transform from framebuffer to output
static const wayland::detail::bitfield< 2147483649, 21 > flipped_270
flip and rotate 270 degrees counter-clockwise
static const wayland::detail::bitfield< 2147483649, 21 > flipped
180 degree flip around a vertical axis
static const wayland::detail::bitfield< 2147483649, 21 > flipped_90
flip and rotate 90 degrees counter-clockwise
static const wayland::detail::bitfield< 2147483649, 21 > flipped_180
flip and rotate 180 degrees counter-clockwise
static const wayland::detail::bitfield< 2147483649, 21 > _180
180 degrees counter-clockwise
static const wayland::detail::bitfield< 2147483649, 21 > normal
no transform
static const wayland::detail::bitfield< 2147483649, 21 > _90
90 degrees counter-clockwise
static const wayland::detail::bitfield< 2147483649, 21 > _270
270 degrees counter-clockwise
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
static const wayland::detail::bitfield< 1, 9 > inactive
do not set keyboard focus