Changeset View
Changeset View
Standalone View
Standalone View
src/client/registry.cpp
Show All 22 Lines | |||||
23 | #include "output.h" | 23 | #include "output.h" | ||
24 | #include "plasmashell.h" | 24 | #include "plasmashell.h" | ||
25 | #include "plasmavirtualdesktop.h" | 25 | #include "plasmavirtualdesktop.h" | ||
26 | #include "plasmawindowmanagement.h" | 26 | #include "plasmawindowmanagement.h" | ||
27 | #include "pointerconstraints.h" | 27 | #include "pointerconstraints.h" | ||
28 | #include "pointergestures.h" | 28 | #include "pointergestures.h" | ||
29 | #include "seat.h" | 29 | #include "seat.h" | ||
30 | #include "shadow.h" | 30 | #include "shadow.h" | ||
31 | #include "screencasting.h" | ||||
31 | #include "blur.h" | 32 | #include "blur.h" | ||
32 | #include "contrast.h" | 33 | #include "contrast.h" | ||
33 | #include "relativepointer.h" | 34 | #include "relativepointer.h" | ||
34 | #include "server_decoration.h" | 35 | #include "server_decoration.h" | ||
35 | #include "slide.h" | 36 | #include "slide.h" | ||
36 | #include "shell.h" | 37 | #include "shell.h" | ||
37 | #include "shm_pool.h" | 38 | #include "shm_pool.h" | ||
38 | #include "subcompositor.h" | 39 | #include "subcompositor.h" | ||
Show All 35 Lines | |||||
74 | #include <wayland-pointer-gestures-unstable-v1-client-protocol.h> | 75 | #include <wayland-pointer-gestures-unstable-v1-client-protocol.h> | ||
75 | #include <wayland-pointer-constraints-unstable-v1-client-protocol.h> | 76 | #include <wayland-pointer-constraints-unstable-v1-client-protocol.h> | ||
76 | #include <wayland-xdg-foreign-unstable-v2-client-protocol.h> | 77 | #include <wayland-xdg-foreign-unstable-v2-client-protocol.h> | ||
77 | #include <wayland-appmenu-client-protocol.h> | 78 | #include <wayland-appmenu-client-protocol.h> | ||
78 | #include <wayland-server-decoration-palette-client-protocol.h> | 79 | #include <wayland-server-decoration-palette-client-protocol.h> | ||
79 | #include <wayland-xdg-output-unstable-v1-client-protocol.h> | 80 | #include <wayland-xdg-output-unstable-v1-client-protocol.h> | ||
80 | #include <wayland-xdg-decoration-unstable-v1-client-protocol.h> | 81 | #include <wayland-xdg-decoration-unstable-v1-client-protocol.h> | ||
81 | #include <wayland-keystate-client-protocol.h> | 82 | #include <wayland-keystate-client-protocol.h> | ||
83 | #include <wayland-zkde-screencast-unstable-v1-client-protocol.h> | ||||
82 | 84 | | |||
83 | /***** | 85 | /***** | ||
84 | * How to add another interface: | 86 | * How to add another interface: | ||
85 | * * define a new enum value in Registry::Interface | 87 | * * define a new enum value in Registry::Interface | ||
86 | * * define the bind<InterfaceName> method | 88 | * * define the bind<InterfaceName> method | ||
87 | * * define the create<InterfaceName> method | 89 | * * define the create<InterfaceName> method | ||
88 | * * define the <interfaceName>Announced signal | 90 | * * define the <interfaceName>Announced signal | ||
89 | * * define the <interfaceName>Removed signal | 91 | * * define the <interfaceName>Removed signal | ||
▲ Show 20 Lines • Show All 277 Lines • ▼ Show 20 Line(s) | 364 | {Registry::Interface::XdgDecorationUnstableV1, { | |||
367 | &Registry::xdgDecorationRemoved | 369 | &Registry::xdgDecorationRemoved | ||
368 | }}, | 370 | }}, | ||
369 | {Registry::Interface::Keystate, { | 371 | {Registry::Interface::Keystate, { | ||
370 | 1, | 372 | 1, | ||
371 | QByteArrayLiteral("org_kde_kwin_keystate"), | 373 | QByteArrayLiteral("org_kde_kwin_keystate"), | ||
372 | &org_kde_kwin_keystate_interface, | 374 | &org_kde_kwin_keystate_interface, | ||
373 | &Registry::keystateAnnounced, | 375 | &Registry::keystateAnnounced, | ||
374 | &Registry::keystateRemoved | 376 | &Registry::keystateRemoved | ||
377 | }}, | ||||
378 | {Registry::Interface::Screencasting, { | ||||
379 | 1, | ||||
380 | QByteArrayLiteral("zkde_screencast_unstable_v1"), | ||||
381 | &zkde_screencast_unstable_v1_interface, | ||||
382 | &Registry::screencastingAnnounced, | ||||
383 | &Registry::screencastingRemoved | ||||
375 | }} | 384 | }} | ||
376 | }; | 385 | }; | ||
377 | 386 | | |||
378 | static quint32 maxVersion(const Registry::Interface &interface) | 387 | static quint32 maxVersion(const Registry::Interface &interface) | ||
379 | { | 388 | { | ||
380 | auto it = s_interfaces.find(interface); | 389 | auto it = s_interfaces.find(interface); | ||
381 | if (it != s_interfaces.end()) { | 390 | if (it != s_interfaces.end()) { | ||
382 | return it.value().maxVersion; | 391 | return it.value().maxVersion; | ||
▲ Show 20 Lines • Show All 292 Lines • ▼ Show 20 Line(s) | |||||
675 | BIND(XdgShellStable, xdg_wm_base) | 684 | BIND(XdgShellStable, xdg_wm_base) | ||
676 | BIND(RelativePointerManagerUnstableV1, zwp_relative_pointer_manager_v1) | 685 | BIND(RelativePointerManagerUnstableV1, zwp_relative_pointer_manager_v1) | ||
677 | BIND(PointerGesturesUnstableV1, zwp_pointer_gestures_v1) | 686 | BIND(PointerGesturesUnstableV1, zwp_pointer_gestures_v1) | ||
678 | BIND(PointerConstraintsUnstableV1, zwp_pointer_constraints_v1) | 687 | BIND(PointerConstraintsUnstableV1, zwp_pointer_constraints_v1) | ||
679 | BIND(XdgExporterUnstableV2, zxdg_exporter_v2) | 688 | BIND(XdgExporterUnstableV2, zxdg_exporter_v2) | ||
680 | BIND(XdgImporterUnstableV2, zxdg_importer_v2) | 689 | BIND(XdgImporterUnstableV2, zxdg_importer_v2) | ||
681 | BIND(IdleInhibitManagerUnstableV1, zwp_idle_inhibit_manager_v1) | 690 | BIND(IdleInhibitManagerUnstableV1, zwp_idle_inhibit_manager_v1) | ||
682 | BIND(Keystate, org_kde_kwin_keystate) | 691 | BIND(Keystate, org_kde_kwin_keystate) | ||
692 | BIND(Screencasting, zkde_screencast_unstable_v1) | ||||
683 | BIND2(ShadowManager, Shadow, org_kde_kwin_shadow_manager) | 693 | BIND2(ShadowManager, Shadow, org_kde_kwin_shadow_manager) | ||
684 | BIND2(BlurManager, Blur, org_kde_kwin_blur_manager) | 694 | BIND2(BlurManager, Blur, org_kde_kwin_blur_manager) | ||
685 | BIND2(ContrastManager, Contrast, org_kde_kwin_contrast_manager) | 695 | BIND2(ContrastManager, Contrast, org_kde_kwin_contrast_manager) | ||
686 | BIND2(SlideManager, Slide, org_kde_kwin_slide_manager) | 696 | BIND2(SlideManager, Slide, org_kde_kwin_slide_manager) | ||
687 | BIND2(DpmsManager, Dpms, org_kde_kwin_dpms_manager) | 697 | BIND2(DpmsManager, Dpms, org_kde_kwin_dpms_manager) | ||
688 | BIND2(AppMenuManager, AppMenu, org_kde_kwin_appmenu_manager) | 698 | BIND2(AppMenuManager, AppMenu, org_kde_kwin_appmenu_manager) | ||
689 | BIND2(ServerSideDecorationPaletteManager, ServerSideDecorationPalette, org_kde_kwin_server_decoration_palette_manager) | 699 | BIND2(ServerSideDecorationPaletteManager, ServerSideDecorationPalette, org_kde_kwin_server_decoration_palette_manager) | ||
690 | BIND(XdgOutputUnstableV1, zxdg_output_manager_v1) | 700 | BIND(XdgOutputUnstableV1, zxdg_output_manager_v1) | ||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | |||||
737 | CREATE(BlurManager) | 747 | CREATE(BlurManager) | ||
738 | CREATE(ContrastManager) | 748 | CREATE(ContrastManager) | ||
739 | CREATE(SlideManager) | 749 | CREATE(SlideManager) | ||
740 | CREATE(DpmsManager) | 750 | CREATE(DpmsManager) | ||
741 | CREATE(ServerSideDecorationManager) | 751 | CREATE(ServerSideDecorationManager) | ||
742 | CREATE2(ShmPool, Shm) | 752 | CREATE2(ShmPool, Shm) | ||
743 | CREATE(AppMenuManager) | 753 | CREATE(AppMenuManager) | ||
744 | CREATE(Keystate) | 754 | CREATE(Keystate) | ||
755 | CREATE(Screencasting) | ||||
745 | CREATE(ServerSideDecorationPaletteManager) | 756 | CREATE(ServerSideDecorationPaletteManager) | ||
746 | 757 | | |||
747 | #undef CREATE | 758 | #undef CREATE | ||
748 | #undef CREATE2 | 759 | #undef CREATE2 | ||
749 | 760 | | |||
750 | XdgExporter *Registry::createXdgExporter(quint32 name, quint32 version, QObject *parent) | 761 | XdgExporter *Registry::createXdgExporter(quint32 name, quint32 version, QObject *parent) | ||
751 | { | 762 | { | ||
752 | //only V1 supported for now | 763 | //only V1 supported for now | ||
▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines |