Wayland++  0.2.6
C++ Bindings for Wayland
wayland-client-protocol.cpp
1 #include <wayland-client-protocol.hpp>
2 
3 using namespace wayland;
4 using namespace detail;
5 
6 const wl_interface* display_interface_sync_request[1] = {
7  &callback_interface,
8 };
9 
10 const wl_interface* display_interface_get_registry_request[1] = {
11  &registry_interface,
12 };
13 
14 const wl_interface* display_interface_error_event[3] = {
15  nullptr,
16  nullptr,
17  nullptr,
18 };
19 
20 const wl_interface* display_interface_delete_id_event[1] = {
21  nullptr,
22 };
23 
24 const 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 
37 const 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 
50 const 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 
60 const wl_interface* registry_interface_bind_request[2] = {
61  nullptr,
62  nullptr,
63 };
64 
65 const wl_interface* registry_interface_global_event[3] = {
66  nullptr,
67  nullptr,
68  nullptr,
69 };
70 
71 const wl_interface* registry_interface_global_remove_event[1] = {
72  nullptr,
73 };
74 
75 const wl_message registry_interface_requests[1] = {
76  {
77  "bind",
78  "usun",
79  registry_interface_bind_request,
80  },
81 };
82 
83 const 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 
96 const 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 
106 const wl_interface* callback_interface_done_event[1] = {
107  nullptr,
108 };
109 
110 const wl_message callback_interface_requests[0] = {
111 };
112 
113 const wl_message callback_interface_events[1] = {
114  {
115  "done",
116  "u",
117  callback_interface_done_event,
118  },
119 };
120 
121 const 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 
131 const wl_interface* compositor_interface_create_surface_request[1] = {
132  &surface_interface,
133 };
134 
135 const wl_interface* compositor_interface_create_region_request[1] = {
136  &region_interface,
137 };
138 
139 const 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 
152 const wl_message compositor_interface_events[0] = {
153 };
154 
155 const wl_interface wayland::detail::compositor_interface =
156  {
157  "wl_compositor",
158  4,
159  2,
160  compositor_interface_requests,
161  0,
162  compositor_interface_events,
163  };
164 
165 const wl_interface* shm_pool_interface_create_buffer_request[6] = {
166  &buffer_interface,
167  nullptr,
168  nullptr,
169  nullptr,
170  nullptr,
171  nullptr,
172 };
173 
174 const wl_interface* shm_pool_interface_destroy_request[0] = {
175 };
176 
177 const wl_interface* shm_pool_interface_resize_request[1] = {
178  nullptr,
179 };
180 
181 const 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 
199 const wl_message shm_pool_interface_events[0] = {
200 };
201 
202 const 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 
212 const wl_interface* shm_interface_create_pool_request[3] = {
213  &shm_pool_interface,
214  nullptr,
215  nullptr,
216 };
217 
218 const wl_interface* shm_interface_format_event[1] = {
219  nullptr,
220 };
221 
222 const wl_message shm_interface_requests[1] = {
223  {
224  "create_pool",
225  "nhi",
226  shm_interface_create_pool_request,
227  },
228 };
229 
230 const wl_message shm_interface_events[1] = {
231  {
232  "format",
233  "u",
234  shm_interface_format_event,
235  },
236 };
237 
238 const 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 
248 const wl_interface* buffer_interface_destroy_request[0] = {
249 };
250 
251 const wl_interface* buffer_interface_release_event[0] = {
252 };
253 
254 const wl_message buffer_interface_requests[1] = {
255  {
256  "destroy",
257  "",
258  buffer_interface_destroy_request,
259  },
260 };
261 
262 const wl_message buffer_interface_events[1] = {
263  {
264  "release",
265  "",
266  buffer_interface_release_event,
267  },
268 };
269 
270 const 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 
280 const wl_interface* data_offer_interface_accept_request[2] = {
281  nullptr,
282  nullptr,
283 };
284 
285 const wl_interface* data_offer_interface_receive_request[2] = {
286  nullptr,
287  nullptr,
288 };
289 
290 const wl_interface* data_offer_interface_destroy_request[0] = {
291 };
292 
293 const wl_interface* data_offer_interface_finish_request[0] = {
294 };
295 
296 const wl_interface* data_offer_interface_set_actions_request[2] = {
297  nullptr,
298  nullptr,
299 };
300 
301 const wl_interface* data_offer_interface_offer_event[1] = {
302  nullptr,
303 };
304 
305 const wl_interface* data_offer_interface_source_actions_event[1] = {
306  nullptr,
307 };
308 
309 const wl_interface* data_offer_interface_action_event[1] = {
310  nullptr,
311 };
312 
313 const 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 
341 const 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 
359 const 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 
369 const wl_interface* data_source_interface_offer_request[1] = {
370  nullptr,
371 };
372 
373 const wl_interface* data_source_interface_destroy_request[0] = {
374 };
375 
376 const wl_interface* data_source_interface_set_actions_request[1] = {
377  nullptr,
378 };
379 
380 const wl_interface* data_source_interface_target_event[1] = {
381  nullptr,
382 };
383 
384 const wl_interface* data_source_interface_send_event[2] = {
385  nullptr,
386  nullptr,
387 };
388 
389 const wl_interface* data_source_interface_cancelled_event[0] = {
390 };
391 
392 const wl_interface* data_source_interface_dnd_drop_performed_event[0] = {
393 };
394 
395 const wl_interface* data_source_interface_dnd_finished_event[0] = {
396 };
397 
398 const wl_interface* data_source_interface_action_event[1] = {
399  nullptr,
400 };
401 
402 const 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 
420 const 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 
453 const 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 
463 const wl_interface* data_device_interface_start_drag_request[4] = {
464  &data_source_interface,
465  &surface_interface,
466  &surface_interface,
467  nullptr,
468 };
469 
470 const wl_interface* data_device_interface_set_selection_request[2] = {
471  &data_source_interface,
472  nullptr,
473 };
474 
475 const wl_interface* data_device_interface_release_request[0] = {
476 };
477 
478 const wl_interface* data_device_interface_data_offer_event[1] = {
479  &data_offer_interface,
480 };
481 
482 const wl_interface* data_device_interface_enter_event[5] = {
483  nullptr,
484  &surface_interface,
485  nullptr,
486  nullptr,
487  &data_offer_interface,
488 };
489 
490 const wl_interface* data_device_interface_leave_event[0] = {
491 };
492 
493 const wl_interface* data_device_interface_motion_event[3] = {
494  nullptr,
495  nullptr,
496  nullptr,
497 };
498 
499 const wl_interface* data_device_interface_drop_event[0] = {
500 };
501 
502 const wl_interface* data_device_interface_selection_event[1] = {
503  &data_offer_interface,
504 };
505 
506 const 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 
524 const 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 
557 const 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 
567 const wl_interface* data_device_manager_interface_create_data_source_request[1] = {
568  &data_source_interface,
569 };
570 
571 const wl_interface* data_device_manager_interface_get_data_device_request[2] = {
572  &data_device_interface,
573  &seat_interface,
574 };
575 
576 const 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 
589 const wl_message data_device_manager_interface_events[0] = {
590 };
591 
592 const 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 
602 const wl_interface* shell_interface_get_shell_surface_request[2] = {
603  &shell_surface_interface,
604  &surface_interface,
605 };
606 
607 const wl_message shell_interface_requests[1] = {
608  {
609  "get_shell_surface",
610  "no",
611  shell_interface_get_shell_surface_request,
612  },
613 };
614 
615 const wl_message shell_interface_events[0] = {
616 };
617 
618 const 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 
628 const wl_interface* shell_surface_interface_pong_request[1] = {
629  nullptr,
630 };
631 
632 const wl_interface* shell_surface_interface_move_request[2] = {
633  &seat_interface,
634  nullptr,
635 };
636 
637 const wl_interface* shell_surface_interface_resize_request[3] = {
638  &seat_interface,
639  nullptr,
640  nullptr,
641 };
642 
643 const wl_interface* shell_surface_interface_set_toplevel_request[0] = {
644 };
645 
646 const wl_interface* shell_surface_interface_set_transient_request[4] = {
647  &surface_interface,
648  nullptr,
649  nullptr,
650  nullptr,
651 };
652 
653 const wl_interface* shell_surface_interface_set_fullscreen_request[3] = {
654  nullptr,
655  nullptr,
656  &output_interface,
657 };
658 
659 const 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 
668 const wl_interface* shell_surface_interface_set_maximized_request[1] = {
669  &output_interface,
670 };
671 
672 const wl_interface* shell_surface_interface_set_title_request[1] = {
673  nullptr,
674 };
675 
676 const wl_interface* shell_surface_interface_set_class_request[1] = {
677  nullptr,
678 };
679 
680 const wl_interface* shell_surface_interface_ping_event[1] = {
681  nullptr,
682 };
683 
684 const wl_interface* shell_surface_interface_configure_event[3] = {
685  nullptr,
686  nullptr,
687  nullptr,
688 };
689 
690 const wl_interface* shell_surface_interface_popup_done_event[0] = {
691 };
692 
693 const 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 
746 const 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 
764 const 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 
774 const wl_interface* surface_interface_destroy_request[0] = {
775 };
776 
777 const wl_interface* surface_interface_attach_request[3] = {
778  &buffer_interface,
779  nullptr,
780  nullptr,
781 };
782 
783 const wl_interface* surface_interface_damage_request[4] = {
784  nullptr,
785  nullptr,
786  nullptr,
787  nullptr,
788 };
789 
790 const wl_interface* surface_interface_frame_request[1] = {
791  &callback_interface,
792 };
793 
794 const wl_interface* surface_interface_set_opaque_region_request[1] = {
795  &region_interface,
796 };
797 
798 const wl_interface* surface_interface_set_input_region_request[1] = {
799  &region_interface,
800 };
801 
802 const wl_interface* surface_interface_commit_request[0] = {
803 };
804 
805 const wl_interface* surface_interface_set_buffer_transform_request[1] = {
806  nullptr,
807 };
808 
809 const wl_interface* surface_interface_set_buffer_scale_request[1] = {
810  nullptr,
811 };
812 
813 const wl_interface* surface_interface_damage_buffer_request[4] = {
814  nullptr,
815  nullptr,
816  nullptr,
817  nullptr,
818 };
819 
820 const wl_interface* surface_interface_enter_event[1] = {
821  &output_interface,
822 };
823 
824 const wl_interface* surface_interface_leave_event[1] = {
825  &output_interface,
826 };
827 
828 const wl_message surface_interface_requests[10] = {
829  {
830  "destroy",
831  "",
832  surface_interface_destroy_request,
833  },
834  {
835  "attach",
836  "?oii",
837  surface_interface_attach_request,
838  },
839  {
840  "damage",
841  "iiii",
842  surface_interface_damage_request,
843  },
844  {
845  "frame",
846  "n",
847  surface_interface_frame_request,
848  },
849  {
850  "set_opaque_region",
851  "?o",
852  surface_interface_set_opaque_region_request,
853  },
854  {
855  "set_input_region",
856  "?o",
857  surface_interface_set_input_region_request,
858  },
859  {
860  "commit",
861  "",
862  surface_interface_commit_request,
863  },
864  {
865  "set_buffer_transform",
866  "2i",
867  surface_interface_set_buffer_transform_request,
868  },
869  {
870  "set_buffer_scale",
871  "3i",
872  surface_interface_set_buffer_scale_request,
873  },
874  {
875  "damage_buffer",
876  "4iiii",
877  surface_interface_damage_buffer_request,
878  },
879 };
880 
881 const wl_message surface_interface_events[2] = {
882  {
883  "enter",
884  "o",
885  surface_interface_enter_event,
886  },
887  {
888  "leave",
889  "o",
890  surface_interface_leave_event,
891  },
892 };
893 
894 const wl_interface wayland::detail::surface_interface =
895  {
896  "wl_surface",
897  4,
898  10,
899  surface_interface_requests,
900  2,
901  surface_interface_events,
902  };
903 
904 const wl_interface* seat_interface_get_pointer_request[1] = {
905  &pointer_interface,
906 };
907 
908 const wl_interface* seat_interface_get_keyboard_request[1] = {
909  &keyboard_interface,
910 };
911 
912 const wl_interface* seat_interface_get_touch_request[1] = {
913  &touch_interface,
914 };
915 
916 const wl_interface* seat_interface_release_request[0] = {
917 };
918 
919 const wl_interface* seat_interface_capabilities_event[1] = {
920  nullptr,
921 };
922 
923 const wl_interface* seat_interface_name_event[1] = {
924  nullptr,
925 };
926 
927 const wl_message seat_interface_requests[4] = {
928  {
929  "get_pointer",
930  "n",
931  seat_interface_get_pointer_request,
932  },
933  {
934  "get_keyboard",
935  "n",
936  seat_interface_get_keyboard_request,
937  },
938  {
939  "get_touch",
940  "n",
941  seat_interface_get_touch_request,
942  },
943  {
944  "release",
945  "5",
946  seat_interface_release_request,
947  },
948 };
949 
950 const wl_message seat_interface_events[2] = {
951  {
952  "capabilities",
953  "u",
954  seat_interface_capabilities_event,
955  },
956  {
957  "name",
958  "2s",
959  seat_interface_name_event,
960  },
961 };
962 
963 const wl_interface wayland::detail::seat_interface =
964  {
965  "wl_seat",
966  7,
967  4,
968  seat_interface_requests,
969  2,
970  seat_interface_events,
971  };
972 
973 const wl_interface* pointer_interface_set_cursor_request[4] = {
974  nullptr,
975  &surface_interface,
976  nullptr,
977  nullptr,
978 };
979 
980 const wl_interface* pointer_interface_release_request[0] = {
981 };
982 
983 const wl_interface* pointer_interface_enter_event[4] = {
984  nullptr,
985  &surface_interface,
986  nullptr,
987  nullptr,
988 };
989 
990 const wl_interface* pointer_interface_leave_event[2] = {
991  nullptr,
992  &surface_interface,
993 };
994 
995 const wl_interface* pointer_interface_motion_event[3] = {
996  nullptr,
997  nullptr,
998  nullptr,
999 };
1000 
1001 const wl_interface* pointer_interface_button_event[4] = {
1002  nullptr,
1003  nullptr,
1004  nullptr,
1005  nullptr,
1006 };
1007 
1008 const wl_interface* pointer_interface_axis_event[3] = {
1009  nullptr,
1010  nullptr,
1011  nullptr,
1012 };
1013 
1014 const wl_interface* pointer_interface_frame_event[0] = {
1015 };
1016 
1017 const wl_interface* pointer_interface_axis_source_event[1] = {
1018  nullptr,
1019 };
1020 
1021 const wl_interface* pointer_interface_axis_stop_event[2] = {
1022  nullptr,
1023  nullptr,
1024 };
1025 
1026 const wl_interface* pointer_interface_axis_discrete_event[2] = {
1027  nullptr,
1028  nullptr,
1029 };
1030 
1031 const wl_message pointer_interface_requests[2] = {
1032  {
1033  "set_cursor",
1034  "u?oii",
1035  pointer_interface_set_cursor_request,
1036  },
1037  {
1038  "release",
1039  "3",
1040  pointer_interface_release_request,
1041  },
1042 };
1043 
1044 const wl_message pointer_interface_events[9] = {
1045  {
1046  "enter",
1047  "uoff",
1048  pointer_interface_enter_event,
1049  },
1050  {
1051  "leave",
1052  "uo",
1053  pointer_interface_leave_event,
1054  },
1055  {
1056  "motion",
1057  "uff",
1058  pointer_interface_motion_event,
1059  },
1060  {
1061  "button",
1062  "uuuu",
1063  pointer_interface_button_event,
1064  },
1065  {
1066  "axis",
1067  "uuf",
1068  pointer_interface_axis_event,
1069  },
1070  {
1071  "frame",
1072  "5",
1073  pointer_interface_frame_event,
1074  },
1075  {
1076  "axis_source",
1077  "5u",
1078  pointer_interface_axis_source_event,
1079  },
1080  {
1081  "axis_stop",
1082  "5uu",
1083  pointer_interface_axis_stop_event,
1084  },
1085  {
1086  "axis_discrete",
1087  "5ui",
1088  pointer_interface_axis_discrete_event,
1089  },
1090 };
1091 
1092 const wl_interface wayland::detail::pointer_interface =
1093  {
1094  "wl_pointer",
1095  7,
1096  2,
1097  pointer_interface_requests,
1098  9,
1099  pointer_interface_events,
1100  };
1101 
1102 const wl_interface* keyboard_interface_release_request[0] = {
1103 };
1104 
1105 const wl_interface* keyboard_interface_keymap_event[3] = {
1106  nullptr,
1107  nullptr,
1108  nullptr,
1109 };
1110 
1111 const wl_interface* keyboard_interface_enter_event[3] = {
1112  nullptr,
1113  &surface_interface,
1114  nullptr,
1115 };
1116 
1117 const wl_interface* keyboard_interface_leave_event[2] = {
1118  nullptr,
1119  &surface_interface,
1120 };
1121 
1122 const wl_interface* keyboard_interface_key_event[4] = {
1123  nullptr,
1124  nullptr,
1125  nullptr,
1126  nullptr,
1127 };
1128 
1129 const wl_interface* keyboard_interface_modifiers_event[5] = {
1130  nullptr,
1131  nullptr,
1132  nullptr,
1133  nullptr,
1134  nullptr,
1135 };
1136 
1137 const wl_interface* keyboard_interface_repeat_info_event[2] = {
1138  nullptr,
1139  nullptr,
1140 };
1141 
1142 const wl_message keyboard_interface_requests[1] = {
1143  {
1144  "release",
1145  "3",
1146  keyboard_interface_release_request,
1147  },
1148 };
1149 
1150 const wl_message keyboard_interface_events[6] = {
1151  {
1152  "keymap",
1153  "uhu",
1154  keyboard_interface_keymap_event,
1155  },
1156  {
1157  "enter",
1158  "uoa",
1159  keyboard_interface_enter_event,
1160  },
1161  {
1162  "leave",
1163  "uo",
1164  keyboard_interface_leave_event,
1165  },
1166  {
1167  "key",
1168  "uuuu",
1169  keyboard_interface_key_event,
1170  },
1171  {
1172  "modifiers",
1173  "uuuuu",
1174  keyboard_interface_modifiers_event,
1175  },
1176  {
1177  "repeat_info",
1178  "4ii",
1179  keyboard_interface_repeat_info_event,
1180  },
1181 };
1182 
1183 const wl_interface wayland::detail::keyboard_interface =
1184  {
1185  "wl_keyboard",
1186  7,
1187  1,
1188  keyboard_interface_requests,
1189  6,
1190  keyboard_interface_events,
1191  };
1192 
1193 const wl_interface* touch_interface_release_request[0] = {
1194 };
1195 
1196 const wl_interface* touch_interface_down_event[6] = {
1197  nullptr,
1198  nullptr,
1199  &surface_interface,
1200  nullptr,
1201  nullptr,
1202  nullptr,
1203 };
1204 
1205 const wl_interface* touch_interface_up_event[3] = {
1206  nullptr,
1207  nullptr,
1208  nullptr,
1209 };
1210 
1211 const wl_interface* touch_interface_motion_event[4] = {
1212  nullptr,
1213  nullptr,
1214  nullptr,
1215  nullptr,
1216 };
1217 
1218 const wl_interface* touch_interface_frame_event[0] = {
1219 };
1220 
1221 const wl_interface* touch_interface_cancel_event[0] = {
1222 };
1223 
1224 const wl_interface* touch_interface_shape_event[3] = {
1225  nullptr,
1226  nullptr,
1227  nullptr,
1228 };
1229 
1230 const wl_interface* touch_interface_orientation_event[2] = {
1231  nullptr,
1232  nullptr,
1233 };
1234 
1235 const wl_message touch_interface_requests[1] = {
1236  {
1237  "release",
1238  "3",
1239  touch_interface_release_request,
1240  },
1241 };
1242 
1243 const wl_message touch_interface_events[7] = {
1244  {
1245  "down",
1246  "uuoiff",
1247  touch_interface_down_event,
1248  },
1249  {
1250  "up",
1251  "uui",
1252  touch_interface_up_event,
1253  },
1254  {
1255  "motion",
1256  "uiff",
1257  touch_interface_motion_event,
1258  },
1259  {
1260  "frame",
1261  "",
1262  touch_interface_frame_event,
1263  },
1264  {
1265  "cancel",
1266  "",
1267  touch_interface_cancel_event,
1268  },
1269  {
1270  "shape",
1271  "6iff",
1272  touch_interface_shape_event,
1273  },
1274  {
1275  "orientation",
1276  "6if",
1277  touch_interface_orientation_event,
1278  },
1279 };
1280 
1281 const wl_interface wayland::detail::touch_interface =
1282  {
1283  "wl_touch",
1284  7,
1285  1,
1286  touch_interface_requests,
1287  7,
1288  touch_interface_events,
1289  };
1290 
1291 const wl_interface* output_interface_release_request[0] = {
1292 };
1293 
1294 const wl_interface* output_interface_geometry_event[8] = {
1295  nullptr,
1296  nullptr,
1297  nullptr,
1298  nullptr,
1299  nullptr,
1300  nullptr,
1301  nullptr,
1302  nullptr,
1303 };
1304 
1305 const wl_interface* output_interface_mode_event[4] = {
1306  nullptr,
1307  nullptr,
1308  nullptr,
1309  nullptr,
1310 };
1311 
1312 const wl_interface* output_interface_done_event[0] = {
1313 };
1314 
1315 const wl_interface* output_interface_scale_event[1] = {
1316  nullptr,
1317 };
1318 
1319 const wl_message output_interface_requests[1] = {
1320  {
1321  "release",
1322  "3",
1323  output_interface_release_request,
1324  },
1325 };
1326 
1327 const wl_message output_interface_events[4] = {
1328  {
1329  "geometry",
1330  "iiiiissi",
1331  output_interface_geometry_event,
1332  },
1333  {
1334  "mode",
1335  "uiii",
1336  output_interface_mode_event,
1337  },
1338  {
1339  "done",
1340  "2",
1341  output_interface_done_event,
1342  },
1343  {
1344  "scale",
1345  "2i",
1346  output_interface_scale_event,
1347  },
1348 };
1349 
1350 const wl_interface wayland::detail::output_interface =
1351  {
1352  "wl_output",
1353  3,
1354  1,
1355  output_interface_requests,
1356  4,
1357  output_interface_events,
1358  };
1359 
1360 const wl_interface* region_interface_destroy_request[0] = {
1361 };
1362 
1363 const wl_interface* region_interface_add_request[4] = {
1364  nullptr,
1365  nullptr,
1366  nullptr,
1367  nullptr,
1368 };
1369 
1370 const wl_interface* region_interface_subtract_request[4] = {
1371  nullptr,
1372  nullptr,
1373  nullptr,
1374  nullptr,
1375 };
1376 
1377 const wl_message region_interface_requests[3] = {
1378  {
1379  "destroy",
1380  "",
1381  region_interface_destroy_request,
1382  },
1383  {
1384  "add",
1385  "iiii",
1386  region_interface_add_request,
1387  },
1388  {
1389  "subtract",
1390  "iiii",
1391  region_interface_subtract_request,
1392  },
1393 };
1394 
1395 const wl_message region_interface_events[0] = {
1396 };
1397 
1398 const wl_interface wayland::detail::region_interface =
1399  {
1400  "wl_region",
1401  1,
1402  3,
1403  region_interface_requests,
1404  0,
1405  region_interface_events,
1406  };
1407 
1408 const wl_interface* subcompositor_interface_destroy_request[0] = {
1409 };
1410 
1411 const wl_interface* subcompositor_interface_get_subsurface_request[3] = {
1412  &subsurface_interface,
1413  &surface_interface,
1414  &surface_interface,
1415 };
1416 
1417 const wl_message subcompositor_interface_requests[2] = {
1418  {
1419  "destroy",
1420  "",
1421  subcompositor_interface_destroy_request,
1422  },
1423  {
1424  "get_subsurface",
1425  "noo",
1426  subcompositor_interface_get_subsurface_request,
1427  },
1428 };
1429 
1430 const wl_message subcompositor_interface_events[0] = {
1431 };
1432 
1433 const wl_interface wayland::detail::subcompositor_interface =
1434  {
1435  "wl_subcompositor",
1436  1,
1437  2,
1438  subcompositor_interface_requests,
1439  0,
1440  subcompositor_interface_events,
1441  };
1442 
1443 const wl_interface* subsurface_interface_destroy_request[0] = {
1444 };
1445 
1446 const wl_interface* subsurface_interface_set_position_request[2] = {
1447  nullptr,
1448  nullptr,
1449 };
1450 
1451 const wl_interface* subsurface_interface_place_above_request[1] = {
1452  &surface_interface,
1453 };
1454 
1455 const wl_interface* subsurface_interface_place_below_request[1] = {
1456  &surface_interface,
1457 };
1458 
1459 const wl_interface* subsurface_interface_set_sync_request[0] = {
1460 };
1461 
1462 const wl_interface* subsurface_interface_set_desync_request[0] = {
1463 };
1464 
1465 const wl_message subsurface_interface_requests[6] = {
1466  {
1467  "destroy",
1468  "",
1469  subsurface_interface_destroy_request,
1470  },
1471  {
1472  "set_position",
1473  "ii",
1474  subsurface_interface_set_position_request,
1475  },
1476  {
1477  "place_above",
1478  "o",
1479  subsurface_interface_place_above_request,
1480  },
1481  {
1482  "place_below",
1483  "o",
1484  subsurface_interface_place_below_request,
1485  },
1486  {
1487  "set_sync",
1488  "",
1489  subsurface_interface_set_sync_request,
1490  },
1491  {
1492  "set_desync",
1493  "",
1494  subsurface_interface_set_desync_request,
1495  },
1496 };
1497 
1498 const wl_message subsurface_interface_events[0] = {
1499 };
1500 
1501 const wl_interface wayland::detail::subsurface_interface =
1502  {
1503  "wl_subsurface",
1504  1,
1505  6,
1506  subsurface_interface_requests,
1507  0,
1508  subsurface_interface_events,
1509  };
1510 
1511 registry_t::registry_t(const proxy_t &p)
1512  : proxy_t(p)
1513 {
1515  {
1516  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1517  }
1518  interface = &registry_interface;
1519  copy_constructor = [] (const proxy_t &p) -> proxy_t
1520  { return registry_t(p); };
1521 }
1522 
1523 registry_t::registry_t()
1524 {
1525  interface = &registry_interface;
1526  copy_constructor = [] (const proxy_t &p) -> proxy_t
1527  { return registry_t(p); };
1528 }
1529 
1530 registry_t::registry_t(wl_registry *p, wrapper_type t)
1531  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1533  {
1534  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1535  }
1536  interface = &registry_interface;
1537  copy_constructor = [] (const proxy_t &p) -> proxy_t
1538  { return registry_t(p); };
1539 }
1540 
1541 registry_t::registry_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1542  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1543  interface = &registry_interface;
1544  copy_constructor = [] (const proxy_t &p) -> proxy_t
1545  { return registry_t(p); };
1546 }
1547 
1548 registry_t registry_t::proxy_create_wrapper()
1549 {
1550  return {*this, construct_proxy_wrapper_tag()};
1551 }
1552 
1553 const std::string registry_t::interface_name = "wl_registry";
1554 
1555 registry_t::operator wl_registry*() const
1556 {
1557  return reinterpret_cast<wl_registry*> (c_ptr());
1558 }
1559 
1560 proxy_t registry_t::bind(uint32_t name, proxy_t &interface, uint32_t version)
1561 {
1562  proxy_t p = marshal_constructor_versioned(0u, interface.interface, version, name, std::string(interface.interface->name), version, nullptr);
1563  interface = interface.copy_constructor(p);
1564  return interface;
1565 }
1566 
1567 std::function<void(uint32_t, std::string, uint32_t)> &registry_t::on_global()
1568 {
1569  return std::static_pointer_cast<events_t>(get_events())->global;
1570 }
1571 
1572 std::function<void(uint32_t)> &registry_t::on_global_remove()
1573 {
1574  return std::static_pointer_cast<events_t>(get_events())->global_remove;
1575 }
1576 
1577 int registry_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
1578 {
1579  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1580  switch(opcode)
1581  {
1582  case 0:
1583  if(events->global) events->global(args[0].get<uint32_t>(), args[1].get<std::string>(), args[2].get<uint32_t>());
1584  break;
1585  case 1:
1586  if(events->global_remove) events->global_remove(args[0].get<uint32_t>());
1587  break;
1588  }
1589  return 0;
1590 }
1591 
1592 callback_t::callback_t(const proxy_t &p)
1593  : proxy_t(p)
1594 {
1596  {
1597  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1598  }
1599  interface = &callback_interface;
1600  copy_constructor = [] (const proxy_t &p) -> proxy_t
1601  { return callback_t(p); };
1602 }
1603 
1604 callback_t::callback_t()
1605 {
1606  interface = &callback_interface;
1607  copy_constructor = [] (const proxy_t &p) -> proxy_t
1608  { return callback_t(p); };
1609 }
1610 
1611 callback_t::callback_t(wl_callback *p, wrapper_type t)
1612  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1614  {
1615  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1616  }
1617  interface = &callback_interface;
1618  copy_constructor = [] (const proxy_t &p) -> proxy_t
1619  { return callback_t(p); };
1620 }
1621 
1622 callback_t::callback_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1623  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1624  interface = &callback_interface;
1625  copy_constructor = [] (const proxy_t &p) -> proxy_t
1626  { return callback_t(p); };
1627 }
1628 
1629 callback_t callback_t::proxy_create_wrapper()
1630 {
1631  return {*this, construct_proxy_wrapper_tag()};
1632 }
1633 
1634 const std::string callback_t::interface_name = "wl_callback";
1635 
1636 callback_t::operator wl_callback*() const
1637 {
1638  return reinterpret_cast<wl_callback*> (c_ptr());
1639 }
1640 
1641 std::function<void(uint32_t)> &callback_t::on_done()
1642 {
1643  return std::static_pointer_cast<events_t>(get_events())->done;
1644 }
1645 
1646 int callback_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
1647 {
1648  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1649  switch(opcode)
1650  {
1651  case 0:
1652  if(events->done) events->done(args[0].get<uint32_t>());
1653  break;
1654  }
1655  return 0;
1656 }
1657 
1658 compositor_t::compositor_t(const proxy_t &p)
1659  : proxy_t(p)
1660 {
1662  {
1663  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1664  }
1665  interface = &compositor_interface;
1666  copy_constructor = [] (const proxy_t &p) -> proxy_t
1667  { return compositor_t(p); };
1668 }
1669 
1670 compositor_t::compositor_t()
1671 {
1672  interface = &compositor_interface;
1673  copy_constructor = [] (const proxy_t &p) -> proxy_t
1674  { return compositor_t(p); };
1675 }
1676 
1677 compositor_t::compositor_t(wl_compositor *p, wrapper_type t)
1678  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1680  {
1681  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1682  }
1683  interface = &compositor_interface;
1684  copy_constructor = [] (const proxy_t &p) -> proxy_t
1685  { return compositor_t(p); };
1686 }
1687 
1688 compositor_t::compositor_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1689  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1690  interface = &compositor_interface;
1691  copy_constructor = [] (const proxy_t &p) -> proxy_t
1692  { return compositor_t(p); };
1693 }
1694 
1695 compositor_t compositor_t::proxy_create_wrapper()
1696 {
1697  return {*this, construct_proxy_wrapper_tag()};
1698 }
1699 
1700 const std::string compositor_t::interface_name = "wl_compositor";
1701 
1702 compositor_t::operator wl_compositor*() const
1703 {
1704  return reinterpret_cast<wl_compositor*> (c_ptr());
1705 }
1706 
1708 {
1709  proxy_t p = marshal_constructor(0u, &surface_interface, nullptr);
1710  return surface_t(p);
1711 }
1712 
1714 {
1715  proxy_t p = marshal_constructor(1u, &region_interface, nullptr);
1716  return region_t(p);
1717 }
1718 
1719 int compositor_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
1720 {
1721  return 0;
1722 }
1723 
1724 shm_pool_t::shm_pool_t(const proxy_t &p)
1725  : proxy_t(p)
1726 {
1728  {
1729  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1730  set_destroy_opcode(1u);
1731  }
1732  interface = &shm_pool_interface;
1733  copy_constructor = [] (const proxy_t &p) -> proxy_t
1734  { return shm_pool_t(p); };
1735 }
1736 
1737 shm_pool_t::shm_pool_t()
1738 {
1739  interface = &shm_pool_interface;
1740  copy_constructor = [] (const proxy_t &p) -> proxy_t
1741  { return shm_pool_t(p); };
1742 }
1743 
1744 shm_pool_t::shm_pool_t(wl_shm_pool *p, wrapper_type t)
1745  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1747  {
1748  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1749  set_destroy_opcode(1u);
1750  }
1751  interface = &shm_pool_interface;
1752  copy_constructor = [] (const proxy_t &p) -> proxy_t
1753  { return shm_pool_t(p); };
1754 }
1755 
1756 shm_pool_t::shm_pool_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1757  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1758  interface = &shm_pool_interface;
1759  copy_constructor = [] (const proxy_t &p) -> proxy_t
1760  { return shm_pool_t(p); };
1761 }
1762 
1763 shm_pool_t shm_pool_t::proxy_create_wrapper()
1764 {
1765  return {*this, construct_proxy_wrapper_tag()};
1766 }
1767 
1768 const std::string shm_pool_t::interface_name = "wl_shm_pool";
1769 
1770 shm_pool_t::operator wl_shm_pool*() const
1771 {
1772  return reinterpret_cast<wl_shm_pool*> (c_ptr());
1773 }
1774 
1775 buffer_t shm_pool_t::create_buffer(int32_t offset, int32_t width, int32_t height, int32_t stride, shm_format format)
1776 {
1777  proxy_t p = marshal_constructor(0u, &buffer_interface, nullptr, offset, width, height, stride, static_cast<uint32_t>(format));
1778  return buffer_t(p);
1779 }
1780 
1781 void shm_pool_t::resize(int32_t size)
1782 {
1783  marshal(2u, size);
1784 }
1785 
1786 int shm_pool_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
1787 {
1788  return 0;
1789 }
1790 
1791 shm_t::shm_t(const proxy_t &p)
1792  : proxy_t(p)
1793 {
1795  {
1796  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1797  }
1798  interface = &shm_interface;
1799  copy_constructor = [] (const proxy_t &p) -> proxy_t
1800  { return shm_t(p); };
1801 }
1802 
1803 shm_t::shm_t()
1804 {
1805  interface = &shm_interface;
1806  copy_constructor = [] (const proxy_t &p) -> proxy_t
1807  { return shm_t(p); };
1808 }
1809 
1810 shm_t::shm_t(wl_shm *p, wrapper_type t)
1811  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1813  {
1814  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1815  }
1816  interface = &shm_interface;
1817  copy_constructor = [] (const proxy_t &p) -> proxy_t
1818  { return shm_t(p); };
1819 }
1820 
1821 shm_t::shm_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1822  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1823  interface = &shm_interface;
1824  copy_constructor = [] (const proxy_t &p) -> proxy_t
1825  { return shm_t(p); };
1826 }
1827 
1828 shm_t shm_t::proxy_create_wrapper()
1829 {
1830  return {*this, construct_proxy_wrapper_tag()};
1831 }
1832 
1833 const std::string shm_t::interface_name = "wl_shm";
1834 
1835 shm_t::operator wl_shm*() const
1836 {
1837  return reinterpret_cast<wl_shm*> (c_ptr());
1838 }
1839 
1840 shm_pool_t shm_t::create_pool(int fd, int32_t size)
1841 {
1842  proxy_t p = marshal_constructor(0u, &shm_pool_interface, nullptr, argument_t::fd(fd), size);
1843  return shm_pool_t(p);
1844 }
1845 
1846 std::function<void(shm_format)> &shm_t::on_format()
1847 {
1848  return std::static_pointer_cast<events_t>(get_events())->format;
1849 }
1850 
1851 int shm_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
1852 {
1853  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1854  switch(opcode)
1855  {
1856  case 0:
1857  if(events->format) events->format(shm_format(args[0].get<uint32_t>()));
1858  break;
1859  }
1860  return 0;
1861 }
1862 
1863 
1864 
1865 buffer_t::buffer_t(const proxy_t &p)
1866  : proxy_t(p)
1867 {
1869  {
1870  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1871  set_destroy_opcode(0u);
1872  }
1873  interface = &buffer_interface;
1874  copy_constructor = [] (const proxy_t &p) -> proxy_t
1875  { return buffer_t(p); };
1876 }
1877 
1878 buffer_t::buffer_t()
1879 {
1880  interface = &buffer_interface;
1881  copy_constructor = [] (const proxy_t &p) -> proxy_t
1882  { return buffer_t(p); };
1883 }
1884 
1885 buffer_t::buffer_t(wl_buffer *p, wrapper_type t)
1886  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1888  {
1889  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1890  set_destroy_opcode(0u);
1891  }
1892  interface = &buffer_interface;
1893  copy_constructor = [] (const proxy_t &p) -> proxy_t
1894  { return buffer_t(p); };
1895 }
1896 
1897 buffer_t::buffer_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1898  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1899  interface = &buffer_interface;
1900  copy_constructor = [] (const proxy_t &p) -> proxy_t
1901  { return buffer_t(p); };
1902 }
1903 
1904 buffer_t buffer_t::proxy_create_wrapper()
1905 {
1906  return {*this, construct_proxy_wrapper_tag()};
1907 }
1908 
1909 const std::string buffer_t::interface_name = "wl_buffer";
1910 
1911 buffer_t::operator wl_buffer*() const
1912 {
1913  return reinterpret_cast<wl_buffer*> (c_ptr());
1914 }
1915 
1916 std::function<void()> &buffer_t::on_release()
1917 {
1918  return std::static_pointer_cast<events_t>(get_events())->release;
1919 }
1920 
1921 int buffer_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
1922 {
1923  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1924  switch(opcode)
1925  {
1926  case 0:
1927  if(events->release) events->release();
1928  break;
1929  }
1930  return 0;
1931 }
1932 
1933 data_offer_t::data_offer_t(const proxy_t &p)
1934  : proxy_t(p)
1935 {
1937  {
1938  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1939  set_destroy_opcode(2u);
1940  }
1941  interface = &data_offer_interface;
1942  copy_constructor = [] (const proxy_t &p) -> proxy_t
1943  { return data_offer_t(p); };
1944 }
1945 
1946 data_offer_t::data_offer_t()
1947 {
1948  interface = &data_offer_interface;
1949  copy_constructor = [] (const proxy_t &p) -> proxy_t
1950  { return data_offer_t(p); };
1951 }
1952 
1953 data_offer_t::data_offer_t(wl_data_offer *p, wrapper_type t)
1954  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1956  {
1957  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1958  set_destroy_opcode(2u);
1959  }
1960  interface = &data_offer_interface;
1961  copy_constructor = [] (const proxy_t &p) -> proxy_t
1962  { return data_offer_t(p); };
1963 }
1964 
1965 data_offer_t::data_offer_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1966  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1967  interface = &data_offer_interface;
1968  copy_constructor = [] (const proxy_t &p) -> proxy_t
1969  { return data_offer_t(p); };
1970 }
1971 
1972 data_offer_t data_offer_t::proxy_create_wrapper()
1973 {
1974  return {*this, construct_proxy_wrapper_tag()};
1975 }
1976 
1977 const std::string data_offer_t::interface_name = "wl_data_offer";
1978 
1979 data_offer_t::operator wl_data_offer*() const
1980 {
1981  return reinterpret_cast<wl_data_offer*> (c_ptr());
1982 }
1983 
1984 void data_offer_t::accept(uint32_t serial, std::string mime_type)
1985 {
1986  marshal(0u, serial, mime_type);
1987 }
1988 
1989 void data_offer_t::receive(std::string mime_type, int fd)
1990 {
1991  marshal(1u, mime_type, argument_t::fd(fd));
1992 }
1993 
1995 {
1996  marshal(3u);
1997 }
1999 {
2000  return (get_version() >= finish_since_version);
2001 }
2002 
2004 {
2005  marshal(4u, static_cast<uint32_t>(dnd_actions), static_cast<uint32_t>(preferred_action));
2006 }
2008 {
2009  return (get_version() >= set_actions_since_version);
2010 }
2011 
2012 std::function<void(std::string)> &data_offer_t::on_offer()
2013 {
2014  return std::static_pointer_cast<events_t>(get_events())->offer;
2015 }
2016 
2018 {
2019  return std::static_pointer_cast<events_t>(get_events())->source_actions;
2020 }
2021 
2023 {
2024  return std::static_pointer_cast<events_t>(get_events())->action;
2025 }
2026 
2027 int data_offer_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
2028 {
2029  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2030  switch(opcode)
2031  {
2032  case 0:
2033  if(events->offer) events->offer(args[0].get<std::string>());
2034  break;
2035  case 1:
2036  if(events->source_actions) events->source_actions(data_device_manager_dnd_action(args[0].get<uint32_t>()));
2037  break;
2038  case 2:
2039  if(events->action) events->action(data_device_manager_dnd_action(args[0].get<uint32_t>()));
2040  break;
2041  }
2042  return 0;
2043 }
2044 
2045 
2046 data_source_t::data_source_t(const proxy_t &p)
2047  : proxy_t(p)
2048 {
2050  {
2051  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2052  set_destroy_opcode(1u);
2053  }
2054  interface = &data_source_interface;
2055  copy_constructor = [] (const proxy_t &p) -> proxy_t
2056  { return data_source_t(p); };
2057 }
2058 
2059 data_source_t::data_source_t()
2060 {
2061  interface = &data_source_interface;
2062  copy_constructor = [] (const proxy_t &p) -> proxy_t
2063  { return data_source_t(p); };
2064 }
2065 
2066 data_source_t::data_source_t(wl_data_source *p, wrapper_type t)
2067  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2069  {
2070  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2071  set_destroy_opcode(1u);
2072  }
2073  interface = &data_source_interface;
2074  copy_constructor = [] (const proxy_t &p) -> proxy_t
2075  { return data_source_t(p); };
2076 }
2077 
2078 data_source_t::data_source_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
2079  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2080  interface = &data_source_interface;
2081  copy_constructor = [] (const proxy_t &p) -> proxy_t
2082  { return data_source_t(p); };
2083 }
2084 
2085 data_source_t data_source_t::proxy_create_wrapper()
2086 {
2087  return {*this, construct_proxy_wrapper_tag()};
2088 }
2089 
2090 const std::string data_source_t::interface_name = "wl_data_source";
2091 
2092 data_source_t::operator wl_data_source*() const
2093 {
2094  return reinterpret_cast<wl_data_source*> (c_ptr());
2095 }
2096 
2097 void data_source_t::offer(std::string mime_type)
2098 {
2099  marshal(0u, mime_type);
2100 }
2101 
2103 {
2104  marshal(2u, static_cast<uint32_t>(dnd_actions));
2105 }
2107 {
2108  return (get_version() >= set_actions_since_version);
2109 }
2110 
2111 std::function<void(std::string)> &data_source_t::on_target()
2112 {
2113  return std::static_pointer_cast<events_t>(get_events())->target;
2114 }
2115 
2116 std::function<void(std::string, int)> &data_source_t::on_send()
2117 {
2118  return std::static_pointer_cast<events_t>(get_events())->send;
2119 }
2120 
2121 std::function<void()> &data_source_t::on_cancelled()
2122 {
2123  return std::static_pointer_cast<events_t>(get_events())->cancelled;
2124 }
2125 
2127 {
2128  return std::static_pointer_cast<events_t>(get_events())->dnd_drop_performed;
2129 }
2130 
2131 std::function<void()> &data_source_t::on_dnd_finished()
2132 {
2133  return std::static_pointer_cast<events_t>(get_events())->dnd_finished;
2134 }
2135 
2137 {
2138  return std::static_pointer_cast<events_t>(get_events())->action;
2139 }
2140 
2141 int data_source_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
2142 {
2143  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2144  switch(opcode)
2145  {
2146  case 0:
2147  if(events->target) events->target(args[0].get<std::string>());
2148  break;
2149  case 1:
2150  if(events->send) events->send(args[0].get<std::string>(), args[1].get<int>());
2151  break;
2152  case 2:
2153  if(events->cancelled) events->cancelled();
2154  break;
2155  case 3:
2156  if(events->dnd_drop_performed) events->dnd_drop_performed();
2157  break;
2158  case 4:
2159  if(events->dnd_finished) events->dnd_finished();
2160  break;
2161  case 5:
2162  if(events->action) events->action(data_device_manager_dnd_action(args[0].get<uint32_t>()));
2163  break;
2164  }
2165  return 0;
2166 }
2167 
2168 
2169 data_device_t::data_device_t(const proxy_t &p)
2170  : proxy_t(p)
2171 {
2173  {
2174  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2175  }
2176  interface = &data_device_interface;
2177  copy_constructor = [] (const proxy_t &p) -> proxy_t
2178  { return data_device_t(p); };
2179 }
2180 
2181 data_device_t::data_device_t()
2182 {
2183  interface = &data_device_interface;
2184  copy_constructor = [] (const proxy_t &p) -> proxy_t
2185  { return data_device_t(p); };
2186 }
2187 
2188 data_device_t::data_device_t(wl_data_device *p, wrapper_type t)
2189  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2191  {
2192  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2193  }
2194  interface = &data_device_interface;
2195  copy_constructor = [] (const proxy_t &p) -> proxy_t
2196  { return data_device_t(p); };
2197 }
2198 
2199 data_device_t::data_device_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
2200  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2201  interface = &data_device_interface;
2202  copy_constructor = [] (const proxy_t &p) -> proxy_t
2203  { return data_device_t(p); };
2204 }
2205 
2206 data_device_t data_device_t::proxy_create_wrapper()
2207 {
2208  return {*this, construct_proxy_wrapper_tag()};
2209 }
2210 
2211 const std::string data_device_t::interface_name = "wl_data_device";
2212 
2213 data_device_t::operator wl_data_device*() const
2214 {
2215  return reinterpret_cast<wl_data_device*> (c_ptr());
2216 }
2217 
2218 void data_device_t::start_drag(data_source_t source, surface_t origin, surface_t icon, uint32_t serial)
2219 {
2220  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);
2221 }
2222 
2223 void data_device_t::set_selection(data_source_t source, uint32_t serial)
2224 {
2225  marshal(1u, source.proxy_has_object() ? reinterpret_cast<wl_object*>(source.c_ptr()) : nullptr, serial);
2226 }
2227 
2229 {
2230  marshal(2u);
2231 }
2233 {
2234  return (get_version() >= release_since_version);
2235 }
2236 
2238 {
2239  return std::static_pointer_cast<events_t>(get_events())->data_offer;
2240 }
2241 
2242 std::function<void(uint32_t, surface_t, double, double, data_offer_t)> &data_device_t::on_enter()
2243 {
2244  return std::static_pointer_cast<events_t>(get_events())->enter;
2245 }
2246 
2247 std::function<void()> &data_device_t::on_leave()
2248 {
2249  return std::static_pointer_cast<events_t>(get_events())->leave;
2250 }
2251 
2252 std::function<void(uint32_t, double, double)> &data_device_t::on_motion()
2253 {
2254  return std::static_pointer_cast<events_t>(get_events())->motion;
2255 }
2256 
2257 std::function<void()> &data_device_t::on_drop()
2258 {
2259  return std::static_pointer_cast<events_t>(get_events())->drop;
2260 }
2261 
2263 {
2264  return std::static_pointer_cast<events_t>(get_events())->selection;
2265 }
2266 
2267 int data_device_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
2268 {
2269  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2270  switch(opcode)
2271  {
2272  case 0:
2273  if(events->data_offer) events->data_offer(data_offer_t(args[0].get<proxy_t>()));
2274  break;
2275  case 1:
2276  if(events->enter) events->enter(args[0].get<uint32_t>(), surface_t(args[1].get<proxy_t>()), args[2].get<double>(), args[3].get<double>(), data_offer_t(args[4].get<proxy_t>()));
2277  break;
2278  case 2:
2279  if(events->leave) events->leave();
2280  break;
2281  case 3:
2282  if(events->motion) events->motion(args[0].get<uint32_t>(), args[1].get<double>(), args[2].get<double>());
2283  break;
2284  case 4:
2285  if(events->drop) events->drop();
2286  break;
2287  case 5:
2288  if(events->selection) events->selection(data_offer_t(args[0].get<proxy_t>()));
2289  break;
2290  }
2291  return 0;
2292 }
2293 
2294 
2295 data_device_manager_t::data_device_manager_t(const proxy_t &p)
2296  : proxy_t(p)
2297 {
2299  {
2300  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2301  }
2302  interface = &data_device_manager_interface;
2303  copy_constructor = [] (const proxy_t &p) -> proxy_t
2304  { return data_device_manager_t(p); };
2305 }
2306 
2307 data_device_manager_t::data_device_manager_t()
2308 {
2309  interface = &data_device_manager_interface;
2310  copy_constructor = [] (const proxy_t &p) -> proxy_t
2311  { return data_device_manager_t(p); };
2312 }
2313 
2314 data_device_manager_t::data_device_manager_t(wl_data_device_manager *p, wrapper_type t)
2315  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2317  {
2318  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2319  }
2320  interface = &data_device_manager_interface;
2321  copy_constructor = [] (const proxy_t &p) -> proxy_t
2322  { return data_device_manager_t(p); };
2323 }
2324 
2325 data_device_manager_t::data_device_manager_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
2326  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2327  interface = &data_device_manager_interface;
2328  copy_constructor = [] (const proxy_t &p) -> proxy_t
2329  { return data_device_manager_t(p); };
2330 }
2331 
2332 data_device_manager_t data_device_manager_t::proxy_create_wrapper()
2333 {
2334  return {*this, construct_proxy_wrapper_tag()};
2335 }
2336 
2337 const std::string data_device_manager_t::interface_name = "wl_data_device_manager";
2338 
2339 data_device_manager_t::operator wl_data_device_manager*() const
2340 {
2341  return reinterpret_cast<wl_data_device_manager*> (c_ptr());
2342 }
2343 
2345 {
2346  proxy_t p = marshal_constructor(0u, &data_source_interface, nullptr);
2347  return data_source_t(p);
2348 }
2349 
2351 {
2352  proxy_t p = marshal_constructor(1u, &data_device_interface, nullptr, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr);
2353  return data_device_t(p);
2354 }
2355 
2356 int data_device_manager_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
2357 {
2358  return 0;
2359 }
2360 const bitfield<3, 6> data_device_manager_dnd_action::none{0};
2361 const bitfield<3, 6> data_device_manager_dnd_action::copy{1};
2362 const bitfield<3, 6> data_device_manager_dnd_action::move{2};
2363 const bitfield<3, 6> data_device_manager_dnd_action::ask{4};
2364 
2365 
2366 shell_t::shell_t(const proxy_t &p)
2367  : proxy_t(p)
2368 {
2370  {
2371  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2372  }
2373  interface = &shell_interface;
2374  copy_constructor = [] (const proxy_t &p) -> proxy_t
2375  { return shell_t(p); };
2376 }
2377 
2378 shell_t::shell_t()
2379 {
2380  interface = &shell_interface;
2381  copy_constructor = [] (const proxy_t &p) -> proxy_t
2382  { return shell_t(p); };
2383 }
2384 
2385 shell_t::shell_t(wl_shell *p, wrapper_type t)
2386  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2388  {
2389  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2390  }
2391  interface = &shell_interface;
2392  copy_constructor = [] (const proxy_t &p) -> proxy_t
2393  { return shell_t(p); };
2394 }
2395 
2396 shell_t::shell_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
2397  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2398  interface = &shell_interface;
2399  copy_constructor = [] (const proxy_t &p) -> proxy_t
2400  { return shell_t(p); };
2401 }
2402 
2403 shell_t shell_t::proxy_create_wrapper()
2404 {
2405  return {*this, construct_proxy_wrapper_tag()};
2406 }
2407 
2408 const std::string shell_t::interface_name = "wl_shell";
2409 
2410 shell_t::operator wl_shell*() const
2411 {
2412  return reinterpret_cast<wl_shell*> (c_ptr());
2413 }
2414 
2416 {
2417  proxy_t p = marshal_constructor(0u, &shell_surface_interface, nullptr, surface.proxy_has_object() ? reinterpret_cast<wl_object*>(surface.c_ptr()) : nullptr);
2418  return shell_surface_t(p);
2419 }
2420 
2421 int shell_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
2422 {
2423  return 0;
2424 }
2425 
2426 
2427 shell_surface_t::shell_surface_t(const proxy_t &p)
2428  : proxy_t(p)
2429 {
2431  {
2432  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2433  }
2434  interface = &shell_surface_interface;
2435  copy_constructor = [] (const proxy_t &p) -> proxy_t
2436  { return shell_surface_t(p); };
2437 }
2438 
2439 shell_surface_t::shell_surface_t()
2440 {
2441  interface = &shell_surface_interface;
2442  copy_constructor = [] (const proxy_t &p) -> proxy_t
2443  { return shell_surface_t(p); };
2444 }
2445 
2446 shell_surface_t::shell_surface_t(wl_shell_surface *p, wrapper_type t)
2447  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2449  {
2450  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2451  }
2452  interface = &shell_surface_interface;
2453  copy_constructor = [] (const proxy_t &p) -> proxy_t
2454  { return shell_surface_t(p); };
2455 }
2456 
2457 shell_surface_t::shell_surface_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
2458  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2459  interface = &shell_surface_interface;
2460  copy_constructor = [] (const proxy_t &p) -> proxy_t
2461  { return shell_surface_t(p); };
2462 }
2463 
2464 shell_surface_t shell_surface_t::proxy_create_wrapper()
2465 {
2466  return {*this, construct_proxy_wrapper_tag()};
2467 }
2468 
2469 const std::string shell_surface_t::interface_name = "wl_shell_surface";
2470 
2471 shell_surface_t::operator wl_shell_surface*() const
2472 {
2473  return reinterpret_cast<wl_shell_surface*> (c_ptr());
2474 }
2475 
2476 void shell_surface_t::pong(uint32_t serial)
2477 {
2478  marshal(0u, serial);
2479 }
2480 
2481 void shell_surface_t::move(seat_t seat, uint32_t serial)
2482 {
2483  marshal(1u, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr, serial);
2484 }
2485 
2486 void shell_surface_t::resize(seat_t seat, uint32_t serial, shell_surface_resize edges)
2487 {
2488  marshal(2u, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr, serial, static_cast<uint32_t>(edges));
2489 }
2490 
2492 {
2493  marshal(3u);
2494 }
2495 
2496 void shell_surface_t::set_transient(surface_t parent, int32_t x, int32_t y, shell_surface_transient flags)
2497 {
2498  marshal(4u, parent.proxy_has_object() ? reinterpret_cast<wl_object*>(parent.c_ptr()) : nullptr, x, y, static_cast<uint32_t>(flags));
2499 }
2500 
2501 void shell_surface_t::set_fullscreen(shell_surface_fullscreen_method method, uint32_t framerate, output_t output)
2502 {
2503  marshal(5u, static_cast<uint32_t>(method), framerate, output.proxy_has_object() ? reinterpret_cast<wl_object*>(output.c_ptr()) : nullptr);
2504 }
2505 
2506 void shell_surface_t::set_popup(seat_t seat, uint32_t serial, surface_t parent, int32_t x, int32_t y, shell_surface_transient flags)
2507 {
2508  marshal(6u, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr, serial, parent.proxy_has_object() ? reinterpret_cast<wl_object*>(parent.c_ptr()) : nullptr, x, y, static_cast<uint32_t>(flags));
2509 }
2510 
2512 {
2513  marshal(7u, output.proxy_has_object() ? reinterpret_cast<wl_object*>(output.c_ptr()) : nullptr);
2514 }
2515 
2516 void shell_surface_t::set_title(std::string title)
2517 {
2518  marshal(8u, title);
2519 }
2520 
2521 void shell_surface_t::set_class(std::string class_)
2522 {
2523  marshal(9u, class_);
2524 }
2525 
2526 std::function<void(uint32_t)> &shell_surface_t::on_ping()
2527 {
2528  return std::static_pointer_cast<events_t>(get_events())->ping;
2529 }
2530 
2531 std::function<void(shell_surface_resize, int32_t, int32_t)> &shell_surface_t::on_configure()
2532 {
2533  return std::static_pointer_cast<events_t>(get_events())->configure;
2534 }
2535 
2536 std::function<void()> &shell_surface_t::on_popup_done()
2537 {
2538  return std::static_pointer_cast<events_t>(get_events())->popup_done;
2539 }
2540 
2541 int shell_surface_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
2542 {
2543  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2544  switch(opcode)
2545  {
2546  case 0:
2547  if(events->ping) events->ping(args[0].get<uint32_t>());
2548  break;
2549  case 1:
2550  if(events->configure) events->configure(shell_surface_resize(args[0].get<uint32_t>()), args[1].get<int32_t>(), args[2].get<int32_t>());
2551  break;
2552  case 2:
2553  if(events->popup_done) events->popup_done();
2554  break;
2555  }
2556  return 0;
2557 }
2558 const bitfield<4, 8> shell_surface_resize::none{0};
2559 const bitfield<4, 8> shell_surface_resize::top{1};
2560 const bitfield<4, 8> shell_surface_resize::bottom{2};
2561 const bitfield<4, 8> shell_surface_resize::left{4};
2562 const bitfield<4, 8> shell_surface_resize::top_left{5};
2563 const bitfield<4, 8> shell_surface_resize::bottom_left{6};
2564 const bitfield<4, 8> shell_surface_resize::right{8};
2565 const bitfield<4, 8> shell_surface_resize::top_right{9};
2566 const bitfield<4, 8> shell_surface_resize::bottom_right{10};
2567 
2568 const bitfield<1, 9> shell_surface_transient::inactive{0x1};
2569 
2570 
2571 
2572 surface_t::surface_t(const proxy_t &p)
2573  : proxy_t(p)
2574 {
2576  {
2577  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2578  set_destroy_opcode(0u);
2579  }
2580  interface = &surface_interface;
2581  copy_constructor = [] (const proxy_t &p) -> proxy_t
2582  { return surface_t(p); };
2583 }
2584 
2585 surface_t::surface_t()
2586 {
2587  interface = &surface_interface;
2588  copy_constructor = [] (const proxy_t &p) -> proxy_t
2589  { return surface_t(p); };
2590 }
2591 
2592 surface_t::surface_t(wl_surface *p, wrapper_type t)
2593  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2595  {
2596  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2597  set_destroy_opcode(0u);
2598  }
2599  interface = &surface_interface;
2600  copy_constructor = [] (const proxy_t &p) -> proxy_t
2601  { return surface_t(p); };
2602 }
2603 
2604 surface_t::surface_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
2605  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2606  interface = &surface_interface;
2607  copy_constructor = [] (const proxy_t &p) -> proxy_t
2608  { return surface_t(p); };
2609 }
2610 
2611 surface_t surface_t::proxy_create_wrapper()
2612 {
2613  return {*this, construct_proxy_wrapper_tag()};
2614 }
2615 
2616 const std::string surface_t::interface_name = "wl_surface";
2617 
2618 surface_t::operator wl_surface*() const
2619 {
2620  return reinterpret_cast<wl_surface*> (c_ptr());
2621 }
2622 
2623 void surface_t::attach(buffer_t buffer, int32_t x, int32_t y)
2624 {
2625  marshal(1u, buffer.proxy_has_object() ? reinterpret_cast<wl_object*>(buffer.c_ptr()) : nullptr, x, y);
2626 }
2627 
2628 void surface_t::damage(int32_t x, int32_t y, int32_t width, int32_t height)
2629 {
2630  marshal(2u, x, y, width, height);
2631 }
2632 
2634 {
2635  proxy_t p = marshal_constructor(3u, &callback_interface, nullptr);
2636  return callback_t(p);
2637 }
2638 
2640 {
2641  marshal(4u, region.proxy_has_object() ? reinterpret_cast<wl_object*>(region.c_ptr()) : nullptr);
2642 }
2643 
2645 {
2646  marshal(5u, region.proxy_has_object() ? reinterpret_cast<wl_object*>(region.c_ptr()) : nullptr);
2647 }
2648 
2650 {
2651  marshal(6u);
2652 }
2653 
2655 {
2656  marshal(7u, static_cast<int32_t>(transform));
2657 }
2659 {
2661 }
2662 
2663 void surface_t::set_buffer_scale(int32_t scale)
2664 {
2665  marshal(8u, scale);
2666 }
2668 {
2670 }
2671 
2672 void surface_t::damage_buffer(int32_t x, int32_t y, int32_t width, int32_t height)
2673 {
2674  marshal(9u, x, y, width, height);
2675 }
2677 {
2679 }
2680 
2681 std::function<void(output_t)> &surface_t::on_enter()
2682 {
2683  return std::static_pointer_cast<events_t>(get_events())->enter;
2684 }
2685 
2686 std::function<void(output_t)> &surface_t::on_leave()
2687 {
2688  return std::static_pointer_cast<events_t>(get_events())->leave;
2689 }
2690 
2691 int surface_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
2692 {
2693  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2694  switch(opcode)
2695  {
2696  case 0:
2697  if(events->enter) events->enter(output_t(args[0].get<proxy_t>()));
2698  break;
2699  case 1:
2700  if(events->leave) events->leave(output_t(args[0].get<proxy_t>()));
2701  break;
2702  }
2703  return 0;
2704 }
2705 
2706 
2707 seat_t::seat_t(const proxy_t &p)
2708  : proxy_t(p)
2709 {
2711  {
2712  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2713  }
2714  interface = &seat_interface;
2715  copy_constructor = [] (const proxy_t &p) -> proxy_t
2716  { return seat_t(p); };
2717 }
2718 
2719 seat_t::seat_t()
2720 {
2721  interface = &seat_interface;
2722  copy_constructor = [] (const proxy_t &p) -> proxy_t
2723  { return seat_t(p); };
2724 }
2725 
2726 seat_t::seat_t(wl_seat *p, wrapper_type t)
2727  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2729  {
2730  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2731  }
2732  interface = &seat_interface;
2733  copy_constructor = [] (const proxy_t &p) -> proxy_t
2734  { return seat_t(p); };
2735 }
2736 
2737 seat_t::seat_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
2738  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2739  interface = &seat_interface;
2740  copy_constructor = [] (const proxy_t &p) -> proxy_t
2741  { return seat_t(p); };
2742 }
2743 
2744 seat_t seat_t::proxy_create_wrapper()
2745 {
2746  return {*this, construct_proxy_wrapper_tag()};
2747 }
2748 
2749 const std::string seat_t::interface_name = "wl_seat";
2750 
2751 seat_t::operator wl_seat*() const
2752 {
2753  return reinterpret_cast<wl_seat*> (c_ptr());
2754 }
2755 
2757 {
2758  proxy_t p = marshal_constructor(0u, &pointer_interface, nullptr);
2759  return pointer_t(p);
2760 }
2761 
2763 {
2764  proxy_t p = marshal_constructor(1u, &keyboard_interface, nullptr);
2765  return keyboard_t(p);
2766 }
2767 
2769 {
2770  proxy_t p = marshal_constructor(2u, &touch_interface, nullptr);
2771  return touch_t(p);
2772 }
2773 
2775 {
2776  marshal(3u);
2777 }
2779 {
2780  return (get_version() >= release_since_version);
2781 }
2782 
2784 {
2785  return std::static_pointer_cast<events_t>(get_events())->capabilities;
2786 }
2787 
2788 std::function<void(std::string)> &seat_t::on_name()
2789 {
2790  return std::static_pointer_cast<events_t>(get_events())->name;
2791 }
2792 
2793 int seat_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
2794 {
2795  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2796  switch(opcode)
2797  {
2798  case 0:
2799  if(events->capabilities) events->capabilities(seat_capability(args[0].get<uint32_t>()));
2800  break;
2801  case 1:
2802  if(events->name) events->name(args[0].get<std::string>());
2803  break;
2804  }
2805  return 0;
2806 }
2807 const bitfield<3, 12> seat_capability::pointer{1};
2808 const bitfield<3, 12> seat_capability::keyboard{2};
2809 const bitfield<3, 12> seat_capability::touch{4};
2810 
2811 
2812 pointer_t::pointer_t(const proxy_t &p)
2813  : proxy_t(p)
2814 {
2816  {
2817  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2818  }
2819  interface = &pointer_interface;
2820  copy_constructor = [] (const proxy_t &p) -> proxy_t
2821  { return pointer_t(p); };
2822 }
2823 
2824 pointer_t::pointer_t()
2825 {
2826  interface = &pointer_interface;
2827  copy_constructor = [] (const proxy_t &p) -> proxy_t
2828  { return pointer_t(p); };
2829 }
2830 
2831 pointer_t::pointer_t(wl_pointer *p, wrapper_type t)
2832  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2834  {
2835  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2836  }
2837  interface = &pointer_interface;
2838  copy_constructor = [] (const proxy_t &p) -> proxy_t
2839  { return pointer_t(p); };
2840 }
2841 
2842 pointer_t::pointer_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
2843  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2844  interface = &pointer_interface;
2845  copy_constructor = [] (const proxy_t &p) -> proxy_t
2846  { return pointer_t(p); };
2847 }
2848 
2849 pointer_t pointer_t::proxy_create_wrapper()
2850 {
2851  return {*this, construct_proxy_wrapper_tag()};
2852 }
2853 
2854 const std::string pointer_t::interface_name = "wl_pointer";
2855 
2856 pointer_t::operator wl_pointer*() const
2857 {
2858  return reinterpret_cast<wl_pointer*> (c_ptr());
2859 }
2860 
2861 void pointer_t::set_cursor(uint32_t serial, surface_t surface, int32_t hotspot_x, int32_t hotspot_y)
2862 {
2863  marshal(0u, serial, surface.proxy_has_object() ? reinterpret_cast<wl_object*>(surface.c_ptr()) : nullptr, hotspot_x, hotspot_y);
2864 }
2865 
2867 {
2868  marshal(1u);
2869 }
2871 {
2872  return (get_version() >= release_since_version);
2873 }
2874 
2875 std::function<void(uint32_t, surface_t, double, double)> &pointer_t::on_enter()
2876 {
2877  return std::static_pointer_cast<events_t>(get_events())->enter;
2878 }
2879 
2880 std::function<void(uint32_t, surface_t)> &pointer_t::on_leave()
2881 {
2882  return std::static_pointer_cast<events_t>(get_events())->leave;
2883 }
2884 
2885 std::function<void(uint32_t, double, double)> &pointer_t::on_motion()
2886 {
2887  return std::static_pointer_cast<events_t>(get_events())->motion;
2888 }
2889 
2890 std::function<void(uint32_t, uint32_t, uint32_t, pointer_button_state)> &pointer_t::on_button()
2891 {
2892  return std::static_pointer_cast<events_t>(get_events())->button;
2893 }
2894 
2895 std::function<void(uint32_t, pointer_axis, double)> &pointer_t::on_axis()
2896 {
2897  return std::static_pointer_cast<events_t>(get_events())->axis;
2898 }
2899 
2900 std::function<void()> &pointer_t::on_frame()
2901 {
2902  return std::static_pointer_cast<events_t>(get_events())->frame;
2903 }
2904 
2905 std::function<void(pointer_axis_source)> &pointer_t::on_axis_source()
2906 {
2907  return std::static_pointer_cast<events_t>(get_events())->axis_source;
2908 }
2909 
2910 std::function<void(uint32_t, pointer_axis)> &pointer_t::on_axis_stop()
2911 {
2912  return std::static_pointer_cast<events_t>(get_events())->axis_stop;
2913 }
2914 
2915 std::function<void(pointer_axis, int32_t)> &pointer_t::on_axis_discrete()
2916 {
2917  return std::static_pointer_cast<events_t>(get_events())->axis_discrete;
2918 }
2919 
2920 int pointer_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
2921 {
2922  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
2923  switch(opcode)
2924  {
2925  case 0:
2926  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>());
2927  break;
2928  case 1:
2929  if(events->leave) events->leave(args[0].get<uint32_t>(), surface_t(args[1].get<proxy_t>()));
2930  break;
2931  case 2:
2932  if(events->motion) events->motion(args[0].get<uint32_t>(), args[1].get<double>(), args[2].get<double>());
2933  break;
2934  case 3:
2935  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>()));
2936  break;
2937  case 4:
2938  if(events->axis) events->axis(args[0].get<uint32_t>(), pointer_axis(args[1].get<uint32_t>()), args[2].get<double>());
2939  break;
2940  case 5:
2941  if(events->frame) events->frame();
2942  break;
2943  case 6:
2944  if(events->axis_source) events->axis_source(pointer_axis_source(args[0].get<uint32_t>()));
2945  break;
2946  case 7:
2947  if(events->axis_stop) events->axis_stop(args[0].get<uint32_t>(), pointer_axis(args[1].get<uint32_t>()));
2948  break;
2949  case 8:
2950  if(events->axis_discrete) events->axis_discrete(pointer_axis(args[0].get<uint32_t>()), args[1].get<int32_t>());
2951  break;
2952  }
2953  return 0;
2954 }
2955 
2956 
2957 
2958 
2959 
2960 keyboard_t::keyboard_t(const proxy_t &p)
2961  : proxy_t(p)
2962 {
2964  {
2965  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2966  }
2967  interface = &keyboard_interface;
2968  copy_constructor = [] (const proxy_t &p) -> proxy_t
2969  { return keyboard_t(p); };
2970 }
2971 
2972 keyboard_t::keyboard_t()
2973 {
2974  interface = &keyboard_interface;
2975  copy_constructor = [] (const proxy_t &p) -> proxy_t
2976  { return keyboard_t(p); };
2977 }
2978 
2979 keyboard_t::keyboard_t(wl_keyboard *p, wrapper_type t)
2980  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
2982  {
2983  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
2984  }
2985  interface = &keyboard_interface;
2986  copy_constructor = [] (const proxy_t &p) -> proxy_t
2987  { return keyboard_t(p); };
2988 }
2989 
2990 keyboard_t::keyboard_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
2991  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
2992  interface = &keyboard_interface;
2993  copy_constructor = [] (const proxy_t &p) -> proxy_t
2994  { return keyboard_t(p); };
2995 }
2996 
2997 keyboard_t keyboard_t::proxy_create_wrapper()
2998 {
2999  return {*this, construct_proxy_wrapper_tag()};
3000 }
3001 
3002 const std::string keyboard_t::interface_name = "wl_keyboard";
3003 
3004 keyboard_t::operator wl_keyboard*() const
3005 {
3006  return reinterpret_cast<wl_keyboard*> (c_ptr());
3007 }
3008 
3010 {
3011  marshal(0u);
3012 }
3014 {
3015  return (get_version() >= release_since_version);
3016 }
3017 
3018 std::function<void(keyboard_keymap_format, int, uint32_t)> &keyboard_t::on_keymap()
3019 {
3020  return std::static_pointer_cast<events_t>(get_events())->keymap;
3021 }
3022 
3023 std::function<void(uint32_t, surface_t, array_t)> &keyboard_t::on_enter()
3024 {
3025  return std::static_pointer_cast<events_t>(get_events())->enter;
3026 }
3027 
3028 std::function<void(uint32_t, surface_t)> &keyboard_t::on_leave()
3029 {
3030  return std::static_pointer_cast<events_t>(get_events())->leave;
3031 }
3032 
3033 std::function<void(uint32_t, uint32_t, uint32_t, keyboard_key_state)> &keyboard_t::on_key()
3034 {
3035  return std::static_pointer_cast<events_t>(get_events())->key;
3036 }
3037 
3038 std::function<void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)> &keyboard_t::on_modifiers()
3039 {
3040  return std::static_pointer_cast<events_t>(get_events())->modifiers;
3041 }
3042 
3043 std::function<void(int32_t, int32_t)> &keyboard_t::on_repeat_info()
3044 {
3045  return std::static_pointer_cast<events_t>(get_events())->repeat_info;
3046 }
3047 
3048 int keyboard_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
3049 {
3050  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
3051  switch(opcode)
3052  {
3053  case 0:
3054  if(events->keymap) events->keymap(keyboard_keymap_format(args[0].get<uint32_t>()), args[1].get<int>(), args[2].get<uint32_t>());
3055  break;
3056  case 1:
3057  if(events->enter) events->enter(args[0].get<uint32_t>(), surface_t(args[1].get<proxy_t>()), args[2].get<array_t>());
3058  break;
3059  case 2:
3060  if(events->leave) events->leave(args[0].get<uint32_t>(), surface_t(args[1].get<proxy_t>()));
3061  break;
3062  case 3:
3063  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>()));
3064  break;
3065  case 4:
3066  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>());
3067  break;
3068  case 5:
3069  if(events->repeat_info) events->repeat_info(args[0].get<int32_t>(), args[1].get<int32_t>());
3070  break;
3071  }
3072  return 0;
3073 }
3074 
3075 
3076 
3077 touch_t::touch_t(const proxy_t &p)
3078  : proxy_t(p)
3079 {
3081  {
3082  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3083  }
3084  interface = &touch_interface;
3085  copy_constructor = [] (const proxy_t &p) -> proxy_t
3086  { return touch_t(p); };
3087 }
3088 
3089 touch_t::touch_t()
3090 {
3091  interface = &touch_interface;
3092  copy_constructor = [] (const proxy_t &p) -> proxy_t
3093  { return touch_t(p); };
3094 }
3095 
3096 touch_t::touch_t(wl_touch *p, wrapper_type t)
3097  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3099  {
3100  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3101  }
3102  interface = &touch_interface;
3103  copy_constructor = [] (const proxy_t &p) -> proxy_t
3104  { return touch_t(p); };
3105 }
3106 
3107 touch_t::touch_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
3108  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
3109  interface = &touch_interface;
3110  copy_constructor = [] (const proxy_t &p) -> proxy_t
3111  { return touch_t(p); };
3112 }
3113 
3114 touch_t touch_t::proxy_create_wrapper()
3115 {
3116  return {*this, construct_proxy_wrapper_tag()};
3117 }
3118 
3119 const std::string touch_t::interface_name = "wl_touch";
3120 
3121 touch_t::operator wl_touch*() const
3122 {
3123  return reinterpret_cast<wl_touch*> (c_ptr());
3124 }
3125 
3127 {
3128  marshal(0u);
3129 }
3131 {
3132  return (get_version() >= release_since_version);
3133 }
3134 
3135 std::function<void(uint32_t, uint32_t, surface_t, int32_t, double, double)> &touch_t::on_down()
3136 {
3137  return std::static_pointer_cast<events_t>(get_events())->down;
3138 }
3139 
3140 std::function<void(uint32_t, uint32_t, int32_t)> &touch_t::on_up()
3141 {
3142  return std::static_pointer_cast<events_t>(get_events())->up;
3143 }
3144 
3145 std::function<void(uint32_t, int32_t, double, double)> &touch_t::on_motion()
3146 {
3147  return std::static_pointer_cast<events_t>(get_events())->motion;
3148 }
3149 
3150 std::function<void()> &touch_t::on_frame()
3151 {
3152  return std::static_pointer_cast<events_t>(get_events())->frame;
3153 }
3154 
3155 std::function<void()> &touch_t::on_cancel()
3156 {
3157  return std::static_pointer_cast<events_t>(get_events())->cancel;
3158 }
3159 
3160 std::function<void(int32_t, double, double)> &touch_t::on_shape()
3161 {
3162  return std::static_pointer_cast<events_t>(get_events())->shape;
3163 }
3164 
3165 std::function<void(int32_t, double)> &touch_t::on_orientation()
3166 {
3167  return std::static_pointer_cast<events_t>(get_events())->orientation;
3168 }
3169 
3170 int touch_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
3171 {
3172  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
3173  switch(opcode)
3174  {
3175  case 0:
3176  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>());
3177  break;
3178  case 1:
3179  if(events->up) events->up(args[0].get<uint32_t>(), args[1].get<uint32_t>(), args[2].get<int32_t>());
3180  break;
3181  case 2:
3182  if(events->motion) events->motion(args[0].get<uint32_t>(), args[1].get<int32_t>(), args[2].get<double>(), args[3].get<double>());
3183  break;
3184  case 3:
3185  if(events->frame) events->frame();
3186  break;
3187  case 4:
3188  if(events->cancel) events->cancel();
3189  break;
3190  case 5:
3191  if(events->shape) events->shape(args[0].get<int32_t>(), args[1].get<double>(), args[2].get<double>());
3192  break;
3193  case 6:
3194  if(events->orientation) events->orientation(args[0].get<int32_t>(), args[1].get<double>());
3195  break;
3196  }
3197  return 0;
3198 }
3199 
3200 output_t::output_t(const proxy_t &p)
3201  : proxy_t(p)
3202 {
3204  {
3205  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3206  }
3207  interface = &output_interface;
3208  copy_constructor = [] (const proxy_t &p) -> proxy_t
3209  { return output_t(p); };
3210 }
3211 
3212 output_t::output_t()
3213 {
3214  interface = &output_interface;
3215  copy_constructor = [] (const proxy_t &p) -> proxy_t
3216  { return output_t(p); };
3217 }
3218 
3219 output_t::output_t(wl_output *p, wrapper_type t)
3220  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3222  {
3223  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3224  }
3225  interface = &output_interface;
3226  copy_constructor = [] (const proxy_t &p) -> proxy_t
3227  { return output_t(p); };
3228 }
3229 
3230 output_t::output_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
3231  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
3232  interface = &output_interface;
3233  copy_constructor = [] (const proxy_t &p) -> proxy_t
3234  { return output_t(p); };
3235 }
3236 
3237 output_t output_t::proxy_create_wrapper()
3238 {
3239  return {*this, construct_proxy_wrapper_tag()};
3240 }
3241 
3242 const std::string output_t::interface_name = "wl_output";
3243 
3244 output_t::operator wl_output*() const
3245 {
3246  return reinterpret_cast<wl_output*> (c_ptr());
3247 }
3248 
3250 {
3251  marshal(0u);
3252 }
3254 {
3255  return (get_version() >= release_since_version);
3256 }
3257 
3258 std::function<void(int32_t, int32_t, int32_t, int32_t, output_subpixel, std::string, std::string, output_transform)> &output_t::on_geometry()
3259 {
3260  return std::static_pointer_cast<events_t>(get_events())->geometry;
3261 }
3262 
3263 std::function<void(output_mode, int32_t, int32_t, int32_t)> &output_t::on_mode()
3264 {
3265  return std::static_pointer_cast<events_t>(get_events())->mode;
3266 }
3267 
3268 std::function<void()> &output_t::on_done()
3269 {
3270  return std::static_pointer_cast<events_t>(get_events())->done;
3271 }
3272 
3273 std::function<void(int32_t)> &output_t::on_scale()
3274 {
3275  return std::static_pointer_cast<events_t>(get_events())->scale;
3276 }
3277 
3278 int output_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
3279 {
3280  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
3281  switch(opcode)
3282  {
3283  case 0:
3284  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>()));
3285  break;
3286  case 1:
3287  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>());
3288  break;
3289  case 2:
3290  if(events->done) events->done();
3291  break;
3292  case 3:
3293  if(events->scale) events->scale(args[0].get<int32_t>());
3294  break;
3295  }
3296  return 0;
3297 }
3298 
3299 const bitfield<3, 20> output_transform::normal{0};
3300 const bitfield<3, 20> output_transform::_90{1};
3301 const bitfield<3, 20> output_transform::_180{2};
3302 const bitfield<3, 20> output_transform::_270{3};
3303 const bitfield<3, 20> output_transform::flipped{4};
3304 const bitfield<3, 20> output_transform::flipped_90{5};
3305 const bitfield<3, 20> output_transform::flipped_180{6};
3306 const bitfield<3, 20> output_transform::flipped_270{7};
3307 
3308 const bitfield<2, 21> output_mode::current{0x1};
3309 const bitfield<2, 21> output_mode::preferred{0x2};
3310 
3311 
3312 region_t::region_t(const proxy_t &p)
3313  : proxy_t(p)
3314 {
3316  {
3317  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3318  set_destroy_opcode(0u);
3319  }
3320  interface = &region_interface;
3321  copy_constructor = [] (const proxy_t &p) -> proxy_t
3322  { return region_t(p); };
3323 }
3324 
3325 region_t::region_t()
3326 {
3327  interface = &region_interface;
3328  copy_constructor = [] (const proxy_t &p) -> proxy_t
3329  { return region_t(p); };
3330 }
3331 
3332 region_t::region_t(wl_region *p, wrapper_type t)
3333  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3335  {
3336  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3337  set_destroy_opcode(0u);
3338  }
3339  interface = &region_interface;
3340  copy_constructor = [] (const proxy_t &p) -> proxy_t
3341  { return region_t(p); };
3342 }
3343 
3344 region_t::region_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
3345  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
3346  interface = &region_interface;
3347  copy_constructor = [] (const proxy_t &p) -> proxy_t
3348  { return region_t(p); };
3349 }
3350 
3351 region_t region_t::proxy_create_wrapper()
3352 {
3353  return {*this, construct_proxy_wrapper_tag()};
3354 }
3355 
3356 const std::string region_t::interface_name = "wl_region";
3357 
3358 region_t::operator wl_region*() const
3359 {
3360  return reinterpret_cast<wl_region*> (c_ptr());
3361 }
3362 
3363 void region_t::add(int32_t x, int32_t y, int32_t width, int32_t height)
3364 {
3365  marshal(1u, x, y, width, height);
3366 }
3367 
3368 void region_t::subtract(int32_t x, int32_t y, int32_t width, int32_t height)
3369 {
3370  marshal(2u, x, y, width, height);
3371 }
3372 
3373 int region_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
3374 {
3375  return 0;
3376 }
3377 
3378 subcompositor_t::subcompositor_t(const proxy_t &p)
3379  : proxy_t(p)
3380 {
3382  {
3383  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3384  set_destroy_opcode(0u);
3385  }
3386  interface = &subcompositor_interface;
3387  copy_constructor = [] (const proxy_t &p) -> proxy_t
3388  { return subcompositor_t(p); };
3389 }
3390 
3391 subcompositor_t::subcompositor_t()
3392 {
3393  interface = &subcompositor_interface;
3394  copy_constructor = [] (const proxy_t &p) -> proxy_t
3395  { return subcompositor_t(p); };
3396 }
3397 
3398 subcompositor_t::subcompositor_t(wl_subcompositor *p, wrapper_type t)
3399  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3401  {
3402  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3403  set_destroy_opcode(0u);
3404  }
3405  interface = &subcompositor_interface;
3406  copy_constructor = [] (const proxy_t &p) -> proxy_t
3407  { return subcompositor_t(p); };
3408 }
3409 
3410 subcompositor_t::subcompositor_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
3411  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
3412  interface = &subcompositor_interface;
3413  copy_constructor = [] (const proxy_t &p) -> proxy_t
3414  { return subcompositor_t(p); };
3415 }
3416 
3417 subcompositor_t subcompositor_t::proxy_create_wrapper()
3418 {
3419  return {*this, construct_proxy_wrapper_tag()};
3420 }
3421 
3422 const std::string subcompositor_t::interface_name = "wl_subcompositor";
3423 
3424 subcompositor_t::operator wl_subcompositor*() const
3425 {
3426  return reinterpret_cast<wl_subcompositor*> (c_ptr());
3427 }
3428 
3430 {
3431  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);
3432  return subsurface_t(p);
3433 }
3434 
3435 int subcompositor_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
3436 {
3437  return 0;
3438 }
3439 
3440 
3441 subsurface_t::subsurface_t(const proxy_t &p)
3442  : proxy_t(p)
3443 {
3445  {
3446  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3447  set_destroy_opcode(0u);
3448  }
3449  interface = &subsurface_interface;
3450  copy_constructor = [] (const proxy_t &p) -> proxy_t
3451  { return subsurface_t(p); };
3452 }
3453 
3454 subsurface_t::subsurface_t()
3455 {
3456  interface = &subsurface_interface;
3457  copy_constructor = [] (const proxy_t &p) -> proxy_t
3458  { return subsurface_t(p); };
3459 }
3460 
3461 subsurface_t::subsurface_t(wl_subsurface *p, wrapper_type t)
3462  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
3464  {
3465  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
3466  set_destroy_opcode(0u);
3467  }
3468  interface = &subsurface_interface;
3469  copy_constructor = [] (const proxy_t &p) -> proxy_t
3470  { return subsurface_t(p); };
3471 }
3472 
3473 subsurface_t::subsurface_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
3474  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
3475  interface = &subsurface_interface;
3476  copy_constructor = [] (const proxy_t &p) -> proxy_t
3477  { return subsurface_t(p); };
3478 }
3479 
3480 subsurface_t subsurface_t::proxy_create_wrapper()
3481 {
3482  return {*this, construct_proxy_wrapper_tag()};
3483 }
3484 
3485 const std::string subsurface_t::interface_name = "wl_subsurface";
3486 
3487 subsurface_t::operator wl_subsurface*() const
3488 {
3489  return reinterpret_cast<wl_subsurface*> (c_ptr());
3490 }
3491 
3492 void subsurface_t::set_position(int32_t x, int32_t y)
3493 {
3494  marshal(1u, x, y);
3495 }
3496 
3498 {
3499  marshal(2u, sibling.proxy_has_object() ? reinterpret_cast<wl_object*>(sibling.c_ptr()) : nullptr);
3500 }
3501 
3503 {
3504  marshal(3u, sibling.proxy_has_object() ? reinterpret_cast<wl_object*>(sibling.c_ptr()) : nullptr);
3505 }
3506 
3508 {
3509  marshal(4u);
3510 }
3511 
3513 {
3514  marshal(5u);
3515 }
3516 
3517 int subsurface_t::dispatcher(uint32_t opcode, std::vector<any> args, std::shared_ptr<detail::events_base_t> e)
3518 {
3519  return 0;
3520 }
3521 
3522 
3523 
wayland::seat_t::get_touch
touch_t get_touch()
return touch object
Definition: wayland-client-protocol.cpp:2768
wayland::shell_surface_transient
details of transient behaviour
Definition: wayland-client-protocol.hpp:1823
wayland::shell_surface_resize::top
static const detail::bitfield< 4, 8 > top
top edge
Definition: wayland-client-protocol.hpp:1800
wayland::data_device_manager_dnd_action::ask
static const detail::bitfield< 3, 6 > ask
ask action
Definition: wayland-client-protocol.hpp:1403
wayland::surface_t::set_buffer_transform
void set_buffer_transform(output_transform transform)
sets the buffer transformation
Definition: wayland-client-protocol.cpp:2654
wayland::subcompositor_t
sub-surface compositing
Definition: wayland-client-protocol.hpp:3560
wayland::surface_t::frame
callback_t frame()
request a frame throttling hint
Definition: wayland-client-protocol.cpp:2633
wayland::subsurface_t::set_desync
void set_desync()
set sub-surface to desynchronized mode
Definition: wayland-client-protocol.cpp:3512
wayland::pointer_t::release
void release()
release the pointer object
Definition: wayland-client-protocol.cpp:2866
wayland::proxy_t::get_wrapper_type
wrapper_type get_wrapper_type() const
Get the type of a proxy object.
Definition: wayland-client.hpp:288
wayland::shm_t::on_format
std::function< void(shm_format)> & on_format()
pixel format description
Definition: wayland-client-protocol.cpp:1846
wayland::shell_surface_t::set_popup
void set_popup(seat_t seat, uint32_t serial, surface_t parent, int32_t x, int32_t y, shell_surface_transient flags)
make the surface a popup surface
Definition: wayland-client-protocol.cpp:2506
wayland::pointer_t::on_button
std::function< void(uint32_t, uint32_t, uint32_t, pointer_button_state)> & on_button()
pointer button event
Definition: wayland-client-protocol.cpp:2890
wayland::data_source_t::on_dnd_drop_performed
std::function< void()> & on_dnd_drop_performed()
the drag-and-drop operation physically finished
Definition: wayland-client-protocol.cpp:2126
wayland::proxy_t::wrapper_type::standard
wayland::output_transform::flipped_90
static const detail::bitfield< 3, 20 > flipped_90
flip and rotate 90 degrees counter-clockwise
Definition: wayland-client-protocol.hpp:3448
wayland::data_device_manager_dnd_action::move
static const detail::bitfield< 3, 6 > move
move action
Definition: wayland-client-protocol.hpp:1401
wayland::shell_surface_resize::left
static const detail::bitfield< 4, 8 > left
left edge
Definition: wayland-client-protocol.hpp:1804
wayland::surface_t::damage_buffer_since_version
static constexpr std::uint32_t damage_buffer_since_version
Minimum protocol version required for the damage_buffer function.
Definition: wayland-client-protocol.hpp:2281
wayland::output_t::release
void release()
release the output object
Definition: wayland-client-protocol.cpp:3249
wayland::pointer_t::on_enter
std::function< void(uint32_t, surface_t, double, double)> & on_enter()
enter event
Definition: wayland-client-protocol.cpp:2875
wayland::shm_t::create_pool
shm_pool_t create_pool(int fd, int32_t size)
create a shm pool
Definition: wayland-client-protocol.cpp:1840
wayland::data_device_manager_dnd_action
drag and drop actions
Definition: wayland-client-protocol.hpp:1390
wayland::data_offer_t::can_finish
bool can_finish() const
Check whether the finish function is available with the currently bound version of the protocol.
Definition: wayland-client-protocol.cpp:1998
wayland::data_device_t::start_drag
void start_drag(data_source_t source, surface_t origin, surface_t icon, uint32_t serial)
start drag-and-drop operation
Definition: wayland-client-protocol.cpp:2218
wayland::keyboard_t::on_enter
std::function< void(uint32_t, surface_t, array_t)> & on_enter()
enter event
Definition: wayland-client-protocol.cpp:3023
wayland::data_device_t::can_release
bool can_release() const
Check whether the release function is available with the currently bound version of the protocol.
Definition: wayland-client-protocol.cpp:2232
wayland::shell_surface_resize::top_left
static const detail::bitfield< 4, 8 > top_left
top and left edges
Definition: wayland-client-protocol.hpp:1806
wayland::shell_t
create desktop-style surfaces
Definition: wayland-client-protocol.hpp:1419
wayland::touch_t::on_shape
std::function< void(int32_t, double, double)> & on_shape()
update shape of touch point
Definition: wayland-client-protocol.cpp:3160
wayland::seat_t::release
void release()
release the seat object
Definition: wayland-client-protocol.cpp:2774
wayland::data_device_manager_t::get_data_device
data_device_t get_data_device(seat_t seat)
create a new data device
Definition: wayland-client-protocol.cpp:2350
wayland::data_offer_t::on_offer
std::function< void(std::string)> & on_offer()
advertise offered mime type
Definition: wayland-client-protocol.cpp:2012
wayland::shell_surface_t::pong
void pong(uint32_t serial)
respond to a ping event
Definition: wayland-client-protocol.cpp:2476
wayland::shell_surface_resize::top_right
static const detail::bitfield< 4, 8 > top_right
top and right edges
Definition: wayland-client-protocol.hpp:1812
wayland::pointer_t::can_release
bool can_release() const
Check whether the release function is available with the currently bound version of the protocol.
Definition: wayland-client-protocol.cpp:2870
wayland::output_t::on_mode
std::function< void(output_mode, int32_t, int32_t, int32_t)> & on_mode()
advertise available modes for the output
Definition: wayland-client-protocol.cpp:3263
wayland::subsurface_t::set_sync
void set_sync()
set sub-surface to synchronized mode
Definition: wayland-client-protocol.cpp:3507
wayland::data_device_t::on_selection
std::function< void(data_offer_t)> & on_selection()
advertise new selection
Definition: wayland-client-protocol.cpp:2262
wayland::pointer_t::set_cursor
void set_cursor(uint32_t serial, surface_t surface, int32_t hotspot_x, int32_t hotspot_y)
set the pointer surface
Definition: wayland-client-protocol.cpp:2861
wayland::data_device_manager_dnd_action::none
static const detail::bitfield< 3, 6 > none
no action
Definition: wayland-client-protocol.hpp:1397
wayland::touch_t::on_motion
std::function< void(uint32_t, int32_t, double, double)> & on_motion()
update of touch point coordinates
Definition: wayland-client-protocol.cpp:3145
wayland::shell_surface_transient::inactive
static const detail::bitfield< 1, 9 > inactive
do not set keyboard focus
Definition: wayland-client-protocol.hpp:1830
wayland::output_transform::flipped_180
static const detail::bitfield< 3, 20 > flipped_180
flip and rotate 180 degrees counter-clockwise
Definition: wayland-client-protocol.hpp:3450
wayland::output_mode
mode information
Definition: wayland-client-protocol.hpp:3461
wayland::shell_surface_resize::bottom
static const detail::bitfield< 4, 8 > bottom
bottom edge
Definition: wayland-client-protocol.hpp:1802
wayland::surface_t::can_set_buffer_scale
bool can_set_buffer_scale() const
Check whether the set_buffer_scale function is available with the currently bound version of the prot...
Definition: wayland-client-protocol.cpp:2667
wayland::seat_t::on_name
std::function< void(std::string)> & on_name()
unique identifier for this seat
Definition: wayland-client-protocol.cpp:2788
wayland::callback_t::on_done
std::function< void(uint32_t)> & on_done()
done event
Definition: wayland-client-protocol.cpp:1641
wayland::keyboard_t::on_leave
std::function< void(uint32_t, surface_t)> & on_leave()
leave event
Definition: wayland-client-protocol.cpp:3028
wayland::shell_surface_t::on_popup_done
std::function< void()> & on_popup_done()
popup interaction is done
Definition: wayland-client-protocol.cpp:2536
wayland::buffer_t
content for a wl_surface
Definition: wayland-client-protocol.hpp:602
wayland::data_source_t::can_set_actions
bool can_set_actions() const
Check whether the set_actions function is available with the currently bound version of the protocol.
Definition: wayland-client-protocol.cpp:2106
wayland::touch_t
touchscreen input device
Definition: wayland-client-protocol.hpp:3064
wayland::keyboard_t::can_release
bool can_release() const
Check whether the release function is available with the currently bound version of the protocol.
Definition: wayland-client-protocol.cpp:3013
wayland::subsurface_t::place_below
void place_below(surface_t sibling)
restack the sub-surface
Definition: wayland-client-protocol.cpp:3502
wayland::data_device_manager_t
data transfer interface
Definition: wayland-client-protocol.hpp:1314
wayland::data_source_t
offer to transfer data
Definition: wayland-client-protocol.hpp:898
wayland::shm_t
shared memory support
Definition: wayland-client-protocol.hpp:391
wayland::surface_t::set_buffer_scale
void set_buffer_scale(int32_t scale)
sets the buffer scaling factor
Definition: wayland-client-protocol.cpp:2663
wayland::data_offer_t::receive
void receive(std::string mime_type, int fd)
request that the data is transferred
Definition: wayland-client-protocol.cpp:1989
wayland::proxy_t::proxy_has_object
bool proxy_has_object() const
Check whether this wrapper actually wraps an object.
wayland::shell_surface_resize::right
static const detail::bitfield< 4, 8 > right
right edge
Definition: wayland-client-protocol.hpp:1810
wayland::shm_pool_t::create_buffer
buffer_t create_buffer(int32_t offset, int32_t width, int32_t height, int32_t stride, shm_format format)
create a buffer from the pool
Definition: wayland-client-protocol.cpp:1775
wayland::shell_surface_t::set_transient
void set_transient(surface_t parent, int32_t x, int32_t y, shell_surface_transient flags)
make the surface a transient surface
Definition: wayland-client-protocol.cpp:2496
wayland::output_t::release_since_version
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
Definition: wayland-client-protocol.hpp:3286
wayland::surface_t::commit
void commit()
commit pending surface state
Definition: wayland-client-protocol.cpp:2649
wayland::keyboard_t::on_key
std::function< void(uint32_t, uint32_t, uint32_t, keyboard_key_state)> & on_key()
key event
Definition: wayland-client-protocol.cpp:3033
wayland::output_t::can_release
bool can_release() const
Check whether the release function is available with the currently bound version of the protocol.
Definition: wayland-client-protocol.cpp:3253
wayland::shell_surface_t::set_title
void set_title(std::string title)
set surface title
Definition: wayland-client-protocol.cpp:2516
wayland::data_source_t::offer
void offer(std::string mime_type)
add an offered mime type
Definition: wayland-client-protocol.cpp:2097
wayland::output_mode::preferred
static const detail::bitfield< 2, 21 > preferred
indicates this is the preferred mode
Definition: wayland-client-protocol.hpp:3470
wayland::keyboard_t::release_since_version
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
Definition: wayland-client-protocol.hpp:2931
wayland::data_device_t
data transfer device
Definition: wayland-client-protocol.hpp:1099
wayland::touch_t::on_frame
std::function< void()> & on_frame()
end of touch frame event
Definition: wayland-client-protocol.cpp:3150
wayland::subsurface_t::set_position
void set_position(int32_t x, int32_t y)
reposition the sub-surface
Definition: wayland-client-protocol.cpp:3492
wayland::buffer_t::on_release
std::function< void()> & on_release()
compositor releases buffer
Definition: wayland-client-protocol.cpp:1916
wayland::shell_surface_t::set_fullscreen
void set_fullscreen(shell_surface_fullscreen_method method, uint32_t framerate, output_t output)
make the surface a fullscreen surface
Definition: wayland-client-protocol.cpp:2501
wayland::data_offer_t::on_source_actions
std::function< void(data_device_manager_dnd_action)> & on_source_actions()
notify the source-side available actions
Definition: wayland-client-protocol.cpp:2017
wayland::surface_t::attach
void attach(buffer_t buffer, int32_t x, int32_t y)
set the surface contents
Definition: wayland-client-protocol.cpp:2623
wayland::data_source_t::on_dnd_finished
std::function< void()> & on_dnd_finished()
the drag-and-drop operation concluded
Definition: wayland-client-protocol.cpp:2131
wayland::surface_t
an onscreen surface
Definition: wayland-client-protocol.hpp:1898
wayland::proxy_t::get_version
uint32_t get_version() const
Get the protocol object version of a proxy object.
wayland::output_transform::flipped
static const detail::bitfield< 3, 20 > flipped
180 degree flip around a vertical axis
Definition: wayland-client-protocol.hpp:3446
wayland::data_offer_t::can_set_actions
bool can_set_actions() const
Check whether the set_actions function is available with the currently bound version of the protocol.
Definition: wayland-client-protocol.cpp:2007
wayland::seat_capability::pointer
static const detail::bitfield< 3, 12 > pointer
the seat has pointer devices
Definition: wayland-client-protocol.hpp:2485
wayland::seat_capability::touch
static const detail::bitfield< 3, 12 > touch
the seat has touch devices
Definition: wayland-client-protocol.hpp:2489
wayland::data_source_t::on_target
std::function< void(std::string)> & on_target()
a target accepts an offered mime type
Definition: wayland-client-protocol.cpp:2111
wayland::surface_t::can_damage_buffer
bool can_damage_buffer() const
Check whether the damage_buffer function is available with the currently bound version of the protoco...
Definition: wayland-client-protocol.cpp:2676
wayland::shell_surface_t::on_configure
std::function< void(shell_surface_resize, int32_t, int32_t)> & on_configure()
suggest resize
Definition: wayland-client-protocol.cpp:2531
wayland::output_t::on_scale
std::function< void(int32_t)> & on_scale()
output scaling properties
Definition: wayland-client-protocol.cpp:3273
wayland::touch_t::on_cancel
std::function< void()> & on_cancel()
touch session cancelled
Definition: wayland-client-protocol.cpp:3155
wayland::data_source_t::set_actions_since_version
static constexpr std::uint32_t set_actions_since_version
Minimum protocol version required for the set_actions function.
Definition: wayland-client-protocol.hpp:962
wayland::data_source_t::on_cancelled
std::function< void()> & on_cancelled()
selection was cancelled
Definition: wayland-client-protocol.cpp:2121
wayland::shell_surface_resize
edge values for resizing
Definition: wayland-client-protocol.hpp:1791
wayland::output_transform::flipped_270
static const detail::bitfield< 3, 20 > flipped_270
flip and rotate 270 degrees counter-clockwise
Definition: wayland-client-protocol.hpp:3452
wayland::proxy_t
Represents a protocol object on the client side.
Definition: wayland-client.hpp:98
wayland::output_t::on_done
std::function< void()> & on_done()
sent all information about output
Definition: wayland-client-protocol.cpp:3268
wayland::data_device_t::release_since_version
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
Definition: wayland-client-protocol.hpp:1193
wayland::data_device_t::on_leave
std::function< void()> & on_leave()
end drag-and-drop session
Definition: wayland-client-protocol.cpp:2247
wayland::surface_t::damage
void damage(int32_t x, int32_t y, int32_t width, int32_t height)
mark part of the surface damaged
Definition: wayland-client-protocol.cpp:2628
wayland::surface_t::on_enter
std::function< void(output_t)> & on_enter()
surface enters an output
Definition: wayland-client-protocol.cpp:2681
wayland::region_t::subtract
void subtract(int32_t x, int32_t y, int32_t width, int32_t height)
subtract rectangle from region
Definition: wayland-client-protocol.cpp:3368
wayland::surface_t::set_buffer_scale_since_version
static constexpr std::uint32_t set_buffer_scale_since_version
Minimum protocol version required for the set_buffer_scale function.
Definition: wayland-client-protocol.hpp:2230
wayland::pointer_t::release_since_version
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
Definition: wayland-client-protocol.hpp:2594
wayland::shm_pool_t::resize
void resize(int32_t size)
change the size of the pool mapping
Definition: wayland-client-protocol.cpp:1781
wayland::surface_t::set_buffer_transform_since_version
static constexpr std::uint32_t set_buffer_transform_since_version
Minimum protocol version required for the set_buffer_transform function.
Definition: wayland-client-protocol.hpp:2191
wayland::data_device_t::set_selection
void set_selection(data_source_t source, uint32_t serial)
copy data to the selection
Definition: wayland-client-protocol.cpp:2223
wayland::keyboard_t::on_repeat_info
std::function< void(int32_t, int32_t)> & on_repeat_info()
repeat rate and delay
Definition: wayland-client-protocol.cpp:3043
wayland::data_device_manager_t::create_data_source
data_source_t create_data_source()
create a new data source
Definition: wayland-client-protocol.cpp:2344
wayland::seat_capability
seat capability bitmask
Definition: wayland-client-protocol.hpp:2478
wayland::shell_surface_resize::bottom_left
static const detail::bitfield< 4, 8 > bottom_left
bottom and left edges
Definition: wayland-client-protocol.hpp:1808
wayland::surface_t::damage_buffer
void damage_buffer(int32_t x, int32_t y, int32_t width, int32_t height)
mark part of the surface damaged using buffer coordinates
Definition: wayland-client-protocol.cpp:2672
wayland::data_offer_t::set_actions
void set_actions(data_device_manager_dnd_action dnd_actions, data_device_manager_dnd_action preferred_action)
set the available/preferred drag-and-drop actions
Definition: wayland-client-protocol.cpp:2003
wayland::shell_surface_resize::none
static const detail::bitfield< 4, 8 > none
no edge
Definition: wayland-client-protocol.hpp:1798
wayland::pointer_t::on_axis
std::function< void(uint32_t, pointer_axis, double)> & on_axis()
axis event
Definition: wayland-client-protocol.cpp:2895
wayland::subcompositor_t::get_subsurface
subsurface_t get_subsurface(surface_t surface, surface_t parent)
give a surface the role sub-surface
Definition: wayland-client-protocol.cpp:3429
wayland::pointer_t::on_frame
std::function< void()> & on_frame()
end of a pointer event sequence
Definition: wayland-client-protocol.cpp:2900
wayland::seat_t::can_release
bool can_release() const
Check whether the release function is available with the currently bound version of the protocol.
Definition: wayland-client-protocol.cpp:2778
wayland::data_device_manager_dnd_action::copy
static const detail::bitfield< 3, 6 > copy
copy action
Definition: wayland-client-protocol.hpp:1399
wayland::shell_surface_t
desktop-style metadata interface
Definition: wayland-client-protocol.hpp:1485
wayland::pointer_t::on_axis_stop
std::function< void(uint32_t, pointer_axis)> & on_axis_stop()
axis stop event
Definition: wayland-client-protocol.cpp:2910
wayland::proxy_t::c_ptr
wl_proxy * c_ptr() const
Get a pointer to the underlying C struct.
wayland::data_device_t::release
void release()
destroy data device
Definition: wayland-client-protocol.cpp:2228
wayland::surface_t::on_leave
std::function< void(output_t)> & on_leave()
surface leaves an output
Definition: wayland-client-protocol.cpp:2686
wayland::shell_surface_t::move
void move(seat_t seat, uint32_t serial)
start an interactive move
Definition: wayland-client-protocol.cpp:2481
wayland::data_source_t::on_send
std::function< void(std::string, int)> & on_send()
send the data
Definition: wayland-client-protocol.cpp:2116
wayland::data_offer_t::set_actions_since_version
static constexpr std::uint32_t set_actions_since_version
Minimum protocol version required for the set_actions function.
Definition: wayland-client-protocol.hpp:804
wayland::shell_surface_t::set_class
void set_class(std::string class_)
set surface class
Definition: wayland-client-protocol.cpp:2521
wayland::data_device_t::on_drop
std::function< void()> & on_drop()
end drag-and-drop session successfully
Definition: wayland-client-protocol.cpp:2257
wayland::region_t
region interface
Definition: wayland-client-protocol.hpp:3482
wayland::shm_pool_t
a shared memory pool
Definition: wayland-client-protocol.hpp:311
wayland::output_transform::_180
static const detail::bitfield< 3, 20 > _180
180 degrees counter-clockwise
Definition: wayland-client-protocol.hpp:3442
wayland::output_mode::current
static const detail::bitfield< 2, 21 > current
indicates this is the current mode
Definition: wayland-client-protocol.hpp:3468
wayland::registry_t
global registry object
Definition: wayland-client-protocol.hpp:130
wayland::registry_t::bind
proxy_t bind(uint32_t name, proxy_t &interface, uint32_t version)
bind an object to the display
Definition: wayland-client-protocol.cpp:1560
wayland::seat_t
group of input devices
Definition: wayland-client-protocol.hpp:2334
wayland::shell_surface_t::resize
void resize(seat_t seat, uint32_t serial, shell_surface_resize edges)
start an interactive resize
Definition: wayland-client-protocol.cpp:2486
wayland::compositor_t::create_surface
surface_t create_surface()
create new surface
Definition: wayland-client-protocol.cpp:1707
wayland::shell_t::get_shell_surface
shell_surface_t get_shell_surface(surface_t surface)
create a shell surface from a surface
Definition: wayland-client-protocol.cpp:2415
wayland::output_transform
transform from framebuffer to output
Definition: wayland-client-protocol.hpp:3431
wayland::shell_surface_t::on_ping
std::function< void(uint32_t)> & on_ping()
ping client
Definition: wayland-client-protocol.cpp:2526
wayland::data_device_t::on_enter
std::function< void(uint32_t, surface_t, double, double, data_offer_t)> & on_enter()
initiate drag-and-drop session
Definition: wayland-client-protocol.cpp:2242
wayland::registry_t::on_global_remove
std::function< void(uint32_t)> & on_global_remove()
announce removal of global object
Definition: wayland-client-protocol.cpp:1572
wayland::pointer_t::on_leave
std::function< void(uint32_t, surface_t)> & on_leave()
leave event
Definition: wayland-client-protocol.cpp:2880
wayland::data_offer_t
offer to transfer data
Definition: wayland-client-protocol.hpp:656
wayland::touch_t::can_release
bool can_release() const
Check whether the release function is available with the currently bound version of the protocol.
Definition: wayland-client-protocol.cpp:3130
wayland::data_offer_t::on_action
std::function< void(data_device_manager_dnd_action)> & on_action()
notify the selected action
Definition: wayland-client-protocol.cpp:2022
wayland::output_transform::_270
static const detail::bitfield< 3, 20 > _270
270 degrees counter-clockwise
Definition: wayland-client-protocol.hpp:3444
wayland::keyboard_t::on_modifiers
std::function< void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)> & on_modifiers()
modifier and group state
Definition: wayland-client-protocol.cpp:3038
wayland::seat_t::get_pointer
pointer_t get_pointer()
return pointer object
Definition: wayland-client-protocol.cpp:2756
wayland::compositor_t
the compositor singleton
Definition: wayland-client-protocol.hpp:251
wayland::pointer_t::on_motion
std::function< void(uint32_t, double, double)> & on_motion()
pointer motion event
Definition: wayland-client-protocol.cpp:2885
wayland::pointer_t::on_axis_source
std::function< void(pointer_axis_source)> & on_axis_source()
axis source event
Definition: wayland-client-protocol.cpp:2905
wayland::shell_surface_t::set_maximized
void set_maximized(output_t output)
make the surface a maximized surface
Definition: wayland-client-protocol.cpp:2511
wayland::output_transform::_90
static const detail::bitfield< 3, 20 > _90
90 degrees counter-clockwise
Definition: wayland-client-protocol.hpp:3440
wayland::touch_t::release_since_version
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
Definition: wayland-client-protocol.hpp:3100
wayland::data_offer_t::accept
void accept(uint32_t serial, std::string mime_type)
accept one of the offered mime types
Definition: wayland-client-protocol.cpp:1984
wayland::surface_t::set_input_region
void set_input_region(region_t region)
set input region
Definition: wayland-client-protocol.cpp:2644
wayland::data_source_t::set_actions
void set_actions(data_device_manager_dnd_action dnd_actions)
set the available drag-and-drop actions
Definition: wayland-client-protocol.cpp:2102
wayland::seat_t::get_keyboard
keyboard_t get_keyboard()
return keyboard object
Definition: wayland-client-protocol.cpp:2762
wayland::data_offer_t::finish_since_version
static constexpr std::uint32_t finish_since_version
Minimum protocol version required for the finish function.
Definition: wayland-client-protocol.hpp:756
wayland::callback_t
callback object
Definition: wayland-client-protocol.hpp:210
wayland::shell_surface_resize::bottom_right
static const detail::bitfield< 4, 8 > bottom_right
bottom and right edges
Definition: wayland-client-protocol.hpp:1814
wayland::shell_surface_t::set_toplevel
void set_toplevel()
make the surface a toplevel surface
Definition: wayland-client-protocol.cpp:2491
wayland::registry_t::on_global
std::function< void(uint32_t, std::string, uint32_t)> & on_global()
announce global object
Definition: wayland-client-protocol.cpp:1567
wayland::keyboard_t::release
void release()
release the keyboard object
Definition: wayland-client-protocol.cpp:3009
wayland::seat_t::release_since_version
static constexpr std::uint32_t release_since_version
Minimum protocol version required for the release function.
Definition: wayland-client-protocol.hpp:2422
wayland::subsurface_t::place_above
void place_above(surface_t sibling)
restack the sub-surface
Definition: wayland-client-protocol.cpp:3497
wayland::compositor_t::create_region
region_t create_region()
create new region
Definition: wayland-client-protocol.cpp:1713
wayland::touch_t::release
void release()
release the touch object
Definition: wayland-client-protocol.cpp:3126
wayland::seat_t::on_capabilities
std::function< void(seat_capability)> & on_capabilities()
seat capabilities changed
Definition: wayland-client-protocol.cpp:2783
wayland::touch_t::on_down
std::function< void(uint32_t, uint32_t, surface_t, int32_t, double, double)> & on_down()
touch down event and beginning of a touch sequence
Definition: wayland-client-protocol.cpp:3135
wayland::seat_capability::keyboard
static const detail::bitfield< 3, 12 > keyboard
the seat has one or more keyboards
Definition: wayland-client-protocol.hpp:2487
wayland::region_t::add
void add(int32_t x, int32_t y, int32_t width, int32_t height)
add rectangle to region
Definition: wayland-client-protocol.cpp:3363
wayland::pointer_t::on_axis_discrete
std::function< void(pointer_axis, int32_t)> & on_axis_discrete()
axis click event
Definition: wayland-client-protocol.cpp:2915
wayland::keyboard_t
keyboard input device
Definition: wayland-client-protocol.hpp:2896
wayland::surface_t::can_set_buffer_transform
bool can_set_buffer_transform() const
Check whether the set_buffer_transform function is available with the currently bound version of the ...
Definition: wayland-client-protocol.cpp:2658
wayland::output_transform::normal
static const detail::bitfield< 3, 20 > normal
no transform
Definition: wayland-client-protocol.hpp:3438
wayland::data_source_t::on_action
std::function< void(data_device_manager_dnd_action)> & on_action()
notify the selected action
Definition: wayland-client-protocol.cpp:2136
wayland::touch_t::on_orientation
std::function< void(int32_t, double)> & on_orientation()
update orientation of touch point
Definition: wayland-client-protocol.cpp:3165
wayland::data_offer_t::finish
void finish()
the offer will no longer be used
Definition: wayland-client-protocol.cpp:1994
wayland::output_t
compositor output region
Definition: wayland-client-protocol.hpp:3250
wayland::subsurface_t
sub-surface interface to a wl_surface
Definition: wayland-client-protocol.hpp:3675
wayland::keyboard_t::on_keymap
std::function< void(keyboard_keymap_format, int, uint32_t)> & on_keymap()
keyboard mapping
Definition: wayland-client-protocol.cpp:3018
wayland::data_device_t::on_data_offer
std::function< void(data_offer_t)> & on_data_offer()
introduce a new wl_data_offer
Definition: wayland-client-protocol.cpp:2237
wayland::data_device_t::on_motion
std::function< void(uint32_t, double, double)> & on_motion()
drag-and-drop session motion
Definition: wayland-client-protocol.cpp:2252
wayland::surface_t::set_opaque_region
void set_opaque_region(region_t region)
set opaque region
Definition: wayland-client-protocol.cpp:2639
wayland::output_t::on_geometry
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
Definition: wayland-client-protocol.cpp:3258
wayland::pointer_t
pointer input device
Definition: wayland-client-protocol.hpp:2505
wayland::touch_t::on_up
std::function< void(uint32_t, uint32_t, int32_t)> & on_up()
end of a touch event sequence
Definition: wayland-client-protocol.cpp:3140