C-Menu 0.2.9
A User Interface Toolkit
Loading...
Searching...
No Matches
ui_theme.h
Go to the documentation of this file.
1#ifndef UI_THEME_H
2#define UI_THEME_H 1
3
4/** @file ui_theme.h
5 @ingroup ui_backend
6 @brief UI theme definitions.
7 */
8#include "ui_backend.h"
9
10/** @brief UI role definitions.
11 @ingroup ui_backend
12 These are used to identify the purpose of a UI element, and can be used to
13 apply different styles to different elements. The default theme will use these
14 roles to apply different colors and styles to different elements.
15 */
16typedef enum {
29} UiRole;
30
31/** @brief UI theme definition.
32
33 A UI theme is a collection of styles for different UI roles. The default theme
34 will use the default styles for each role, but custom themes can be created
35 by defining different styles for each role.
36 */
37typedef struct {
38 UiStyle roles[16];
39} UiTheme;
40
41/** @brief Get the style for a given UI role.
42 @ingroup ui_backend
43 @param theme The UI theme to get the style from.
44 @param role The UI role to get the style for.
45 @return The style for the given UI role.
46 */
47const UiStyle *ui_theme_style(const UiTheme *theme, UiRole role);
48
49#endif
const UiStyle * ui_theme_style(const UiTheme *theme, UiRole role)
Get the style for a given UI role.
@ UI_ROLE_BOX
Definition ui_theme.h:22
@ UI_ROLE_BRACKET
Definition ui_theme.h:28
@ UI_ROLE_NORMAL_HIGHLIGHT
Definition ui_theme.h:20
@ UI_ROLE_NORMAL_REVERSE
Definition ui_theme.h:19
@ UI_ROLE_BOLD
Definition ui_theme.h:26
@ UI_ROLE_DEFAULT
Definition ui_theme.h:17
@ UI_ROLE_NORMAL
Definition ui_theme.h:18
@ UI_ROLE_CMDLINE
Definition ui_theme.h:25
@ UI_ROLE_FILL
Definition ui_theme.h:27
@ UI_ROLE_LINENO
Definition ui_theme.h:24
@ UI_ROLE_NORMAL_HIGHLIGHT_REVERSE
Definition ui_theme.h:21
@ UI_ROLE_TITLE
Definition ui_theme.h:23
UiStyle roles[16]
Definition ui_theme.h:38