KWayland

xdgforeign.h
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 #ifndef KWAYLAND_CLIENT_XDGFOREIGN_H
7 #define KWAYLAND_CLIENT_XDGFOREIGN_H
8 
9 #include "surface.h"
10 
11 #include <QObject>
12 
13 #include <KWayland/Client/kwaylandclient_export.h>
14 
15 struct zxdg_exporter_v2;
16 struct zxdg_importer_v2;
17 struct zxdg_exported_v2;
18 struct zxdg_imported_v2;
19 
20 namespace KWayland
21 {
22 namespace Client
23 {
24 
25 class EventQueue;
26 class Surface;
27 class XdgExported;
28 class XdgImported;
29 
53 class KWAYLANDCLIENT_EXPORT XdgExporter : public QObject
54 {
55  Q_OBJECT
56 public:
57  virtual ~XdgExporter();
58 
64  void setup(zxdg_exporter_v2 *);
68  bool isValid() const;
74  void release();
91  void destroy();
92 
96  void setEventQueue(EventQueue *queue);
100  EventQueue *eventQueue();
101 
110  XdgExported *exportTopLevel(Surface *surface, QObject *parent = nullptr);
111 
112  operator zxdg_exporter_v2*();
113  operator zxdg_exporter_v2*() const;
114 
115 Q_SIGNALS:
122  void removed();
123 
124 protected:
125  class Private;
126  explicit XdgExporter(Private *p, QObject *parent = nullptr);
128 };
129 
153 class KWAYLANDCLIENT_EXPORT XdgImporter : public QObject
154 {
155  Q_OBJECT
156 public:
157  virtual ~XdgImporter();
158 
164  void setup(zxdg_importer_v2 *);
168  bool isValid() const;
174  void release();
191  void destroy();
192 
196  void setEventQueue(EventQueue *queue);
200  EventQueue *eventQueue();
201 
215  XdgImported *importTopLevel(const QString & handle, QObject *parent = nullptr);
216 
217  operator zxdg_importer_v2*();
218  operator zxdg_importer_v2*() const;
219 
220 Q_SIGNALS:
227  void removed();
228 
229 protected:
230  class Private;
231  explicit XdgImporter(Private *p, QObject *parent = nullptr);
233 };
234 
235 class KWAYLANDCLIENT_EXPORT XdgExported : public QObject
236 {
237  Q_OBJECT
238 public:
239  virtual ~XdgExported();
240 
246  void setup(zxdg_exported_v2 *);
250  bool isValid() const;
256  void release();
273  void destroy();
274 
280  QString handle() const;
281 
282  operator zxdg_exported_v2*();
283  operator zxdg_exported_v2*() const;
284 
285 Q_SIGNALS:
290  void done();
291 
292 protected:
293  friend class XdgExporter;
294  class Private;
295  explicit XdgExported(Private *p, QObject *parent = nullptr);
297 };
298 
299 class KWAYLANDCLIENT_EXPORT XdgImported : public QObject
300 {
301  Q_OBJECT
302 public:
303  virtual ~XdgImported();
304 
310  void setup(zxdg_imported_v2 *);
314  bool isValid() const;
320  void release();
337  void destroy();
338 
347  void setParentOf(Surface *surface);
348 
349  operator zxdg_imported_v2*();
350  operator zxdg_imported_v2*() const;
351 
352 Q_SIGNALS:
357  void importedDestroyed();
358 
359 protected:
360  friend class XdgImporter;
361  class Private;
362  explicit XdgImported(Private *p, QObject *parent = nullptr);
364 };
365 
366 
367 }
368 }
369 
370 #endif
Wrapper for the zxdg_exporter_v2 interface.
Definition: xdgforeign.h:53
Wrapper class for wl_event_queue interface.
Definition: event_queue.h:55
Wrapper for the zxdg_importer_v2 interface.
Definition: xdgforeign.h:153
Wrapper for the wl_surface interface.
Definition: surface.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Sep 21 2020 22:50:49 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.