Changeset View
Changeset View
Standalone View
Standalone View
src/windowsystem/windowshadow.h
- This file was copied from src/windowsystem/plugin.cpp.
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | * Copyright 2015 Martin Gräßlin <mgraesslin@kde.org> | 2 | * Copyright 2020 Vlad Zahorodnii <vladzzag@gmail.com> | ||
3 | * | 3 | * | ||
4 | * This library is free software; you can redistribute it and/or | 4 | * This library is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU Lesser General Public | 5 | * modify it under the terms of the GNU Lesser General Public | ||
6 | * License as published by the Free Software Foundation; either | 6 | * License as published by the Free Software Foundation; either | ||
7 | * version 2.1 of the License, or (at your option) version 3, or any | 7 | * version 2.1 of the License, or (at your option) version 3, or any | ||
8 | * later version accepted by the membership of KDE e.V. (or its | 8 | * later version accepted by the membership of KDE e.V. (or its | ||
9 | * successor approved by the membership of KDE e.V.), which shall | 9 | * successor approved by the membership of KDE e.V.), which shall | ||
10 | * act as a proxy defined in Section 6 of version 3 of the license. | 10 | * act as a proxy defined in Section 6 of version 3 of the license. | ||
11 | * | 11 | * | ||
12 | * This library is distributed in the hope that it will be useful, | 12 | * This library is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * Lesser General Public License for more details. | 15 | * Lesser General Public License for more details. | ||
16 | * | 16 | * | ||
17 | * You should have received a copy of the GNU Lesser General Public | 17 | * You should have received a copy of the GNU Lesser General Public | ||
18 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | 18 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | 19 | */ | ||
20 | #include "plugin.h" | | |||
21 | #include "windowsystem.h" | | |||
22 | #include "windoweffects.h" | | |||
23 | #include "windowinfo.h" | | |||
24 | 20 | | |||
25 | KWaylandPlugin::KWaylandPlugin(QObject *parent) | 21 | #ifndef WINDOWSHADOW_H | ||
26 | : KWindowSystemPluginInterface(parent) | 22 | #define WINDOWSHADOW_H | ||
27 | { | | |||
28 | } | | |||
29 | 23 | | |||
30 | KWaylandPlugin::~KWaylandPlugin() | 24 | #include <KWayland/Client/buffer.h> | ||
31 | { | 25 | #include <KWayland/Client/shadow.h> | ||
32 | } | 26 | #include <KWindowSystem/private/kwindowshadow_p.h> | ||
33 | 27 | | |||
34 | KWindowEffectsPrivate *KWaylandPlugin::createEffects() | 28 | class WindowShadowTile final : public KWindowShadowTilePrivate | ||
35 | { | 29 | { | ||
36 | return new WindowEffects(); | 30 | public: | ||
37 | } | 31 | bool create() noexcept override; | ||
32 | void destroy() noexcept override; | ||||
38 | 33 | | |||
39 | KWindowSystemPrivate *KWaylandPlugin::createWindowSystem() | 34 | static WindowShadowTile *get(const KWindowShadowTile *tile) noexcept; | ||
40 | { | | |||
41 | return new WindowSystem(); | | |||
42 | } | | |||
43 | 35 | | |||
44 | KWindowInfoPrivate *KWaylandPlugin::createWindowInfo(WId window, NET::Properties properties, NET::Properties2 properties2) | 36 | KWayland::Client::Buffer::Ptr buffer; | ||
37 | }; | ||||
38 | | ||||
39 | class WindowShadow final : public KWindowShadowPrivate | ||||
45 | { | 40 | { | ||
46 | return new WindowInfo(window, properties, properties2); | 41 | public: | ||
47 | } | 42 | bool create() noexcept override; | ||
43 | void destroy() noexcept override; | ||||
44 | | ||||
45 | QPointer<KWayland::Client::Shadow> shadow; | ||||
46 | }; | ||||
47 | | ||||
48 | #endif // WINDOWSHADOW_H |