File indexing completed on 2024-05-12 17:00:18

0001 /*
0002     SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org>
0003     SPDX-FileCopyrightText: 2015 Marco Martin <mart@kde.org>
0004     SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007 */
0008 #ifndef WAYLANDINTEGRATION_H
0009 #define WAYLANDINTEGRATION_H
0010 #include <private/kwindoweffects_p.h>
0011 
0012 #include <QObject>
0013 #include <QPointer>
0014 
0015 namespace KWayland
0016 {
0017 namespace Client
0018 {
0019 class BlurManager;
0020 class ContrastManager;
0021 class Compositor;
0022 class ConnectionThread;
0023 class PlasmaWindowManagement;
0024 class PlasmaShell;
0025 class Registry;
0026 class ShadowManager;
0027 class ShmPool;
0028 class SlideManager;
0029 }
0030 }
0031 class WaylandXdgActivationV1;
0032 
0033 class WaylandIntegration : public QObject
0034 {
0035 public:
0036     explicit WaylandIntegration();
0037     ~WaylandIntegration();
0038     void setupKWaylandIntegration();
0039 
0040     static WaylandIntegration *self();
0041 
0042     KWayland::Client::Registry *registry() const;
0043     KWayland::Client::ConnectionThread *waylandConnection() const;
0044     KWayland::Client::BlurManager *waylandBlurManager();
0045     KWayland::Client::ContrastManager *waylandContrastManager();
0046     KWayland::Client::SlideManager *waylandSlideManager();
0047     KWayland::Client::ShadowManager *waylandShadowManager();
0048     KWayland::Client::Compositor *waylandCompositor() const;
0049     KWayland::Client::PlasmaWindowManagement *plasmaWindowManagement();
0050     KWayland::Client::PlasmaShell *waylandPlasmaShell();
0051     KWayland::Client::ShmPool *createShmPool();
0052     WaylandXdgActivationV1 *activation();
0053 
0054 private:
0055     QPointer<KWayland::Client::ConnectionThread> m_waylandConnection;
0056     QPointer<KWayland::Client::Compositor> m_waylandCompositor;
0057     QPointer<KWayland::Client::Registry> m_registry;
0058     QPointer<KWayland::Client::BlurManager> m_waylandBlurManager;
0059     QPointer<KWayland::Client::ContrastManager> m_waylandContrastManager;
0060     QPointer<KWayland::Client::SlideManager> m_waylandSlideManager;
0061     QPointer<KWayland::Client::ShadowManager> m_waylandShadowManager;
0062     QPointer<KWayland::Client::PlasmaWindowManagement> m_wm;
0063     QPointer<KWayland::Client::PlasmaShell> m_waylandPlasmaShell;
0064     QPointer<WaylandXdgActivationV1> m_activation;
0065     struct {
0066         quint32 name = 0;
0067         quint32 version = 0;
0068     } m_activationInterface;
0069 };
0070 
0071 #endif