KWayland

plasmavirtualdesktop.h
1 /*
2  SPDX-FileCopyrightText: 2018 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_PLASMAVIRTUALDESKTOP_H
7 #define KWAYLAND_CLIENT_PLASMAVIRTUALDESKTOP_H
8 
9 #include <QObject>
10 
11 #include <KWayland/Client/kwaylandclient_export.h>
12 
13 struct org_kde_plasma_virtual_desktop_management;
14 struct org_kde_plasma_virtual_desktop;
15 
16 namespace KWayland
17 {
18 namespace Client
19 {
20 
21 class EventQueue;
22 class PlasmaVirtualDesktop;
23 
48 class KWAYLANDCLIENT_EXPORT PlasmaVirtualDesktopManagement : public QObject
49 {
50  Q_OBJECT
51 public:
58  explicit PlasmaVirtualDesktopManagement(QObject *parent = nullptr);
60 
66  void setup(org_kde_plasma_virtual_desktop_management *plasmavirtualdesktopmanagement);
70  bool isValid() const;
76  void release();
93  void destroy();
94 
98  void setEventQueue(EventQueue *queue);
99 
104  EventQueue *eventQueue();
105 
110  PlasmaVirtualDesktop *getVirtualDesktop(const QString &id);
111 
116  void requestRemoveVirtualDesktop(const QString &id);
117 
125  void requestCreateVirtualDesktop(const QString &name, quint32 position = std::numeric_limits<uint32_t>::max());
126 
130  QList <PlasmaVirtualDesktop *> desktops() const;
131 
136  quint32 rows() const;
137 
138  operator org_kde_plasma_virtual_desktop_management*();
139  operator org_kde_plasma_virtual_desktop_management*() const;
140 
141 Q_SIGNALS:
142  void removed();
143 
147  void desktopCreated(const QString &id, quint32 position);
148 
152  void desktopRemoved(const QString &id);
153 
158  void rowsChanged(quint32 rows);
159 
167  void done();
168 
169 private:
170  class Private;
172 };
173 
174 class KWAYLANDCLIENT_EXPORT PlasmaVirtualDesktop : public QObject
175 {
176  Q_OBJECT
177 public:
178  virtual ~PlasmaVirtualDesktop();
179 
185  void setup(org_kde_plasma_virtual_desktop *plasmavirtualdesktop);
186 
190  bool isValid() const;
191 
197  void release();
198 
215  void destroy();
216 
221  void requestActivate();
222 
226  QString id() const;
227 
228 
232  QString name() const;
233 
240  bool isActive() const;
241 
242  operator org_kde_plasma_virtual_desktop*();
243  operator org_kde_plasma_virtual_desktop*() const;
244 
245 Q_SIGNALS:
250  void activated();
251 
255  void deactivated();
256 
264  void done();
265 
271  void removed();
272 
273 private:
274  friend class PlasmaVirtualDesktopManagement;
275  explicit PlasmaVirtualDesktop(QObject *parent = nullptr);
276  class Private;
278 };
279 
280 
281 }
282 }
283 
284 #endif
Wrapper class for wl_event_queue interface.
Definition: event_queue.h:55
Wrapper for the org_kde_plasma_virtual_desktop_management interface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Aug 7 2020 22:48:18 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.