File indexing completed on 2024-07-14 14:38:31

0001 /*
0002     SPDX-FileCopyrightText: 2019 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-or-later
0005 */
0006 
0007 #ifndef KWINDOWSHADOW_P_H
0008 #define KWINDOWSHADOW_P_H
0009 
0010 //
0011 //  W A R N I N G
0012 //  -------------
0013 //
0014 // This file is not part of the KF API.  It exists purely as an
0015 // implementation detail.  This header file may change from version to
0016 // version without notice, or even be removed.
0017 //
0018 // We mean it.
0019 //
0020 
0021 #include "kwindowshadow.h"
0022 
0023 #include <QPointer>
0024 
0025 class KWINDOWSYSTEM_EXPORT KWindowShadowTilePrivate
0026 {
0027 public:
0028     virtual ~KWindowShadowTilePrivate();
0029 
0030     virtual bool create() = 0;
0031     virtual void destroy() = 0;
0032 
0033     static KWindowShadowTilePrivate *get(const KWindowShadowTile *tile);
0034 
0035     QImage image;
0036     bool isCreated = false;
0037 };
0038 
0039 class KWINDOWSYSTEM_EXPORT KWindowShadowPrivate
0040 {
0041 public:
0042     virtual ~KWindowShadowPrivate();
0043 
0044     virtual bool create() = 0;
0045     virtual void destroy() = 0;
0046 
0047     bool prepareTiles();
0048 
0049     QPointer<QWindow> window;
0050     KWindowShadowTile::Ptr leftTile;
0051     KWindowShadowTile::Ptr topLeftTile;
0052     KWindowShadowTile::Ptr topTile;
0053     KWindowShadowTile::Ptr topRightTile;
0054     KWindowShadowTile::Ptr rightTile;
0055     KWindowShadowTile::Ptr bottomRightTile;
0056     KWindowShadowTile::Ptr bottomTile;
0057     KWindowShadowTile::Ptr bottomLeftTile;
0058     QMargins padding;
0059     bool isCreated = false;
0060 };
0061 
0062 #endif // KWINDOWSHADOW_P_H