KDecoration2

decoratedclientprivate.h
1 /*
2  * SPDX-FileCopyrightText: 2014 Martin Gräßlin <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5  */
6 #ifndef KDECORATION2_DECORATED_CLIENT_PRIVATE_H
7 #define KDECORATION2_DECORATED_CLIENT_PRIVATE_H
8 
9 #include "../decorationdefines.h"
10 #include <kdecoration2/private/kdecoration2_private_export.h>
11 
12 #include <QIcon>
13 #include <QString>
14 
15 //
16 // W A R N I N G
17 // -------------
18 //
19 // This file is not part of the KDecoration2 API. It exists purely as an
20 // implementation detail. This header file may change from version to
21 // version without notice, or even be removed.
22 //
23 // We mean it.
24 //
25 
26 namespace KDecoration2
27 {
28 class Decoration;
29 class DecoratedClient;
30 
31 class KDECORATIONS_PRIVATE_EXPORT DecoratedClientPrivate
32 {
33 public:
34  virtual ~DecoratedClientPrivate();
35  virtual bool isActive() const = 0;
36  virtual QString caption() const = 0;
37  virtual int desktop() const = 0;
38  virtual bool isOnAllDesktops() const = 0;
39  virtual bool isShaded() const = 0;
40  virtual QIcon icon() const = 0;
41  virtual bool isMaximized() const = 0;
42  virtual bool isMaximizedHorizontally() const = 0;
43  virtual bool isMaximizedVertically() const = 0;
44  virtual bool isKeepAbove() const = 0;
45  virtual bool isKeepBelow() const = 0;
46 
47  virtual bool isCloseable() const = 0;
48  virtual bool isMaximizeable() const = 0;
49  virtual bool isMinimizeable() const = 0;
50  virtual bool providesContextHelp() const = 0;
51  virtual bool isModal() const = 0;
52  virtual bool isShadeable() const = 0;
53  virtual bool isMoveable() const = 0;
54  virtual bool isResizeable() const = 0;
55 
56  virtual WId windowId() const = 0;
57  virtual WId decorationId() const = 0;
58 
59  virtual int width() const = 0;
60  virtual int height() const = 0;
61  virtual QSize size() const = 0;
62  virtual QPalette palette() const = 0;
63  virtual Qt::Edges adjacentScreenEdges() const = 0;
64 
65  virtual void requestShowToolTip(const QString &text) = 0;
66  virtual void requestHideToolTip() = 0;
67  virtual void requestClose() = 0;
68  virtual void requestToggleMaximization(Qt::MouseButtons buttons) = 0;
69  virtual void requestMinimize() = 0;
70  virtual void requestContextHelp() = 0;
71  virtual void requestToggleOnAllDesktops() = 0;
72  virtual void requestToggleShade() = 0;
73  virtual void requestToggleKeepAbove() = 0;
74  virtual void requestToggleKeepBelow() = 0;
75  virtual void requestShowWindowMenu(const QRect &rect) = 0;
76 
77  Decoration *decoration();
78  Decoration *decoration() const;
79 
80  virtual QColor color(ColorGroup group, ColorRole role) const;
81 
82 protected:
83  explicit DecoratedClientPrivate(DecoratedClient *client, Decoration *decoration);
84  DecoratedClient *client();
85 
86 private:
87  class Private;
89 };
90 
91 class KDECORATIONS_PRIVATE_EXPORT ApplicationMenuEnabledDecoratedClientPrivate : public DecoratedClientPrivate
92 {
93 public:
94  ~ApplicationMenuEnabledDecoratedClientPrivate() override;
95 
96  virtual bool hasApplicationMenu() const = 0;
97  virtual bool isApplicationMenuActive() const = 0;
98 
99  virtual void showApplicationMenu(int actionId) = 0;
100  virtual void requestShowApplicationMenu(const QRect &rect, int actionId) = 0;
101 
102 protected:
103  explicit ApplicationMenuEnabledDecoratedClientPrivate(DecoratedClient *client, Decoration *decoration);
104 };
105 
106 } // namespace
107 
108 #endif
QString caption()
Framework for creating window decorations.
typedef Edges
typedef MouseButtons
ColorGroup
Color groups are used for DecoratedClient::color().
ColorRole
Color roles are used for DecoratedClient::color().
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Jun 20 2021 23:07:39 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.