KWayland

plasmavirtualdesktop_interface.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_SERVER_PLASMAVIRTUALDESKTOP_H
7 #define KWAYLAND_SERVER_PLASMAVIRTUALDESKTOP_H
8 
9 #include "global.h"
10 #include "resource.h"
11 
12 #include <KWayland/Server/kwaylandserver_export.h>
13 
14 namespace KWayland
15 {
16 namespace Server
17 {
18 
19 class Display;
20 class PlasmaVirtualDesktopInterface;
21 
28 class KWAYLANDSERVER_EXPORT PlasmaVirtualDesktopManagementInterface : public Global
29 {
30  Q_OBJECT
31 public:
33 
38  void setRows(quint32 rows);
39 
45  PlasmaVirtualDesktopInterface *desktop(const QString &id);
46 
55  PlasmaVirtualDesktopInterface *createDesktop(const QString &id, quint32 position = std::numeric_limits<uint32_t>::max());
56 
60  void removeDesktop(const QString &id);
61 
66 
71  void sendDone();
72 
73 Q_SIGNALS:
77  void desktopActivated(const QString &id);
78 
83  void desktopRemoveRequested(const QString &id);
84 
91  void desktopCreateRequested(const QString &name, quint32 position);
92 
93 private:
94  explicit PlasmaVirtualDesktopManagementInterface(Display *display, QObject *parent = nullptr);
95  friend class Display;
96  class Private;
97  Private *d_func() const;
98 };
99 
100 class KWAYLANDSERVER_EXPORT PlasmaVirtualDesktopInterface : public QObject
101 {
102  Q_OBJECT
103 public:
104  virtual ~PlasmaVirtualDesktopInterface();
105 
111  QString id() const;
112 
116  void setName(const QString &name);
117 
121  QString name() const;
122 
127  void setActive(bool active);
128 
132  bool isActive() const;
133 
138  void sendDone();
139 
140 Q_SIGNALS:
145  void activateRequested();
146 
147 private:
148  explicit PlasmaVirtualDesktopInterface(PlasmaVirtualDesktopManagementInterface *parent);
150 
151  class Private;
152  const QScopedPointer<Private> d;
153 };
154 
155 }
156 }
157 
158 #endif
Class holding the Wayland server display loop.
Definition: display.h:89
Base class for all Globals.
Definition: global.h:46
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.