KWin
Loading...
Searching...
No Matches
invert.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: 2007 Rivo Laks <rivolaks@hot.ee>
6 SPDX-FileCopyrightText: 2008 Lucas Murray <lmurray@undefinedfire.com>
7
8 SPDX-License-Identifier: GPL-2.0-or-later
9*/
10
11#pragma once
12
14
15namespace KWin
16{
17
18class GLShader;
19
24{
25 Q_OBJECT
26public:
28 ~InvertEffect() override;
29
30 bool isActive() const override;
31 bool provides(Feature) override;
32 int requestedEffectChainPosition() const override;
33
34 static bool supported();
35
36public Q_SLOTS:
38 void toggleWindow();
39
42
43protected:
44 bool loadData();
45
46private:
47 bool isInvertable(EffectWindow *window) const;
48 void invert(EffectWindow *window);
49 void uninvert(EffectWindow *window);
50
51 bool m_inited;
52 bool m_valid;
53 std::unique_ptr<GLShader> m_shader;
54 bool m_allWindows;
55 QList<EffectWindow *> m_windows;
56};
57
59{
60 return 99;
61}
62
63} // namespace
Representation of a window used by/for Effect classes.
int requestedEffectChainPosition() const override
Definition invert.h:58
static bool supported()
Definition invert.cpp:68
void slotWindowAdded(KWin::EffectWindow *w)
Definition invert.cpp:107
void slotWindowClosed(KWin::EffectWindow *w)
Definition invert.cpp:114
bool provides(Feature) override
Definition invert.cpp:158
~InvertEffect() override
bool isActive() const override
Definition invert.cpp:153
void toggleScreenInversion()
Definition invert.cpp:119