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 <QObject>
10 
11 #include <KWayland/Server/kwaylandserver_export.h>
12 
13 #include "global.h"
14 #include "resource.h"
15 
16 class QSize;
17 
18 namespace KWayland
19 {
20 namespace Server
21 {
22 
23 class Display;
24 class PlasmaWindowInterface;
25 class SurfaceInterface;
26 class PlasmaVirtualDesktopManagementInterface;
27 
31 class KWAYLANDSERVER_EXPORT PlasmaWindowManagementInterface : public Global
32 {
33  Q_OBJECT
34 public:
36  enum class ShowingDesktopState {
37  Disabled,
38  Enabled
39  };
40  void setShowingDesktopState(ShowingDesktopState state);
41 
42  PlasmaWindowInterface *createWindow(QObject *parent);
43  QList<PlasmaWindowInterface*> windows() const;
44 
60  void unmapWindow(PlasmaWindowInterface *window);
61 
68  void setPlasmaVirtualDesktopManagementInterface(PlasmaVirtualDesktopManagementInterface *manager);
69 
74  PlasmaVirtualDesktopManagementInterface *plasmaVirtualDesktopManagementInterface() const;
75 
76 
81  void setStackingOrder(const QVector<quint32> &stackingOrder);
82 
83 Q_SIGNALS:
84  void requestChangeShowingDesktop(ShowingDesktopState requestedState);
85 
86 private:
87  friend class Display;
88  explicit PlasmaWindowManagementInterface(Display *display, QObject *parent);
89  class Private;
90  Private *d_func() const;
91 };
92 
96 class KWAYLANDSERVER_EXPORT PlasmaWindowInterface : public QObject
97 {
98  Q_OBJECT
99 public:
100  virtual ~PlasmaWindowInterface();
101 
102  void setTitle(const QString &title);
103  void setAppId(const QString &appId);
104  void setPid(quint32 pid);
105 #if KWAYLANDSERVER_ENABLE_DEPRECATED_SINCE(5, 52)
106 
109  KWAYLANDSERVER_DEPRECATED_VERSION(5, 52, "Use PlasmaWindowManagementInterface::addPlasmaVirtualDesktop(const QString&) and PlasmaWindowManagementInterface::removePlasmaVirtualDesktop(const QString&)")
110  void setVirtualDesktop(quint32 desktop);
111 #endif
112  void setActive(bool set);
113  void setMinimized(bool set);
114  void setMaximized(bool set);
115  void setFullscreen(bool set);
116  void setKeepAbove(bool set);
117  void setKeepBelow(bool set);
118  void setOnAllDesktops(bool set);
119  void setDemandsAttention(bool set);
120  void setCloseable(bool set);
121  void setMinimizeable(bool set);
122  void setMaximizeable(bool set);
123  void setFullscreenable(bool set);
124  void setSkipTaskbar(bool skip);
125  void setSkipSwitcher(bool skip);
126 #if KWAYLANDSERVER_ENABLE_DEPRECATED_SINCE(5, 28)
127 
130  KWAYLANDSERVER_DEPRECATED_VERSION(5, 28, "Use PlasmaWindowManagementInterface::setIcon(const QIcon&)")
131  void setThemedIconName(const QString &iconName);
132 #endif
133 
136  void setShadeable(bool set);
140  void setShaded(bool set);
144  void setMovable(bool set);
148  void setResizable(bool set);
153  void setVirtualDesktopChangeable(bool set);
154 
162  void unmap();
163 
169  QHash<SurfaceInterface*, QRect> minimizedGeometries() const;
170 
177  void setParentWindow(PlasmaWindowInterface *parentWindow);
178 
185  void setGeometry(const QRect &geometry);
186 
198  void setIcon(const QIcon &icon);
199 
207  void addPlasmaVirtualDesktop(const QString &id);
208 
214  void removePlasmaVirtualDesktop(const QString &id);
215 
222  QStringList plasmaVirtualDesktops() const;
223 
229  void setApplicationMenuPaths(const QString &serviceName, const QString &objectPath);
230 
236  quint32 internalId() const;
237 
238 Q_SIGNALS:
239  void closeRequested();
243  void moveRequested();
247  void resizeRequested();
248 #if KWAYLANDSERVER_ENABLE_DEPRECATED_SINCE(5, 52)
249 
252  KWAYLANDSERVER_DEPRECATED_VERSION(5, 52, "Use PlasmaWindowManagementInterface::enterPlasmaVirtualDesktopRequested(const QString&) and PlasmaWindowManagementInterface::leavePlasmaVirtualDesktopRequested(const QString&)")
253  void virtualDesktopRequested(quint32 desktop);
254 #endif
255  void activeRequested(bool set);
256  void minimizedRequested(bool set);
257  void maximizedRequested(bool set);
258  void fullscreenRequested(bool set);
259  void keepAboveRequested(bool set);
260  void keepBelowRequested(bool set);
261  void demandsAttentionRequested(bool set);
262  void closeableRequested(bool set);
263  void minimizeableRequested(bool set);
264  void maximizeableRequested(bool set);
265  void fullscreenableRequested(bool set);
266  void skipTaskbarRequested(bool set);
267  void skipSwitcherRequested(bool set);
268  QRect minimizedGeometriesChanged();
272  void shadeableRequested(bool set);
276  void shadedRequested(bool set);
280  void movableRequested(bool set);
284  void resizableRequested(bool set);
289  void virtualDesktopChangeableRequested(bool set);
290 
296  void enterPlasmaVirtualDesktopRequested(const QString &desktop);
297 
304  void enterNewPlasmaVirtualDesktopRequested();
305 
311  void leavePlasmaVirtualDesktopRequested(const QString &desktop);
312 
313 private:
314  friend class PlasmaWindowManagementInterface;
316 
317  class Private;
318  const QScopedPointer<Private> d;
319 };
320 
321 }
322 }
323 
324 Q_DECLARE_METATYPE(KWayland::Server::PlasmaWindowManagementInterface::ShowingDesktopState)
325 
326 #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 Thu Jun 4 2020 22:51:17 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.