KWayland

xdgforeign.cpp
1 /*
2  SPDX-FileCopyrightText: 2017 Marco Martin <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 #include "xdgforeign.h"
7 #include "xdgforeign_p.h"
8 #include "event_queue.h"
9 #include "wayland_pointer_p.h"
10 
11 #include <wayland-xdg-foreign-unstable-v2-client-protocol.h>
12 
13 #include <QDebug>
14 
15 namespace KWayland
16 {
17 namespace Client
18 {
19 
20 XdgExporter::Private::Private()
21 {
22 }
23 
24 XdgExporter::Private::~Private()
25 {
26 }
27 
28 XdgExporter::XdgExporter(Private *p, QObject *parent)
29  : QObject(parent)
30  , d(p)
31 {
32 }
33 
34 XdgExporter::~XdgExporter()
35 {
36  release();
37 }
38 
39 void XdgExporter::setup(zxdg_exporter_v2 *exporter)
40 {
41  d->setupV2(exporter);
42 }
43 
44 void XdgExporter::release()
45 {
46  d->release();
47 }
48 
49 void XdgExporter::destroy()
50 {
51  d->destroy();
52 }
53 
54 XdgExporter::operator zxdg_exporter_v2*() {
55  return d->exporterV2();
56 }
57 
58 XdgExporter::operator zxdg_exporter_v2*() const {
59  return d->exporterV2();
60 }
61 
62 bool XdgExporter::isValid() const
63 {
64  return d->isValid();
65 }
66 
67 void XdgExporter::setEventQueue(EventQueue *queue)
68 {
69  d->queue = queue;
70 }
71 
72 EventQueue *XdgExporter::eventQueue()
73 {
74  return d->queue;
75 }
76 
77 XdgExported *XdgExporter::exportTopLevel(Surface *surface, QObject *parent)
78 {
79  return d->exportTopLevelV2(surface, parent);
80 }
81 
82 
83 
84 XdgImporter::Private::Private()
85 {
86 }
87 
88 XdgImporter::Private::~Private()
89 {
90 }
91 
92 XdgImporter::XdgImporter(Private *p, QObject *parent)
93  : QObject(parent)
94  , d(p)
95 {
96 }
97 
98 XdgImporter::~XdgImporter()
99 {
100  release();
101 }
102 
103 void XdgImporter::setup(zxdg_importer_v2 *importer)
104 {
105  d->setupV2(importer);
106 }
107 
108 void XdgImporter::release()
109 {
110  d->release();
111 }
112 
113 void XdgImporter::destroy()
114 {
115  d->destroy();
116 }
117 
118 XdgImporter::operator zxdg_importer_v2*() {
119  return d->importerV2();
120 }
121 
122 XdgImporter::operator zxdg_importer_v2*() const {
123  return d->importerV2();
124 }
125 
126 bool XdgImporter::isValid() const
127 {
128  return d->isValid();
129 }
130 
131 void XdgImporter::setEventQueue(EventQueue *queue)
132 {
133  d->queue = queue;
134 }
135 
136 EventQueue *XdgImporter::eventQueue()
137 {
138  return d->queue;
139 }
140 
141 XdgImported *XdgImporter::importTopLevel(const QString & handle, QObject *parent)
142 {
143  Q_ASSERT(isValid());
144  return d->importTopLevelV2(handle, parent);
145 }
146 
147 XdgExported::XdgExported(Private *p, QObject *parent)
148  : QObject(parent)
149  , d(p)
150 {
151 }
152 
153 XdgExported::Private::Private(XdgExported *q)
154  : q(q)
155 {
156 }
157 
158 XdgExported::Private::~Private()
159 {
160 }
161 
162 XdgExported::~XdgExported()
163 {
164  release();
165 }
166 
167 void XdgExported::setup(zxdg_exported_v2 *exported)
168 {
169  d->setupV2(exported);
170 }
171 
172 void XdgExported::release()
173 {
174  d->release();
175 }
176 
177 void XdgExported::destroy()
178 {
179  d->destroy();
180 }
181 
182 QString XdgExported::handle() const
183 {
184  return d->handle;
185 }
186 
187 XdgExported::operator zxdg_exported_v2*() {
188  return d->exportedV2();
189 }
190 
191 XdgExported::operator zxdg_exported_v2*() const {
192  return d->exportedV2();
193 }
194 
195 bool XdgExported::isValid() const
196 {
197  return d->isValid();
198 }
199 
200 XdgImported::Private::Private(XdgImported *q)
201  : q(q)
202 {
203 }
204 
205 XdgImported::Private::~Private()
206 {
207 }
208 
209 XdgImported::XdgImported(Private *p, QObject *parent)
210  : QObject(parent)
211  , d(p)
212 {
213 }
214 
215 XdgImported::~XdgImported()
216 {
217  release();
218 }
219 
220 void XdgImported::setup(zxdg_imported_v2 *imported)
221 {
222  d->setupV2(imported);
223 }
224 
225 void XdgImported::release()
226 {
227  d->release();
228 }
229 
230 void XdgImported::destroy()
231 {
232  d->destroy();
233 }
234 
235 XdgImported::operator zxdg_imported_v2*() {
236  return d->importedV2();
237 }
238 
239 XdgImported::operator zxdg_imported_v2*() const {
240  return d->importedV2();
241 }
242 
243 bool XdgImported::isValid() const
244 {
245  return d->isValid();
246 }
247 
248 void XdgImported::setParentOf(Surface *surface)
249 {
250  Q_ASSERT(isValid());
251  d->setParentOf(surface);
252 }
253 
254 
255 }
256 }
257 
XdgShellSurfaceInterface * surface() const
The surface this decoration is attached to.
Wrapper class for wl_event_queue interface.
Definition: event_queue.h:55
Wrapper for the wl_surface interface.
Definition: surface.h:44
QObject(QObject *parent)
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Aug 11 2020 22:52:09 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.