File indexing completed on 2024-05-05 05:29:54
0001 /* 0002 * SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 #pragma once 0007 0008 namespace KDecoration2 0009 { 0010 /** 0011 * The DecorationButtonType is a helper type for the DecorationButton. 0012 * A Decoration should provide a DecorationButton for each of the types, 0013 * if it wants to provide further buttons it should use the Custom type. 0014 * The DecorationButton gets configured depending on the type. E.g. the 0015 * Close button gets disabled if the DecoratedClient is not closeable. 0016 **/ 0017 enum class DecorationButtonType { 0018 /** 0019 * The Menu button requests showing the window menu on left or right click. 0020 **/ 0021 Menu, 0022 /** 0023 * The ApplicationMenu button requests showing the application's menu on left or right click. 0024 */ 0025 ApplicationMenu, 0026 /** 0027 * The OnAllDesktops button requests toggling the DecoratedClient's on all desktops state. 0028 * The DecoratedButton is only visible if multiple virtual desktops are available. 0029 **/ 0030 OnAllDesktops, 0031 /** 0032 * The Minimize button requests minimizing the DecoratedClient. The DecorationButton is only 0033 * enabled if the DecoratedClient is minimizeable. 0034 **/ 0035 Minimize, 0036 /** 0037 * The Maximize button requests maximizing the DecoratedClient. The DecorationButton is checkable 0038 * and if the DecoratedClient is maximized the DecorationButton is checked. The DecorationButton 0039 * supports multiple mouse buttons to change horizontal, vertical and overall maximized state. 0040 * 0041 * The DecorationButton is only enabled if the DecoratedClient is maximizeable. 0042 **/ 0043 Maximize, 0044 /** 0045 * The Close button requests closing the DecoratedClient. The DecorationButton is only enabled 0046 * if the DecoratedClient is closeable. 0047 **/ 0048 Close, 0049 /** 0050 * The ContextHelp button requests entering the context help mode. The DecorationButton is only 0051 * visible if the DecoratedClient provides context help. 0052 **/ 0053 ContextHelp, 0054 /** 0055 * The Shade button requests toggling the DecoratedClient's shaded state. The DecoratedButton 0056 * is only enabled if the DecoratedClient is shadeable. 0057 **/ 0058 Shade, 0059 /** 0060 * The KeepBelow button requests toggling the DecoratedClient's keep below state. 0061 **/ 0062 KeepBelow, 0063 /** 0064 * The KeepAbove button requests toggling the DecoratedClient's keep above state. 0065 **/ 0066 KeepAbove, 0067 /** 0068 * The Custom type allows a Decoration to provide custom DecorationButtons. 0069 **/ 0070 Custom, 0071 /** 0072 * The Spacer button provides some space between buttons. 0073 */ 0074 Spacer, 0075 }; 0076 0077 /** 0078 * Border sizes are a combination of visual and accessibility features. 0079 * Larger borders should be used to increase the non title bar borders to 0080 * make it easier to resize the decoration 0081 **/ 0082 enum class BorderSize { 0083 /** 0084 * Border sizes of all non title bar sides should be set to 0. 0085 **/ 0086 None, 0087 /** 0088 * Border sizes of the sides should be set to 0. Title bar and 0089 * the border on opposite side of the title bar should follow the 0090 * Normal settings. 0091 **/ 0092 NoSides, 0093 /** 0094 * Borders should be smaller than Normal, e.g. a factor of 0.5. 0095 **/ 0096 Tiny, 0097 /** 0098 * The default border size with borders on each side. This should 0099 * be the base for calculating other border sizes. 0100 **/ 0101 Normal, 0102 /** 0103 * Increased border sizes, considered a factor of 1.5. 0104 **/ 0105 Large, 0106 /** 0107 * Increased border sizes, considered a factor of 2.0. 0108 **/ 0109 VeryLarge, 0110 /** 0111 * Increased border sizes, considered a factor of 2.5. 0112 **/ 0113 Huge, 0114 /** 0115 * Increased border sizes, considered a factor of 3.0. 0116 **/ 0117 VeryHuge, 0118 /** 0119 * Increased border sizes, considered a factor of 5.0. 0120 **/ 0121 Oversized, 0122 }; 0123 0124 /** 0125 * Color groups are used for DecoratedClient::color(). 0126 * @since 5.3 0127 **/ 0128 enum class ColorGroup { 0129 /** 0130 * Inactive color, used for unfocused windows. 0131 **/ 0132 Inactive, 0133 /** 0134 * Active color, used for focused windows. 0135 **/ 0136 Active, 0137 /** 0138 * Warning color, can only be used with ColorRole::Foreground. If used with other roles, 0139 * a invalid QColor is returned. It can be used for close buttons and is typically red. 0140 **/ 0141 Warning, 0142 }; 0143 0144 /** 0145 * Color roles are used for DecoratedClient::color(). 0146 * @since 5.3 0147 **/ 0148 enum class ColorRole { 0149 /** 0150 * The decoration's frame background color. 0151 **/ 0152 Frame, 0153 /** 0154 * The decoration's title bar background color 0155 **/ 0156 TitleBar, 0157 /** 0158 * The decoration's title bar forground color 0159 **/ 0160 Foreground, 0161 }; 0162 0163 }