1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-31 13:47:20 +03:00
latte-dock/app/xwindowinterface.h

68 lines
2.0 KiB
C
Raw Normal View History

2017-01-02 17:05:30 -05:00
/*
* Copyright 2016 Smith AR <audoban@openmailbox.org>
* Michail Vourlakos <mvourlakos@gmail.com>
*
* This file is part of Latte-Dock
*
* Latte-Dock 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 2 of
* the License, or (at your option) any later version.
*
* Latte-Dock 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
2016-12-29 00:37:53 -05:00
#include "abstractwindowinterface.h"
#include "windowinfowrap.h"
2016-12-29 00:37:53 -05:00
#include <QObject>
#include <KWindowInfo>
#include <KWindowEffects>
2016-12-28 22:27:55 -05:00
namespace Latte {
2016-12-28 22:27:55 -05:00
class XWindowInterface : public AbstractWindowInterface {
Q_OBJECT
2017-01-16 14:07:49 -05:00
public:
explicit XWindowInterface(QObject *parent = nullptr);
~XWindowInterface() override;
2017-01-16 14:07:49 -05:00
void setDockExtraFlags(QQuickWindow &view) override;
void setDockStruts(WId dockId, const QRect &dockRect, Plasma::Types::Location location) const override;
void removeDockStruts(WId dockId) const override;
2017-01-16 14:07:49 -05:00
2016-12-28 22:27:55 -05:00
WId activeWindow() const override;
WindowInfoWrap requestInfo(WId wid) const override;
WindowInfoWrap requestInfoActive() const override;
bool isOnCurrentDesktop(WId wid) const override;
const std::list<WId> &windows() const override;
2017-01-16 14:07:49 -05:00
void skipTaskBar(const QDialog &dialog) const override;
void slideWindow(QQuickWindow &view, Slide location) const override;
void enableBlurBehind(QQuickWindow &view) const override;
2017-01-16 14:07:49 -05:00
private:
bool isValidWindow(const KWindowInfo &winfo) const;
2016-12-28 22:27:55 -05:00
void windowChangedProxy(WId wid, NET::Properties prop1, NET::Properties2 prop2);
2017-01-16 14:07:49 -05:00
WId m_desktopId;
};
}
2016-12-28 22:27:55 -05:00
#endif // XWINDOWINTERFACE_H