GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
include
widgets
gp_widgets_color_scheme.h
Go to the documentation of this file.
1
//SPDX-License-Identifier: LGPL-2.0-or-later
2
3
/*
4
5
Copyright (c) 2014-2024 Cyril Hrubis <metan@ucw.cz>
6
7
*/
8
47
#ifndef GP_WIDGETS_COLOR_SCHEME_H
48
#define GP_WIDGETS_COLOR_SCHEME_H
49
50
#include <
widgets/gp_widget_types.h
>
51
59
enum
gp_widgets_color_scheme
{
61
GP_WIDGET_COLOR_SCHEME_DEFAULT
,
63
GP_WIDGET_COLOR_SCHEME_LIGHT
,
65
GP_WIDGET_COLOR_SCHEME_DARK
,
66
};
67
74
enum
gp_widgets_color
{
80
GP_WIDGETS_COL_TEXT
= 0,
86
GP_WIDGETS_COL_FG
= 1,
92
GP_WIDGETS_COL_BG
= 2,
96
GP_WIDGETS_COL_HIGHLIGHT
= 3,
102
GP_WIDGETS_COL_SELECT
= 4,
108
GP_WIDGETS_COL_ALERT
= 5,
114
GP_WIDGETS_COL_WARN
= 6,
120
GP_WIDGETS_COL_ACCEPT
= 7,
126
GP_WIDGETS_COL_FILL
= 8,
132
GP_WIDGETS_COL_DISABLED
= 9,
134
GP_WIDGETS_THEME_COLORS
= 10,
135
137
GP_WIDGETS_COL_BLACK
= 10,
139
GP_WIDGETS_COL_RED
= 11,
141
GP_WIDGETS_COL_GREEN
= 12,
143
GP_WIDGETS_COL_YELLOW
= 13,
145
GP_WIDGETS_COL_BLUE
= 14,
147
GP_WIDGETS_COL_MAGENTA
= 15,
149
GP_WIDGETS_COL_CYAN
= 16,
151
GP_WIDGETS_COL_GRAY
= 17,
153
GP_WIDGETS_COL_BR_BLACK
= 18,
155
GP_WIDGETS_COL_BR_RED
= 19,
157
GP_WIDGETS_COL_BR_GREEN
= 20,
159
GP_WIDGETS_COL_BR_YELLOW
= 21,
161
GP_WIDGETS_COL_BR_BLUE
= 22,
163
GP_WIDGETS_COL_BR_MAGENTA
= 23,
165
GP_WIDGETS_COL_BR_CYAN
= 24,
167
GP_WIDGETS_COL_WHITE
= 25,
169
GP_WIDGETS_COL_CNT
,
170
};
171
179
enum
gp_widgets_color
gp_widgets_color_name_idx
(
const
char
*name);
180
189
gp_pixel
gp_widgets_color
(
const
gp_widget_render_ctx
*ctx,
enum
gp_widgets_color
color);
190
196
void
gp_widgets_color_scheme_toggle
(
void
);
197
205
void
gp_widgets_color_scheme_set
(
enum
gp_widgets_color_scheme
color_scheme);
206
212
enum
gp_widgets_color_scheme
gp_widgets_color_scheme_get
(
void
);
213
219
gp_widget
*
gp_widget_color_scheme_switch
(
void
);
220
221
#endif
/* GP_WIDGETS_COLOR_SCHEME_H */
gp_pixel
uint32_t gp_pixel
Pixel integer value.
Definition
gp_types.h:33
gp_widget_types.h
Common widget types.
gp_widgets_color_scheme
gp_widgets_color_scheme
A color scheme.
Definition
gp_widgets_color_scheme.h:59
GP_WIDGET_COLOR_SCHEME_DARK
@ GP_WIDGET_COLOR_SCHEME_DARK
Dark color scheme.
Definition
gp_widgets_color_scheme.h:65
GP_WIDGET_COLOR_SCHEME_LIGHT
@ GP_WIDGET_COLOR_SCHEME_LIGHT
Light color scheme.
Definition
gp_widgets_color_scheme.h:63
GP_WIDGET_COLOR_SCHEME_DEFAULT
@ GP_WIDGET_COLOR_SCHEME_DEFAULT
Default color scheme.
Definition
gp_widgets_color_scheme.h:61
gp_widgets_color_name_idx
enum gp_widgets_color gp_widgets_color_name_idx(const char *name)
Converts a color name into a color index.
gp_widgets_color_scheme_get
enum gp_widgets_color_scheme gp_widgets_color_scheme_get(void)
Returns current color scheme.
gp_widgets_color_scheme_toggle
void gp_widgets_color_scheme_toggle(void)
Toggles current color scheme.
gp_widgets_color_scheme_set
void gp_widgets_color_scheme_set(enum gp_widgets_color_scheme color_scheme)
Sets a color scheme.
gp_widget_color_scheme_switch
gp_widget * gp_widget_color_scheme_switch(void)
Creates a color scheme switch widget.
gp_widgets_color
gp_widgets_color
Widget theme colors.
Definition
gp_widgets_color_scheme.h:74
GP_WIDGETS_COL_DISABLED
@ GP_WIDGETS_COL_DISABLED
Default disabled widget color.
Definition
gp_widgets_color_scheme.h:132
GP_WIDGETS_COL_CYAN
@ GP_WIDGETS_COL_CYAN
Cyan in standard 16 colors.
Definition
gp_widgets_color_scheme.h:149
GP_WIDGETS_COL_TEXT
@ GP_WIDGETS_COL_TEXT
Default text color.
Definition
gp_widgets_color_scheme.h:80
GP_WIDGETS_COL_YELLOW
@ GP_WIDGETS_COL_YELLOW
Yellow in standard 16 colors.
Definition
gp_widgets_color_scheme.h:143
GP_WIDGETS_COL_HIGHLIGHT
@ GP_WIDGETS_COL_HIGHLIGHT
Default highlighted color.
Definition
gp_widgets_color_scheme.h:96
GP_WIDGETS_COL_BR_YELLOW
@ GP_WIDGETS_COL_BR_YELLOW
Bright yellow in standard 16 colors.
Definition
gp_widgets_color_scheme.h:159
GP_WIDGETS_COL_BG
@ GP_WIDGETS_COL_BG
Default background color.
Definition
gp_widgets_color_scheme.h:92
GP_WIDGETS_THEME_COLORS
@ GP_WIDGETS_THEME_COLORS
The number of theme colors.
Definition
gp_widgets_color_scheme.h:134
GP_WIDGETS_COL_GRAY
@ GP_WIDGETS_COL_GRAY
Gray in standard 16 colors.
Definition
gp_widgets_color_scheme.h:151
GP_WIDGETS_COL_BR_GREEN
@ GP_WIDGETS_COL_BR_GREEN
Bright green in standard 16 colors.
Definition
gp_widgets_color_scheme.h:157
GP_WIDGETS_COL_ACCEPT
@ GP_WIDGETS_COL_ACCEPT
Default accept color.
Definition
gp_widgets_color_scheme.h:120
GP_WIDGETS_COL_BR_CYAN
@ GP_WIDGETS_COL_BR_CYAN
Bright cyan in standard 16 colors.
Definition
gp_widgets_color_scheme.h:165
GP_WIDGETS_COL_BR_BLACK
@ GP_WIDGETS_COL_BR_BLACK
Bright black in standard 16 colors.
Definition
gp_widgets_color_scheme.h:153
GP_WIDGETS_COL_GREEN
@ GP_WIDGETS_COL_GREEN
Green in standard 16 colors.
Definition
gp_widgets_color_scheme.h:141
GP_WIDGETS_COL_FG
@ GP_WIDGETS_COL_FG
Default foreground color.
Definition
gp_widgets_color_scheme.h:86
GP_WIDGETS_COL_BR_RED
@ GP_WIDGETS_COL_BR_RED
Bright red in standard 16 colors.
Definition
gp_widgets_color_scheme.h:155
GP_WIDGETS_COL_BR_BLUE
@ GP_WIDGETS_COL_BR_BLUE
Bright blue in standard 16 colors.
Definition
gp_widgets_color_scheme.h:161
GP_WIDGETS_COL_RED
@ GP_WIDGETS_COL_RED
Red in standard 16 colors.
Definition
gp_widgets_color_scheme.h:139
GP_WIDGETS_COL_SELECT
@ GP_WIDGETS_COL_SELECT
Default selection color.
Definition
gp_widgets_color_scheme.h:102
GP_WIDGETS_COL_BLACK
@ GP_WIDGETS_COL_BLACK
Black in standard 16 colors.
Definition
gp_widgets_color_scheme.h:137
GP_WIDGETS_COL_MAGENTA
@ GP_WIDGETS_COL_MAGENTA
Magenta in standard 16 colors.
Definition
gp_widgets_color_scheme.h:147
GP_WIDGETS_COL_WHITE
@ GP_WIDGETS_COL_WHITE
White in standard 16 colors.
Definition
gp_widgets_color_scheme.h:167
GP_WIDGETS_COL_CNT
@ GP_WIDGETS_COL_CNT
The number of widget colors.
Definition
gp_widgets_color_scheme.h:169
GP_WIDGETS_COL_BLUE
@ GP_WIDGETS_COL_BLUE
Blue in standard 16 colors.
Definition
gp_widgets_color_scheme.h:145
GP_WIDGETS_COL_FILL
@ GP_WIDGETS_COL_FILL
Default fill color.
Definition
gp_widgets_color_scheme.h:126
GP_WIDGETS_COL_ALERT
@ GP_WIDGETS_COL_ALERT
Default alert color.
Definition
gp_widgets_color_scheme.h:108
GP_WIDGETS_COL_BR_MAGENTA
@ GP_WIDGETS_COL_BR_MAGENTA
Bright magenta in standard 16 colors.
Definition
gp_widgets_color_scheme.h:163
GP_WIDGETS_COL_WARN
@ GP_WIDGETS_COL_WARN
Default warning color.
Definition
gp_widgets_color_scheme.h:114
gp_widget_render_ctx
Global widget (rendering) context.
Definition
gp_widget_render.h:29
gp_widget
A widget base.
Definition
gp_widget.h:28
Generated by
1.9.8