Debian Codegraph @

wayland/qtwayland-dev/5.15.1/QtWaylandClient/private/qwaylandnativeinterface_p.h

raw symbols SCIP
1 // Copyright (C) 2020 The Qt Company Ltd.
2 //
3 // SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5 #ifndef QWAYLANDNATIVEINTERFACE_H
6 #define QWAYLANDNATIVEINTERFACE_H
7
8 //
9 // W A R N I N G
10 // -------------
11 //
12 // This file is not part of the Qt API. It exists purely as an
13 // implementation detail. This header file may change from version to
14 // version without notice, or even be removed.
15 //
16 // We mean it.
17 //
18
19 #include <QVariantMap>
20 #include <qpa/qplatformnativeinterface.h>
21
22 #include <QtWaylandClient/qtwaylandclientglobal.h>
23
24 QT_BEGIN_NAMESPACE
25
26 namespace QtWaylandClient {
27
28 class QWaylandIntegration;
29 class QWaylandScreen;
30
31 class Q_WAYLAND_CLIENT_EXPORT QWaylandNativeInterface : public QPlatformNativeInterface
32 {
33 public:
34 QWaylandNativeInterface(QWaylandIntegration *integration);
35 void *nativeResourceForIntegration(const QByteArray &resource) override;
36 void *nativeResourceForWindow(const QByteArray &resourceString,
37 QWindow *window) override;
38 void *nativeResourceForScreen(const QByteArray &resourceString,
39 QScreen *screen) override;
40 #if QT_CONFIG(opengl)
41 void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) override;
42 #endif
43 QVariantMap windowProperties(QPlatformWindow *window) const override;
44 QVariant windowProperty(QPlatformWindow *window, const QString &name) const override;
45 QVariant windowProperty(QPlatformWindow *window, const QString &name, const QVariant &defaultValue) const override;
46 void setWindowProperty(QPlatformWindow *window, const QString &name, const QVariant &value) override;
47
48 void emitWindowPropertyChanged(QPlatformWindow *window, const QString &name);
49
50 QFunctionPointer platformFunction(const QByteArray &resource) const override;
51
52 private:
53 QWaylandIntegration *m_integration = nullptr;
54 QHash<QPlatformWindow*, QVariantMap> m_windowProperties;
55
56 static void setSync(QWindow *window);
57 static void setDeSync(QWindow *window);
58 static bool isSync(QWindow *window);
59 };
60
61 }
62
63 QT_END_NAMESPACE
64
65 #endif // QWAYLANDNATIVEINTERFACE_H