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 | |
15 | class WaylandXdgForeignExportedV2 : public QObject, public QtWayland::zxdg_exported_v2 |
16 | { |
17 | Q_OBJECT |
18 | |
19 | public: |
20 | explicit WaylandXdgForeignExportedV2(::zxdg_exported_v2 *object); |
21 | ~WaylandXdgForeignExportedV2() override; |
22 | |
23 | QString handle() const; |
24 | |
25 | Q_SIGNALS: |
26 | void handleReceived(const QString &handle); |
27 | |
28 | protected: |
29 | void zxdg_exported_v2_handle(const QString &handle) override; |
30 | |
31 | private: |
32 | QString m_handle; |
33 | }; |
34 | |
35 | class WaylandXdgForeignExporterV2 : public QWaylandClientExtensionTemplate<WaylandXdgForeignExporterV2>, public QtWayland::zxdg_exporter_v2 |
36 | { |
37 | public: |
38 | ~WaylandXdgForeignExporterV2() override; |
39 | |
40 | static WaylandXdgForeignExporterV2 &self(); |
41 | |
42 | WaylandXdgForeignExportedV2 *exportToplevel(struct ::wl_surface *surface); |
43 | |
44 | private: |
45 | WaylandXdgForeignExporterV2(); |
46 | }; |
47 | |
48 | class WaylandXdgForeignImportedV2 : public QObject, public QtWayland::zxdg_imported_v2 |
49 | { |
50 | public: |
51 | explicit WaylandXdgForeignImportedV2(const QString &handle, ::zxdg_imported_v2 *object); |
52 | ~WaylandXdgForeignImportedV2() override; |
53 | |
54 | QString handle() const; |
55 | |
56 | protected: |
57 | void zxdg_imported_v2_destroyed() override; |
58 | |
59 | private: |
60 | QString m_handle; |
61 | }; |
62 | |
63 | class WaylandXdgForeignImporterV2 : public QWaylandClientExtensionTemplate<WaylandXdgForeignImporterV2>, public QtWayland::zxdg_importer_v2 |
64 | { |
65 | public: |
66 | ~WaylandXdgForeignImporterV2() override; |
67 | |
68 | static WaylandXdgForeignImporterV2 &self(); |
69 | |
70 | WaylandXdgForeignImportedV2 *importToplevel(const QString &handle); |
71 | |
72 | private: |
73 | WaylandXdgForeignImporterV2(); |
74 | }; |
75 | |
76 | #endif // WAYLANDXDGFOREIGNV2_P_H |
77 |