KDecoration2

decorationdefines.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 #pragma once
7 
8 namespace KDecoration2
9 {
10 /**
11  * The DecorationButtonType is a helper type for the DecorationButton.
12  * A Decoration should provide a DecorationButton for each of the types,
13  * if it wants to provide further buttons it should use the Custom type.
14  * The DecorationButton gets configured depending on the type. E.g. the
15  * Close button gets disabled if the DecoratedClient is not closeable.
16  **/
18  /**
19  * The Menu button requests showing the window menu on left or right click.
20  **/
21  Menu,
22  /**
23  * The ApplicationMenu button requests showing the application's menu on left or right click.
24  */
26  /**
27  * The OnAllDesktops button requests toggling the DecoratedClient's on all desktops state.
28  * The DecoratedButton is only visible if multiple virtual desktops are available.
29  **/
31  /**
32  * The Minimize button requests minimizing the DecoratedClient. The DecorationButton is only
33  * enabled if the DecoratedClient is minimizeable.
34  **/
35  Minimize,
36  /**
37  * The Maximize button requests maximizing the DecoratedClient. The DecorationButton is checkable
38  * and if the DecoratedClient is maximized the DecorationButton is checked. The DecorationButton
39  * supports multiple mouse buttons to change horizontal, vertical and overall maximized state.
40  *
41  * The DecorationButton is only enabled if the DecoratedClient is maximizeable.
42  **/
43  Maximize,
44  /**
45  * The Close button requests closing the DecoratedClient. The DecorationButton is only enabled
46  * if the DecoratedClient is closeable.
47  **/
48  Close,
49  /**
50  * The ContextHelp button requests entering the context help mode. The DecorationButton is only
51  * visible if the DecoratedClient provides context help.
52  **/
54  /**
55  * The Shade button requests toggling the DecoratedClient's shaded state. The DecoratedButton
56  * is only enabled if the DecoratedClient is shadeable.
57  **/
58  Shade,
59  /**
60  * The KeepBelow button requests toggling the DecoratedClient's keep below state.
61  **/
62  KeepBelow,
63  /**
64  * The KeepAbove button requests toggling the DecoratedClient's keep above state.
65  **/
66  KeepAbove,
67  /**
68  * The Custom type allows a Decoration to provide custom DecorationButtons.
69  **/
70  Custom,
71 };
72 
73 /**
74  * Border sizes are a combination of visual and accessibility features.
75  * Larger borders should be used to increase the non title bar borders to
76  * make it easier to resize the decoration
77  **/
78 enum class BorderSize {
79  /**
80  * Border sizes of all non title bar sides should be set to 0.
81  **/
82  None,
83  /**
84  * Border sizes of the sides should be set to 0. Title bar and
85  * the border on opposite side of the title bar should follow the
86  * Normal settings.
87  **/
88  NoSides,
89  /**
90  * Borders should be smaller than Normal, e.g. a factor of 0.5.
91  **/
92  Tiny,
93  /**
94  * The default border size with borders on each side. This should
95  * be the base for calculating other border sizes.
96  **/
97  Normal,
98  /**
99  * Increased border sizes, considered a factor of 1.5.
100  **/
101  Large,
102  /**
103  * Increased border sizes, considered a factor of 2.0.
104  **/
105  VeryLarge,
106  /**
107  * Increased border sizes, considered a factor of 2.5.
108  **/
109  Huge,
110  /**
111  * Increased border sizes, considered a factor of 3.0.
112  **/
113  VeryHuge,
114  /**
115  * Increased border sizes, considered a factor of 5.0.
116  **/
117  Oversized,
118 };
119 
120 /**
121  * Color groups are used for DecoratedClient::color().
122  * @since 5.3
123  **/
124 enum class ColorGroup {
125  /**
126  * Inactive color, used for unfocused windows.
127  **/
128  Inactive,
129  /**
130  * Active color, used for focused windows.
131  **/
132  Active,
133  /**
134  * Warning color, can only be used with ColorRole::Foreground. If used with other roles,
135  * a invalid QColor is returned. It can be used for close buttons and is typically red.
136  **/
137  Warning,
138 };
139 
140 /**
141  * Color roles are used for DecoratedClient::color().
142  * @since 5.3
143  **/
144 enum class ColorRole {
145  /**
146  * The decoration's frame background color.
147  **/
148  Frame,
149  /**
150  * The decoration's title bar background color
151  **/
152  TitleBar,
153  /**
154  * The decoration's title bar forground color
155  **/
156  Foreground,
157 };
158 
159 }
@ Tiny
Borders should be smaller than Normal, e.g.
@ Foreground
The decoration's title bar forground color.
DecorationButtonType
The DecorationButtonType is a helper type for the DecorationButton.
@ KeepBelow
The KeepBelow button requests toggling the DecoratedClient's keep below state.
@ VeryHuge
Increased border sizes, considered a factor of 3.0.
@ Maximize
The Maximize button requests maximizing the DecoratedClient.
@ None
Border sizes of all non title bar sides should be set to 0.
@ ApplicationMenu
The ApplicationMenu button requests showing the application's menu on left or right click.
@ VeryLarge
Increased border sizes, considered a factor of 2.0.
@ Huge
Increased border sizes, considered a factor of 2.5.
@ Frame
The decoration's frame background color.
@ Close
The Close button requests closing the DecoratedClient.
@ ContextHelp
The ContextHelp button requests entering the context help mode.
@ Minimize
The Minimize button requests minimizing the DecoratedClient.
@ KeepAbove
The KeepAbove button requests toggling the DecoratedClient's keep above state.
@ Shade
The Shade button requests toggling the DecoratedClient's shaded state.
@ Warning
Warning color, can only be used with ColorRole::Foreground.
@ TitleBar
The decoration's title bar background color.
@ Custom
The Custom type allows a Decoration to provide custom DecorationButtons.
@ Active
Active color, used for focused windows.
ColorGroup
Color groups are used for DecoratedClient::color().
@ Large
Increased border sizes, considered a factor of 1.5.
@ Normal
The default border size with borders on each side.
@ OnAllDesktops
The OnAllDesktops button requests toggling the DecoratedClient's on all desktops state.
@ Inactive
Inactive color, used for unfocused windows.
@ NoSides
Border sizes of the sides should be set to 0.
ColorRole
Color roles are used for DecoratedClient::color().
@ Menu
The Menu button requests showing the window menu on left or right click.
BorderSize
Border sizes are a combination of visual and accessibility features.
@ Oversized
Increased border sizes, considered a factor of 5.0.
Framework for creating window decorations.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Dec 2 2023 03:52:27 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.