KWayland

plasmawindowmanagement_interface.h
1 /*
2  SPDX-FileCopyrightText: 2015 Martin Gräßlin <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 #ifndef WAYLAND_SERVER_PLASMA_WINDOW_MANAGEMENT_INTERFACE_H
7 #define WAYLAND_SERVER_PLASMA_WINDOW_MANAGEMENT_INTERFACE_H
8 
9 #include <KWayland/Server/kwaylandserver_export.h>
10 
11 #if KWAYLANDSERVER_ENABLE_DEPRECATED_SINCE(5, 73)
12 
13 #include <QObject>
14 
15 
16 #include "global.h"
17 #include "resource.h"
18 
19 class QSize;
20 
21 namespace KWayland
22 {
23 namespace Server
24 {
25 
26 class Display;
27 class PlasmaWindowInterface;
28 class SurfaceInterface;
29 class PlasmaVirtualDesktopManagementInterface;
30 
34 class KWAYLANDSERVER_EXPORT PlasmaWindowManagementInterface : public Global
35 {
36  Q_OBJECT
37 public:
38  KWAYLANDSERVER_DEPRECATED_VERSION(5, 73, "Port to KWaylandServer")
41  enum class ShowingDesktopState {
42  Disabled,
43  Enabled
44  };
45  void setShowingDesktopState(ShowingDesktopState state);
46 
47  PlasmaWindowInterface *createWindow(QObject *parent);
48  QList<PlasmaWindowInterface*> windows() const;
49 
65  void unmapWindow(PlasmaWindowInterface *window);
66 
73  void setPlasmaVirtualDesktopManagementInterface(PlasmaVirtualDesktopManagementInterface *manager);
74 
79  PlasmaVirtualDesktopManagementInterface *plasmaVirtualDesktopManagementInterface() const;
80 
81 
86  void setStackingOrder(const QVector<quint32> &stackingOrder);
87 
88 Q_SIGNALS:
89  void requestChangeShowingDesktop(ShowingDesktopState requestedState);
90 
91 private:
92  friend class Display;
93  explicit PlasmaWindowManagementInterface(Display *display, QObject *parent);
94  class Private;
95  Private *d_func() const;
96 };
97 
101 class KWAYLANDSERVER_EXPORT PlasmaWindowInterface : public QObject
102 {
103  Q_OBJECT
104 public:
105  KWAYLANDSERVER_DEPRECATED_VERSION(5, 73, "Port to KWaylandServer")
106  PlasmaWindowInterface() = default;
107  virtual ~PlasmaWindowInterface();
108 
109  void setTitle(const QString &title);
110  void setAppId(const QString &appId);
111  void setPid(quint32 pid);
112 #if KWAYLANDSERVER_ENABLE_DEPRECATED_SINCE(5, 52)
113 
116  KWAYLANDSERVER_DEPRECATED_VERSION(5, 52, "Use PlasmaWindowManagementInterface::addPlasmaVirtualDesktop(const QString&) and PlasmaWindowManagementInterface::removePlasmaVirtualDesktop(const QString&)")
117  void setVirtualDesktop(quint32 desktop);
118 #endif
119  void setActive(bool set);
120  void setMinimized(bool set);
121  void setMaximized(bool set);
122  void setFullscreen(bool set);
123  void setKeepAbove(bool set);
124  void setKeepBelow(bool set);
125  void setOnAllDesktops(bool set);
126  void setDemandsAttention(bool set);
127  void setCloseable(bool set);
128  void setMinimizeable(bool set);
129  void setMaximizeable(bool set);
130  void setFullscreenable(bool set);
131  void setSkipTaskbar(bool skip);
132  void setSkipSwitcher(bool skip);
133 #if KWAYLANDSERVER_ENABLE_DEPRECATED_SINCE(5, 28)
134 
137  KWAYLANDSERVER_DEPRECATED_VERSION(5, 28, "Use PlasmaWindowManagementInterface::setIcon(const QIcon&)")
138  void setThemedIconName(const QString &iconName);
139 #endif
140 
143  void setShadeable(bool set);
147  void setShaded(bool set);
151  void setMovable(bool set);
155  void setResizable(bool set);
160  void setVirtualDesktopChangeable(bool set);
161 
169  void unmap();
170 
176  QHash<SurfaceInterface*, QRect> minimizedGeometries() const;
177 
184  void setParentWindow(PlasmaWindowInterface *parentWindow);
185 
192  void setGeometry(const QRect &geometry);
193 
205  void setIcon(const QIcon &icon);
206 
214  void addPlasmaVirtualDesktop(const QString &id);
215 
221  void removePlasmaVirtualDesktop(const QString &id);
222 
229  QStringList plasmaVirtualDesktops() const;
230 
236  void setApplicationMenuPaths(const QString &serviceName, const QString &objectPath);
237 
243  quint32 internalId() const;
244 
245 Q_SIGNALS:
246  void closeRequested();
250  void moveRequested();
254  void resizeRequested();
255 #if KWAYLANDSERVER_ENABLE_DEPRECATED_SINCE(5, 52)
256 
259  KWAYLANDSERVER_DEPRECATED_VERSION(5, 52, "Use PlasmaWindowManagementInterface::enterPlasmaVirtualDesktopRequested(const QString&) and PlasmaWindowManagementInterface::leavePlasmaVirtualDesktopRequested(const QString&)")
260  void virtualDesktopRequested(quint32 desktop);
261 #endif
262  void activeRequested(bool set);
263  void minimizedRequested(bool set);
264  void maximizedRequested(bool set);
265  void fullscreenRequested(bool set);
266  void keepAboveRequested(bool set);
267  void keepBelowRequested(bool set);
268  void demandsAttentionRequested(bool set);
269  void closeableRequested(bool set);
270  void minimizeableRequested(bool set);
271  void maximizeableRequested(bool set);
272  void fullscreenableRequested(bool set);
273  void skipTaskbarRequested(bool set);
274  void skipSwitcherRequested(bool set);
275  QRect minimizedGeometriesChanged();
279  void shadeableRequested(bool set);
283  void shadedRequested(bool set);
287  void movableRequested(bool set);
291  void resizableRequested(bool set);
296  void virtualDesktopChangeableRequested(bool set);
297 
303  void enterPlasmaVirtualDesktopRequested(const QString &desktop);
304 
311  void enterNewPlasmaVirtualDesktopRequested();
312 
318  void leavePlasmaVirtualDesktopRequested(const QString &desktop);
319 
320 private:
321  friend class PlasmaWindowManagementInterface;
323 
324  class Private;
325  const QScopedPointer<Private> d;
326 };
327 
328 }
329 }
330 
331 Q_DECLARE_METATYPE(KWayland::Server::PlasmaWindowManagementInterface::ShowingDesktopState)
332 
333 #endif
334 #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 14 2020 22:49:57 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.