File indexing completed on 2024-05-12 17:00:19

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 <KWayland/Client/buffer.h>
0011 #include <KWayland/Client/shadow.h>
0012 #include <private/kwindowshadow_p.h>
0013 
0014 class WindowShadowTile final : public KWindowShadowTilePrivate
0015 {
0016 public:
0017     WindowShadowTile();
0018     ~WindowShadowTile();
0019 
0020     bool create() override;
0021     void destroy() override;
0022 
0023     static WindowShadowTile *get(const KWindowShadowTile *tile);
0024 
0025     KWayland::Client::Buffer::Ptr buffer;
0026     QScopedPointer<KWayland::Client::ShmPool> m_shmPool;
0027 };
0028 
0029 class WindowShadow final : public QObject, public KWindowShadowPrivate
0030 {
0031 public:
0032     bool create() override;
0033     void destroy() override;
0034 
0035 protected:
0036     bool eventFilter(QObject *watched, QEvent *event) override;
0037 
0038 private:
0039     bool internalCreate();
0040     void internalDestroy();
0041 
0042     QPointer<KWayland::Client::Shadow> shadow;
0043 };
0044 
0045 #endif // WINDOWSHADOW_H