dock/src/xwindowinterface.h

69 lines
1.9 KiB
C
Raw Normal View History

2021-03-15 20:17:11 -07:00
/*
2021-03-16 03:13:34 -07:00
* Copyright (C) 2021 CutefishOS Team.
2021-03-15 20:17:11 -07:00
*
* Author: rekols <revenmartin@gmail.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef XWINDOWINTERFACE_H
#define XWINDOWINTERFACE_H
#include "applicationitem.h"
#include "docksettings.h"
#include <QObject>
// KLIB
#include <KWindowInfo>
#include <KWindowEffects>
class XWindowInterface : public QObject
{
Q_OBJECT
public:
static XWindowInterface *instance();
explicit XWindowInterface(QObject *parent = nullptr);
void enableBlurBehind(QWindow *view, bool enable = true, const QRegion &region = QRegion());
WId activeWindow();
void minimizeWindow(WId win);
void closeWindow(WId id);
void forceActiveWindow(WId win);
QMap<QString, QVariant> requestInfo(quint64 wid);
QString requestWindowClass(quint64 wid);
bool isAcceptableWindow(quint64 wid);
2021-03-24 04:44:53 -07:00
void setViewStruts(QWindow *view, DockSettings::Direction direction, const QRect &rect);
2021-06-20 11:52:26 -07:00
void clearViewStruts(QWindow *view);
2021-03-15 20:17:11 -07:00
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