1 | /* |
---|---|
2 | SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
5 | */ |
6 | |
7 | #ifndef WINDOWSHADOW_H |
8 | #define WINDOWSHADOW_H |
9 | |
10 | #include "kwindowshadow_p.h" |
11 | |
12 | #include <memory> |
13 | |
14 | class Shadow; |
15 | class ShmBuffer; |
16 | class Shm; |
17 | |
18 | class WindowShadowTile final : public QObject, public KWindowShadowTilePrivate |
19 | { |
20 | public: |
21 | WindowShadowTile(); |
22 | ~WindowShadowTile(); |
23 | |
24 | bool create() override; |
25 | void destroy() override; |
26 | |
27 | static WindowShadowTile *get(const KWindowShadowTile *tile); |
28 | |
29 | std::unique_ptr<ShmBuffer> buffer; |
30 | }; |
31 | |
32 | class WindowShadow final : public QObject, public KWindowShadowPrivate |
33 | { |
34 | public: |
35 | WindowShadow(); |
36 | ~WindowShadow() override; |
37 | bool create() override; |
38 | void destroy() override; |
39 | |
40 | protected: |
41 | bool eventFilter(QObject *watched, QEvent *event) override; |
42 | |
43 | private: |
44 | bool internalCreate(); |
45 | void internalDestroy(); |
46 | |
47 | std::unique_ptr<Shadow> shadow; |
48 | }; |
49 | |
50 | #endif // WINDOWSHADOW_H |
51 |