1fb9f6f13a
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.
64 lines
1.4 KiB
C++
64 lines
1.4 KiB
C++
/********************************************************************
|
|
KWin - the KDE window manager
|
|
This file is part of the KDE project.
|
|
|
|
SPDX-FileCopyrightText: 2007 Rivo Laks <rivolaks@hot.ee>
|
|
SPDX-FileCopyrightText: 2008 Lucas Murray <lmurray@undefinedfire.com>
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
*********************************************************************/
|
|
|
|
#ifndef KWIN_INVERT_H
|
|
#define KWIN_INVERT_H
|
|
|
|
#include <kwineffects.h>
|
|
|
|
namespace KWin
|
|
{
|
|
|
|
class GLShader;
|
|
|
|
/**
|
|
* Inverts desktop's colors
|
|
*/
|
|
class InvertEffect
|
|
: public Effect
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
InvertEffect();
|
|
~InvertEffect() override;
|
|
|
|
void drawWindow(EffectWindow* w, int mask, const QRegion ®ion, WindowPaintData& data) override;
|
|
void paintEffectFrame(KWin::EffectFrame* frame, const QRegion ®ion, double opacity, double frameOpacity) override;
|
|
bool isActive() const override;
|
|
bool provides(Feature) override;
|
|
|
|
int requestedEffectChainPosition() const override;
|
|
|
|
static bool supported();
|
|
|
|
public Q_SLOTS:
|
|
void toggleScreenInversion();
|
|
void toggleWindow();
|
|
void slotWindowClosed(KWin::EffectWindow *w);
|
|
|
|
protected:
|
|
bool loadData();
|
|
|
|
private:
|
|
bool m_inited;
|
|
bool m_valid;
|
|
GLShader* m_shader;
|
|
bool m_allWindows;
|
|
QList<EffectWindow*> m_windows;
|
|
};
|
|
|
|
inline int InvertEffect::requestedEffectChainPosition() const
|
|
{
|
|
return 99;
|
|
}
|
|
|
|
} // namespace
|
|
|
|
#endif
|