| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QWAYLANDPLATFORMSERVICES_H |
| 5 | #define QWAYLANDPLATFORMSERVICES_H |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists purely as an |
| 12 | // implementation detail. This header file may change from version to |
| 13 | // version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | // |
| 17 | |
| 18 | #include <QtCore/QMap> |
| 19 | #include <QtGui/private/qdesktopunixservices_p.h> |
| 20 | |
| 21 | #include <QtWaylandClient/private/qwayland-qt-windowmanager.h> |
| 22 | #include <QtWaylandClient/qtwaylandclientglobal.h> |
| 23 | |
| 24 | QT_BEGIN_NAMESPACE |
| 25 | |
| 26 | namespace QtWaylandClient { |
| 27 | |
| 28 | class QWaylandAppMenu; |
| 29 | class QWaylandDisplay; |
| 30 | class QWaylandWindow; |
| 31 | |
| 32 | class Q_WAYLANDCLIENT_EXPORT QWaylandPlatformServices : public QDesktopUnixServices |
| 33 | { |
| 34 | public: |
| 35 | explicit QWaylandPlatformServices(QWaylandDisplay *waylandDisplay); |
| 36 | ~QWaylandPlatformServices(); |
| 37 | |
| 38 | bool openUrl(const QUrl &url) override; |
| 39 | bool openDocument(const QUrl &url) override; |
| 40 | QString portalWindowIdentifier(QWindow *window) override; |
| 41 | void registerDBusMenuForWindow(QWindow *window, const QString &service, |
| 42 | const QString &path) override; |
| 43 | void unregisterDBusMenuForWindow(QWindow *window) override; |
| 44 | |
| 45 | private: |
| 46 | QWaylandDisplay *m_display; |
| 47 | QMap<QWindow *, QWaylandAppMenu *> m_appMenus; |
| 48 | }; |
| 49 | |
| 50 | QT_END_NAMESPACE |
| 51 | |
| 52 | } // namespace QtWaylandClient |
| 53 | |
| 54 | #endif // QWAYLANDPLATFORMSERVICES_H |
| 55 |
