File indexing completed on 2024-11-17 03:43:06
0001 /* 0002 SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef WINDOWSHADOW_H 0008 #define WINDOWSHADOW_H 0009 0010 #include "kwindowshadow_p.h" 0011 0012 #include <memory> 0013 0014 class Shadow; 0015 class ShmBuffer; 0016 class Shm; 0017 0018 class WindowShadowTile final : public QObject, public KWindowShadowTilePrivate 0019 { 0020 public: 0021 WindowShadowTile(); 0022 ~WindowShadowTile(); 0023 0024 bool create() override; 0025 void destroy() override; 0026 0027 static WindowShadowTile *get(const KWindowShadowTile *tile); 0028 0029 std::unique_ptr<ShmBuffer> buffer; 0030 }; 0031 0032 class WindowShadow final : public QObject, public KWindowShadowPrivate 0033 { 0034 public: 0035 WindowShadow(); 0036 ~WindowShadow() override; 0037 bool create() override; 0038 void destroy() override; 0039 0040 protected: 0041 bool eventFilter(QObject *watched, QEvent *event) override; 0042 0043 private: 0044 bool internalCreate(); 0045 void internalDestroy(); 0046 0047 std::unique_ptr<Shadow> shadow; 0048 }; 0049 0050 #endif // WINDOWSHADOW_H