/* This file is part of the KDE libraries SPDX-FileCopyrightText: 2015 Martin Gräßlin SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL */ #ifndef KWAYLANDINTEGRATION_H #define KWAYLANDINTEGRATION_H #include "kdeplatformtheme.h" #include #include #include class QWindow; class AppMenuManager; class ServerSideDecorationPaletteManager; class KWaylandIntegration : public QObject { Q_OBJECT public: explicit KWaylandIntegration(KdePlatformTheme *platformTheme); ~KWaylandIntegration() override; void setAppMenu(QWindow *window, const QString &serviceName, const QString &objectPath); void setPalette(QWindow *window, const QString &paletteName); bool eventFilter(QObject *watched, QEvent *event) override; private: static bool isRelevantTopLevel(QWindow *w); static struct wl_surface *surfaceFromWindow(QWindow *w); void shellSurfaceCreated(QWindow *w); void shellSurfaceDestroyed(QWindow *w); void installColorScheme(QWindow *w); QScopedPointer m_appMenuManager; QScopedPointer m_paletteManager; struct DBusMenuInfo { QString serviceName; QString objectPath; }; QHash m_dbusMenuInfos; KdePlatformTheme *m_platformTheme; }; #endif