Wayland++ 1.0.0
C++ Bindings for Wayland
Loading...
Searching...
No Matches
wayland-client-protocol-extra.cpp
1#include <wayland-client-protocol-extra.hpp>
2
3using namespace wayland;
4using namespace wayland::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
726
727std::function<void(uint32_t)> &presentation_t::on_clock_id()
728{
729 return std::static_pointer_cast<events_t>(get_events())->clock_id;
730}
731
732int presentation_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
733{
734 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
735 switch(opcode)
736 {
737 case 0:
738 if(events->clock_id) events->clock_id(args[0].get<uint32_t>());
739 break;
740 }
741 return 0;
742}
743
744
745presentation_feedback_t::presentation_feedback_t(const proxy_t &p)
746 : proxy_t(p)
747{
749 {
750 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
751 }
752 set_interface(&presentation_feedback_interface);
753 set_copy_constructor([] (const proxy_t &p) -> proxy_t
754 { return presentation_feedback_t(p); });
755}
756
757presentation_feedback_t::presentation_feedback_t()
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(wp_presentation_feedback *p, wrapper_type t)
765 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
767 {
768 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
769 }
770 set_interface(&presentation_feedback_interface);
771 set_copy_constructor([] (const proxy_t &p) -> proxy_t
772 { return presentation_feedback_t(p); });
773}
774
775presentation_feedback_t::presentation_feedback_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
776 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
777 set_interface(&presentation_feedback_interface);
778 set_copy_constructor([] (const proxy_t &p) -> proxy_t
779 { return presentation_feedback_t(p); });
780}
781
782presentation_feedback_t presentation_feedback_t::proxy_create_wrapper()
783{
784 return {*this, construct_proxy_wrapper_tag()};
785}
786
787const std::string presentation_feedback_t::interface_name = "wp_presentation_feedback";
788
789presentation_feedback_t::operator wp_presentation_feedback*() const
790{
791 return reinterpret_cast<wp_presentation_feedback*> (c_ptr());
792}
793
795{
796 return std::static_pointer_cast<events_t>(get_events())->sync_output;
797}
798
799std::function<void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, presentation_feedback_kind)> &presentation_feedback_t::on_presented()
800{
801 return std::static_pointer_cast<events_t>(get_events())->presented;
802}
803
805{
806 return std::static_pointer_cast<events_t>(get_events())->discarded;
807}
808
809int presentation_feedback_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
810{
811 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
812 switch(opcode)
813 {
814 case 0:
815 if(events->sync_output) events->sync_output(output_t(args[0].get<proxy_t>()));
816 break;
817 case 1:
818 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>()));
819 break;
820 case 2:
821 if(events->discarded) events->discarded();
822 break;
823 }
824 return 0;
825}
826const bitfield<4, 1> presentation_feedback_kind::vsync{0x1};
827const bitfield<4, 1> presentation_feedback_kind::hw_clock{0x2};
828const bitfield<4, 1> presentation_feedback_kind::hw_completion{0x4};
829const bitfield<4, 1> presentation_feedback_kind::zero_copy{0x8};
830
831
832viewporter_t::viewporter_t(const proxy_t &p)
833 : proxy_t(p)
834{
836 {
837 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
838 set_destroy_opcode(0U);
839 }
840 set_interface(&viewporter_interface);
841 set_copy_constructor([] (const proxy_t &p) -> proxy_t
842 { return viewporter_t(p); });
843}
844
845viewporter_t::viewporter_t()
846{
847 set_interface(&viewporter_interface);
848 set_copy_constructor([] (const proxy_t &p) -> proxy_t
849 { return viewporter_t(p); });
850}
851
852viewporter_t::viewporter_t(wp_viewporter *p, wrapper_type t)
853 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
855 {
856 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
857 set_destroy_opcode(0U);
858 }
859 set_interface(&viewporter_interface);
860 set_copy_constructor([] (const proxy_t &p) -> proxy_t
861 { return viewporter_t(p); });
862}
863
864viewporter_t::viewporter_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
865 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
866 set_interface(&viewporter_interface);
867 set_copy_constructor([] (const proxy_t &p) -> proxy_t
868 { return viewporter_t(p); });
869}
870
871viewporter_t viewporter_t::proxy_create_wrapper()
872{
873 return {*this, construct_proxy_wrapper_tag()};
874}
875
876const std::string viewporter_t::interface_name = "wp_viewporter";
877
878viewporter_t::operator wp_viewporter*() const
879{
880 return reinterpret_cast<wp_viewporter*> (c_ptr());
881}
882
884{
885 proxy_t p = marshal_constructor(1U, &viewport_interface, nullptr, surface.proxy_has_object() ? reinterpret_cast<wl_object*>(surface.c_ptr()) : nullptr);
886 return viewport_t(p);
887}
888
889
890int viewporter_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
891{
892 return 0;
893}
894
895
896viewport_t::viewport_t(const proxy_t &p)
897 : proxy_t(p)
898{
900 {
901 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
902 set_destroy_opcode(0U);
903 }
904 set_interface(&viewport_interface);
905 set_copy_constructor([] (const proxy_t &p) -> proxy_t
906 { return viewport_t(p); });
907}
908
909viewport_t::viewport_t()
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(wp_viewport *p, wrapper_type t)
917 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
919 {
920 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
921 set_destroy_opcode(0U);
922 }
923 set_interface(&viewport_interface);
924 set_copy_constructor([] (const proxy_t &p) -> proxy_t
925 { return viewport_t(p); });
926}
927
928viewport_t::viewport_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
929 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
930 set_interface(&viewport_interface);
931 set_copy_constructor([] (const proxy_t &p) -> proxy_t
932 { return viewport_t(p); });
933}
934
935viewport_t viewport_t::proxy_create_wrapper()
936{
937 return {*this, construct_proxy_wrapper_tag()};
938}
939
940const std::string viewport_t::interface_name = "wp_viewport";
941
942viewport_t::operator wp_viewport*() const
943{
944 return reinterpret_cast<wp_viewport*> (c_ptr());
945}
946
947void viewport_t::set_source(double x, double y, double width, double height)
948{
949 marshal(1U, x, y, width, height);
950}
951
952
953void viewport_t::set_destination(int32_t width, int32_t height)
954{
955 marshal(2U, width, height);
956}
957
958
959int viewport_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
960{
961 return 0;
962}
963
964
965xdg_wm_base_t::xdg_wm_base_t(const proxy_t &p)
966 : proxy_t(p)
967{
969 {
970 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
971 set_destroy_opcode(0U);
972 }
973 set_interface(&xdg_wm_base_interface);
974 set_copy_constructor([] (const proxy_t &p) -> proxy_t
975 { return xdg_wm_base_t(p); });
976}
977
978xdg_wm_base_t::xdg_wm_base_t()
979{
980 set_interface(&xdg_wm_base_interface);
981 set_copy_constructor([] (const proxy_t &p) -> proxy_t
982 { return xdg_wm_base_t(p); });
983}
984
985xdg_wm_base_t::xdg_wm_base_t(xdg_wm_base *p, wrapper_type t)
986 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
988 {
989 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
990 set_destroy_opcode(0U);
991 }
992 set_interface(&xdg_wm_base_interface);
993 set_copy_constructor([] (const proxy_t &p) -> proxy_t
994 { return xdg_wm_base_t(p); });
995}
996
997xdg_wm_base_t::xdg_wm_base_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
998 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
999 set_interface(&xdg_wm_base_interface);
1000 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1001 { return xdg_wm_base_t(p); });
1002}
1003
1004xdg_wm_base_t xdg_wm_base_t::proxy_create_wrapper()
1005{
1006 return {*this, construct_proxy_wrapper_tag()};
1007}
1008
1009const std::string xdg_wm_base_t::interface_name = "xdg_wm_base";
1010
1011xdg_wm_base_t::operator xdg_wm_base*() const
1012{
1013 return reinterpret_cast<xdg_wm_base*> (c_ptr());
1014}
1015
1017{
1018 proxy_t p = marshal_constructor(1U, &xdg_positioner_interface, nullptr);
1019 return xdg_positioner_t(p);
1020}
1021
1022
1024{
1025 proxy_t p = marshal_constructor(2U, &xdg_surface_interface, nullptr, surface.proxy_has_object() ? reinterpret_cast<wl_object*>(surface.c_ptr()) : nullptr);
1026 return xdg_surface_t(p);
1027}
1028
1029
1030void xdg_wm_base_t::pong(uint32_t serial)
1031{
1032 marshal(3U, serial);
1033}
1034
1035
1036std::function<void(uint32_t)> &xdg_wm_base_t::on_ping()
1037{
1038 return std::static_pointer_cast<events_t>(get_events())->ping;
1039}
1040
1041int xdg_wm_base_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1042{
1043 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1044 switch(opcode)
1045 {
1046 case 0:
1047 if(events->ping) events->ping(args[0].get<uint32_t>());
1048 break;
1049 }
1050 return 0;
1051}
1052
1053
1054xdg_positioner_t::xdg_positioner_t(const proxy_t &p)
1055 : proxy_t(p)
1056{
1058 {
1059 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1060 set_destroy_opcode(0U);
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()
1068{
1069 set_interface(&xdg_positioner_interface);
1070 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1071 { return xdg_positioner_t(p); });
1072}
1073
1074xdg_positioner_t::xdg_positioner_t(xdg_positioner *p, wrapper_type t)
1075 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1077 {
1078 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1079 set_destroy_opcode(0U);
1080 }
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_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1087 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1088 set_interface(&xdg_positioner_interface);
1089 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1090 { return xdg_positioner_t(p); });
1091}
1092
1093xdg_positioner_t xdg_positioner_t::proxy_create_wrapper()
1094{
1095 return {*this, construct_proxy_wrapper_tag()};
1096}
1097
1098const std::string xdg_positioner_t::interface_name = "xdg_positioner";
1099
1100xdg_positioner_t::operator xdg_positioner*() const
1101{
1102 return reinterpret_cast<xdg_positioner*> (c_ptr());
1103}
1104
1105void xdg_positioner_t::set_size(int32_t width, int32_t height)
1106{
1107 marshal(1U, width, height);
1108}
1109
1110
1111void xdg_positioner_t::set_anchor_rect(int32_t x, int32_t y, int32_t width, int32_t height)
1112{
1113 marshal(2U, x, y, width, height);
1114}
1115
1116
1117void xdg_positioner_t::set_anchor(xdg_positioner_anchor const& anchor)
1118{
1119 marshal(3U, static_cast<uint32_t>(anchor));
1120}
1121
1122
1123void xdg_positioner_t::set_gravity(xdg_positioner_gravity const& gravity)
1124{
1125 marshal(4U, static_cast<uint32_t>(gravity));
1126}
1127
1128
1130{
1131 marshal(5U, static_cast<uint32_t>(constraint_adjustment));
1132}
1133
1134
1135void xdg_positioner_t::set_offset(int32_t x, int32_t y)
1136{
1137 marshal(6U, x, y);
1138}
1139
1140
1142{
1143 marshal(7U);
1144}
1145
1150
1151
1152void xdg_positioner_t::set_parent_size(int32_t parent_width, int32_t parent_height)
1153{
1154 marshal(8U, parent_width, parent_height);
1155}
1156
1161
1162
1164{
1165 marshal(9U, serial);
1166}
1167
1172
1173
1174int xdg_positioner_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1175{
1176 return 0;
1177}
1178
1179
1180
1181const bitfield<6, 8> xdg_positioner_constraint_adjustment::none{0};
1182const bitfield<6, 8> xdg_positioner_constraint_adjustment::slide_x{1};
1183const bitfield<6, 8> xdg_positioner_constraint_adjustment::slide_y{2};
1184const bitfield<6, 8> xdg_positioner_constraint_adjustment::flip_x{4};
1185const bitfield<6, 8> xdg_positioner_constraint_adjustment::flip_y{8};
1186const bitfield<6, 8> xdg_positioner_constraint_adjustment::resize_x{16};
1187const bitfield<6, 8> xdg_positioner_constraint_adjustment::resize_y{32};
1188
1189
1190xdg_surface_t::xdg_surface_t(const proxy_t &p)
1191 : proxy_t(p)
1192{
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()
1204{
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(xdg_surface *p, wrapper_type t)
1211 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1213 {
1214 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1215 set_destroy_opcode(0U);
1216 }
1217 set_interface(&xdg_surface_interface);
1218 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1219 { return xdg_surface_t(p); });
1220}
1221
1222xdg_surface_t::xdg_surface_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1223 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1224 set_interface(&xdg_surface_interface);
1225 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1226 { return xdg_surface_t(p); });
1227}
1228
1229xdg_surface_t xdg_surface_t::proxy_create_wrapper()
1230{
1231 return {*this, construct_proxy_wrapper_tag()};
1232}
1233
1234const std::string xdg_surface_t::interface_name = "xdg_surface";
1235
1236xdg_surface_t::operator xdg_surface*() const
1237{
1238 return reinterpret_cast<xdg_surface*> (c_ptr());
1239}
1240
1242{
1243 proxy_t p = marshal_constructor(1U, &xdg_toplevel_interface, nullptr);
1244 return xdg_toplevel_t(p);
1245}
1246
1247
1249{
1250 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);
1251 return xdg_popup_t(p);
1252}
1253
1254
1255void xdg_surface_t::set_window_geometry(int32_t x, int32_t y, int32_t width, int32_t height)
1256{
1257 marshal(3U, x, y, width, height);
1258}
1259
1260
1261void xdg_surface_t::ack_configure(uint32_t serial)
1262{
1263 marshal(4U, serial);
1264}
1265
1266
1267std::function<void(uint32_t)> &xdg_surface_t::on_configure()
1268{
1269 return std::static_pointer_cast<events_t>(get_events())->configure;
1270}
1271
1272int xdg_surface_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1273{
1274 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1275 switch(opcode)
1276 {
1277 case 0:
1278 if(events->configure) events->configure(args[0].get<uint32_t>());
1279 break;
1280 }
1281 return 0;
1282}
1283
1284
1285xdg_toplevel_t::xdg_toplevel_t(const proxy_t &p)
1286 : proxy_t(p)
1287{
1289 {
1290 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1291 set_destroy_opcode(0U);
1292 }
1293 set_interface(&xdg_toplevel_interface);
1294 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1295 { return xdg_toplevel_t(p); });
1296}
1297
1298xdg_toplevel_t::xdg_toplevel_t()
1299{
1300 set_interface(&xdg_toplevel_interface);
1301 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1302 { return xdg_toplevel_t(p); });
1303}
1304
1305xdg_toplevel_t::xdg_toplevel_t(xdg_toplevel *p, wrapper_type t)
1306 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1308 {
1309 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1310 set_destroy_opcode(0U);
1311 }
1312 set_interface(&xdg_toplevel_interface);
1313 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1314 { return xdg_toplevel_t(p); });
1315}
1316
1317xdg_toplevel_t::xdg_toplevel_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1318 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1319 set_interface(&xdg_toplevel_interface);
1320 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1321 { return xdg_toplevel_t(p); });
1322}
1323
1324xdg_toplevel_t xdg_toplevel_t::proxy_create_wrapper()
1325{
1326 return {*this, construct_proxy_wrapper_tag()};
1327}
1328
1329const std::string xdg_toplevel_t::interface_name = "xdg_toplevel";
1330
1331xdg_toplevel_t::operator xdg_toplevel*() const
1332{
1333 return reinterpret_cast<xdg_toplevel*> (c_ptr());
1334}
1335
1337{
1338 marshal(1U, parent.proxy_has_object() ? reinterpret_cast<wl_object*>(parent.c_ptr()) : nullptr);
1339}
1340
1341
1342void xdg_toplevel_t::set_title(std::string const& title)
1343{
1344 marshal(2U, title);
1345}
1346
1347
1348void xdg_toplevel_t::set_app_id(std::string const& app_id)
1349{
1350 marshal(3U, app_id);
1351}
1352
1353
1354void xdg_toplevel_t::show_window_menu(seat_t const& seat, uint32_t serial, int32_t x, int32_t y)
1355{
1356 marshal(4U, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr, serial, x, y);
1357}
1358
1359
1360void xdg_toplevel_t::move(seat_t const& seat, uint32_t serial)
1361{
1362 marshal(5U, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr, serial);
1363}
1364
1365
1366void xdg_toplevel_t::resize(seat_t const& seat, uint32_t serial, xdg_toplevel_resize_edge const& edges)
1367{
1368 marshal(6U, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr, serial, static_cast<uint32_t>(edges));
1369}
1370
1371
1372void xdg_toplevel_t::set_max_size(int32_t width, int32_t height)
1373{
1374 marshal(7U, width, height);
1375}
1376
1377
1378void xdg_toplevel_t::set_min_size(int32_t width, int32_t height)
1379{
1380 marshal(8U, width, height);
1381}
1382
1383
1385{
1386 marshal(9U);
1387}
1388
1389
1391{
1392 marshal(10U);
1393}
1394
1395
1397{
1398 marshal(11U, output.proxy_has_object() ? reinterpret_cast<wl_object*>(output.c_ptr()) : nullptr);
1399}
1400
1401
1403{
1404 marshal(12U);
1405}
1406
1407
1409{
1410 marshal(13U);
1411}
1412
1413
1414std::function<void(int32_t, int32_t, array_t)> &xdg_toplevel_t::on_configure()
1415{
1416 return std::static_pointer_cast<events_t>(get_events())->configure;
1417}
1418
1419std::function<void()> &xdg_toplevel_t::on_close()
1420{
1421 return std::static_pointer_cast<events_t>(get_events())->close;
1422}
1423
1424std::function<void(int32_t, int32_t)> &xdg_toplevel_t::on_configure_bounds()
1425{
1426 return std::static_pointer_cast<events_t>(get_events())->configure_bounds;
1427}
1428
1429int xdg_toplevel_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1430{
1431 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1432 switch(opcode)
1433 {
1434 case 0:
1435 if(events->configure) events->configure(args[0].get<int32_t>(), args[1].get<int32_t>(), args[2].get<array_t>());
1436 break;
1437 case 1:
1438 if(events->close) events->close();
1439 break;
1440 case 2:
1441 if(events->configure_bounds) events->configure_bounds(args[0].get<int32_t>(), args[1].get<int32_t>());
1442 break;
1443 }
1444 return 0;
1445}
1446
1447const bitfield<4, 11> xdg_toplevel_resize_edge::none{0};
1448const bitfield<4, 11> xdg_toplevel_resize_edge::top{1};
1449const bitfield<4, 11> xdg_toplevel_resize_edge::bottom{2};
1450const bitfield<4, 11> xdg_toplevel_resize_edge::left{4};
1451const bitfield<4, 11> xdg_toplevel_resize_edge::top_left{5};
1452const bitfield<4, 11> xdg_toplevel_resize_edge::bottom_left{6};
1453const bitfield<4, 11> xdg_toplevel_resize_edge::right{8};
1454const bitfield<4, 11> xdg_toplevel_resize_edge::top_right{9};
1455const bitfield<4, 11> xdg_toplevel_resize_edge::bottom_right{10};
1456
1457
1458
1459xdg_popup_t::xdg_popup_t(const proxy_t &p)
1460 : proxy_t(p)
1461{
1463 {
1464 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1465 set_destroy_opcode(0U);
1466 }
1467 set_interface(&xdg_popup_interface);
1468 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1469 { return xdg_popup_t(p); });
1470}
1471
1472xdg_popup_t::xdg_popup_t()
1473{
1474 set_interface(&xdg_popup_interface);
1475 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1476 { return xdg_popup_t(p); });
1477}
1478
1479xdg_popup_t::xdg_popup_t(xdg_popup *p, wrapper_type t)
1480 : proxy_t(reinterpret_cast<wl_proxy*> (p), t){
1482 {
1483 set_events(std::shared_ptr<detail::events_base_t>(new events_t), dispatcher);
1484 set_destroy_opcode(0U);
1485 }
1486 set_interface(&xdg_popup_interface);
1487 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1488 { return xdg_popup_t(p); });
1489}
1490
1491xdg_popup_t::xdg_popup_t(proxy_t const &wrapped_proxy, construct_proxy_wrapper_tag /*unused*/)
1492 : proxy_t(wrapped_proxy, construct_proxy_wrapper_tag()){
1493 set_interface(&xdg_popup_interface);
1494 set_copy_constructor([] (const proxy_t &p) -> proxy_t
1495 { return xdg_popup_t(p); });
1496}
1497
1498xdg_popup_t xdg_popup_t::proxy_create_wrapper()
1499{
1500 return {*this, construct_proxy_wrapper_tag()};
1501}
1502
1503const std::string xdg_popup_t::interface_name = "xdg_popup";
1504
1505xdg_popup_t::operator xdg_popup*() const
1506{
1507 return reinterpret_cast<xdg_popup*> (c_ptr());
1508}
1509
1510void xdg_popup_t::grab(seat_t const& seat, uint32_t serial)
1511{
1512 marshal(1U, seat.proxy_has_object() ? reinterpret_cast<wl_object*>(seat.c_ptr()) : nullptr, serial);
1513}
1514
1515
1516void xdg_popup_t::reposition(xdg_positioner_t const& positioner, uint32_t token)
1517{
1518 marshal(2U, positioner.proxy_has_object() ? reinterpret_cast<wl_object*>(positioner.c_ptr()) : nullptr, token);
1519}
1520
1522{
1524}
1525
1526
1527std::function<void(int32_t, int32_t, int32_t, int32_t)> &xdg_popup_t::on_configure()
1528{
1529 return std::static_pointer_cast<events_t>(get_events())->configure;
1530}
1531
1532std::function<void()> &xdg_popup_t::on_popup_done()
1533{
1534 return std::static_pointer_cast<events_t>(get_events())->popup_done;
1535}
1536
1537std::function<void(uint32_t)> &xdg_popup_t::on_repositioned()
1538{
1539 return std::static_pointer_cast<events_t>(get_events())->repositioned;
1540}
1541
1542int xdg_popup_t::dispatcher(uint32_t opcode, const std::vector<any>& args, const std::shared_ptr<detail::events_base_t>& e)
1543{
1544 std::shared_ptr<events_t> events = std::static_pointer_cast<events_t>(e);
1545 switch(opcode)
1546 {
1547 case 0:
1548 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>());
1549 break;
1550 case 1:
1551 if(events->popup_done) events->popup_done();
1552 break;
1553 case 2:
1554 if(events->repositioned) events->repositioned(args[0].get<uint32_t>());
1555 break;
1556 }
1557 return 0;
1558}
1559
1560
1561
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
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