1// Copyright (C) 2022 David Reondo <kde@david-redondo.de>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qwaylandxdgexporterv2_p.h"
5
6QT_BEGIN_NAMESPACE
7
8namespace QtWaylandClient {
9
10QWaylandXdgExportedV2::QWaylandXdgExportedV2(::zxdg_exported_v2 *object)
11 : QtWayland::zxdg_exported_v2(object)
12{
13}
14
15QWaylandXdgExportedV2::~QWaylandXdgExportedV2()
16{
17 destroy();
18}
19
20void QWaylandXdgExportedV2::zxdg_exported_v2_handle(const QString &handle)
21{
22 mHandle = handle;
23}
24
25QString QWaylandXdgExportedV2::handle() const
26{
27 return mHandle;
28}
29
30QWaylandXdgExporterV2::QWaylandXdgExporterV2(wl_registry *registry, uint32_t id, int version)
31 : QtWayland::zxdg_exporter_v2(registry, id, qMin(version, 1))
32{
33}
34
35QWaylandXdgExporterV2::~QWaylandXdgExporterV2()
36{
37 destroy();
38}
39
40QtWaylandClient::QWaylandXdgExportedV2 *QWaylandXdgExporterV2::exportToplevel(wl_surface *surface)
41{
42 return new QWaylandXdgExportedV2(export_toplevel(surface));
43}
44
45}
46
47QT_END_NAMESPACE
48

source code of qtwayland/src/plugins/shellintegration/xdg-shell/qwaylandxdgexporterv2.cpp