/* * Copyright (C) 2021 CutefishOS Team. * * Author: rekols * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef XWINDOWINTERFACE_H #define XWINDOWINTERFACE_H #include "applicationitem.h" #include "docksettings.h" #include // KLIB #include #include class XWindowInterface : public QObject { Q_OBJECT public: static XWindowInterface *instance(); explicit XWindowInterface(QObject *parent = nullptr); void enableBlurBehind(QWindow *view, bool enable = true, const QRegion ®ion = QRegion()); WId activeWindow(); void minimizeWindow(WId win); void closeWindow(WId id); void forceActiveWindow(WId win); QMap requestInfo(quint64 wid); QString requestWindowClass(quint64 wid); bool isAcceptableWindow(quint64 wid); void setViewStruts(QWindow *view, DockSettings::Direction direction, const QRect &rect); void clearViewStruts(QWindow *view); void startInitWindows(); QString desktopFilePath(quint64 wid); void setIconGeometry(quint64 wid, const QRect &rect); signals: void windowAdded(quint64 wid); void windowRemoved(quint64 wid); void activeChanged(quint64 wid); private: void onWindowadded(quint64 wid); }; #endif // XWINDOWINTERFACE_H