kwin/effects/magiclamp/magiclamp.h
Vlad Zahorodnii 1fb9f6f13a Switch to SPDX license markers
The main advantage of SPDX license identifiers over the traditional
license headers is that it's more difficult to overlook inappropriate
licenses for kwin, for example GPL 3. We also don't have to copy a
lot of boilerplate text.

In order to create this change, I ran licensedigger -r -c from the
toplevel source directory.
2020-08-07 19:57:56 +00:00

58 lines
1.4 KiB
C++

/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
SPDX-FileCopyrightText: 2008 Martin Gräßlin <mgraesslin@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*********************************************************************/
#ifndef KWIN_MAGICLAMP_H
#define KWIN_MAGICLAMP_H
#include <kwineffects.h>
namespace KWin
{
class MagicLampEffect
: public Effect
{
Q_OBJECT
public:
MagicLampEffect();
void reconfigure(ReconfigureFlags) override;
void prePaintScreen(ScreenPrePaintData& data, int time) override;
void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time) override;
void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) override;
void postPaintScreen() override;
bool isActive() const override;
int requestedEffectChainPosition() const override {
return 50;
}
static bool supported();
public Q_SLOTS:
void slotWindowDeleted(KWin::EffectWindow *w);
void slotWindowMinimized(KWin::EffectWindow *w);
void slotWindowUnminimized(KWin::EffectWindow *w);
private:
std::chrono::milliseconds m_duration;
QHash<const EffectWindow*, TimeLine> m_animations;
enum IconPosition {
Top,
Bottom,
Left,
Right
};
};
} // namespace
#endif