KWin
Loading...
Searching...
No Matches
src
plugins
invert
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
13
#include "
effect/offscreeneffect.h
"
14
15
namespace
KWin
16
{
17
18
class
GLShader;
19
23
class
InvertEffect
:
public
OffscreenEffect
24
{
25
Q_OBJECT
26
public
:
27
InvertEffect
();
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
36
public
Q_SLOTS:
37
void
toggleScreenInversion
();
38
void
toggleWindow
();
39
40
void
slotWindowAdded
(
KWin::EffectWindow
*w);
41
void
slotWindowClosed
(
KWin::EffectWindow
*w);
42
43
protected
:
44
bool
loadData
();
45
46
private
:
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
58
inline
int
InvertEffect::requestedEffectChainPosition
()
const
59
{
60
return
99;
61
}
62
63
}
// namespace
KWin::EffectWindow
Representation of a window used by/for Effect classes.
Definition
effectwindow.cpp:24
KWin::InvertEffect
Definition
invert.h:24
KWin::InvertEffect::toggleWindow
void toggleWindow()
Definition
invert.cpp:135
KWin::InvertEffect::requestedEffectChainPosition
int requestedEffectChainPosition() const override
Definition
invert.h:58
KWin::InvertEffect::supported
static bool supported()
Definition
invert.cpp:68
KWin::InvertEffect::slotWindowAdded
void slotWindowAdded(KWin::EffectWindow *w)
Definition
invert.cpp:107
KWin::InvertEffect::InvertEffect
InvertEffect()
Definition
invert.cpp:35
KWin::InvertEffect::slotWindowClosed
void slotWindowClosed(KWin::EffectWindow *w)
Definition
invert.cpp:114
KWin::InvertEffect::loadData
bool loadData()
Definition
invert.cpp:93
KWin::InvertEffect::provides
bool provides(Feature) override
Definition
invert.cpp:158
KWin::InvertEffect::~InvertEffect
~InvertEffect() override
KWin::InvertEffect::isActive
bool isActive() const override
Definition
invert.cpp:153
KWin::InvertEffect::toggleScreenInversion
void toggleScreenInversion()
Definition
invert.cpp:119
KWin::OffscreenEffect
Definition
offscreeneffect.h:34
KWin::Effect::Feature
Feature
Definition
effect.h:574
KWin
Definition
activation_test.cpp:20
offscreeneffect.h
Generated on Sat Feb 17 2024 01:42:09 for KWin by
1.10.0