Wayland++ 0.2.8
C++ Bindings for Wayland
wayland-client-protocol-extra.cpp
1#include <wayland-client-protocol-extra.hpp>
2
3using namespace wayland;
4using namespace detail;
5
6const wl_interface* presentation_interface_destroy_request[0] = {
7};
8
9const wl_interface* presentation_interface_feedback_request[2] = {
10 &surface_interface,
11 &presentation_feedback_interface,
12};
13
14const wl_interface* presentation_interface_clock_id_event[1] = {
15 nullptr,
16};
17
18const 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
31const wl_message presentation_interface_events[1] = {
32 {
33 "clock_id",
34 "u",
35 presentation_interface_clock_id_event,
36 },
37};
38
39const 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
49const wl_interface* presentation_feedback_interface_sync_output_event[1] = {
50 &output_interface,
51};
52
53const wl_interface* presentation_feedback_interface_presented_event[7] = {
54 nullptr,
55 nullptr,
56 nullptr,
57 nullptr,
58 nullptr,
59 nullptr,
60 nullptr,
61};
62
63const wl_interface* presentation_feedback_interface_discarded_event[0] = {
64};
65
66const wl_message presentation_feedback_interface_requests[0] = {
67};
68
69const 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
87const 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
97const wl_interface* viewporter_interface_destroy_request[0] = {
98};
99
100const wl_interface* viewporter_interface_get_viewport_request[2] = {
101 &viewport_interface,
102 &surface_interface,
103};
104
105const 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
118const wl_message viewporter_interface_events[0] = {
119};
120
121const 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
131const wl_interface* viewport_interface_destroy_request[0] = {
132};
133
134const wl_interface* viewport_interface_set_source_request[4] = {
135 nullptr,
136 nullptr,
137 nullptr,
138 nullptr,
139};
140
141const wl_interface* viewport_interface_set_destination_request[2] = {
142 nullptr,
143 nullptr,
144};
145
146const 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
164const wl_message viewport_interface_events[0] = {
165};
166
167const 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
177const wl_interface* xdg_wm_base_interface_destroy_request[0] = {
178};
179
180const wl_interface* xdg_wm_base_interface_create_positioner_request[1] = {
181 &xdg_positioner_interface,
182};
183
184const wl_interface* xdg_wm_base_interface_get_xdg_surface_request[2] = {
185 &xdg_surface_interface,
186 &surface_interface,
187};
188
189const wl_interface* xdg_wm_base_interface_pong_request[1] = {
190 nullptr,
191};
192
193const wl_interface* xdg_wm_base_interface_ping_event[1] = {
194 nullptr,
195};
196
197const 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
220const wl_message xdg_wm_base_interface_events[1] = {
221 {
222 "ping",
223 "u",
224 xdg_wm_base_interface_ping_event,
225 },
226};
227
228const 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
238const wl_interface* xdg_positioner_interface_destroy_request[0] = {
239};
240
241const wl_interface* xdg_positioner_interface_set_size_request[2] = {
242 nullptr,
243 nullptr,
244};
245
246const wl_interface* xdg_positioner_interface_set_anchor_rect_request[4] = {
247 nullptr,
248 nullptr,
249 nullptr,
250 nullptr,
251};
252
253const wl_interface* xdg_positioner_interface_set_anchor_request[1] = {
254 nullptr,
255};
256
257const wl_interface* xdg_positioner_interface_set_gravity_request[1] = {
258 nullptr,
259};
260
261const wl_interface* xdg_positioner_interface_set_constraint_adjustment_request[1] = {
262 nullptr,
263};
264
265const wl_interface* xdg_positioner_interface_set_offset_request[2] = {
266 nullptr,
267 nullptr,
268};
269
270const wl_interface* xdg_positioner_interface_set_reactive_request[0] = {
271};
272
273const wl_interface* xdg_positioner_interface_set_parent_size_request[2] = {
274 nullptr,
275 nullptr,
276};
277
278const wl_interface* xdg_positioner_interface_set_parent_configure_request[1] = {
279 nullptr,
280};
281
282const 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
335const wl_message xdg_positioner_interface_events[0] = {
336};
337
338const 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
348const wl_interface* xdg_surface_interface_destroy_request[0] = {
349};
350
351const wl_interface* xdg_surface_interface_get_toplevel_request[1] = {
352 &xdg_toplevel_interface,
353};
354
355const wl_interface* xdg_surface_interface_get_popup_request[3] = {
356 &xdg_popup_interface,
357 &xdg_surface_interface,
358 &xdg_positioner_interface,
359};
360
361const wl_interface* xdg_surface_interface_set_window_geometry_request[4] = {
362 nullptr,
363 nullptr,
364 nullptr,
365 nullptr,
366};
367
368const wl_interface* xdg_surface_interface_ack_configure_request[1] = {
369 nullptr,
370};
371
372const wl_interface* xdg_surface_interface_configure_event[1] = {
373 nullptr,
374};
375
376const 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
404const wl_message xdg_surface_interface_events[1] = {
405 {
406 "configure",
407 "u",
408 xdg_surface_interface_configure_event,
409 },
410};
411
412const 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
422const wl_interface* xdg_toplevel_interface_destroy_request[0] = {
423};
424
425const wl_interface* xdg_toplevel_interface_set_parent_request[1] = {
426 &xdg_toplevel_interface,
427};
428
429const wl_interface* xdg_toplevel_interface_set_title_request[1] = {
430 nullptr,
431};
432
433const wl_interface* xdg_toplevel_interface_set_app_id_request[1] = {
434 nullptr,
435};
436
437const wl_interface* xdg_toplevel_interface_show_window_menu_request[4] = {
438 &seat_interface,
439 nullptr,
440 nullptr,
441 nullptr,
442};
443
444const wl_interface* xdg_toplevel_interface_move_request[2] = {
445 &seat_interface,
446 nullptr,
447};
448
449const wl_interface* xdg_toplevel_interface_resize_request[3] = {
450 &seat_interface,
451 nullptr,
452 nullptr,
453};
454
455const wl_interface* xdg_toplevel_interface_set_max_size_request[2] = {
456 nullptr,
457 nullptr,
458};
459
460const wl_interface* xdg_toplevel_interface_set_min_size_request[2] = {
461 nullptr,
462 nullptr,
463};
464
465const wl_interface* xdg_toplevel_interface_set_maximized_request[0] = {
466};
467
468const wl_interface* xdg_toplevel_interface_unset_maximized_request[0] = {
469};
470
471const wl_interface* xdg_toplevel_interface_set_fullscreen_request[1] = {
472 &output_interface,
473};
474
475const wl_interface* xdg_toplevel_interface_unset_fullscreen_request[0] = {
476};
477
478const wl_interface* xdg_toplevel_interface_set_minimized_request[0] = {
479};
480
481const wl_interface* xdg_toplevel_interface_configure_event[3] = {
482 nullptr,
483 nullptr,
484 nullptr,
485};
486
487const wl_interface* xdg_toplevel_interface_close_event[0] = {
488};
489
490const 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
563const 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
576const 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
586const wl_interface* xdg_popup_interface_destroy_request[0] = {
587};
588
589const wl_interface* xdg_popup_interface_grab_request[2] = {
590 &seat_interface,
591 nullptr,
592};
593
594const wl_interface* xdg_popup_interface_reposition_request[2] = {
595 &xdg_positioner_interface,
596 nullptr,
597};
598
599const wl_interface* xdg_popup_interface_configure_event[4] = {
600 nullptr,
601 nullptr,
602 nullptr,
603 nullptr,
604};
605
606const wl_interface* xdg_popup_interface_popup_done_event[0] = {
607};
608
609const wl_interface* xdg_popup_interface_repositioned_event[1] = {
610 nullptr,
611};
612
613const 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
631const 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
649const 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
659presentation_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
672presentation_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
679presentation_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
691presentation_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
698presentation_t presentation_t::proxy_create_wrapper()
699{
700 return {*this, construct_proxy_wrapper_tag()};
701}
702
703const std::string presentation_t::interface_name = "wp_presentation";
704
705presentation_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
716std::function<void(uint32_t)> &presentation_t::on_clock_id()
717{
718 return std::static_pointer_cast<events_t>(get_events())->clock_id;
719}
720
721int 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
734presentation_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
746presentation_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
753presentation_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
764presentation_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
771presentation_feedback_t presentation_feedback_t::proxy_create_wrapper()
772{
773 return {*this, construct_proxy_wrapper_tag()};
774}
775
776const std::string presentation_feedback_t::interface_name = "wp_presentation_feedback";
777
778presentation_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
788std::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
798int 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}
815const bitfield<4, 1> presentation_feedback_kind::vsync{0x1};
816const bitfield<4, 1> presentation_feedback_kind::hw_clock{0x2};
817const bitfield<4, 1> presentation_feedback_kind::hw_completion{0x4};
818const bitfield<4, 1> presentation_feedback_kind::zero_copy{0x8};
819
820
821viewporter_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
834viewporter_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
841viewporter_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
853viewporter_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
860viewporter_t viewporter_t::proxy_create_wrapper()
861{
862 return {*this, construct_proxy_wrapper_tag()};
863}
864
865const std::string viewporter_t::interface_name = "wp_viewporter";
866
867viewporter_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
878int 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
884viewport_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
897viewport_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
904viewport_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
916viewport_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
923viewport_t viewport_t::proxy_create_wrapper()
924{
925 return {*this, construct_proxy_wrapper_tag()};
926}
927
928const std::string viewport_t::interface_name = "wp_viewport";
929
930viewport_t::operator wp_viewport*() const
931{
932 return reinterpret_cast<wp_viewport*> (c_ptr());
933}
934
935void viewport_t::set_source(double x, double y, double width, double height)
936{
937 marshal(1U, x, y, width, height);
938}
939
940void viewport_t::set_destination(int32_t width, int32_t height)
941{
942 marshal(2U, width, height);
943}
944
945int 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
951xdg_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
964xdg_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
971xdg_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
983xdg_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
990xdg_wm_base_t xdg_wm_base_t::proxy_create_wrapper()
991{
992 return {*this, construct_proxy_wrapper_tag()};
993}
994
995const std::string xdg_wm_base_t::interface_name = "xdg_wm_base";
996
997xdg_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
1014void xdg_wm_base_t::pong(uint32_t serial)
1015{
1016 marshal(3U, serial);
1017}
1018
1019std::function<void(uint32_t)> &xdg_wm_base_t::on_ping()
1020{
1021 return std::static_pointer_cast<events_t>(get_events())->ping;
1022}
1023
1024int 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
1037xdg_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
1050xdg_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
1057xdg_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
1069xdg_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
1076xdg_positioner_t xdg_positioner_t::proxy_create_wrapper()
1077{
1078 return {*this, construct_proxy_wrapper_tag()};
1079}
1080
1081const std::string xdg_positioner_t::interface_name = "xdg_positioner";
1082
1083xdg_positioner_t::operator xdg_positioner*() const
1084{
1085 return reinterpret_cast<xdg_positioner*> (c_ptr());
1086}
1087
1088void xdg_positioner_t::set_size(int32_t width, int32_t height)
1089{
1090 marshal(1U, width, height);
1091}
1092
1093void 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
1098void xdg_positioner_t::set_anchor(xdg_positioner_anchor const& anchor)
1099{
1100 marshal(3U, static_cast<uint32_t>(anchor));
1101}
1102
1103void 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
1113void 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
1127void 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
1145int 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
1152const bitfield<6, 8> xdg_positioner_constraint_adjustment::none{0};
1153const bitfield<6, 8> xdg_positioner_constraint_adjustment::slide_x{1};
1154const bitfield<6, 8> xdg_positioner_constraint_adjustment::slide_y{2};
1155const bitfield<6, 8> xdg_positioner_constraint_adjustment::flip_x{4};
1156const bitfield<6, 8> xdg_positioner_constraint_adjustment::flip_y{8};
1157const bitfield<6, 8> xdg_positioner_constraint_adjustment::resize_x{16};
1158const bitfield<6, 8> xdg_positioner_constraint_adjustment::resize_y{32};
1159
1160
1161xdg_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
1174xdg_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
1181xdg_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
1193xdg_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
1200xdg_surface_t xdg_surface_t::proxy_create_wrapper()
1201{
1202 return {*this, construct_proxy_wrapper_tag()};
1203}
1204
1205const std::string xdg_surface_t::interface_name = "xdg_surface";
1206
1207xdg_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
1224void 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
1229void xdg_surface_t::ack_configure(uint32_t serial)
1230{
1231 marshal(4U, serial);
1232}
1233
1234std::function<void(uint32_t)> &xdg_surface_t::on_configure()
1235{
1236 return std::static_pointer_cast<events_t>(get_events())->configure;
1237}
1238
1239int 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
1252xdg_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
1265xdg_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
1272xdg_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
1284xdg_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
1291xdg_toplevel_t xdg_toplevel_t::proxy_create_wrapper()
1292{
1293 return {*this, construct_proxy_wrapper_tag()};
1294}
1295
1296const std::string xdg_toplevel_t::interface_name = "xdg_toplevel";
1297
1298xdg_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
1308void xdg_toplevel_t::set_title(std::string const& title)
1309{
1310 marshal(2U, title);
1311}
1312
1313void xdg_toplevel_t::set_app_id(std::string const& app_id)
1314{
1315 marshal(3U, app_id);
1316}
1317
1318void 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
1323void 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
1328void 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
1333void xdg_toplevel_t::set_max_size(int32_t width, int32_t height)
1334{
1335 marshal(7U, width, height);
1336}
1337
1338void 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
1368std::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
1373std::function<void()> &xdg_toplevel_t::on_close()
1374{
1375 return std::static_pointer_cast<events_t>(get_events())->close;
1376}
1377
1378int 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}
1392const bitfield<4, 10> xdg_toplevel_resize_edge::none{0};
1393const bitfield<4, 10> xdg_toplevel_resize_edge::top{1};
1394const bitfield<4, 10> xdg_toplevel_resize_edge::bottom{2};
1395const bitfield<4, 10> xdg_toplevel_resize_edge::left{4};
1396const bitfield<4, 10> xdg_toplevel_resize_edge::top_left{5};
1397const bitfield<4, 10> xdg_toplevel_resize_edge::bottom_left{6};
1398const bitfield<4, 10> xdg_toplevel_resize_edge::right{8};
1399const bitfield<4, 10> xdg_toplevel_resize_edge::top_right{9};
1400const bitfield<4, 10> xdg_toplevel_resize_edge::bottom_right{10};
1401
1402
1403
1404xdg_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
1417xdg_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
1424xdg_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
1436xdg_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
1443xdg_popup_t xdg_popup_t::proxy_create_wrapper()
1444{
1445 return {*this, construct_proxy_wrapper_tag()};
1446}
1447
1448const std::string xdg_popup_t::interface_name = "xdg_popup";
1449
1450xdg_popup_t::operator xdg_popup*() const
1451{
1452 return reinterpret_cast<xdg_popup*> (c_ptr());
1453}
1454
1455void 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
1460void 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{
1467}
1468
1469std::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
1474std::function<void()> &xdg_popup_t::on_popup_done()
1475{
1476 return std::static_pointer_cast<events_t>(get_events())->popup_done;
1477}
1478
1479std::function<void(uint32_t)> &xdg_popup_t::on_repositioned()
1480{
1481 return std::static_pointer_cast<events_t>(get_events())->repositioned;
1482}
1483
1484int 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
compositor output region
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
std::function< void()> & on_discarded()
the content update was not displayed
std::function< void(output_t)> & on_sync_output()
presentation synchronized to this output
timed presentation related wl_surface requests
std::function< void(uint32_t)> & on_clock_id()
clock ID for timestamps
presentation_feedback_t feedback(surface_t const &surface)
request presentation feedback information
Represents a protocol object on the client side.
bool proxy_has_object() const
Check whether this wrapper actually wraps an object.
uint32_t get_version() const
Get the protocol object version of a proxy object.
wrapper_type get_wrapper_type() const
Get the type of a proxy object.
wl_proxy * c_ptr() const
Get a pointer to the underlying C struct.
group of input devices
crop and scale interface to a wl_surface
void set_source(double x, double y, double width, double height)
set the source rectangle for cropping
void set_destination(int32_t width, int32_t height)
set the surface size for scaling
surface cropping and scaling
viewport_t get_viewport(surface_t const &surface)
extend surface interface for crop and scale
short-lived, popup surfaces for menus
std::function< void(int32_t, int32_t, int32_t, int32_t)> & on_configure()
configure the popup surface
std::function< void()> & on_popup_done()
popup interaction is done
void grab(seat_t const &seat, uint32_t serial)
make the popup take an explicit grab
void reposition(xdg_positioner_t const &positioner, uint32_t token)
recalculate the popup's location
std::function< void(uint32_t)> & on_repositioned()
signal the completion of a repositioned request
bool can_reposition() const
Check whether the reposition function is available with the currently bound version of the protocol.
static constexpr std::uint32_t reposition_since_version
Minimum protocol version required for the reposition function.
static constexpr std::uint32_t set_parent_configure_since_version
Minimum protocol version required for the set_parent_configure function.
void set_parent_configure(uint32_t serial)
set parent configure this is a response to
void set_reactive()
continuously reconstrain the surface
void set_offset(int32_t x, int32_t y)
set surface position offset
static constexpr std::uint32_t set_parent_size_since_version
Minimum protocol version required for the set_parent_size function.
static constexpr std::uint32_t set_reactive_since_version
Minimum protocol version required for the set_reactive function.
void set_constraint_adjustment(xdg_positioner_constraint_adjustment const &constraint_adjustment)
set the adjustment to be done when constrained
bool can_set_reactive() const
Check whether the set_reactive function is available with the currently bound version of the protocol...
void set_size(int32_t width, int32_t height)
set the size of the to-be positioned rectangle
void set_gravity(xdg_positioner_gravity const &gravity)
set child surface gravity
bool can_set_parent_configure() const
Check whether the set_parent_configure function is available with the currently bound version of the ...
void set_anchor(xdg_positioner_anchor const &anchor)
set anchor rectangle anchor
void set_anchor_rect(int32_t x, int32_t y, int32_t width, int32_t height)
set the anchor rectangle within the parent surface
bool can_set_parent_size() const
Check whether the set_parent_size function is available with the currently bound version of the proto...
void set_parent_size(int32_t parent_width, int32_t parent_height)
desktop user interface surface base interface
std::function< void(uint32_t)> & on_configure()
suggest a surface change
xdg_toplevel_t get_toplevel()
assign the xdg_toplevel surface role
void ack_configure(uint32_t serial)
ack a configure event
xdg_popup_t get_popup(xdg_surface_t const &parent, xdg_positioner_t const &positioner)
assign the xdg_popup surface role
void set_window_geometry(int32_t x, int32_t y, int32_t width, int32_t height)
set the new window geometry
void set_title(std::string const &title)
set surface title
std::function< void()> & on_close()
surface wants to be closed
void show_window_menu(seat_t const &seat, uint32_t serial, int32_t x, int32_t y)
show the window menu
void set_min_size(int32_t width, int32_t height)
set the minimum size
std::function< void(int32_t, int32_t, array_t)> & on_configure()
suggest a surface change
void set_maximized()
maximize the window
void set_max_size(int32_t width, int32_t height)
set the maximum size
void set_minimized()
set the window as minimized
void set_fullscreen(output_t const &output)
set the window as fullscreen on an output
void move(seat_t const &seat, uint32_t serial)
start an interactive move
void set_app_id(std::string const &app_id)
set application ID
void unset_fullscreen()
unset the window as fullscreen
void set_parent(xdg_toplevel_t const &parent)
set the parent of this surface
void resize(seat_t const &seat, uint32_t serial, xdg_toplevel_resize_edge const &edges)
start an interactive resize
void unset_maximized()
unmaximize the window
create desktop-style surfaces
std::function< void(uint32_t)> & on_ping()
check if the client is alive
void pong(uint32_t serial)
respond to a ping event
xdg_positioner_t create_positioner()
create a positioner object
xdg_surface_t get_xdg_surface(surface_t const &surface)
create a shell surface from a surface
static const detail::bitfield< 4, 1 > hw_clock
hardware provided the presentation timestamp
static const detail::bitfield< 4, 1 > hw_completion
hardware signalled the start of the presentation
static const detail::bitfield< 4, 1 > vsync
presentation was vsync'd
static const detail::bitfield< 4, 1 > zero_copy
presentation was done zero-copy