KWin
Loading...
Searching...
No Matches
src
scene
shadowitem.h
Go to the documentation of this file.
1
/*
2
SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
3
4
SPDX-License-Identifier: GPL-2.0-or-later
5
*/
6
7
#pragma once
8
9
#include "
scene/item.h
"
10
11
namespace
KWin
12
{
13
14
class
Shadow;
15
class
Window
;
16
17
class
KWIN_EXPORT
ShadowTextureProvider
18
{
19
public
:
20
explicit
ShadowTextureProvider
(
Shadow
*shadow);
21
virtual
~ShadowTextureProvider
();
22
23
Shadow
*
shadow
()
const
{
return
m_shadow; }
24
25
virtual
void
update
() = 0;
26
27
protected
:
28
Shadow
*
m_shadow
;
29
};
30
34
class
KWIN_EXPORT
ShadowItem
:
public
Item
35
{
36
Q_OBJECT
37
38
public
:
39
explicit
ShadowItem
(
Shadow
*shadow,
Window
*window,
Scene
*scene,
Item
*parent =
nullptr
);
40
~ShadowItem
()
override
;
41
42
Shadow
*shadow()
const
;
43
ShadowTextureProvider
*textureProvider()
const
;
44
45
protected
:
46
WindowQuadList
buildQuads()
const override
;
47
void
preprocess()
override
;
48
49
private
Q_SLOTS:
50
void
handleTextureChanged();
51
void
updateGeometry();
52
53
private
:
54
Window
*m_window;
55
Shadow
*m_shadow =
nullptr
;
56
std::unique_ptr<ShadowTextureProvider> m_textureProvider;
57
bool
m_textureDirty =
true
;
58
};
59
60
}
// namespace KWin
KWin::Item
Definition
item.h:30
KWin::Scene
Definition
scene.h:44
KWin::Shadow
Class representing a Window's Shadow to be rendered by the Compositor.
Definition
shadow.h:48
KWin::ShadowItem
Definition
shadowitem.h:35
KWin::ShadowTextureProvider
Definition
shadowitem.h:18
KWin::ShadowTextureProvider::update
virtual void update()=0
KWin::ShadowTextureProvider::m_shadow
Shadow * m_shadow
Definition
shadowitem.h:28
KWin::ShadowTextureProvider::shadow
Shadow * shadow() const
Definition
shadowitem.h:23
KWin::Window
Definition
window.h:61
KWin::WindowQuadList
Definition
itemgeometry.h:81
Window
Definition
copy.cpp:16
item.h
KWin
Definition
activation_test.cpp:20
Generated on Sat Feb 17 2024 01:42:10 for KWin by
1.10.0