add more spacing
[personal-kdebase.git] / workspace / kwin / effects / invert.h
blob3d89540215597ca657052c5400e23ac608cf94aa
1 /********************************************************************
2 KWin - the KDE window manager
3 This file is part of the KDE project.
5 Copyright (C) 2007 Rivo Laks <rivolaks@hot.ee>
6 Copyright (C) 2008 Lucas Murray <lmurray@undefinedfire.com>
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 *********************************************************************/
22 #ifndef KWIN_INVERT_H
23 #define KWIN_INVERT_H
25 #include <kwineffects.h>
27 namespace KWin
30 class GLShader;
32 /**
33 * Inverts desktop's colors
34 **/
35 class InvertEffect
36 : public QObject, public Effect
38 Q_OBJECT
39 public:
40 InvertEffect();
41 ~InvertEffect();
43 virtual void paintWindow( EffectWindow* w, int mask, QRegion region, WindowPaintData& data );
44 virtual void windowClosed( EffectWindow* w );
46 public slots:
47 void toggle();
48 void toggleWindow();
50 protected:
51 bool loadData();
53 private:
54 bool m_inited;
55 bool m_valid;
56 GLShader* m_shader;
57 bool m_allWindows;
58 QList<EffectWindow*> m_windows;
61 } // namespace
63 #endif