7#include <PhosphorWorkspaces/Plasma/phosphorworkspacesplasma_export.h>
51 void onCurrentChanged(
const QString& desktopId);
52 void onCountChanged(uint count);
55 void onDesktopCreated(
const QDBusMessage& message);
56 void onDesktopRemoved(
const QString& desktopId);
57 void onRowsChanged(uint rows);
59 void onDesktopDataChanged(
const QDBusMessage& message);
64 static QList<DesktopEntry> readDesktopArray(
const QDBusArgument& arg);
66 QDBusInterface* m_interface =
nullptr;
67 bool m_subscribed =
false;
std::function< void(std::optional< Snapshot > snapshot)> SnapshotCallback
Definition IVirtualDesktopBackend.h:56
std::function< void(bool answered)> AnswerCallback
answered is false for an error or a timeout: a stall, not a refusal.
Definition IVirtualDesktopBackend.h:58
IVirtualDesktopBackend(QObject *parent=nullptr)
Definition IVirtualDesktopBackend.h:60
void unsubscribe() override
bool connectToSource() override
Probe KWin's interface. False on a session without KWin.
void setDesktopName(const QString &desktopId, const QString &name) override
Rename a desktop. The new name arrives as desktopDataChanged.
void removeDesktop(const QString &desktopId, AnswerCallback done) override
Remove a desktop. done as for createDesktop.
void createDesktop(uint position, const QString &name, AnswerCallback done) override
Create a desktop at a 0-based position.
bool isReachable() const override
KWin's service is on the bus (QDBusInterface follows its owner).
void readSnapshotAsync(SnapshotCallback done) override
Read the whole list without blocking.
KWinVirtualDesktopBackend(QObject *parent=nullptr)
void subscribe() override
Start and stop emitting the change signals.
~KWinVirtualDesktopBackend() override
void setCurrentDesktop(const QString &desktopId) override
Switch to the desktop with this id, without waiting for the switch: it arrives as currentChanged.
std::optional< Snapshot > readSnapshot() override
Read the whole list now, blocking the caller.
Definition WindowTrackingService.h:46