KDecoration2

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

KDE's Doxygen guidelines are available online.