1/*
2 SPDX-FileCopyrightText: 2017 Marco Martin <notmart@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6#ifndef KWAYLAND_CLIENT_XDGFOREIGN_V2_H
7#define KWAYLAND_CLIENT_XDGFOREIGN_V2_H
8
9#include "surface.h"
10#include "xdgforeign.h"
11
12#include <QObject>
13
14#include "KWayland/Client/kwaylandclient_export.h"
15
16struct zxdg_exporter_v2;
17struct zxdg_importer_v2;
18struct zxdg_exported_v2;
19struct zxdg_imported_v2;
20
21namespace KWayland
22{
23namespace Client
24{
25class XdgExportedUnstableV2;
26class XdgImportedUnstableV2;
27
28/**
29 * @short Wrapper for the zxdg_exporter_v2 interface.
30 *
31 * This class provides a convenient wrapper for the zxdg_exporter_v2 interface.
32 *
33 * To use this class one needs to interact with the Registry. There are two
34 * possible ways to create the interface:
35 * @code
36 * *c = registry->create(name, version);
37 * @endcode
38 *
39 * This creates the and sets it up directly. As an alternative this
40 * can also be done in a more low level way:
41 * @code
42 * *c = new ;
43 * c->setup(registry->bind(name, version));
44 * @endcode
45 *
46 * The can be used as a drop-in replacement for any zxdg_exporter_v2
47 * pointer as it provides matching cast operators.
48 *
49 * @see Registry
50 **/
51class Q_DECL_HIDDEN XdgExporterUnstableV2 : public XdgExporter
52{
53 Q_OBJECT
54public:
55 /**
56 * Creates a new .
57 * Note: after constructing the it is not yet valid and one needs
58 * to call setup. In order to get a ready to use prefer using
59 * Registry::create.
60 **/
61 explicit XdgExporterUnstableV2(QObject *parent = nullptr);
62 ~XdgExporterUnstableV2() override;
63
64private:
65 class Private;
66};
67
68/**
69 * @short Wrapper for the zxdg_importer_v2 interface.
70 *
71 * This class provides a convenient wrapper for the zxdg_importer_v2 interface.
72 *
73 * To use this class one needs to interact with the Registry. There are two
74 * possible ways to create the interface:
75 * @code
76 * *c = registry->create(name, version);
77 * @endcode
78 *
79 * This creates the and sets it up directly. As an alternative this
80 * can also be done in a more low level way:
81 * @code
82 * *c = new ;
83 * c->setup(registry->bind(name, version));
84 * @endcode
85 *
86 * The can be used as a drop-in replacement for any zxdg_importer_v2
87 * pointer as it provides matching cast operators.
88 *
89 * @see Registry
90 **/
91class Q_DECL_HIDDEN XdgImporterUnstableV2 : public XdgImporter
92{
93 Q_OBJECT
94public:
95 /**
96 * Creates a new .
97 * Note: after constructing the it is not yet valid and one needs
98 * to call setup. In order to get a ready to use prefer using
99 * Registry::create.
100 **/
101 explicit XdgImporterUnstableV2(QObject *parent = nullptr);
102 ~XdgImporterUnstableV2() override;
103
104private:
105 class Private;
106};
107
108class Q_DECL_HIDDEN XdgExportedUnstableV2 : public XdgExported
109{
110 Q_OBJECT
111public:
112 ~XdgExportedUnstableV2() override;
113
114private:
115 friend class XdgExporterUnstableV2;
116 explicit XdgExportedUnstableV2(QObject *parent = nullptr);
117 class Private;
118};
119
120class Q_DECL_HIDDEN XdgImportedUnstableV2 : public XdgImported
121{
122 Q_OBJECT
123public:
124 ~XdgImportedUnstableV2() override;
125
126private:
127 friend class XdgImporterUnstableV2;
128 explicit XdgImportedUnstableV2(QObject *parent = nullptr);
129 class Private;
130};
131
132}
133}
134
135#endif
136

source code of kwayland/src/client/xdgforeign_v2.h