KWin
Loading...
Searching...
No Matches
plasmavirtualdesktop.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2018 Marco Martin <notmart@gmail.com>
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
13namespace KWin
14{
15class Display;
16class PlasmaVirtualDesktopInterface;
17class PlasmaVirtualDesktopInterfacePrivate;
18class PlasmaVirtualDesktopManagementInterfacePrivate;
19
25class KWIN_EXPORT PlasmaVirtualDesktopManagementInterface : public QObject
26{
27 Q_OBJECT
28
29public:
30 explicit PlasmaVirtualDesktopManagementInterface(Display *display, QObject *parent = nullptr);
32
36 void setRows(quint32 rows);
37
43 PlasmaVirtualDesktopInterface *desktop(const QString &id);
44
53 PlasmaVirtualDesktopInterface *createDesktop(const QString &id, quint32 position = std::numeric_limits<uint32_t>::max());
54
58 void removeDesktop(const QString &id);
59
63 QList<PlasmaVirtualDesktopInterface *> desktops() const;
64
69 void sendDone();
70
71Q_SIGNALS:
75 void desktopActivated(const QString &id);
76
81 void desktopRemoveRequested(const QString &id);
82
89 void desktopCreateRequested(const QString &name, quint32 position);
90
91private:
92 std::unique_ptr<PlasmaVirtualDesktopManagementInterfacePrivate> d;
93};
94
95class KWIN_EXPORT PlasmaVirtualDesktopInterface : public QObject
96{
97 Q_OBJECT
98public:
100
106 QString id() const;
107
111 void setName(const QString &name);
112
116 QString name() const;
117
122 void setActive(bool active);
123
127 bool isActive() const;
128
133 void sendDone();
134
135Q_SIGNALS:
141
142private:
146
147 std::unique_ptr<PlasmaVirtualDesktopInterfacePrivate> d;
148};
149
150}
Class holding the Wayland server display loop.
Definition display.h:34
Wrapper for the org_kde_plasma_virtual_desktop_management interface.
void desktopCreateRequested(const QString &name, quint32 position)
void desktopRemoveRequested(const QString &id)
struct _XDisplay Display