Changeset View
Changeset View
Standalone View
Standalone View
kded/kwin_bridge/dummydecoratedclient.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright (C) 2020 Mikhail Zolotukhin <zomial@protonmail.com> | ||||
3 | * | ||||
4 | * This program is free software; you can redistribute it and/or | ||||
5 | * modify it under the terms of the GNU General Public License as | ||||
6 | * published by the Free Software Foundation; either version 2 of | ||||
7 | * the License or (at your option) version 3 or any later version | ||||
8 | * accepted by the membership of KDE e.V. (or its successor approved | ||||
9 | * by the membership of KDE e.V.), which shall act as a proxy | ||||
10 | * defined in Section 14 of version 3 of the license. | ||||
11 | * | ||||
12 | * This program is distributed in the hope that it will be useful, | ||||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
15 | * GNU General Public License for more details. | ||||
16 | * | ||||
17 | * You should have received a copy of the GNU General Public License | ||||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
19 | */ | ||||
20 | | ||||
21 | #pragma once | ||||
22 | | ||||
23 | #include <KDecoration2/Private/DecoratedClientPrivate> | ||||
24 | | ||||
25 | #include <QPalette> | ||||
26 | | ||||
27 | #include "decorationpalette.h" | ||||
28 | | ||||
29 | namespace KDecoration2 { | ||||
30 | | ||||
31 | class DummyDecoratedClient : public QObject, public DecoratedClientPrivate { | ||||
32 | Q_OBJECT | ||||
33 | public: | ||||
34 | DummyDecoratedClient(DecoratedClient *client, Decoration *decoration); | ||||
35 | | ||||
36 | bool isActive() const override; | ||||
37 | QString caption() const override; | ||||
38 | int desktop() const override; | ||||
39 | bool isOnAllDesktops() const override; | ||||
40 | bool isShaded() const override; | ||||
41 | QIcon icon() const override; | ||||
42 | bool isMaximized() const override; | ||||
43 | bool isMaximizedHorizontally() const override; | ||||
44 | bool isMaximizedVertically() const override; | ||||
45 | bool isKeepAbove() const override; | ||||
46 | bool isKeepBelow() const override; | ||||
47 | | ||||
48 | bool isCloseable() const override; | ||||
49 | bool isMaximizeable() const override; | ||||
50 | bool isMinimizeable() const override; | ||||
51 | bool providesContextHelp() const override; | ||||
52 | bool isModal() const override; | ||||
53 | bool isShadeable() const override; | ||||
54 | bool isMoveable() const override; | ||||
55 | bool isResizeable() const override; | ||||
56 | | ||||
57 | WId windowId() const override; | ||||
58 | WId decorationId() const override; | ||||
59 | | ||||
60 | int width() const override; | ||||
61 | int height() const override; | ||||
62 | QSize size() const override; | ||||
63 | QPalette palette() const override; | ||||
64 | QColor color(ColorGroup group, ColorRole role) const override; | ||||
65 | Qt::Edges adjacentScreenEdges() const override; | ||||
66 | | ||||
67 | void requestShowToolTip(const QString &text) override; | ||||
68 | | ||||
69 | void requestHideToolTip() override; | ||||
70 | void requestClose() override; | ||||
71 | void requestToggleMaximization(Qt::MouseButtons buttons) override; | ||||
72 | void requestMinimize() override; | ||||
73 | void requestContextHelp() override; | ||||
74 | void requestToggleOnAllDesktops() override; | ||||
75 | void requestToggleShade() override; | ||||
76 | void requestToggleKeepAbove() override; | ||||
77 | void requestToggleKeepBelow() override; | ||||
78 | void requestShowWindowMenu() override; | ||||
79 | | ||||
80 | void setMaximized(bool maximized); | ||||
81 | | ||||
82 | private: | ||||
83 | KWin::Decoration::DecorationPalette m_pallete; | ||||
84 | bool m_maximized; | ||||
85 | }; | ||||
86 | | ||||
87 | } |