kwin/effects/highlightwindow/highlightwindow.h

62 lines
1.6 KiB
C
Raw Normal View History

2020-08-02 22:22:19 +00:00
/*
KWin - the KDE window manager
This file is part of the KDE project.
2020-08-02 22:22:19 +00:00
SPDX-FileCopyrightText: 2009 Lucas Murray <lmurray@undefinedfire.com>
2020-08-02 22:22:19 +00:00
SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef KWIN_HIGHLIGHTWINDOW_H
#define KWIN_HIGHLIGHTWINDOW_H
#include <kwinanimationeffect.h>
namespace KWin
{
class HighlightWindowEffect : public AnimationEffect
2011-01-30 14:34:42 +00:00
{
Q_OBJECT
2011-01-30 14:34:42 +00:00
public:
HighlightWindowEffect();
int requestedEffectChainPosition() const override {
return 70;
}
bool provides(Feature feature) override;
bool perform(Feature feature, const QVariantList &arguments) override;
public Q_SLOTS:
void slotWindowAdded(KWin::EffectWindow* w);
void slotWindowClosed(KWin::EffectWindow *w);
void slotWindowDeleted(KWin::EffectWindow *w);
void slotPropertyNotify(KWin::EffectWindow* w, long atom, EffectWindow *addedWindow = nullptr);
2011-01-30 14:34:42 +00:00
private:
void startGhostAnimation(EffectWindow *window, int duration = -1);
void startHighlightAnimation(EffectWindow *window, int duration = -1);
void startRevertAnimation(EffectWindow *window);
bool isHighlighted(EffectWindow *window) const;
2011-01-30 14:34:42 +00:00
void prepareHighlighting();
void finishHighlighting();
void highlightWindows(const QVector<KWin::EffectWindow *> &windows);
2011-01-30 14:34:42 +00:00
long m_atom;
QList<EffectWindow *> m_highlightedWindows;
QHash<EffectWindow *, quint64> m_animations;
QEasingCurve m_easingCurve;
int m_fadeDuration;
EffectWindow *m_monitorWindow;
QList<WId> m_highlightedIds;
float m_ghostOpacity = 0.15;
2011-01-30 14:34:42 +00:00
};
} // namespace
#endif