Changeset View
Changeset View
Standalone View
Standalone View
src/client/registry.cpp
Show All 22 Lines | |||||
23 | #include "connection_thread.h" | 23 | #include "connection_thread.h" | ||
24 | #include "datadevicemanager.h" | 24 | #include "datadevicemanager.h" | ||
25 | #include "dpms.h" | 25 | #include "dpms.h" | ||
26 | #include "event_queue.h" | 26 | #include "event_queue.h" | ||
27 | #include "fakeinput.h" | 27 | #include "fakeinput.h" | ||
28 | #include "fullscreen_shell.h" | 28 | #include "fullscreen_shell.h" | ||
29 | #include "idle.h" | 29 | #include "idle.h" | ||
30 | #include "idleinhibit.h" | 30 | #include "idleinhibit.h" | ||
31 | #include "keystate.h" | ||||
31 | #include "remote_access.h" | 32 | #include "remote_access.h" | ||
32 | #include "logging.h" | 33 | #include "logging.h" | ||
33 | #include "outputconfiguration.h" | 34 | #include "outputconfiguration.h" | ||
34 | #include "outputmanagement.h" | 35 | #include "outputmanagement.h" | ||
35 | #include "outputdevice.h" | 36 | #include "outputdevice.h" | ||
36 | #include "output.h" | 37 | #include "output.h" | ||
37 | #include "plasmashell.h" | 38 | #include "plasmashell.h" | ||
38 | #include "plasmavirtualdesktop.h" | 39 | #include "plasmavirtualdesktop.h" | ||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | |||||
86 | #include <wayland-relativepointer-unstable-v1-client-protocol.h> | 87 | #include <wayland-relativepointer-unstable-v1-client-protocol.h> | ||
87 | #include <wayland-pointer-gestures-unstable-v1-client-protocol.h> | 88 | #include <wayland-pointer-gestures-unstable-v1-client-protocol.h> | ||
88 | #include <wayland-pointer-constraints-unstable-v1-client-protocol.h> | 89 | #include <wayland-pointer-constraints-unstable-v1-client-protocol.h> | ||
89 | #include <wayland-xdg-foreign-unstable-v2-client-protocol.h> | 90 | #include <wayland-xdg-foreign-unstable-v2-client-protocol.h> | ||
90 | #include <wayland-appmenu-client-protocol.h> | 91 | #include <wayland-appmenu-client-protocol.h> | ||
91 | #include <wayland-server-decoration-palette-client-protocol.h> | 92 | #include <wayland-server-decoration-palette-client-protocol.h> | ||
92 | #include <wayland-xdg-output-unstable-v1-client-protocol.h> | 93 | #include <wayland-xdg-output-unstable-v1-client-protocol.h> | ||
93 | #include <wayland-xdg-decoration-unstable-v1-client-protocol.h> | 94 | #include <wayland-xdg-decoration-unstable-v1-client-protocol.h> | ||
95 | #include <wayland-keystate-client-protocol.h> | ||||
94 | 96 | | |||
95 | /***** | 97 | /***** | ||
96 | * How to add another interface: | 98 | * How to add another interface: | ||
97 | * * define a new enum value in Registry::Interface | 99 | * * define a new enum value in Registry::Interface | ||
98 | * * define the bind<InterfaceName> method | 100 | * * define the bind<InterfaceName> method | ||
99 | * * define the create<InterfaceName> method | 101 | * * define the create<InterfaceName> method | ||
100 | * * define the <interfaceName>Announced signal | 102 | * * define the <interfaceName>Announced signal | ||
101 | * * define the <interfaceName>Removed signal | 103 | * * define the <interfaceName>Removed signal | ||
▲ Show 20 Lines • Show All 270 Lines • ▼ Show 20 Line(s) | 369 | {Registry::Interface::XdgShellStable, { | |||
372 | &Registry::xdgShellStableRemoved | 374 | &Registry::xdgShellStableRemoved | ||
373 | }}, | 375 | }}, | ||
374 | {Registry::Interface::XdgDecorationUnstableV1, { | 376 | {Registry::Interface::XdgDecorationUnstableV1, { | ||
375 | 1, | 377 | 1, | ||
376 | QByteArrayLiteral("zxdg_decoration_manager_v1"), | 378 | QByteArrayLiteral("zxdg_decoration_manager_v1"), | ||
377 | &zxdg_decoration_manager_v1_interface, | 379 | &zxdg_decoration_manager_v1_interface, | ||
378 | &Registry::xdgDecorationAnnounced, | 380 | &Registry::xdgDecorationAnnounced, | ||
379 | &Registry::xdgDecorationRemoved | 381 | &Registry::xdgDecorationRemoved | ||
382 | }}, | ||||
383 | {Registry::Interface::Keystate, { | ||||
384 | 1, | ||||
385 | QByteArrayLiteral("org_kde_kwin_keystate"), | ||||
386 | &org_kde_kwin_keystate_interface, | ||||
387 | &Registry::keystateAnnounced, | ||||
388 | &Registry::keystateRemoved | ||||
380 | }} | 389 | }} | ||
381 | }; | 390 | }; | ||
382 | 391 | | |||
383 | static quint32 maxVersion(const Registry::Interface &interface) | 392 | static quint32 maxVersion(const Registry::Interface &interface) | ||
384 | { | 393 | { | ||
385 | auto it = s_interfaces.find(interface); | 394 | auto it = s_interfaces.find(interface); | ||
386 | if (it != s_interfaces.end()) { | 395 | if (it != s_interfaces.end()) { | ||
387 | return it.value().maxVersion; | 396 | return it.value().maxVersion; | ||
▲ Show 20 Lines • Show All 291 Lines • ▼ Show 20 Line(s) | |||||
679 | BIND(XdgShellUnstableV6, zxdg_shell_v6) | 688 | BIND(XdgShellUnstableV6, zxdg_shell_v6) | ||
680 | BIND(XdgShellStable, xdg_wm_base) | 689 | BIND(XdgShellStable, xdg_wm_base) | ||
681 | BIND(RelativePointerManagerUnstableV1, zwp_relative_pointer_manager_v1) | 690 | BIND(RelativePointerManagerUnstableV1, zwp_relative_pointer_manager_v1) | ||
682 | BIND(PointerGesturesUnstableV1, zwp_pointer_gestures_v1) | 691 | BIND(PointerGesturesUnstableV1, zwp_pointer_gestures_v1) | ||
683 | BIND(PointerConstraintsUnstableV1, zwp_pointer_constraints_v1) | 692 | BIND(PointerConstraintsUnstableV1, zwp_pointer_constraints_v1) | ||
684 | BIND(XdgExporterUnstableV2, zxdg_exporter_v2) | 693 | BIND(XdgExporterUnstableV2, zxdg_exporter_v2) | ||
685 | BIND(XdgImporterUnstableV2, zxdg_importer_v2) | 694 | BIND(XdgImporterUnstableV2, zxdg_importer_v2) | ||
686 | BIND(IdleInhibitManagerUnstableV1, zwp_idle_inhibit_manager_v1) | 695 | BIND(IdleInhibitManagerUnstableV1, zwp_idle_inhibit_manager_v1) | ||
696 | BIND(Keystate, org_kde_kwin_keystate) | ||||
687 | BIND2(ShadowManager, Shadow, org_kde_kwin_shadow_manager) | 697 | BIND2(ShadowManager, Shadow, org_kde_kwin_shadow_manager) | ||
688 | BIND2(BlurManager, Blur, org_kde_kwin_blur_manager) | 698 | BIND2(BlurManager, Blur, org_kde_kwin_blur_manager) | ||
689 | BIND2(ContrastManager, Contrast, org_kde_kwin_contrast_manager) | 699 | BIND2(ContrastManager, Contrast, org_kde_kwin_contrast_manager) | ||
690 | BIND2(SlideManager, Slide, org_kde_kwin_slide_manager) | 700 | BIND2(SlideManager, Slide, org_kde_kwin_slide_manager) | ||
691 | BIND2(DpmsManager, Dpms, org_kde_kwin_dpms_manager) | 701 | BIND2(DpmsManager, Dpms, org_kde_kwin_dpms_manager) | ||
692 | BIND2(AppMenuManager, AppMenu, org_kde_kwin_appmenu_manager) | 702 | BIND2(AppMenuManager, AppMenu, org_kde_kwin_appmenu_manager) | ||
693 | BIND2(ServerSideDecorationPaletteManager, ServerSideDecorationPalette, org_kde_kwin_server_decoration_palette_manager) | 703 | BIND2(ServerSideDecorationPaletteManager, ServerSideDecorationPalette, org_kde_kwin_server_decoration_palette_manager) | ||
694 | BIND(XdgOutputUnstableV1, zxdg_output_manager_v1) | 704 | BIND(XdgOutputUnstableV1, zxdg_output_manager_v1) | ||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
740 | CREATE(ShadowManager) | 750 | CREATE(ShadowManager) | ||
741 | CREATE(BlurManager) | 751 | CREATE(BlurManager) | ||
742 | CREATE(ContrastManager) | 752 | CREATE(ContrastManager) | ||
743 | CREATE(SlideManager) | 753 | CREATE(SlideManager) | ||
744 | CREATE(DpmsManager) | 754 | CREATE(DpmsManager) | ||
745 | CREATE(ServerSideDecorationManager) | 755 | CREATE(ServerSideDecorationManager) | ||
746 | CREATE2(ShmPool, Shm) | 756 | CREATE2(ShmPool, Shm) | ||
747 | CREATE(AppMenuManager) | 757 | CREATE(AppMenuManager) | ||
758 | CREATE(Keystate) | ||||
748 | CREATE(ServerSideDecorationPaletteManager) | 759 | CREATE(ServerSideDecorationPaletteManager) | ||
749 | 760 | | |||
750 | #undef CREATE | 761 | #undef CREATE | ||
751 | #undef CREATE2 | 762 | #undef CREATE2 | ||
752 | 763 | | |||
753 | XdgExporter *Registry::createXdgExporter(quint32 name, quint32 version, QObject *parent) | 764 | XdgExporter *Registry::createXdgExporter(quint32 name, quint32 version, QObject *parent) | ||
754 | { | 765 | { | ||
755 | //only V1 supported for now | 766 | //only V1 supported for now | ||
▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines |