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
11struct wl_resource;
12
13QT_BEGIN_NAMESPACE
14
15class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandResource
16{
17 Q_GADGET
18 QML_NAMED_ELEMENT(waylandresource)
19 QML_UNCREATABLE("")
20 QML_ADDED_IN_VERSION(1, 0)
21public:
22 QWaylandResource();
23 explicit QWaylandResource(wl_resource *resource);
24
25 wl_resource *resource() const { return m_resource; }
26
27private:
28 wl_resource *m_resource = nullptr;
29};
30
31QT_END_NAMESPACE
32
33Q_DECLARE_METATYPE(QWaylandResource)
34
35#endif /*QWAYLANDRESOURCE_H*/
36

source code of qtwayland/src/compositor/compositor_api/qwaylandresource.h