Wayland++ 0.2.9
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 4,
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 4,
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 4,
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_interface* xdg_toplevel_interface_configure_bounds_event[2] = {
491 nullptr,
492 nullptr,
493};
494
495const wl_message xdg_toplevel_interface_requests[14] = {
496 {
497 "destroy",
498 "",
499 xdg_toplevel_interface_destroy_request,
500 },
501 {
502 "set_parent",
503 "?o",
504 xdg_toplevel_interface_set_parent_request,
505 },
506 {
507 "set_title",
508 "s",
509 xdg_toplevel_interface_set_title_request,
510 },
511 {
512 "set_app_id",
513 "s",
514 xdg_toplevel_interface_set_app_id_request,
515 },
516 {
517 "show_window_menu",
518 "ouii",
519 xdg_toplevel_interface_show_window_menu_request,
520 },
521 {
522 "move",
523 "ou",
524 xdg_toplevel_interface_move_request,
525 },
526 {
527 "resize",
528 "ouu",
529 xdg_toplevel_interface_resize_request,
530 },
531 {
532 "set_max_size",
533 "ii",
534 xdg_toplevel_interface_set_max_size_request,
535 },
536 {
537 "set_min_size",
538 "ii",
539 xdg_toplevel_interface_set_min_size_request,
540 },
541 {
542 "set_maximized",
543 "",
544 xdg_toplevel_interface_set_maximized_request,
545 },
546 {
547 "unset_maximized",
548 "",
549 xdg_toplevel_interface_unset_maximized_request,
550 },
551 {
552 "set_fullscreen",
553 "?o",
554 xdg_toplevel_interface_set_fullscreen_request,
555 },
556 {
557 "unset_fullscreen",
558 "",
559 xdg_toplevel_interface_unset_fullscreen_request,
560 },
561 {
562 "set_minimized",
563 "",
564 xdg_toplevel_interface_set_minimized_request,
565 },
566};
567
568const wl_message xdg_toplevel_interface_events[3] = {
569 {
570 "configure",
571 "iia",
572 xdg_toplevel_interface_configure_event,
573 },
574 {
575 "close",
576 "",
577 xdg_toplevel_interface_close_event,
578 },
579 {
580 "configure_bounds",
581 "4ii",
582 xdg_toplevel_interface_configure_bounds_event,
583 },
584};
585
586const wl_interface wayland::detail::xdg_toplevel_interface =
587 {
588 "xdg_toplevel",
589 4,
590 14,
591 xdg_toplevel_interface_requests,
592 3,
593 xdg_toplevel_interface_events,
594 };
595
596const wl_interface* xdg_popup_interface_destroy_request[0] = {
597};
598
599const wl_interface* xdg_popup_interface_grab_request[2] = {
600 &seat_interface,
601 nullptr,
602};
603
604const wl_interface* xdg_popup_interface_reposition_request[2] = {
605 &xdg_positioner_interface,
606 nullptr,
607};
608
609const wl_interface* xdg_popup_interface_configure_event[4] = {
610 nullptr,
611 nullptr,
612 nullptr,
613 nullptr,
614};
615
616const wl_interface* xdg_popup_interface_popup_done_event[0] = {
617};
618
619const wl_interface* xdg_popup_interface_repositioned_event[1] = {
620 nullptr,
621};
622
623const wl_message xdg_popup_interface_requests[3] = {
624 {
625 "destroy",
626 "",
627 xdg_popup_interface_destroy_request,
628 },
629 {
630 "grab",
631 "ou",
632 xdg_popup_interface_grab_request,
633 },
634 {
635 "reposition",
636 "3ou",
637 xdg_popup_interface_reposition_request,
638 },
639};
640
641const wl_message xdg_popup_interface_events[3] = {
642 {
643 "configure",
644 "iiii",
645 xdg_popup_interface_configure_event,
646 },
647 {
648 "popup_done",
649 "",
650 xdg_popup_interface_popup_done_event,
651 },
652 {
653 "repositioned",
654 "3u",
655 xdg_popup_interface_repositioned_event,
656 },
657};
658
659const wl_interface wayland::detail::xdg_popup_interface =
660 {
661 "xdg_popup",
662 4,
663 3,
664 xdg_popup_interface_requests,
665 3,
666 xdg_popup_interface_events,
667 };
668
669presentation_t::presentation_t(const proxy_t &p)
670 : proxy_t(p)
671{
672 if(proxy_has_object() && get_wrapper_type() == wrapper_type::standard)
673 {
674 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
675 set_destroy_opcode(0U);
676 }
677 set_interface(&presentation_interface);
678 set_copy_constructor([] (const proxy_t &p) -> proxy_t
679 { return presentation_t(p); });
680}
681
682presentation_t::presentation_t()
683{
684 set_interface(&presentation_interface);
685 set_copy_constructor([] (const proxy_t &p) -> proxy_t
686 { return presentation_t(p); });
687}
688
689presentation_t::presentation_t(wp_presentation *p, wrapper_type t)
690 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
691 if(proxy_has_object() && get_wrapper_type() == wrapper_type::standard)
692 {
693 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
694 set_destroy_opcode(0U);
695 }
696 set_interface(&presentation_interface);
697 set_copy_constructor([] (const proxy_t &p) -> proxy_t
698 { return presentation_t(p); });
699}
700
701presentation_t::presentation_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
702 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
703 set_interface(&presentation_interface);
704 set_copy_constructor([] (const proxy_t &p) -> proxy_t
705 { return presentation_t(p); });
706}
707
708presentation_t presentation_t::proxy_create_wrapper()
709{
710 return {*this, construct_proxy_wrapper_tag()};
711}
712
713const std::string presentation_t::interface_name = "wp_presentation";
714
715presentation_t::operator wp_presentation*() const
716{
717 return reinterpret_cast<wp_presentation*> (c_ptr());
718}
719
721{
722 proxy_t p = marshal_constructor(1U, &presentation_feedback_interface, surface.proxy_has_object() ? reinterpret_cast<wl_object*>(surface.c_ptr()) : nullptr, nullptr);
723 return presentation_feedback_t(p);
724}
725
726std::function<void(uint32_t)> &presentation_t::on_clock_id()
727{
728 return std::static_pointer_cast<events_t>(get_events())->clock_id;
729}
730
731int presentation_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
732{
733 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
734 switch(opcode)
735 {
736 case 0:
737 if(events->clock_id) events->clock_id(args[0].get<uint32_t>());
738 break;
739 }
740 return 0;
741}
742
743
744presentation_feedback_t::presentation_feedback_t(const proxy_t &p)
745 : proxy_t(p)
746{
748 {
749 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
750 }
751 set_interface(&presentation_feedback_interface);
752 set_copy_constructor([] (const proxy_t &p) -> proxy_t
753 { return presentation_feedback_t(p); });
754}
755
756presentation_feedback_t::presentation_feedback_t()
757{
758 set_interface(&presentation_feedback_interface);
759 set_copy_constructor([] (const proxy_t &p) -> proxy_t
760 { return presentation_feedback_t(p); });
761}
762
763presentation_feedback_t::presentation_feedback_t(wp_presentation_feedback *p, wrapper_type t)
764 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
766 {
767 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
768 }
769 set_interface(&presentation_feedback_interface);
770 set_copy_constructor([] (const proxy_t &p) -> proxy_t
771 { return presentation_feedback_t(p); });
772}
773
774presentation_feedback_t::presentation_feedback_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
775 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
776 set_interface(&presentation_feedback_interface);
777 set_copy_constructor([] (const proxy_t &p) -> proxy_t
778 { return presentation_feedback_t(p); });
779}
780
781presentation_feedback_t presentation_feedback_t::proxy_create_wrapper()
782{
783 return {*this, construct_proxy_wrapper_tag()};
784}
785
786const std::string presentation_feedback_t::interface_name = "wp_presentation_feedback";
787
788presentation_feedback_t::operator wp_presentation_feedback*() const
789{
790 return reinterpret_cast<wp_presentation_feedback*> (c_ptr());
791}
792
794{
795 return std::static_pointer_cast<events_t>(get_events())->sync_output;
796}
797
798std::function<void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, presentation_feedback_kind)> &presentation_feedback_t::on_presented()
799{
800 return std::static_pointer_cast<events_t>(get_events())->presented;
801}
802
804{
805 return std::static_pointer_cast<events_t>(get_events())->discarded;
806}
807
808int presentation_feedback_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
809{
810 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
811 switch(opcode)
812 {
813 case 0:
814 if(events->sync_output) events->sync_output(output_t(args[0].get<proxy_t>()));
815 break;
816 case 1:
817 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>()));
818 break;
819 case 2:
820 if(events->discarded) events->discarded();
821 break;
822 }
823 return 0;
824}
825const bitfield<4, 1> presentation_feedback_kind::vsync{0x1};
826const bitfield<4, 1> presentation_feedback_kind::hw_clock{0x2};
827const bitfield<4, 1> presentation_feedback_kind::hw_completion{0x4};
828const bitfield<4, 1> presentation_feedback_kind::zero_copy{0x8};
829
830
831viewporter_t::viewporter_t(const proxy_t &p)
832 : proxy_t(p)
833{
835 {
836 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
837 set_destroy_opcode(0U);
838 }
839 set_interface(&viewporter_interface);
840 set_copy_constructor([] (const proxy_t &p) -> proxy_t
841 { return viewporter_t(p); });
842}
843
844viewporter_t::viewporter_t()
845{
846 set_interface(&viewporter_interface);
847 set_copy_constructor([] (const proxy_t &p) -> proxy_t
848 { return viewporter_t(p); });
849}
850
851viewporter_t::viewporter_t(wp_viewporter *p, wrapper_type t)
852 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
854 {
855 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
856 set_destroy_opcode(0U);
857 }
858 set_interface(&viewporter_interface);
859 set_copy_constructor([] (const proxy_t &p) -> proxy_t
860 { return viewporter_t(p); });
861}
862
863viewporter_t::viewporter_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
864 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
865 set_interface(&viewporter_interface);
866 set_copy_constructor([] (const proxy_t &p) -> proxy_t
867 { return viewporter_t(p); });
868}
869
870viewporter_t viewporter_t::proxy_create_wrapper()
871{
872 return {*this, construct_proxy_wrapper_tag()};
873}
874
875const std::string viewporter_t::interface_name = "wp_viewporter";
876
877viewporter_t::operator wp_viewporter*() const
878{
879 return reinterpret_cast<wp_viewporter*> (c_ptr());
880}
881
883{
884 proxy_t p = marshal_constructor(1U, &viewport_interface, nullptr, surface.proxy_has_object() ? reinterpret_cast<wl_object*>(surface.c_ptr()) : nullptr);
885 return viewport_t(p);
886}
887
888int viewporter_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
889{
890 return 0;
891}
892
893
894viewport_t::viewport_t(const proxy_t &p)
895 : proxy_t(p)
896{
898 {
899 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
900 set_destroy_opcode(0U);
901 }
902 set_interface(&viewport_interface);
903 set_copy_constructor([] (const proxy_t &p) -> proxy_t
904 { return viewport_t(p); });
905}
906
907viewport_t::viewport_t()
908{
909 set_interface(&viewport_interface);
910 set_copy_constructor([] (const proxy_t &p) -> proxy_t
911 { return viewport_t(p); });
912}
913
914viewport_t::viewport_t(wp_viewport *p, wrapper_type t)
915 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
917 {
918 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
919 set_destroy_opcode(0U);
920 }
921 set_interface(&viewport_interface);
922 set_copy_constructor([] (const proxy_t &p) -> proxy_t
923 { return viewport_t(p); });
924}
925
926viewport_t::viewport_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
927 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
928 set_interface(&viewport_interface);
929 set_copy_constructor([] (const proxy_t &p) -> proxy_t
930 { return viewport_t(p); });
931}
932
933viewport_t viewport_t::proxy_create_wrapper()
934{
935 return {*this, construct_proxy_wrapper_tag()};
936}
937
938const std::string viewport_t::interface_name = "wp_viewport";
939
940viewport_t::operator wp_viewport*() const
941{
942 return reinterpret_cast<wp_viewport*> (c_ptr());
943}
944
945void viewport_t::set_source(double x, double y, double width, double height)
946{
947 marshal(1U, x, y, width, height);
948}
949
950void viewport_t::set_destination(int32_t width, int32_t height)
951{
952 marshal(2U, width, height);
953}
954
955int viewport_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
956{
957 return 0;
958}
959
960
961xdg_wm_base_t::xdg_wm_base_t(const proxy_t &p)
962 : proxy_t(p)
963{
965 {
966 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
967 set_destroy_opcode(0U);
968 }
969 set_interface(&xdg_wm_base_interface);
970 set_copy_constructor([] (const proxy_t &p) -> proxy_t
971 { return xdg_wm_base_t(p); });
972}
973
974xdg_wm_base_t::xdg_wm_base_t()
975{
976 set_interface(&xdg_wm_base_interface);
977 set_copy_constructor([] (const proxy_t &p) -> proxy_t
978 { return xdg_wm_base_t(p); });
979}
980
981xdg_wm_base_t::xdg_wm_base_t(xdg_wm_base *p, wrapper_type t)
982 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
984 {
985 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
986 set_destroy_opcode(0U);
987 }
988 set_interface(&xdg_wm_base_interface);
989 set_copy_constructor([] (const proxy_t &p) -> proxy_t
990 { return xdg_wm_base_t(p); });
991}
992
993xdg_wm_base_t::xdg_wm_base_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
994 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
995 set_interface(&xdg_wm_base_interface);
996 set_copy_constructor([] (const proxy_t &p) -> proxy_t
997 { return xdg_wm_base_t(p); });
998}
999
1000xdg_wm_base_t xdg_wm_base_t::proxy_create_wrapper()
1001{
1002 return {*this, construct_proxy_wrapper_tag()};
1003}
1004
1005const std::string xdg_wm_base_t::interface_name = "xdg_wm_base";
1006
1007xdg_wm_base_t::operator xdg_wm_base*() const
1008{
1009 return reinterpret_cast<xdg_wm_base*> (c_ptr());
1010}
1011
1013{
1014 proxy_t p = marshal_constructor(1U, &xdg_positioner_interface, nullptr);
1015 return xdg_positioner_t(p);
1016}
1017
1019{
1020 proxy_t p = marshal_constructor(2U, &xdg_surface_interface, nullptr, surface.proxy_has_object() ? reinterpret_cast<wl_object*>(surface.c_ptr()) : nullptr);
1021 return xdg_surface_t(p);
1022}
1023
1024void xdg_wm_base_t::pong(uint32_t serial)
1025{
1026 marshal(3U, serial);
1027}
1028
1029std::function<void(uint32_t)> &xdg_wm_base_t::on_ping()
1030{
1031 return std::static_pointer_cast<events_t>(get_events())->ping;
1032}
1033
1034int xdg_wm_base_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1035{
1036 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1037 switch(opcode)
1038 {
1039 case 0:
1040 if(events->ping) events->ping(args[0].get<uint32_t>());
1041 break;
1042 }
1043 return 0;
1044}
1045
1046
1047xdg_positioner_t::xdg_positioner_t(const proxy_t &p)
1048 : proxy_t(p)
1049{
1051 {
1052 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1053 set_destroy_opcode(0U);
1054 }
1055 set_interface(&xdg_positioner_interface);
1056 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1057 { return xdg_positioner_t(p); });
1058}
1059
1060xdg_positioner_t::xdg_positioner_t()
1061{
1062 set_interface(&xdg_positioner_interface);
1063 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1064 { return xdg_positioner_t(p); });
1065}
1066
1067xdg_positioner_t::xdg_positioner_t(xdg_positioner *p, wrapper_type t)
1068 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1070 {
1071 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1072 set_destroy_opcode(0U);
1073 }
1074 set_interface(&xdg_positioner_interface);
1075 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1076 { return xdg_positioner_t(p); });
1077}
1078
1079xdg_positioner_t::xdg_positioner_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1080 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1081 set_interface(&xdg_positioner_interface);
1082 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1083 { return xdg_positioner_t(p); });
1084}
1085
1086xdg_positioner_t xdg_positioner_t::proxy_create_wrapper()
1087{
1088 return {*this, construct_proxy_wrapper_tag()};
1089}
1090
1091const std::string xdg_positioner_t::interface_name = "xdg_positioner";
1092
1093xdg_positioner_t::operator xdg_positioner*() const
1094{
1095 return reinterpret_cast<xdg_positioner*> (c_ptr());
1096}
1097
1098void xdg_positioner_t::set_size(int32_t width, int32_t height)
1099{
1100 marshal(1U, width, height);
1101}
1102
1103void xdg_positioner_t::set_anchor_rect(int32_t x, int32_t y, int32_t width, int32_t height)
1104{
1105 marshal(2U, x, y, width, height);
1106}
1107
1108void xdg_positioner_t::set_anchor(xdg_positioner_anchor const& anchor)
1109{
1110 marshal(3U, static_cast<uint32_t>(anchor));
1111}
1112
1113void xdg_positioner_t::set_gravity(xdg_positioner_gravity const& gravity)
1114{
1115 marshal(4U, static_cast<uint32_t>(gravity));
1116}
1117
1119{
1120 marshal(5U, static_cast<uint32_t>(constraint_adjustment));
1121}
1122
1123void xdg_positioner_t::set_offset(int32_t x, int32_t y)
1124{
1125 marshal(6U, x, y);
1126}
1127
1129{
1130 marshal(7U);
1131}
1133{
1135}
1136
1137void xdg_positioner_t::set_parent_size(int32_t parent_width, int32_t parent_height)
1138{
1139 marshal(8U, parent_width, parent_height);
1140}
1142{
1144}
1145
1147{
1148 marshal(9U, serial);
1149}
1151{
1153}
1154
1155int xdg_positioner_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1156{
1157 return 0;
1158}
1159
1160
1161
1162const bitfield<6, 8> xdg_positioner_constraint_adjustment::none{0};
1163const bitfield<6, 8> xdg_positioner_constraint_adjustment::slide_x{1};
1164const bitfield<6, 8> xdg_positioner_constraint_adjustment::slide_y{2};
1165const bitfield<6, 8> xdg_positioner_constraint_adjustment::flip_x{4};
1166const bitfield<6, 8> xdg_positioner_constraint_adjustment::flip_y{8};
1167const bitfield<6, 8> xdg_positioner_constraint_adjustment::resize_x{16};
1168const bitfield<6, 8> xdg_positioner_constraint_adjustment::resize_y{32};
1169
1170
1171xdg_surface_t::xdg_surface_t(const proxy_t &p)
1172 : proxy_t(p)
1173{
1175 {
1176 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1177 set_destroy_opcode(0U);
1178 }
1179 set_interface(&xdg_surface_interface);
1180 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1181 { return xdg_surface_t(p); });
1182}
1183
1184xdg_surface_t::xdg_surface_t()
1185{
1186 set_interface(&xdg_surface_interface);
1187 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1188 { return xdg_surface_t(p); });
1189}
1190
1191xdg_surface_t::xdg_surface_t(xdg_surface *p, wrapper_type t)
1192 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1194 {
1195 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1196 set_destroy_opcode(0U);
1197 }
1198 set_interface(&xdg_surface_interface);
1199 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1200 { return xdg_surface_t(p); });
1201}
1202
1203xdg_surface_t::xdg_surface_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1204 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1205 set_interface(&xdg_surface_interface);
1206 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1207 { return xdg_surface_t(p); });
1208}
1209
1210xdg_surface_t xdg_surface_t::proxy_create_wrapper()
1211{
1212 return {*this, construct_proxy_wrapper_tag()};
1213}
1214
1215const std::string xdg_surface_t::interface_name = "xdg_surface";
1216
1217xdg_surface_t::operator xdg_surface*() const
1218{
1219 return reinterpret_cast<xdg_surface*> (c_ptr());
1220}
1221
1223{
1224 proxy_t p = marshal_constructor(1U, &xdg_toplevel_interface, nullptr);
1225 return xdg_toplevel_t(p);
1226}
1227
1229{
1230 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);
1231 return xdg_popup_t(p);
1232}
1233
1234void xdg_surface_t::set_window_geometry(int32_t x, int32_t y, int32_t width, int32_t height)
1235{
1236 marshal(3U, x, y, width, height);
1237}
1238
1239void xdg_surface_t::ack_configure(uint32_t serial)
1240{
1241 marshal(4U, serial);
1242}
1243
1244std::function<void(uint32_t)> &xdg_surface_t::on_configure()
1245{
1246 return std::static_pointer_cast<events_t>(get_events())->configure;
1247}
1248
1249int xdg_surface_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1250{
1251 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1252 switch(opcode)
1253 {
1254 case 0:
1255 if(events->configure) events->configure(args[0].get<uint32_t>());
1256 break;
1257 }
1258 return 0;
1259}
1260
1261
1262xdg_toplevel_t::xdg_toplevel_t(const proxy_t &p)
1263 : proxy_t(p)
1264{
1266 {
1267 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1268 set_destroy_opcode(0U);
1269 }
1270 set_interface(&xdg_toplevel_interface);
1271 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1272 { return xdg_toplevel_t(p); });
1273}
1274
1275xdg_toplevel_t::xdg_toplevel_t()
1276{
1277 set_interface(&xdg_toplevel_interface);
1278 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1279 { return xdg_toplevel_t(p); });
1280}
1281
1282xdg_toplevel_t::xdg_toplevel_t(xdg_toplevel *p, wrapper_type t)
1283 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1285 {
1286 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1287 set_destroy_opcode(0U);
1288 }
1289 set_interface(&xdg_toplevel_interface);
1290 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1291 { return xdg_toplevel_t(p); });
1292}
1293
1294xdg_toplevel_t::xdg_toplevel_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1295 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1296 set_interface(&xdg_toplevel_interface);
1297 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1298 { return xdg_toplevel_t(p); });
1299}
1300
1301xdg_toplevel_t xdg_toplevel_t::proxy_create_wrapper()
1302{
1303 return {*this, construct_proxy_wrapper_tag()};
1304}
1305
1306const std::string xdg_toplevel_t::interface_name = "xdg_toplevel";
1307
1308xdg_toplevel_t::operator xdg_toplevel*() const
1309{
1310 return reinterpret_cast<xdg_toplevel*> (c_ptr());
1311}
1312
1314{
1315 marshal(1U, parent.proxy_has_object() ? reinterpret_cast<wl_object*>(parent.c_ptr()) : nullptr);
1316}
1317
1318void xdg_toplevel_t::set_title(std::string const& title)
1319{
1320 marshal(2U, title);
1321}
1322
1323void xdg_toplevel_t::set_app_id(std::string const& app_id)
1324{
1325 marshal(3U, app_id);
1326}
1327
1328void xdg_toplevel_t::show_window_menu(seat_t const& seat, uint32_t serial, int32_t x, int32_t y)
1329{
1330 marshal(4U, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr, serial, x, y);
1331}
1332
1333void xdg_toplevel_t::move(seat_t const& seat, uint32_t serial)
1334{
1335 marshal(5U, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr, serial);
1336}
1337
1338void xdg_toplevel_t::resize(seat_t const& seat, uint32_t serial, xdg_toplevel_resize_edge const& edges)
1339{
1340 marshal(6U, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr, serial, static_cast<uint32_t>(edges));
1341}
1342
1343void xdg_toplevel_t::set_max_size(int32_t width, int32_t height)
1344{
1345 marshal(7U, width, height);
1346}
1347
1348void xdg_toplevel_t::set_min_size(int32_t width, int32_t height)
1349{
1350 marshal(8U, width, height);
1351}
1352
1354{
1355 marshal(9U);
1356}
1357
1359{
1360 marshal(10U);
1361}
1362
1364{
1365 marshal(11U, output.proxy_has_object() ? reinterpret_cast<wl_object*>(output.c_ptr()) : nullptr);
1366}
1367
1369{
1370 marshal(12U);
1371}
1372
1374{
1375 marshal(13U);
1376}
1377
1378std::function<void(int32_t, int32_t, array_t)> &xdg_toplevel_t::on_configure()
1379{
1380 return std::static_pointer_cast<events_t>(get_events())->configure;
1381}
1382
1383std::function<void()> &xdg_toplevel_t::on_close()
1384{
1385 return std::static_pointer_cast<events_t>(get_events())->close;
1386}
1387
1388std::function<void(int32_t, int32_t)> &xdg_toplevel_t::on_configure_bounds()
1389{
1390 return std::static_pointer_cast<events_t>(get_events())->configure_bounds;
1391}
1392
1393int xdg_toplevel_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1394{
1395 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1396 switch(opcode)
1397 {
1398 case 0:
1399 if(events->configure) events->configure(args[0].get<int32_t>(), args[1].get<int32_t>(), args[2].get<array_t>());
1400 break;
1401 case 1:
1402 if(events->close) events->close();
1403 break;
1404 case 2:
1405 if(events->configure_bounds) events->configure_bounds(args[0].get<int32_t>(), args[1].get<int32_t>());
1406 break;
1407 }
1408 return 0;
1409}
1410
1411const bitfield<4, 11> xdg_toplevel_resize_edge::none{0};
1412const bitfield<4, 11> xdg_toplevel_resize_edge::top{1};
1413const bitfield<4, 11> xdg_toplevel_resize_edge::bottom{2};
1414const bitfield<4, 11> xdg_toplevel_resize_edge::left{4};
1415const bitfield<4, 11> xdg_toplevel_resize_edge::top_left{5};
1416const bitfield<4, 11> xdg_toplevel_resize_edge::bottom_left{6};
1417const bitfield<4, 11> xdg_toplevel_resize_edge::right{8};
1418const bitfield<4, 11> xdg_toplevel_resize_edge::top_right{9};
1419const bitfield<4, 11> xdg_toplevel_resize_edge::bottom_right{10};
1420
1421
1422
1423xdg_popup_t::xdg_popup_t(const proxy_t &p)
1424 : proxy_t(p)
1425{
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()
1437{
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(xdg_popup *p, wrapper_type t)
1444 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1446 {
1447 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1448 set_destroy_opcode(0U);
1449 }
1450 set_interface(&xdg_popup_interface);
1451 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1452 { return xdg_popup_t(p); });
1453}
1454
1455xdg_popup_t::xdg_popup_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1456 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1457 set_interface(&xdg_popup_interface);
1458 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1459 { return xdg_popup_t(p); });
1460}
1461
1462xdg_popup_t xdg_popup_t::proxy_create_wrapper()
1463{
1464 return {*this, construct_proxy_wrapper_tag()};
1465}
1466
1467const std::string xdg_popup_t::interface_name = "xdg_popup";
1468
1469xdg_popup_t::operator xdg_popup*() const
1470{
1471 return reinterpret_cast<xdg_popup*> (c_ptr());
1472}
1473
1474void xdg_popup_t::grab(seat_t const& seat, uint32_t serial)
1475{
1476 marshal(1U, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr, serial);
1477}
1478
1479void xdg_popup_t::reposition(xdg_positioner_t const& positioner, uint32_t token)
1480{
1481 marshal(2U, positioner.proxy_has_object() ? reinterpret_cast<wl_object*>(positioner.c_ptr()) : nullptr, token);
1482}
1484{
1486}
1487
1488std::function<void(int32_t, int32_t, int32_t, int32_t)> &xdg_popup_t::on_configure()
1489{
1490 return std::static_pointer_cast<events_t>(get_events())->configure;
1491}
1492
1493std::function<void()> &xdg_popup_t::on_popup_done()
1494{
1495 return std::static_pointer_cast<events_t>(get_events())->popup_done;
1496}
1497
1498std::function<void(uint32_t)> &xdg_popup_t::on_repositioned()
1499{
1500 return std::static_pointer_cast<events_t>(get_events())->repositioned;
1501}
1502
1503int xdg_popup_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1504{
1505 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1506 switch(opcode)
1507 {
1508 case 0:
1509 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>());
1510 break;
1511 case 1:
1512 if(events->popup_done) events->popup_done();
1513 break;
1514 case 2:
1515 if(events->repositioned) events->repositioned(args[0].get<uint32_t>());
1516 break;
1517 }
1518 return 0;
1519}
1520
1521
1522
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
std::function< void(int32_t, int32_t)> & on_configure_bounds()
recommended window geometry bounds
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