File indexing completed on 2024-04-28 16:44:34
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 0073 /** 0074 * Border sizes are a combination of visual and accessibility features. 0075 * Larger borders should be used to increase the non title bar borders to 0076 * make it easier to resize the decoration 0077 **/ 0078 enum class BorderSize { 0079 /** 0080 * Border sizes of all non title bar sides should be set to 0. 0081 **/ 0082 None, 0083 /** 0084 * Border sizes of the sides should be set to 0. Title bar and 0085 * the border on opposite side of the title bar should follow the 0086 * Normal settings. 0087 **/ 0088 NoSides, 0089 /** 0090 * Borders should be smaller than Normal, e.g. a factor of 0.5. 0091 **/ 0092 Tiny, 0093 /** 0094 * The default border size with borders on each side. This should 0095 * be the base for calculating other border sizes. 0096 **/ 0097 Normal, 0098 /** 0099 * Increased border sizes, considered a factor of 1.5. 0100 **/ 0101 Large, 0102 /** 0103 * Increased border sizes, considered a factor of 2.0. 0104 **/ 0105 VeryLarge, 0106 /** 0107 * Increased border sizes, considered a factor of 2.5. 0108 **/ 0109 Huge, 0110 /** 0111 * Increased border sizes, considered a factor of 3.0. 0112 **/ 0113 VeryHuge, 0114 /** 0115 * Increased border sizes, considered a factor of 5.0. 0116 **/ 0117 Oversized, 0118 }; 0119 0120 /** 0121 * Color groups are used for DecoratedClient::color(). 0122 * @since 5.3 0123 **/ 0124 enum class ColorGroup { 0125 /** 0126 * Inactive color, used for unfocused windows. 0127 **/ 0128 Inactive, 0129 /** 0130 * Active color, used for focused windows. 0131 **/ 0132 Active, 0133 /** 0134 * Warning color, can only be used with ColorRole::Foreground. If used with other roles, 0135 * a invalid QColor is returned. It can be used for close buttons and is typically red. 0136 **/ 0137 Warning, 0138 }; 0139 0140 /** 0141 * Color roles are used for DecoratedClient::color(). 0142 * @since 5.3 0143 **/ 0144 enum class ColorRole { 0145 /** 0146 * The decoration's frame background color. 0147 **/ 0148 Frame, 0149 /** 0150 * The decoration's title bar background color 0151 **/ 0152 TitleBar, 0153 /** 0154 * The decoration's title bar forground color 0155 **/ 0156 Foreground, 0157 }; 0158 0159 }