KWin
Loading...
Searching...
No Matches
highlightwindow.h
Go to the documentation of this file.
1/*
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5 SPDX-FileCopyrightText: 2009 Lucas Murray <lmurray@undefinedfire.com>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9
10#pragma once
11
13
14namespace KWin
15{
16
18{
19 Q_OBJECT
20
21public:
23 ~HighlightWindowEffect() override;
24
25 int requestedEffectChainPosition() const override
26 {
27 return 70;
28 }
29
30 bool provides(Feature feature) override;
31 bool perform(Feature feature, const QVariantList &arguments) override;
32 Q_SCRIPTABLE void highlightWindows(const QStringList &windows);
33
34public Q_SLOTS:
38 void slotPropertyNotify(KWin::EffectWindow *w, long atom, EffectWindow *addedWindow = nullptr);
39
40private:
41 quint64 startGhostAnimation(EffectWindow *window);
42 quint64 startHighlightAnimation(EffectWindow *window);
43 void startRevertAnimation(EffectWindow *window);
44
45 bool isHighlighted(EffectWindow *window) const;
46
47 void prepareHighlighting();
48 void finishHighlighting();
49 void highlightWindows(const QList<KWin::EffectWindow *> &windows);
50
51 long m_atom;
52 QList<EffectWindow *> m_highlightedWindows;
53 QHash<EffectWindow *, quint64> m_animations;
54 QEasingCurve m_easingCurve;
55 int m_fadeDuration;
56 EffectWindow *m_monitorWindow;
57 QList<WId> m_highlightedIds;
58 float m_ghostOpacity = 0;
59};
60
61} // namespace
Representation of a window used by/for Effect classes.
void slotWindowAdded(KWin::EffectWindow *w)
bool perform(Feature feature, const QVariantList &arguments) override
bool provides(Feature feature) override
int requestedEffectChainPosition() const override
void slotWindowDeleted(KWin::EffectWindow *w)
Q_SCRIPTABLE void highlightWindows(const QStringList &windows)
void slotPropertyNotify(KWin::EffectWindow *w, long atom, EffectWindow *addedWindow=nullptr)
void slotWindowClosed(KWin::EffectWindow *w)