#pragma once #include "WindowTypes.hpp" #include #include class WindowBackend : public QObject { Q_OBJECT public: enum SnapEdge { SnapLeft = 0, SnapRight, SnapMaximize }; explicit WindowBackend(QObject *parent = nullptr) : QObject(parent) { } ~WindowBackend() override = default; virtual bool isConnected() const = 0; virtual QVector windows() const = 0; virtual QVector workspaces() const = 0; virtual qint64 focusedWindowId() const = 0; virtual bool focusWindow(qint64 windowId) = 0; virtual bool closeWindow(qint64 windowId) = 0; virtual bool maximizeWindow(qint64 windowId) = 0; virtual bool restoreWindow(qint64 windowId) = 0; virtual bool minimizeWindow(qint64 windowId) = 0; virtual bool setWindowFloating(qint64 windowId, bool floating) = 0; virtual bool moveWindow(qint64 windowId, int x, int y) = 0; virtual bool resizeWindow(qint64 windowId, int width, int height) = 0; virtual bool snapWindow(qint64 windowId, SnapEdge edge) = 0; virtual bool switchWorkspace(const QString &workspaceId) = 0; signals: void connectedChanged(); void windowsChanged(); void workspacesChanged(); void focusChanged(); };