Wayland++  0.2.8
C++ Bindings for Wayland
wayland-client-protocol-extra.cpp
1 #include <wayland-client-protocol-extra.hpp>
2 
3 using namespace wayland;
4 using namespace detail;
5 
6 const wl_interface* presentation_interface_destroy_request[0] = {
7 };
8 
9 const wl_interface* presentation_interface_feedback_request[2] = {
10  &surface_interface,
11  &presentation_feedback_interface,
12 };
13 
14 const wl_interface* presentation_interface_clock_id_event[1] = {
15  nullptr,
16 };
17 
18 const wl_message presentation_interface_requests[2] = {
19  {
20  "destroy",
21  "",
22  presentation_interface_destroy_request,
23  },
24  {
25  "feedback",
26  "on",
27  presentation_interface_feedback_request,
28  },
29 };
30 
31 const wl_message presentation_interface_events[1] = {
32  {
33  "clock_id",
34  "u",
35  presentation_interface_clock_id_event,
36  },
37 };
38 
39 const wl_interface wayland::detail::presentation_interface =
40  {
41  "wp_presentation",
42  1,
43  2,
44  presentation_interface_requests,
45  1,
46  presentation_interface_events,
47  };
48 
49 const wl_interface* presentation_feedback_interface_sync_output_event[1] = {
50  &output_interface,
51 };
52 
53 const wl_interface* presentation_feedback_interface_presented_event[7] = {
54  nullptr,
55  nullptr,
56  nullptr,
57  nullptr,
58  nullptr,
59  nullptr,
60  nullptr,
61 };
62 
63 const wl_interface* presentation_feedback_interface_discarded_event[0] = {
64 };
65 
66 const wl_message presentation_feedback_interface_requests[0] = {
67 };
68 
69 const wl_message presentation_feedback_interface_events[3] = {
70  {
71  "sync_output",
72  "o",
73  presentation_feedback_interface_sync_output_event,
74  },
75  {
76  "presented",
77  "uuuuuuu",
78  presentation_feedback_interface_presented_event,
79  },
80  {
81  "discarded",
82  "",
83  presentation_feedback_interface_discarded_event,
84  },
85 };
86 
87 const wl_interface wayland::detail::presentation_feedback_interface =
88  {
89  "wp_presentation_feedback",
90  1,
91  0,
92  presentation_feedback_interface_requests,
93  3,
94  presentation_feedback_interface_events,
95  };
96 
97 const wl_interface* viewporter_interface_destroy_request[0] = {
98 };
99 
100 const wl_interface* viewporter_interface_get_viewport_request[2] = {
101  &viewport_interface,
102  &surface_interface,
103 };
104 
105 const wl_message viewporter_interface_requests[2] = {
106  {
107  "destroy",
108  "",
109  viewporter_interface_destroy_request,
110  },
111  {
112  "get_viewport",
113  "no",
114  viewporter_interface_get_viewport_request,
115  },
116 };
117 
118 const wl_message viewporter_interface_events[0] = {
119 };
120 
121 const wl_interface wayland::detail::viewporter_interface =
122  {
123  "wp_viewporter",
124  1,
125  2,
126  viewporter_interface_requests,
127  0,
128  viewporter_interface_events,
129  };
130 
131 const wl_interface* viewport_interface_destroy_request[0] = {
132 };
133 
134 const wl_interface* viewport_interface_set_source_request[4] = {
135  nullptr,
136  nullptr,
137  nullptr,
138  nullptr,
139 };
140 
141 const wl_interface* viewport_interface_set_destination_request[2] = {
142  nullptr,
143  nullptr,
144 };
145 
146 const wl_message viewport_interface_requests[3] = {
147  {
148  "destroy",
149  "",
150  viewport_interface_destroy_request,
151  },
152  {
153  "set_source",
154  "ffff",
155  viewport_interface_set_source_request,
156  },
157  {
158  "set_destination",
159  "ii",
160  viewport_interface_set_destination_request,
161  },
162 };
163 
164 const wl_message viewport_interface_events[0] = {
165 };
166 
167 const wl_interface wayland::detail::viewport_interface =
168  {
169  "wp_viewport",
170  1,
171  3,
172  viewport_interface_requests,
173  0,
174  viewport_interface_events,
175  };
176 
177 const wl_interface* xdg_wm_base_interface_destroy_request[0] = {
178 };
179 
180 const wl_interface* xdg_wm_base_interface_create_positioner_request[1] = {
181  &xdg_positioner_interface,
182 };
183 
184 const wl_interface* xdg_wm_base_interface_get_xdg_surface_request[2] = {
185  &xdg_surface_interface,
186  &surface_interface,
187 };
188 
189 const wl_interface* xdg_wm_base_interface_pong_request[1] = {
190  nullptr,
191 };
192 
193 const wl_interface* xdg_wm_base_interface_ping_event[1] = {
194  nullptr,
195 };
196 
197 const wl_message xdg_wm_base_interface_requests[4] = {
198  {
199  "destroy",
200  "",
201  xdg_wm_base_interface_destroy_request,
202  },
203  {
204  "create_positioner",
205  "n",
206  xdg_wm_base_interface_create_positioner_request,
207  },
208  {
209  "get_xdg_surface",
210  "no",
211  xdg_wm_base_interface_get_xdg_surface_request,
212  },
213  {
214  "pong",
215  "u",
216  xdg_wm_base_interface_pong_request,
217  },
218 };
219 
220 const wl_message xdg_wm_base_interface_events[1] = {
221  {
222  "ping",
223  "u",
224  xdg_wm_base_interface_ping_event,
225  },
226 };
227 
228 const wl_interface wayland::detail::xdg_wm_base_interface =
229  {
230  "xdg_wm_base",
231  3,
232  4,
233  xdg_wm_base_interface_requests,
234  1,
235  xdg_wm_base_interface_events,
236  };
237 
238 const wl_interface* xdg_positioner_interface_destroy_request[0] = {
239 };
240 
241 const wl_interface* xdg_positioner_interface_set_size_request[2] = {
242  nullptr,
243  nullptr,
244 };
245 
246 const wl_interface* xdg_positioner_interface_set_anchor_rect_request[4] = {
247  nullptr,
248  nullptr,
249  nullptr,
250  nullptr,
251 };
252 
253 const wl_interface* xdg_positioner_interface_set_anchor_request[1] = {
254  nullptr,
255 };
256 
257 const wl_interface* xdg_positioner_interface_set_gravity_request[1] = {
258  nullptr,
259 };
260 
261 const wl_interface* xdg_positioner_interface_set_constraint_adjustment_request[1] = {
262  nullptr,
263 };
264 
265 const wl_interface* xdg_positioner_interface_set_offset_request[2] = {
266  nullptr,
267  nullptr,
268 };
269 
270 const wl_interface* xdg_positioner_interface_set_reactive_request[0] = {
271 };
272 
273 const wl_interface* xdg_positioner_interface_set_parent_size_request[2] = {
274  nullptr,
275  nullptr,
276 };
277 
278 const wl_interface* xdg_positioner_interface_set_parent_configure_request[1] = {
279  nullptr,
280 };
281 
282 const wl_message xdg_positioner_interface_requests[10] = {
283  {
284  "destroy",
285  "",
286  xdg_positioner_interface_destroy_request,
287  },
288  {
289  "set_size",
290  "ii",
291  xdg_positioner_interface_set_size_request,
292  },
293  {
294  "set_anchor_rect",
295  "iiii",
296  xdg_positioner_interface_set_anchor_rect_request,
297  },
298  {
299  "set_anchor",
300  "u",
301  xdg_positioner_interface_set_anchor_request,
302  },
303  {
304  "set_gravity",
305  "u",
306  xdg_positioner_interface_set_gravity_request,
307  },
308  {
309  "set_constraint_adjustment",
310  "u",
311  xdg_positioner_interface_set_constraint_adjustment_request,
312  },
313  {
314  "set_offset",
315  "ii",
316  xdg_positioner_interface_set_offset_request,
317  },
318  {
319  "set_reactive",
320  "3",
321  xdg_positioner_interface_set_reactive_request,
322  },
323  {
324  "set_parent_size",
325  "3ii",
326  xdg_positioner_interface_set_parent_size_request,
327  },
328  {
329  "set_parent_configure",
330  "3u",
331  xdg_positioner_interface_set_parent_configure_request,
332  },
333 };
334 
335 const wl_message xdg_positioner_interface_events[0] = {
336 };
337 
338 const wl_interface wayland::detail::xdg_positioner_interface =
339  {
340  "xdg_positioner",
341  3,
342  10,
343  xdg_positioner_interface_requests,
344  0,
345  xdg_positioner_interface_events,
346  };
347 
348 const wl_interface* xdg_surface_interface_destroy_request[0] = {
349 };
350 
351 const wl_interface* xdg_surface_interface_get_toplevel_request[1] = {
352  &xdg_toplevel_interface,
353 };
354 
355 const wl_interface* xdg_surface_interface_get_popup_request[3] = {
356  &xdg_popup_interface,
357  &xdg_surface_interface,
358  &xdg_positioner_interface,
359 };
360 
361 const wl_interface* xdg_surface_interface_set_window_geometry_request[4] = {
362  nullptr,
363  nullptr,
364  nullptr,
365  nullptr,
366 };
367 
368 const wl_interface* xdg_surface_interface_ack_configure_request[1] = {
369  nullptr,
370 };
371 
372 const wl_interface* xdg_surface_interface_configure_event[1] = {
373  nullptr,
374 };
375 
376 const wl_message xdg_surface_interface_requests[5] = {
377  {
378  "destroy",
379  "",
380  xdg_surface_interface_destroy_request,
381  },
382  {
383  "get_toplevel",
384  "n",
385  xdg_surface_interface_get_toplevel_request,
386  },
387  {
388  "get_popup",
389  "n?oo",
390  xdg_surface_interface_get_popup_request,
391  },
392  {
393  "set_window_geometry",
394  "iiii",
395  xdg_surface_interface_set_window_geometry_request,
396  },
397  {
398  "ack_configure",
399  "u",
400  xdg_surface_interface_ack_configure_request,
401  },
402 };
403 
404 const wl_message xdg_surface_interface_events[1] = {
405  {
406  "configure",
407  "u",
408  xdg_surface_interface_configure_event,
409  },
410 };
411 
412 const wl_interface wayland::detail::xdg_surface_interface =
413  {
414  "xdg_surface",
415  3,
416  5,
417  xdg_surface_interface_requests,
418  1,
419  xdg_surface_interface_events,
420  };
421 
422 const wl_interface* xdg_toplevel_interface_destroy_request[0] = {
423 };
424 
425 const wl_interface* xdg_toplevel_interface_set_parent_request[1] = {
426  &xdg_toplevel_interface,
427 };
428 
429 const wl_interface* xdg_toplevel_interface_set_title_request[1] = {
430  nullptr,
431 };
432 
433 const wl_interface* xdg_toplevel_interface_set_app_id_request[1] = {
434  nullptr,
435 };
436 
437 const wl_interface* xdg_toplevel_interface_show_window_menu_request[4] = {
438  &seat_interface,
439  nullptr,
440  nullptr,
441  nullptr,
442 };
443 
444 const wl_interface* xdg_toplevel_interface_move_request[2] = {
445  &seat_interface,
446  nullptr,
447 };
448 
449 const wl_interface* xdg_toplevel_interface_resize_request[3] = {
450  &seat_interface,
451  nullptr,
452  nullptr,
453 };
454 
455 const wl_interface* xdg_toplevel_interface_set_max_size_request[2] = {
456  nullptr,
457  nullptr,
458 };
459 
460 const wl_interface* xdg_toplevel_interface_set_min_size_request[2] = {
461  nullptr,
462  nullptr,
463 };
464 
465 const wl_interface* xdg_toplevel_interface_set_maximized_request[0] = {
466 };
467 
468 const wl_interface* xdg_toplevel_interface_unset_maximized_request[0] = {
469 };
470 
471 const wl_interface* xdg_toplevel_interface_set_fullscreen_request[1] = {
472  &output_interface,
473 };
474 
475 const wl_interface* xdg_toplevel_interface_unset_fullscreen_request[0] = {
476 };
477 
478 const wl_interface* xdg_toplevel_interface_set_minimized_request[0] = {
479 };
480 
481 const wl_interface* xdg_toplevel_interface_configure_event[3] = {
482  nullptr,
483  nullptr,
484  nullptr,
485 };
486 
487 const wl_interface* xdg_toplevel_interface_close_event[0] = {
488 };
489 
490 const wl_message xdg_toplevel_interface_requests[14] = {
491  {
492  "destroy",
493  "",
494  xdg_toplevel_interface_destroy_request,
495  },
496  {
497  "set_parent",
498  "?o",
499  xdg_toplevel_interface_set_parent_request,
500  },
501  {
502  "set_title",
503  "s",
504  xdg_toplevel_interface_set_title_request,
505  },
506  {
507  "set_app_id",
508  "s",
509  xdg_toplevel_interface_set_app_id_request,
510  },
511  {
512  "show_window_menu",
513  "ouii",
514  xdg_toplevel_interface_show_window_menu_request,
515  },
516  {
517  "move",
518  "ou",
519  xdg_toplevel_interface_move_request,
520  },
521  {
522  "resize",
523  "ouu",
524  xdg_toplevel_interface_resize_request,
525  },
526  {
527  "set_max_size",
528  "ii",
529  xdg_toplevel_interface_set_max_size_request,
530  },
531  {
532  "set_min_size",
533  "ii",
534  xdg_toplevel_interface_set_min_size_request,
535  },
536  {
537  "set_maximized",
538  "",
539  xdg_toplevel_interface_set_maximized_request,
540  },
541  {
542  "unset_maximized",
543  "",
544  xdg_toplevel_interface_unset_maximized_request,
545  },
546  {
547  "set_fullscreen",
548  "?o",
549  xdg_toplevel_interface_set_fullscreen_request,
550  },
551  {
552  "unset_fullscreen",
553  "",
554  xdg_toplevel_interface_unset_fullscreen_request,
555  },
556  {
557  "set_minimized",
558  "",
559  xdg_toplevel_interface_set_minimized_request,
560  },
561 };
562 
563 const wl_message xdg_toplevel_interface_events[2] = {
564  {
565  "configure",
566  "iia",
567  xdg_toplevel_interface_configure_event,
568  },
569  {
570  "close",
571  "",
572  xdg_toplevel_interface_close_event,
573  },
574 };
575 
576 const wl_interface wayland::detail::xdg_toplevel_interface =
577  {
578  "xdg_toplevel",
579  3,
580  14,
581  xdg_toplevel_interface_requests,
582  2,
583  xdg_toplevel_interface_events,
584  };
585 
586 const wl_interface* xdg_popup_interface_destroy_request[0] = {
587 };
588 
589 const wl_interface* xdg_popup_interface_grab_request[2] = {
590  &seat_interface,
591  nullptr,
592 };
593 
594 const wl_interface* xdg_popup_interface_reposition_request[2] = {
595  &xdg_positioner_interface,
596  nullptr,
597 };
598 
599 const wl_interface* xdg_popup_interface_configure_event[4] = {
600  nullptr,
601  nullptr,
602  nullptr,
603  nullptr,
604 };
605 
606 const wl_interface* xdg_popup_interface_popup_done_event[0] = {
607 };
608 
609 const wl_interface* xdg_popup_interface_repositioned_event[1] = {
610  nullptr,
611 };
612 
613 const wl_message xdg_popup_interface_requests[3] = {
614  {
615  "destroy",
616  "",
617  xdg_popup_interface_destroy_request,
618  },
619  {
620  "grab",
621  "ou",
622  xdg_popup_interface_grab_request,
623  },
624  {
625  "reposition",
626  "3ou",
627  xdg_popup_interface_reposition_request,
628  },
629 };
630 
631 const wl_message xdg_popup_interface_events[3] = {
632  {
633  "configure",
634  "iiii",
635  xdg_popup_interface_configure_event,
636  },
637  {
638  "popup_done",
639  "",
640  xdg_popup_interface_popup_done_event,
641  },
642  {
643  "repositioned",
644  "3u",
645  xdg_popup_interface_repositioned_event,
646  },
647 };
648 
649 const wl_interface wayland::detail::xdg_popup_interface =
650  {
651  "xdg_popup",
652  3,
653  3,
654  xdg_popup_interface_requests,
655  3,
656  xdg_popup_interface_events,
657  };
658 
659 presentation_t::presentation_t(const proxy_t &p)
660  : proxy_t(p)
661 {
662  if(proxy_has_object() && get_wrapper_type() == wrapper_type::standard)
663  {
664  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
665  set_destroy_opcode(0U);
666  }
667  set_interface(&presentation_interface);
668  set_copy_constructor([] (const proxy_t &p) -> proxy_t
669  { return presentation_t(p); });
670 }
671 
672 presentation_t::presentation_t()
673 {
674  set_interface(&presentation_interface);
675  set_copy_constructor([] (const proxy_t &p) -> proxy_t
676  { return presentation_t(p); });
677 }
678 
679 presentation_t::presentation_t(wp_presentation *p, wrapper_type t)
680  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
681  if(proxy_has_object() && get_wrapper_type() == wrapper_type::standard)
682  {
683  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
684  set_destroy_opcode(0U);
685  }
686  set_interface(&presentation_interface);
687  set_copy_constructor([] (const proxy_t &p) -> proxy_t
688  { return presentation_t(p); });
689 }
690 
691 presentation_t::presentation_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
692  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
693  set_interface(&presentation_interface);
694  set_copy_constructor([] (const proxy_t &p) -> proxy_t
695  { return presentation_t(p); });
696 }
697 
698 presentation_t presentation_t::proxy_create_wrapper()
699 {
700  return {*this, construct_proxy_wrapper_tag()};
701 }
702 
703 const std::string presentation_t::interface_name = "wp_presentation";
704 
705 presentation_t::operator wp_presentation*() const
706 {
707  return reinterpret_cast<wp_presentation*> (c_ptr());
708 }
709 
711 {
712  proxy_t p = marshal_constructor(1U, &presentation_feedback_interface, surface.proxy_has_object() ? reinterpret_cast<wl_object*>(surface.c_ptr()) : nullptr, nullptr);
713  return presentation_feedback_t(p);
714 }
715 
716 std::function<void(uint32_t)> &presentation_t::on_clock_id()
717 {
718  return std::static_pointer_cast<events_t>(get_events())->clock_id;
719 }
720 
721 int presentation_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
722 {
723  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
724  switch(opcode)
725  {
726  case 0:
727  if(events->clock_id) events->clock_id(args[0].get<uint32_t>());
728  break;
729  }
730  return 0;
731 }
732 
733 
734 presentation_feedback_t::presentation_feedback_t(const proxy_t &p)
735  : proxy_t(p)
736 {
738  {
739  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
740  }
741  set_interface(&presentation_feedback_interface);
742  set_copy_constructor([] (const proxy_t &p) -> proxy_t
743  { return presentation_feedback_t(p); });
744 }
745 
746 presentation_feedback_t::presentation_feedback_t()
747 {
748  set_interface(&presentation_feedback_interface);
749  set_copy_constructor([] (const proxy_t &p) -> proxy_t
750  { return presentation_feedback_t(p); });
751 }
752 
753 presentation_feedback_t::presentation_feedback_t(wp_presentation_feedback *p, wrapper_type t)
754  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
756  {
757  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
758  }
759  set_interface(&presentation_feedback_interface);
760  set_copy_constructor([] (const proxy_t &p) -> proxy_t
761  { return presentation_feedback_t(p); });
762 }
763 
764 presentation_feedback_t::presentation_feedback_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
765  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
766  set_interface(&presentation_feedback_interface);
767  set_copy_constructor([] (const proxy_t &p) -> proxy_t
768  { return presentation_feedback_t(p); });
769 }
770 
771 presentation_feedback_t presentation_feedback_t::proxy_create_wrapper()
772 {
773  return {*this, construct_proxy_wrapper_tag()};
774 }
775 
776 const std::string presentation_feedback_t::interface_name = "wp_presentation_feedback";
777 
778 presentation_feedback_t::operator wp_presentation_feedback*() const
779 {
780  return reinterpret_cast<wp_presentation_feedback*> (c_ptr());
781 }
782 
784 {
785  return std::static_pointer_cast<events_t>(get_events())->sync_output;
786 }
787 
788 std::function<void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, presentation_feedback_kind)> &presentation_feedback_t::on_presented()
789 {
790  return std::static_pointer_cast<events_t>(get_events())->presented;
791 }
792 
794 {
795  return std::static_pointer_cast<events_t>(get_events())->discarded;
796 }
797 
798 int presentation_feedback_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
799 {
800  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
801  switch(opcode)
802  {
803  case 0:
804  if(events->sync_output) events->sync_output(output_t(args[0].get<proxy_t>()));
805  break;
806  case 1:
807  if(events->presented) events->presented(args[0].get<uint32_t>(), args[1].get<uint32_t>(), args[2].get<uint32_t>(), args[3].get<uint32_t>(), args[4].get<uint32_t>(), args[5].get<uint32_t>(), presentation_feedback_kind(args[6].get<uint32_t>()));
808  break;
809  case 2:
810  if(events->discarded) events->discarded();
811  break;
812  }
813  return 0;
814 }
815 const bitfield<4, 1> presentation_feedback_kind::vsync{0x1};
816 const bitfield<4, 1> presentation_feedback_kind::hw_clock{0x2};
817 const bitfield<4, 1> presentation_feedback_kind::hw_completion{0x4};
818 const bitfield<4, 1> presentation_feedback_kind::zero_copy{0x8};
819 
820 
821 viewporter_t::viewporter_t(const proxy_t &p)
822  : proxy_t(p)
823 {
825  {
826  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
827  set_destroy_opcode(0U);
828  }
829  set_interface(&viewporter_interface);
830  set_copy_constructor([] (const proxy_t &p) -> proxy_t
831  { return viewporter_t(p); });
832 }
833 
834 viewporter_t::viewporter_t()
835 {
836  set_interface(&viewporter_interface);
837  set_copy_constructor([] (const proxy_t &p) -> proxy_t
838  { return viewporter_t(p); });
839 }
840 
841 viewporter_t::viewporter_t(wp_viewporter *p, wrapper_type t)
842  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
844  {
845  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
846  set_destroy_opcode(0U);
847  }
848  set_interface(&viewporter_interface);
849  set_copy_constructor([] (const proxy_t &p) -> proxy_t
850  { return viewporter_t(p); });
851 }
852 
853 viewporter_t::viewporter_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
854  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
855  set_interface(&viewporter_interface);
856  set_copy_constructor([] (const proxy_t &p) -> proxy_t
857  { return viewporter_t(p); });
858 }
859 
860 viewporter_t viewporter_t::proxy_create_wrapper()
861 {
862  return {*this, construct_proxy_wrapper_tag()};
863 }
864 
865 const std::string viewporter_t::interface_name = "wp_viewporter";
866 
867 viewporter_t::operator wp_viewporter*() const
868 {
869  return reinterpret_cast<wp_viewporter*> (c_ptr());
870 }
871 
873 {
874  proxy_t p = marshal_constructor(1U, &viewport_interface, nullptr, surface.proxy_has_object() ? reinterpret_cast<wl_object*>(surface.c_ptr()) : nullptr);
875  return viewport_t(p);
876 }
877 
878 int viewporter_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
879 {
880  return 0;
881 }
882 
883 
884 viewport_t::viewport_t(const proxy_t &p)
885  : proxy_t(p)
886 {
888  {
889  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
890  set_destroy_opcode(0U);
891  }
892  set_interface(&viewport_interface);
893  set_copy_constructor([] (const proxy_t &p) -> proxy_t
894  { return viewport_t(p); });
895 }
896 
897 viewport_t::viewport_t()
898 {
899  set_interface(&viewport_interface);
900  set_copy_constructor([] (const proxy_t &p) -> proxy_t
901  { return viewport_t(p); });
902 }
903 
904 viewport_t::viewport_t(wp_viewport *p, wrapper_type t)
905  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
907  {
908  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
909  set_destroy_opcode(0U);
910  }
911  set_interface(&viewport_interface);
912  set_copy_constructor([] (const proxy_t &p) -> proxy_t
913  { return viewport_t(p); });
914 }
915 
916 viewport_t::viewport_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
917  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
918  set_interface(&viewport_interface);
919  set_copy_constructor([] (const proxy_t &p) -> proxy_t
920  { return viewport_t(p); });
921 }
922 
923 viewport_t viewport_t::proxy_create_wrapper()
924 {
925  return {*this, construct_proxy_wrapper_tag()};
926 }
927 
928 const std::string viewport_t::interface_name = "wp_viewport";
929 
930 viewport_t::operator wp_viewport*() const
931 {
932  return reinterpret_cast<wp_viewport*> (c_ptr());
933 }
934 
935 void viewport_t::set_source(double x, double y, double width, double height)
936 {
937  marshal(1U, x, y, width, height);
938 }
939 
940 void viewport_t::set_destination(int32_t width, int32_t height)
941 {
942  marshal(2U, width, height);
943 }
944 
945 int viewport_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
946 {
947  return 0;
948 }
949 
950 
951 xdg_wm_base_t::xdg_wm_base_t(const proxy_t &p)
952  : proxy_t(p)
953 {
955  {
956  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
957  set_destroy_opcode(0U);
958  }
959  set_interface(&xdg_wm_base_interface);
960  set_copy_constructor([] (const proxy_t &p) -> proxy_t
961  { return xdg_wm_base_t(p); });
962 }
963 
964 xdg_wm_base_t::xdg_wm_base_t()
965 {
966  set_interface(&xdg_wm_base_interface);
967  set_copy_constructor([] (const proxy_t &p) -> proxy_t
968  { return xdg_wm_base_t(p); });
969 }
970 
971 xdg_wm_base_t::xdg_wm_base_t(xdg_wm_base *p, wrapper_type t)
972  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
974  {
975  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
976  set_destroy_opcode(0U);
977  }
978  set_interface(&xdg_wm_base_interface);
979  set_copy_constructor([] (const proxy_t &p) -> proxy_t
980  { return xdg_wm_base_t(p); });
981 }
982 
983 xdg_wm_base_t::xdg_wm_base_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
984  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
985  set_interface(&xdg_wm_base_interface);
986  set_copy_constructor([] (const proxy_t &p) -> proxy_t
987  { return xdg_wm_base_t(p); });
988 }
989 
990 xdg_wm_base_t xdg_wm_base_t::proxy_create_wrapper()
991 {
992  return {*this, construct_proxy_wrapper_tag()};
993 }
994 
995 const std::string xdg_wm_base_t::interface_name = "xdg_wm_base";
996 
997 xdg_wm_base_t::operator xdg_wm_base*() const
998 {
999  return reinterpret_cast<xdg_wm_base*> (c_ptr());
1000 }
1001 
1003 {
1004  proxy_t p = marshal_constructor(1U, &xdg_positioner_interface, nullptr);
1005  return xdg_positioner_t(p);
1006 }
1007 
1009 {
1010  proxy_t p = marshal_constructor(2U, &xdg_surface_interface, nullptr, surface.proxy_has_object() ? reinterpret_cast<wl_object*>(surface.c_ptr()) : nullptr);
1011  return xdg_surface_t(p);
1012 }
1013 
1014 void xdg_wm_base_t::pong(uint32_t serial)
1015 {
1016  marshal(3U, serial);
1017 }
1018 
1019 std::function<void(uint32_t)> &xdg_wm_base_t::on_ping()
1020 {
1021  return std::static_pointer_cast<events_t>(get_events())->ping;
1022 }
1023 
1024 int xdg_wm_base_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1025 {
1026  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1027  switch(opcode)
1028  {
1029  case 0:
1030  if(events->ping) events->ping(args[0].get<uint32_t>());
1031  break;
1032  }
1033  return 0;
1034 }
1035 
1036 
1037 xdg_positioner_t::xdg_positioner_t(const proxy_t &p)
1038  : proxy_t(p)
1039 {
1041  {
1042  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1043  set_destroy_opcode(0U);
1044  }
1045  set_interface(&xdg_positioner_interface);
1046  set_copy_constructor([] (const proxy_t &p) -> proxy_t
1047  { return xdg_positioner_t(p); });
1048 }
1049 
1050 xdg_positioner_t::xdg_positioner_t()
1051 {
1052  set_interface(&xdg_positioner_interface);
1053  set_copy_constructor([] (const proxy_t &p) -> proxy_t
1054  { return xdg_positioner_t(p); });
1055 }
1056 
1057 xdg_positioner_t::xdg_positioner_t(xdg_positioner *p, wrapper_type t)
1058  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1060  {
1061  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1062  set_destroy_opcode(0U);
1063  }
1064  set_interface(&xdg_positioner_interface);
1065  set_copy_constructor([] (const proxy_t &p) -> proxy_t
1066  { return xdg_positioner_t(p); });
1067 }
1068 
1069 xdg_positioner_t::xdg_positioner_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1070  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1071  set_interface(&xdg_positioner_interface);
1072  set_copy_constructor([] (const proxy_t &p) -> proxy_t
1073  { return xdg_positioner_t(p); });
1074 }
1075 
1076 xdg_positioner_t xdg_positioner_t::proxy_create_wrapper()
1077 {
1078  return {*this, construct_proxy_wrapper_tag()};
1079 }
1080 
1081 const std::string xdg_positioner_t::interface_name = "xdg_positioner";
1082 
1083 xdg_positioner_t::operator xdg_positioner*() const
1084 {
1085  return reinterpret_cast<xdg_positioner*> (c_ptr());
1086 }
1087 
1088 void xdg_positioner_t::set_size(int32_t width, int32_t height)
1089 {
1090  marshal(1U, width, height);
1091 }
1092 
1093 void xdg_positioner_t::set_anchor_rect(int32_t x, int32_t y, int32_t width, int32_t height)
1094 {
1095  marshal(2U, x, y, width, height);
1096 }
1097 
1098 void xdg_positioner_t::set_anchor(xdg_positioner_anchor const& anchor)
1099 {
1100  marshal(3U, static_cast<uint32_t>(anchor));
1101 }
1102 
1103 void xdg_positioner_t::set_gravity(xdg_positioner_gravity const& gravity)
1104 {
1105  marshal(4U, static_cast<uint32_t>(gravity));
1106 }
1107 
1109 {
1110  marshal(5U, static_cast<uint32_t>(constraint_adjustment));
1111 }
1112 
1113 void xdg_positioner_t::set_offset(int32_t x, int32_t y)
1114 {
1115  marshal(6U, x, y);
1116 }
1117 
1119 {
1120  marshal(7U);
1121 }
1123 {
1125 }
1126 
1127 void xdg_positioner_t::set_parent_size(int32_t parent_width, int32_t parent_height)
1128 {
1129  marshal(8U, parent_width, parent_height);
1130 }
1132 {
1134 }
1135 
1137 {
1138  marshal(9U, serial);
1139 }
1141 {
1143 }
1144 
1145 int xdg_positioner_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1146 {
1147  return 0;
1148 }
1149 
1150 
1151 
1152 const bitfield<6, 8> xdg_positioner_constraint_adjustment::none{0};
1153 const bitfield<6, 8> xdg_positioner_constraint_adjustment::slide_x{1};
1154 const bitfield<6, 8> xdg_positioner_constraint_adjustment::slide_y{2};
1155 const bitfield<6, 8> xdg_positioner_constraint_adjustment::flip_x{4};
1156 const bitfield<6, 8> xdg_positioner_constraint_adjustment::flip_y{8};
1157 const bitfield<6, 8> xdg_positioner_constraint_adjustment::resize_x{16};
1158 const bitfield<6, 8> xdg_positioner_constraint_adjustment::resize_y{32};
1159 
1160 
1161 xdg_surface_t::xdg_surface_t(const proxy_t &p)
1162  : proxy_t(p)
1163 {
1165  {
1166  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1167  set_destroy_opcode(0U);
1168  }
1169  set_interface(&xdg_surface_interface);
1170  set_copy_constructor([] (const proxy_t &p) -> proxy_t
1171  { return xdg_surface_t(p); });
1172 }
1173 
1174 xdg_surface_t::xdg_surface_t()
1175 {
1176  set_interface(&xdg_surface_interface);
1177  set_copy_constructor([] (const proxy_t &p) -> proxy_t
1178  { return xdg_surface_t(p); });
1179 }
1180 
1181 xdg_surface_t::xdg_surface_t(xdg_surface *p, wrapper_type t)
1182  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1184  {
1185  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1186  set_destroy_opcode(0U);
1187  }
1188  set_interface(&xdg_surface_interface);
1189  set_copy_constructor([] (const proxy_t &p) -> proxy_t
1190  { return xdg_surface_t(p); });
1191 }
1192 
1193 xdg_surface_t::xdg_surface_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1194  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1195  set_interface(&xdg_surface_interface);
1196  set_copy_constructor([] (const proxy_t &p) -> proxy_t
1197  { return xdg_surface_t(p); });
1198 }
1199 
1200 xdg_surface_t xdg_surface_t::proxy_create_wrapper()
1201 {
1202  return {*this, construct_proxy_wrapper_tag()};
1203 }
1204 
1205 const std::string xdg_surface_t::interface_name = "xdg_surface";
1206 
1207 xdg_surface_t::operator xdg_surface*() const
1208 {
1209  return reinterpret_cast<xdg_surface*> (c_ptr());
1210 }
1211 
1213 {
1214  proxy_t p = marshal_constructor(1U, &xdg_toplevel_interface, nullptr);
1215  return xdg_toplevel_t(p);
1216 }
1217 
1219 {
1220  proxy_t p = marshal_constructor(2U, &xdg_popup_interface, nullptr, parent.proxy_has_object() ? reinterpret_cast<wl_object*>(parent.c_ptr()) : nullptr, positioner.proxy_has_object() ? reinterpret_cast<wl_object*>(positioner.c_ptr()) : nullptr);
1221  return xdg_popup_t(p);
1222 }
1223 
1224 void xdg_surface_t::set_window_geometry(int32_t x, int32_t y, int32_t width, int32_t height)
1225 {
1226  marshal(3U, x, y, width, height);
1227 }
1228 
1229 void xdg_surface_t::ack_configure(uint32_t serial)
1230 {
1231  marshal(4U, serial);
1232 }
1233 
1234 std::function<void(uint32_t)> &xdg_surface_t::on_configure()
1235 {
1236  return std::static_pointer_cast<events_t>(get_events())->configure;
1237 }
1238 
1239 int xdg_surface_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1240 {
1241  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1242  switch(opcode)
1243  {
1244  case 0:
1245  if(events->configure) events->configure(args[0].get<uint32_t>());
1246  break;
1247  }
1248  return 0;
1249 }
1250 
1251 
1252 xdg_toplevel_t::xdg_toplevel_t(const proxy_t &p)
1253  : proxy_t(p)
1254 {
1256  {
1257  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1258  set_destroy_opcode(0U);
1259  }
1260  set_interface(&xdg_toplevel_interface);
1261  set_copy_constructor([] (const proxy_t &p) -> proxy_t
1262  { return xdg_toplevel_t(p); });
1263 }
1264 
1265 xdg_toplevel_t::xdg_toplevel_t()
1266 {
1267  set_interface(&xdg_toplevel_interface);
1268  set_copy_constructor([] (const proxy_t &p) -> proxy_t
1269  { return xdg_toplevel_t(p); });
1270 }
1271 
1272 xdg_toplevel_t::xdg_toplevel_t(xdg_toplevel *p, wrapper_type t)
1273  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1275  {
1276  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1277  set_destroy_opcode(0U);
1278  }
1279  set_interface(&xdg_toplevel_interface);
1280  set_copy_constructor([] (const proxy_t &p) -> proxy_t
1281  { return xdg_toplevel_t(p); });
1282 }
1283 
1284 xdg_toplevel_t::xdg_toplevel_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1285  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1286  set_interface(&xdg_toplevel_interface);
1287  set_copy_constructor([] (const proxy_t &p) -> proxy_t
1288  { return xdg_toplevel_t(p); });
1289 }
1290 
1291 xdg_toplevel_t xdg_toplevel_t::proxy_create_wrapper()
1292 {
1293  return {*this, construct_proxy_wrapper_tag()};
1294 }
1295 
1296 const std::string xdg_toplevel_t::interface_name = "xdg_toplevel";
1297 
1298 xdg_toplevel_t::operator xdg_toplevel*() const
1299 {
1300  return reinterpret_cast<xdg_toplevel*> (c_ptr());
1301 }
1302 
1304 {
1305  marshal(1U, parent.proxy_has_object() ? reinterpret_cast<wl_object*>(parent.c_ptr()) : nullptr);
1306 }
1307 
1308 void xdg_toplevel_t::set_title(std::string const& title)
1309 {
1310  marshal(2U, title);
1311 }
1312 
1313 void xdg_toplevel_t::set_app_id(std::string const& app_id)
1314 {
1315  marshal(3U, app_id);
1316 }
1317 
1318 void xdg_toplevel_t::show_window_menu(seat_t const& seat, uint32_t serial, int32_t x, int32_t y)
1319 {
1320  marshal(4U, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr, serial, x, y);
1321 }
1322 
1323 void xdg_toplevel_t::move(seat_t const& seat, uint32_t serial)
1324 {
1325  marshal(5U, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr, serial);
1326 }
1327 
1328 void xdg_toplevel_t::resize(seat_t const& seat, uint32_t serial, xdg_toplevel_resize_edge const& edges)
1329 {
1330  marshal(6U, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr, serial, static_cast<uint32_t>(edges));
1331 }
1332 
1333 void xdg_toplevel_t::set_max_size(int32_t width, int32_t height)
1334 {
1335  marshal(7U, width, height);
1336 }
1337 
1338 void xdg_toplevel_t::set_min_size(int32_t width, int32_t height)
1339 {
1340  marshal(8U, width, height);
1341 }
1342 
1344 {
1345  marshal(9U);
1346 }
1347 
1349 {
1350  marshal(10U);
1351 }
1352 
1354 {
1355  marshal(11U, output.proxy_has_object() ? reinterpret_cast<wl_object*>(output.c_ptr()) : nullptr);
1356 }
1357 
1359 {
1360  marshal(12U);
1361 }
1362 
1364 {
1365  marshal(13U);
1366 }
1367 
1368 std::function<void(int32_t, int32_t, array_t)> &xdg_toplevel_t::on_configure()
1369 {
1370  return std::static_pointer_cast<events_t>(get_events())->configure;
1371 }
1372 
1373 std::function<void()> &xdg_toplevel_t::on_close()
1374 {
1375  return std::static_pointer_cast<events_t>(get_events())->close;
1376 }
1377 
1378 int xdg_toplevel_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1379 {
1380  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1381  switch(opcode)
1382  {
1383  case 0:
1384  if(events->configure) events->configure(args[0].get<int32_t>(), args[1].get<int32_t>(), args[2].get<array_t>());
1385  break;
1386  case 1:
1387  if(events->close) events->close();
1388  break;
1389  }
1390  return 0;
1391 }
1392 const bitfield<4, 10> xdg_toplevel_resize_edge::none{0};
1393 const bitfield<4, 10> xdg_toplevel_resize_edge::top{1};
1394 const bitfield<4, 10> xdg_toplevel_resize_edge::bottom{2};
1395 const bitfield<4, 10> xdg_toplevel_resize_edge::left{4};
1396 const bitfield<4, 10> xdg_toplevel_resize_edge::top_left{5};
1397 const bitfield<4, 10> xdg_toplevel_resize_edge::bottom_left{6};
1398 const bitfield<4, 10> xdg_toplevel_resize_edge::right{8};
1399 const bitfield<4, 10> xdg_toplevel_resize_edge::top_right{9};
1400 const bitfield<4, 10> xdg_toplevel_resize_edge::bottom_right{10};
1401 
1402 
1403 
1404 xdg_popup_t::xdg_popup_t(const proxy_t &p)
1405  : proxy_t(p)
1406 {
1408  {
1409  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1410  set_destroy_opcode(0U);
1411  }
1412  set_interface(&xdg_popup_interface);
1413  set_copy_constructor([] (const proxy_t &p) -> proxy_t
1414  { return xdg_popup_t(p); });
1415 }
1416 
1417 xdg_popup_t::xdg_popup_t()
1418 {
1419  set_interface(&xdg_popup_interface);
1420  set_copy_constructor([] (const proxy_t &p) -> proxy_t
1421  { return xdg_popup_t(p); });
1422 }
1423 
1424 xdg_popup_t::xdg_popup_t(xdg_popup *p, wrapper_type t)
1425  : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1427  {
1428  set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1429  set_destroy_opcode(0U);
1430  }
1431  set_interface(&xdg_popup_interface);
1432  set_copy_constructor([] (const proxy_t &p) -> proxy_t
1433  { return xdg_popup_t(p); });
1434 }
1435 
1436 xdg_popup_t::xdg_popup_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1437  : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1438  set_interface(&xdg_popup_interface);
1439  set_copy_constructor([] (const proxy_t &p) -> proxy_t
1440  { return xdg_popup_t(p); });
1441 }
1442 
1443 xdg_popup_t xdg_popup_t::proxy_create_wrapper()
1444 {
1445  return {*this, construct_proxy_wrapper_tag()};
1446 }
1447 
1448 const std::string xdg_popup_t::interface_name = "xdg_popup";
1449 
1450 xdg_popup_t::operator xdg_popup*() const
1451 {
1452  return reinterpret_cast<xdg_popup*> (c_ptr());
1453 }
1454 
1455 void xdg_popup_t::grab(seat_t const& seat, uint32_t serial)
1456 {
1457  marshal(1U, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr, serial);
1458 }
1459 
1460 void xdg_popup_t::reposition(xdg_positioner_t const& positioner, uint32_t token)
1461 {
1462  marshal(2U, positioner.proxy_has_object() ? reinterpret_cast<wl_object*>(positioner.c_ptr()) : nullptr, token);
1463 }
1465 {
1466  return (get_version() >= reposition_since_version);
1467 }
1468 
1469 std::function<void(int32_t, int32_t, int32_t, int32_t)> &xdg_popup_t::on_configure()
1470 {
1471  return std::static_pointer_cast<events_t>(get_events())->configure;
1472 }
1473 
1474 std::function<void()> &xdg_popup_t::on_popup_done()
1475 {
1476  return std::static_pointer_cast<events_t>(get_events())->popup_done;
1477 }
1478 
1479 std::function<void(uint32_t)> &xdg_popup_t::on_repositioned()
1480 {
1481  return std::static_pointer_cast<events_t>(get_events())->repositioned;
1482 }
1483 
1484 int xdg_popup_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1485 {
1486  std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1487  switch(opcode)
1488  {
1489  case 0:
1490  if(events->configure) events->configure(args[0].get<int32_t>(), args[1].get<int32_t>(), args[2].get<int32_t>(), args[3].get<int32_t>());
1491  break;
1492  case 1:
1493  if(events->popup_done) events->popup_done();
1494  break;
1495  case 2:
1496  if(events->repositioned) events->repositioned(args[0].get<uint32_t>());
1497  break;
1498  }
1499  return 0;
1500 }
1501 
1502 
1503 
wayland::xdg_toplevel_t::resize
void resize(seat_t const &seat, uint32_t serial, xdg_toplevel_resize_edge const &edges)
start an interactive resize
Definition: wayland-client-protocol-extra.cpp:1328
wayland::presentation_feedback_kind::hw_clock
static const detail::bitfield< 4, 1 > hw_clock
hardware provided the presentation timestamp
Definition: wayland-client-protocol-extra.hpp:334
wayland::presentation_feedback_t
presentation time feedback event
Definition: wayland-client-protocol-extra.hpp:187
wayland::xdg_wm_base_t::pong
void pong(uint32_t serial)
respond to a ping event
Definition: wayland-client-protocol-extra.cpp:1014
wayland::xdg_toplevel_t::move
void move(seat_t const &seat, uint32_t serial)
start an interactive move
Definition: wayland-client-protocol-extra.cpp:1323
wayland::xdg_popup_t::reposition_since_version
static constexpr std::uint32_t reposition_since_version
Minimum protocol version required for the reposition function.
Definition: wayland-client-protocol-extra.hpp:1881
wayland::presentation_feedback_t::on_discarded
std::function< void()> & on_discarded()
the content update was not displayed
Definition: wayland-client-protocol-extra.cpp:793
wayland::presentation_t::feedback
presentation_feedback_t feedback(surface_t const &surface)
request presentation feedback information
Definition: wayland-client-protocol-extra.cpp:710
wayland::proxy_t::get_wrapper_type
wrapper_type get_wrapper_type() const
Get the type of a proxy object.
Definition: wayland-client.hpp:301
wayland::presentation_t::on_clock_id
std::function< void(uint32_t)> & on_clock_id()
clock ID for timestamps
Definition: wayland-client-protocol-extra.cpp:716
wayland::proxy_t::wrapper_type::standard
@ standard
wayland::presentation_feedback_kind::hw_completion
static const detail::bitfield< 4, 1 > hw_completion
hardware signalled the start of the presentation
Definition: wayland-client-protocol-extra.hpp:336
wayland::xdg_positioner_t::set_constraint_adjustment
void set_constraint_adjustment(xdg_positioner_constraint_adjustment const &constraint_adjustment)
set the adjustment to be done when constrained
Definition: wayland-client-protocol-extra.cpp:1108
wayland::xdg_positioner_t::set_size
void set_size(int32_t width, int32_t height)
set the size of the to-be positioned rectangle
Definition: wayland-client-protocol-extra.cpp:1088
wayland::presentation_feedback_kind
bitmask of flags in presented event
Definition: wayland-client-protocol-extra.hpp:326
wayland::xdg_popup_t
short-lived, popup surfaces for menus
Definition: wayland-client-protocol-extra.hpp:1771
wayland::xdg_toplevel_t::unset_fullscreen
void unset_fullscreen()
unset the window as fullscreen
Definition: wayland-client-protocol-extra.cpp:1358
wayland::xdg_toplevel_t::set_title
void set_title(std::string const &title)
set surface title
Definition: wayland-client-protocol-extra.cpp:1308
wayland::xdg_toplevel_t::set_min_size
void set_min_size(int32_t width, int32_t height)
set the minimum size
Definition: wayland-client-protocol-extra.cpp:1338
wayland::presentation_t
timed presentation related wl_surface requests
Definition: wayland-client-protocol-extra.hpp:76
wayland::xdg_positioner_t::set_offset
void set_offset(int32_t x, int32_t y)
set surface position offset
Definition: wayland-client-protocol-extra.cpp:1113
wayland::xdg_positioner_t::set_anchor
void set_anchor(xdg_positioner_anchor const &anchor)
set anchor rectangle anchor
Definition: wayland-client-protocol-extra.cpp:1098
wayland::xdg_toplevel_t::set_maximized
void set_maximized()
maximize the window
Definition: wayland-client-protocol-extra.cpp:1343
wayland::xdg_surface_t::get_popup
xdg_popup_t get_popup(xdg_surface_t const &parent, xdg_positioner_t const &positioner)
assign the xdg_popup surface role
Definition: wayland-client-protocol-extra.cpp:1218
wayland::presentation_feedback_kind::zero_copy
static const detail::bitfield< 4, 1 > zero_copy
presentation was done zero-copy
Definition: wayland-client-protocol-extra.hpp:338
wayland::xdg_positioner_t::set_reactive_since_version
static constexpr std::uint32_t set_reactive_since_version
Minimum protocol version required for the set_reactive function.
Definition: wayland-client-protocol-extra.hpp:856
wayland::xdg_surface_t
desktop user interface surface base interface
Definition: wayland-client-protocol-extra.hpp:1030
wayland::xdg_popup_t::on_repositioned
std::function< void(uint32_t)> & on_repositioned()
signal the completion of a repositioned request
Definition: wayland-client-protocol-extra.cpp:1479
wayland::proxy_t::proxy_has_object
bool proxy_has_object() const
Check whether this wrapper actually wraps an object.
wayland::xdg_wm_base_t::get_xdg_surface
xdg_surface_t get_xdg_surface(surface_t const &surface)
create a shell surface from a surface
Definition: wayland-client-protocol-extra.cpp:1008
wayland::xdg_positioner_t::can_set_parent_configure
bool can_set_parent_configure() const
Check whether the set_parent_configure function is available with the currently bound version of the ...
Definition: wayland-client-protocol-extra.cpp:1140
wayland::xdg_toplevel_resize_edge
edge values for resizing
Definition: wayland-client-protocol-extra.hpp:1698
wayland::xdg_positioner_t::set_anchor_rect
void set_anchor_rect(int32_t x, int32_t y, int32_t width, int32_t height)
set the anchor rectangle within the parent surface
Definition: wayland-client-protocol-extra.cpp:1093
wayland::xdg_toplevel_t::set_max_size
void set_max_size(int32_t width, int32_t height)
set the maximum size
Definition: wayland-client-protocol-extra.cpp:1333
wayland::xdg_positioner_t::set_parent_configure
void set_parent_configure(uint32_t serial)
set parent configure this is a response to
Definition: wayland-client-protocol-extra.cpp:1136
wayland::xdg_toplevel_t::set_minimized
void set_minimized()
set the window as minimized
Definition: wayland-client-protocol-extra.cpp:1363
wayland::xdg_positioner_t::set_parent_configure_since_version
static constexpr std::uint32_t set_parent_configure_since_version
Minimum protocol version required for the set_parent_configure function.
Definition: wayland-client-protocol-extra.hpp:900
wayland::surface_t
an onscreen surface
Definition: wayland-client-protocol.hpp:1974
wayland::proxy_t::get_version
uint32_t get_version() const
Get the protocol object version of a proxy object.
wayland::xdg_positioner_t
child surface positioner
Definition: wayland-client-protocol-extra.hpp:699
wayland::proxy_t
Represents a protocol object on the client side.
Definition: wayland-client.hpp:109
wayland::xdg_surface_t::on_configure
std::function< void(uint32_t)> & on_configure()
suggest a surface change
Definition: wayland-client-protocol-extra.cpp:1234
wayland::xdg_popup_t::grab
void grab(seat_t const &seat, uint32_t serial)
make the popup take an explicit grab
Definition: wayland-client-protocol-extra.cpp:1455
wayland::xdg_toplevel_t::set_app_id
void set_app_id(std::string const &app_id)
set application ID
Definition: wayland-client-protocol-extra.cpp:1313
wayland::xdg_toplevel_t::on_close
std::function< void()> & on_close()
surface wants to be closed
Definition: wayland-client-protocol-extra.cpp:1373
wayland::xdg_positioner_t::set_reactive
void set_reactive()
continuously reconstrain the surface
Definition: wayland-client-protocol-extra.cpp:1118
wayland::xdg_toplevel_t::on_configure
std::function< void(int32_t, int32_t, array_t)> & on_configure()
suggest a surface change
Definition: wayland-client-protocol-extra.cpp:1368
wayland::xdg_toplevel_t::set_fullscreen
void set_fullscreen(output_t const &output)
set the window as fullscreen on an output
Definition: wayland-client-protocol-extra.cpp:1353
wayland::viewport_t::set_source
void set_source(double x, double y, double width, double height)
set the source rectangle for cropping
Definition: wayland-client-protocol-extra.cpp:935
wayland::viewport_t::set_destination
void set_destination(int32_t width, int32_t height)
set the surface size for scaling
Definition: wayland-client-protocol-extra.cpp:940
wayland::proxy_t::c_ptr
wl_proxy * c_ptr() const
Get a pointer to the underlying C struct.
wayland::xdg_surface_t::get_toplevel
xdg_toplevel_t get_toplevel()
assign the xdg_toplevel surface role
Definition: wayland-client-protocol-extra.cpp:1212
wayland::xdg_toplevel_t
toplevel surface
Definition: wayland-client-protocol-extra.hpp:1218
wayland::xdg_surface_t::set_window_geometry
void set_window_geometry(int32_t x, int32_t y, int32_t width, int32_t height)
set the new window geometry
Definition: wayland-client-protocol-extra.cpp:1224
wayland::presentation_feedback_t::on_sync_output
std::function< void(output_t)> & on_sync_output()
presentation synchronized to this output
Definition: wayland-client-protocol-extra.cpp:783
wayland::xdg_positioner_t::can_set_reactive
bool can_set_reactive() const
Check whether the set_reactive function is available with the currently bound version of the protocol...
Definition: wayland-client-protocol-extra.cpp:1122
wayland::seat_t
group of input devices
Definition: wayland-client-protocol.hpp:2413
wayland::xdg_positioner_constraint_adjustment
constraint adjustments
Definition: wayland-client-protocol-extra.hpp:966
wayland::xdg_toplevel_t::set_parent
void set_parent(xdg_toplevel_t const &parent)
set the parent of this surface
Definition: wayland-client-protocol-extra.cpp:1303
wayland::xdg_positioner_t::set_parent_size
void set_parent_size(int32_t parent_width, int32_t parent_height)
Definition: wayland-client-protocol-extra.cpp:1127
wayland::xdg_popup_t::on_configure
std::function< void(int32_t, int32_t, int32_t, int32_t)> & on_configure()
configure the popup surface
Definition: wayland-client-protocol-extra.cpp:1469
wayland::xdg_popup_t::reposition
void reposition(xdg_positioner_t const &positioner, uint32_t token)
recalculate the popup's location
Definition: wayland-client-protocol-extra.cpp:1460
wayland::xdg_surface_t::ack_configure
void ack_configure(uint32_t serial)
ack a configure event
Definition: wayland-client-protocol-extra.cpp:1229
wayland::xdg_popup_t::on_popup_done
std::function< void()> & on_popup_done()
popup interaction is done
Definition: wayland-client-protocol-extra.cpp:1474
wayland::xdg_toplevel_t::unset_maximized
void unset_maximized()
unmaximize the window
Definition: wayland-client-protocol-extra.cpp:1348
wayland::xdg_wm_base_t
create desktop-style surfaces
Definition: wayland-client-protocol-extra.hpp:565
wayland::xdg_positioner_t::set_parent_size_since_version
static constexpr std::uint32_t set_parent_size_since_version
Minimum protocol version required for the set_parent_size function.
Definition: wayland-client-protocol-extra.hpp:880
wayland::presentation_feedback_t::on_presented
std::function< void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, presentation_feedback_kind)> & on_presented()
the content update was displayed
Definition: wayland-client-protocol-extra.cpp:788
wayland::viewport_t
crop and scale interface to a wl_surface
Definition: wayland-client-protocol-extra.hpp:468
wayland::xdg_wm_base_t::on_ping
std::function< void(uint32_t)> & on_ping()
check if the client is alive
Definition: wayland-client-protocol-extra.cpp:1019
wayland::xdg_positioner_t::can_set_parent_size
bool can_set_parent_size() const
Check whether the set_parent_size function is available with the currently bound version of the proto...
Definition: wayland-client-protocol-extra.cpp:1131
wayland::viewporter_t
surface cropping and scaling
Definition: wayland-client-protocol-extra.hpp:353
wayland::xdg_popup_t::can_reposition
bool can_reposition() const
Check whether the reposition function is available with the currently bound version of the protocol.
Definition: wayland-client-protocol-extra.cpp:1464
wayland::xdg_toplevel_t::show_window_menu
void show_window_menu(seat_t const &seat, uint32_t serial, int32_t x, int32_t y)
show the window menu
Definition: wayland-client-protocol-extra.cpp:1318
wayland::xdg_positioner_t::set_gravity
void set_gravity(xdg_positioner_gravity const &gravity)
set child surface gravity
Definition: wayland-client-protocol-extra.cpp:1103
wayland::presentation_feedback_kind::vsync
static const detail::bitfield< 4, 1 > vsync
presentation was vsync'd
Definition: wayland-client-protocol-extra.hpp:332
wayland::output_t
compositor output region
Definition: wayland-client-protocol.hpp:3355
wayland::xdg_wm_base_t::create_positioner
xdg_positioner_t create_positioner()
create a positioner object
Definition: wayland-client-protocol-extra.cpp:1002
wayland::viewporter_t::get_viewport
viewport_t get_viewport(surface_t const &surface)
extend surface interface for crop and scale
Definition: wayland-client-protocol-extra.cpp:872