Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylandresource.cpp
Go to the documentation of this file.
1// Copyright (C) 2017 Klarälvdalens Datakonsult AB (KDAB).
2// Copyright (C) 2021 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
4// Qt-Security score:significant reason:default
5
7
8QT_BEGIN_NAMESPACE
9
10/*!
11 * \class QWaylandResource
12 * \inmodule QtWaylandCompositor
13 * \since 5.8
14 * \brief QWaylandResource is a container for a \c wl_resource.
15 *
16 * The QWaylandResource is a simple wrapper around the Wayland type \c wl_resource, and makes it
17 * possible to use wl_resource pointers in Qt Quick APIs.
18 *
19 * \sa {Custom Shell}
20 */
21
22/*!
23 * Constructs an invalid QWaylandResource. The \l{resource()} accessor will return null.
24 */
25QWaylandResource::QWaylandResource()
26{
27}
28
29/*!
30 * Constructs a QWaylandResource which contains \a resource.
31 */
32QWaylandResource::QWaylandResource(wl_resource *resource)
33 : m_resource(resource)
34{
35}
36
37/*!
38 * \fn wl_resource *QWaylandResource::resource() const
39 *
40 * \return the wl_resource pointer held by this QWaylandResource.
41 */
42
43QT_END_NAMESPACE
44
45#include "moc_qwaylandresource.cpp"