1/*
2 SPDX-FileCopyrightText: 2023 Kai Uwe Broulik <kde@broulik.de>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef WAYLANDXDGFOREIGNV2_P_H
8#define WAYLANDXDGFOREIGNV2_P_H
9
10#include "qwayland-xdg-foreign-unstable-v2.h"
11
12#include <QObject>
13#include <QtWaylandClient/QWaylandClientExtension>
14
15class WaylandXdgForeignExportedV2 : public QObject, public QtWayland::zxdg_exported_v2
16{
17 Q_OBJECT
18
19public:
20 explicit WaylandXdgForeignExportedV2(::zxdg_exported_v2 *object);
21 ~WaylandXdgForeignExportedV2() override;
22
23 QString handle() const;
24
25Q_SIGNALS:
26 void handleReceived(const QString &handle);
27
28protected:
29 void zxdg_exported_v2_handle(const QString &handle) override;
30
31private:
32 QString m_handle;
33};
34
35class WaylandXdgForeignExporterV2 : public QWaylandClientExtensionTemplate<WaylandXdgForeignExporterV2>, public QtWayland::zxdg_exporter_v2
36{
37public:
38 ~WaylandXdgForeignExporterV2() override;
39
40 static WaylandXdgForeignExporterV2 &self();
41
42 WaylandXdgForeignExportedV2 *exportToplevel(struct ::wl_surface *surface);
43
44private:
45 WaylandXdgForeignExporterV2();
46};
47
48class WaylandXdgForeignImportedV2 : public QObject, public QtWayland::zxdg_imported_v2
49{
50public:
51 explicit WaylandXdgForeignImportedV2(const QString &handle, ::zxdg_imported_v2 *object);
52 ~WaylandXdgForeignImportedV2() override;
53
54 QString handle() const;
55
56protected:
57 void zxdg_imported_v2_destroyed() override;
58
59private:
60 QString m_handle;
61};
62
63class WaylandXdgForeignImporterV2 : public QWaylandClientExtensionTemplate<WaylandXdgForeignImporterV2>, public QtWayland::zxdg_importer_v2
64{
65public:
66 ~WaylandXdgForeignImporterV2() override;
67
68 static WaylandXdgForeignImporterV2 &self();
69
70 WaylandXdgForeignImportedV2 *importToplevel(const QString &handle);
71
72private:
73 WaylandXdgForeignImporterV2();
74};
75
76#endif // WAYLANDXDGFOREIGNV2_P_H
77

source code of kwindowsystem/src/platforms/wayland/waylandxdgforeignv2_p.h