| 1 | // Copyright (C) 2017 Klarälvdalens Datakonsult AB (KDAB). |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QWAYLANDRESOURCE_H |
| 5 | #define QWAYLANDRESOURCE_H |
| 6 | |
| 7 | #include <QtCore/QObject> |
| 8 | #include <QtWaylandCompositor/qtwaylandcompositorglobal.h> |
| 9 | #include <QtWaylandCompositor/qtwaylandqmlinclude.h> |
| 10 | |
| 11 | struct wl_resource; |
| 12 | |
| 13 | QT_BEGIN_NAMESPACE |
| 14 | |
| 15 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandResource |
| 16 | { |
| 17 | Q_GADGET |
| 18 | QML_NAMED_ELEMENT(waylandresource) |
| 19 | QML_UNCREATABLE("") |
| 20 | QML_ADDED_IN_VERSION(1, 0) |
| 21 | public: |
| 22 | QWaylandResource(); |
| 23 | explicit QWaylandResource(wl_resource *resource); |
| 24 | |
| 25 | wl_resource *resource() const { return m_resource; } |
| 26 | |
| 27 | private: |
| 28 | wl_resource *m_resource = nullptr; |
| 29 | }; |
| 30 | |
| 31 | QT_END_NAMESPACE |
| 32 | |
| 33 | Q_DECLARE_METATYPE(QWaylandResource) |
| 34 | |
| 35 | #endif /*QWAYLANDRESOURCE_H*/ |
| 36 |
