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 QWAYLANDWINDOWMANAGERINTEGRATION_H
5#define QWAYLANDWINDOWMANAGERINTEGRATION_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/QObject>
19#include <QtCore/QScopedPointer>
20
21#include <QtGui/private/qgenericunixservices_p.h>
22
23#include <QtWaylandClient/private/qwayland-qt-windowmanager.h>
24#include <QtWaylandClient/qtwaylandclientglobal.h>
25
26QT_BEGIN_NAMESPACE
27
28namespace QtWaylandClient {
29
30class QWaylandWindow;
31class QWaylandDisplay;
32
33class QWaylandWindowManagerIntegrationPrivate;
34
35class Q_WAYLANDCLIENT_EXPORT QWaylandWindowManagerIntegration : public QObject, public QGenericUnixServices, public QtWayland::qt_windowmanager
36{
37 Q_OBJECT
38 Q_DECLARE_PRIVATE(QWaylandWindowManagerIntegration)
39public:
40 explicit QWaylandWindowManagerIntegration(QWaylandDisplay *waylandDisplay);
41 ~QWaylandWindowManagerIntegration() override;
42
43 bool openUrl(const QUrl &url) override;
44 bool openDocument(const QUrl &url) override;
45 QString portalWindowIdentifier(QWindow *window) override;
46
47 bool showIsFullScreen() const;
48
49private:
50 static void wlHandleListenerGlobal(void *data, wl_registry *registry, uint32_t id,
51 const QString &interface, uint32_t version);
52
53 QScopedPointer<QWaylandWindowManagerIntegrationPrivate> d_ptr;
54
55 void windowmanager_hints(int32_t showIsFullScreen) override;
56 void windowmanager_quit() override;
57
58 void openUrl_helper(const QUrl &url);
59};
60
61QT_END_NAMESPACE
62
63}
64
65#endif // QWAYLANDWINDOWMANAGERINTEGRATION_H
66

source code of qtwayland/src/client/qwaylandwindowmanagerintegration_p.h