KWin
Loading...
Searching...
No Matches
plasmawindowmanagement.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2015 Martin Gräßlin <mgraesslin@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6#pragma once
7
8#include "kwin_export.h"
9
10#include <QObject>
11#include <memory>
12
13class QSize;
14
15namespace KWin
16{
17class Display;
18class OutputInterface;
19class PlasmaWindowActivationFeedbackInterfacePrivate;
20class PlasmaWindowInterface;
21class PlasmaVirtualDesktopManagementInterface;
22class PlasmaWindowActivationInterfacePrivate;
23class PlasmaWindowManagementInterfacePrivate;
24class PlasmaWindowInterfacePrivate;
25class SurfaceInterface;
26
28{
29public:
31
32 void sendAppId(const QString &id);
33
34private:
37
38 std::unique_ptr<PlasmaWindowActivationInterfacePrivate> d;
39};
40
41class KWIN_EXPORT PlasmaWindowActivationFeedbackInterface : public QObject
42{
43 Q_OBJECT
44
45public:
46 explicit PlasmaWindowActivationFeedbackInterface(Display *display, QObject *parent = nullptr);
48
55 std::unique_ptr<PlasmaWindowActivationInterface> createActivation(const QString &app_id);
56
57private:
58 std::unique_ptr<PlasmaWindowActivationFeedbackInterfacePrivate> d;
59};
60
61class KWIN_EXPORT PlasmaWindowManagementInterface : public QObject
62{
63 Q_OBJECT
64
65public:
66 explicit PlasmaWindowManagementInterface(Display *display, QObject *parent = nullptr);
69 Disabled,
70 Enabled,
71 };
72 void setShowingDesktopState(ShowingDesktopState state);
73
74 PlasmaWindowInterface *createWindow(QObject *parent, const QUuid &uuid);
75 QList<PlasmaWindowInterface *> windows() const;
76
82 void setPlasmaVirtualDesktopManagementInterface(PlasmaVirtualDesktopManagementInterface *manager);
83
87 PlasmaVirtualDesktopManagementInterface *plasmaVirtualDesktopManagementInterface() const;
88
92 void setStackingOrder(const QList<quint32> &stackingOrder);
93
94 void setStackingOrderUuids(const QList<QString> &stackingOrderUuids);
95
96Q_SIGNALS:
98
99private:
100 std::unique_ptr<PlasmaWindowManagementInterfacePrivate> d;
101};
102
106class KWIN_EXPORT PlasmaWindowInterface : public QObject
107{
108 Q_OBJECT
109public:
111
112 void setTitle(const QString &title);
113 void setAppId(const QString &appId);
114 void setPid(quint32 pid);
115 void setActive(bool set);
116 void setMinimized(bool set);
117 void setMaximized(bool set);
118 void setFullscreen(bool set);
119 void setKeepAbove(bool set);
120 void setKeepBelow(bool set);
121 void setOnAllDesktops(bool set);
122 void setDemandsAttention(bool set);
123 void setCloseable(bool set);
124 void setMinimizeable(bool set);
125 void setMaximizeable(bool set);
126 void setFullscreenable(bool set);
127 void setSkipTaskbar(bool skip);
128 void setSkipSwitcher(bool skip);
129 void setShadeable(bool set);
130 void setShaded(bool set);
131 void setMovable(bool set);
132 void setResizable(bool set);
133 void setResourceName(const QString &resourceName);
137 void setVirtualDesktopChangeable(bool set);
138
145 void unmap();
146
151 QHash<SurfaceInterface *, QRect> minimizedGeometries() const;
152
158 void setParentWindow(PlasmaWindowInterface *parentWindow);
159
165 void setGeometry(const QRect &geometry);
166
177 void setIcon(const QIcon &icon);
178
184 void addPlasmaVirtualDesktop(const QString &id);
185
189 void removePlasmaVirtualDesktop(const QString &id);
190
195 QStringList plasmaVirtualDesktops() const;
196
202 void addPlasmaActivity(const QString &id);
203
207 void removePlasmaActivity(const QString &id);
208
213 QStringList plasmaActivities() const;
214
218 void setApplicationMenuPaths(const QString &serviceName, const QString &objectPath);
219
223 quint32 internalId() const;
224
228 QString uuid() const;
229
230Q_SIGNALS:
234 void activeRequested(bool set);
235 void minimizedRequested(bool set);
236 void maximizedRequested(bool set);
237 void fullscreenRequested(bool set);
238 void keepAboveRequested(bool set);
239 void keepBelowRequested(bool set);
241 void closeableRequested(bool set);
242 void minimizeableRequested(bool set);
243 void maximizeableRequested(bool set);
245 void skipTaskbarRequested(bool set);
246 void skipSwitcherRequested(bool set);
248 void shadeableRequested(bool set);
249 void shadedRequested(bool set);
250 void movableRequested(bool set);
251 void resizableRequested(bool set);
256
261 void enterPlasmaVirtualDesktopRequested(const QString &desktop);
262
269
274 void leavePlasmaVirtualDesktopRequested(const QString &desktop);
275
280 void enterPlasmaActivityRequested(const QString &activity);
281
286 void leavePlasmaActivityRequested(const QString &activity);
287
292
293private:
297 explicit PlasmaWindowInterface(PlasmaWindowManagementInterface *wm, QObject *parent);
298
299 std::unique_ptr<PlasmaWindowInterfacePrivate> d;
300};
301
302}
303
Class holding the Wayland server display loop.
Definition display.h:34
Wrapper for the org_kde_plasma_virtual_desktop_management interface.
void shadeableRequested(bool set)
void shadedRequested(bool set)
void sendToOutput(KWin::OutputInterface *output)
void leavePlasmaActivityRequested(const QString &activity)
void keepAboveRequested(bool set)
void keepBelowRequested(bool set)
void maximizedRequested(bool set)
void movableRequested(bool set)
void resizableRequested(bool set)
void minimizedRequested(bool set)
void activeRequested(bool set)
void enterNewPlasmaVirtualDesktopRequested()
void virtualDesktopChangeableRequested(bool set)
void fullscreenRequested(bool set)
void leavePlasmaVirtualDesktopRequested(const QString &desktop)
void skipSwitcherRequested(bool set)
void fullscreenableRequested(bool set)
void enterPlasmaActivityRequested(const QString &activity)
void skipTaskbarRequested(bool set)
void minimizeableRequested(bool set)
void maximizeableRequested(bool set)
void closeableRequested(bool set)
void enterPlasmaVirtualDesktopRequested(const QString &desktop)
void demandsAttentionRequested(bool set)
void requestChangeShowingDesktop(ShowingDesktopState requestedState)
Q_DECLARE_METATYPE(KWin::SwitchEvent::State)
struct _XDisplay Display