Changeset View
Changeset View
Standalone View
Standalone View
src/client/registry.cpp
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
46 | #include "contrast.h" | 46 | #include "contrast.h" | ||
47 | #include "relativepointer.h" | 47 | #include "relativepointer.h" | ||
48 | #include "server_decoration.h" | 48 | #include "server_decoration.h" | ||
49 | #include "slide.h" | 49 | #include "slide.h" | ||
50 | #include "shell.h" | 50 | #include "shell.h" | ||
51 | #include "shm_pool.h" | 51 | #include "shm_pool.h" | ||
52 | #include "subcompositor.h" | 52 | #include "subcompositor.h" | ||
53 | #include "textinput_p.h" | 53 | #include "textinput_p.h" | ||
54 | #include "viewporter.h" | ||||
54 | #include "xdgshell.h" | 55 | #include "xdgshell.h" | ||
55 | #include "xdgshell_p.h" | 56 | #include "xdgshell_p.h" | ||
56 | #include "wayland_pointer_p.h" | 57 | #include "wayland_pointer_p.h" | ||
57 | #include "xdgforeign_v2.h" | 58 | #include "xdgforeign_v2.h" | ||
58 | #include "appmenu.h" | 59 | #include "appmenu.h" | ||
59 | #include "server_decoration_palette.h" | 60 | #include "server_decoration_palette.h" | ||
60 | #include "xdgoutput.h" | 61 | #include "xdgoutput.h" | ||
61 | #include "xdgdecoration.h" | 62 | #include "xdgdecoration.h" | ||
Show All 23 Lines | |||||
85 | #include <wayland-xdg-shell-v6-client-protocol.h> | 86 | #include <wayland-xdg-shell-v6-client-protocol.h> | ||
86 | #include <wayland-xdg-shell-client-protocol.h> | 87 | #include <wayland-xdg-shell-client-protocol.h> | ||
87 | #include <wayland-relativepointer-unstable-v1-client-protocol.h> | 88 | #include <wayland-relativepointer-unstable-v1-client-protocol.h> | ||
88 | #include <wayland-pointer-gestures-unstable-v1-client-protocol.h> | 89 | #include <wayland-pointer-gestures-unstable-v1-client-protocol.h> | ||
89 | #include <wayland-pointer-constraints-unstable-v1-client-protocol.h> | 90 | #include <wayland-pointer-constraints-unstable-v1-client-protocol.h> | ||
90 | #include <wayland-xdg-foreign-unstable-v2-client-protocol.h> | 91 | #include <wayland-xdg-foreign-unstable-v2-client-protocol.h> | ||
91 | #include <wayland-appmenu-client-protocol.h> | 92 | #include <wayland-appmenu-client-protocol.h> | ||
92 | #include <wayland-server-decoration-palette-client-protocol.h> | 93 | #include <wayland-server-decoration-palette-client-protocol.h> | ||
94 | #include <wayland-viewporter-client-protocol.h> | ||||
93 | #include <wayland-xdg-output-unstable-v1-client-protocol.h> | 95 | #include <wayland-xdg-output-unstable-v1-client-protocol.h> | ||
94 | #include <wayland-xdg-decoration-unstable-v1-client-protocol.h> | 96 | #include <wayland-xdg-decoration-unstable-v1-client-protocol.h> | ||
95 | #include <wayland-keystate-client-protocol.h> | 97 | #include <wayland-keystate-client-protocol.h> | ||
96 | 98 | | |||
97 | /***** | 99 | /***** | ||
98 | * How to add another interface: | 100 | * How to add another interface: | ||
99 | * * define a new enum value in Registry::Interface | 101 | * * define a new enum value in Registry::Interface | ||
100 | * * define the bind<InterfaceName> method | 102 | * * define the bind<InterfaceName> method | ||
▲ Show 20 Lines • Show All 183 Lines • ▼ Show 20 Line(s) | 125 | static const QMap<Registry::Interface, SuppertedInterfaceData> s_interfaces = { | |||
284 | }}, | 286 | }}, | ||
285 | {Registry::Interface::TextInputManagerUnstableV2, { | 287 | {Registry::Interface::TextInputManagerUnstableV2, { | ||
286 | 1, | 288 | 1, | ||
287 | QByteArrayLiteral("zwp_text_input_manager_v2"), | 289 | QByteArrayLiteral("zwp_text_input_manager_v2"), | ||
288 | &zwp_text_input_manager_v2_interface, | 290 | &zwp_text_input_manager_v2_interface, | ||
289 | &Registry::textInputManagerUnstableV2Announced, | 291 | &Registry::textInputManagerUnstableV2Announced, | ||
290 | &Registry::textInputManagerUnstableV2Removed | 292 | &Registry::textInputManagerUnstableV2Removed | ||
291 | }}, | 293 | }}, | ||
294 | {Registry::Interface::Viewporter, { | ||||
295 | 1, | ||||
296 | QByteArrayLiteral("wp_viewporter"), | ||||
297 | &wp_viewporter_interface, | ||||
298 | &Registry::viewporterAnnounced, | ||||
299 | &Registry::viewporterRemoved | ||||
300 | }}, | ||||
292 | {Registry::Interface::XdgShellUnstableV5, { | 301 | {Registry::Interface::XdgShellUnstableV5, { | ||
293 | 1, | 302 | 1, | ||
294 | QByteArrayLiteral("xdg_shell"), | 303 | QByteArrayLiteral("xdg_shell"), | ||
295 | &zxdg_shell_v5_interface, | 304 | &zxdg_shell_v5_interface, | ||
296 | &Registry::xdgShellUnstableV5Announced, | 305 | &Registry::xdgShellUnstableV5Announced, | ||
297 | &Registry::xdgShellUnstableV5Removed | 306 | &Registry::xdgShellUnstableV5Removed | ||
298 | }}, | 307 | }}, | ||
299 | {Registry::Interface::RelativePointerManagerUnstableV1, { | 308 | {Registry::Interface::RelativePointerManagerUnstableV1, { | ||
▲ Show 20 Lines • Show All 379 Lines • ▼ Show 20 Line(s) | |||||
679 | BIND(Idle, org_kde_kwin_idle) | 688 | BIND(Idle, org_kde_kwin_idle) | ||
680 | BIND(RemoteAccessManager, org_kde_kwin_remote_access_manager) | 689 | BIND(RemoteAccessManager, org_kde_kwin_remote_access_manager) | ||
681 | BIND(FakeInput, org_kde_kwin_fake_input) | 690 | BIND(FakeInput, org_kde_kwin_fake_input) | ||
682 | BIND(OutputManagement, org_kde_kwin_outputmanagement) | 691 | BIND(OutputManagement, org_kde_kwin_outputmanagement) | ||
683 | BIND(OutputDevice, org_kde_kwin_outputdevice) | 692 | BIND(OutputDevice, org_kde_kwin_outputdevice) | ||
684 | BIND(ServerSideDecorationManager, org_kde_kwin_server_decoration_manager) | 693 | BIND(ServerSideDecorationManager, org_kde_kwin_server_decoration_manager) | ||
685 | BIND(TextInputManagerUnstableV0, wl_text_input_manager) | 694 | BIND(TextInputManagerUnstableV0, wl_text_input_manager) | ||
686 | BIND(TextInputManagerUnstableV2, zwp_text_input_manager_v2) | 695 | BIND(TextInputManagerUnstableV2, zwp_text_input_manager_v2) | ||
696 | BIND(Viewporter, wp_viewporter) | ||||
687 | BIND(XdgShellUnstableV5, xdg_shell) | 697 | BIND(XdgShellUnstableV5, xdg_shell) | ||
688 | BIND(XdgShellUnstableV6, zxdg_shell_v6) | 698 | BIND(XdgShellUnstableV6, zxdg_shell_v6) | ||
689 | BIND(XdgShellStable, xdg_wm_base) | 699 | BIND(XdgShellStable, xdg_wm_base) | ||
690 | BIND(RelativePointerManagerUnstableV1, zwp_relative_pointer_manager_v1) | 700 | BIND(RelativePointerManagerUnstableV1, zwp_relative_pointer_manager_v1) | ||
691 | BIND(PointerGesturesUnstableV1, zwp_pointer_gestures_v1) | 701 | BIND(PointerGesturesUnstableV1, zwp_pointer_gestures_v1) | ||
692 | BIND(PointerConstraintsUnstableV1, zwp_pointer_constraints_v1) | 702 | BIND(PointerConstraintsUnstableV1, zwp_pointer_constraints_v1) | ||
693 | BIND(XdgExporterUnstableV2, zxdg_exporter_v2) | 703 | BIND(XdgExporterUnstableV2, zxdg_exporter_v2) | ||
694 | BIND(XdgImporterUnstableV2, zxdg_importer_v2) | 704 | BIND(XdgImporterUnstableV2, zxdg_importer_v2) | ||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | |||||
752 | CREATE(ContrastManager) | 762 | CREATE(ContrastManager) | ||
753 | CREATE(SlideManager) | 763 | CREATE(SlideManager) | ||
754 | CREATE(DpmsManager) | 764 | CREATE(DpmsManager) | ||
755 | CREATE(ServerSideDecorationManager) | 765 | CREATE(ServerSideDecorationManager) | ||
756 | CREATE2(ShmPool, Shm) | 766 | CREATE2(ShmPool, Shm) | ||
757 | CREATE(AppMenuManager) | 767 | CREATE(AppMenuManager) | ||
758 | CREATE(Keystate) | 768 | CREATE(Keystate) | ||
759 | CREATE(ServerSideDecorationPaletteManager) | 769 | CREATE(ServerSideDecorationPaletteManager) | ||
770 | CREATE(Viewporter) | ||||
760 | 771 | | |||
761 | #undef CREATE | 772 | #undef CREATE | ||
762 | #undef CREATE2 | 773 | #undef CREATE2 | ||
763 | 774 | | |||
764 | XdgExporter *Registry::createXdgExporter(quint32 name, quint32 version, QObject *parent) | 775 | XdgExporter *Registry::createXdgExporter(quint32 name, quint32 version, QObject *parent) | ||
765 | { | 776 | { | ||
766 | //only V1 supported for now | 777 | //only V1 supported for now | ||
767 | return d->create<XdgExporterUnstableV2>(name, version, parent, &Registry::bindXdgExporterUnstableV2); | 778 | return d->create<XdgExporterUnstableV2>(name, version, parent, &Registry::bindXdgExporterUnstableV2); | ||
▲ Show 20 Lines • Show All 144 Lines • Show Last 20 Lines |