Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
CTCaer
GitHub Repository: CTCaer/hekate
Path: blob/master/bdk/libs/lvgl/lv_themes/lv_theme.h
1476 views
1
/*
2
* Copyright (c) 2019 CTCaer
3
*
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms and conditions of the GNU General Public License,
6
* version 2, as published by the Free Software Foundation.
7
*
8
* This program is distributed in the hope it will be useful, but WITHOUT
9
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11
* more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*/
16
17
/**
18
*@file lv_themes.h
19
*
20
*/
21
22
#ifndef LV_THEMES_H
23
#define LV_THEMES_H
24
25
#ifdef __cplusplus
26
extern "C" {
27
#endif
28
29
/*********************
30
* INCLUDES
31
*********************/
32
#ifdef LV_CONF_INCLUDE_SIMPLE
33
#include "lv_conf.h"
34
#else
35
#include "../../lv_conf.h"
36
#endif
37
38
#include "../lv_core/lv_style.h"
39
40
/*********************
41
* DEFINES
42
*********************/
43
44
/**********************
45
* TYPEDEFS
46
**********************/
47
48
typedef struct {
49
lv_style_t *bg;
50
lv_style_t *panel;
51
52
#if USE_LV_CONT != 0
53
lv_style_t *cont;
54
#endif
55
56
#if USE_LV_BTN != 0
57
struct {
58
lv_style_t *rel;
59
lv_style_t *pr;
60
lv_style_t *tgl_rel;
61
lv_style_t *tgl_pr;
62
lv_style_t *ina;
63
} btn;
64
#endif
65
66
67
#if USE_LV_IMGBTN != 0
68
struct {
69
lv_style_t *rel;
70
lv_style_t *pr;
71
lv_style_t *tgl_rel;
72
lv_style_t *tgl_pr;
73
lv_style_t *ina;
74
} imgbtn;
75
#endif
76
77
#if USE_LV_LABEL != 0
78
struct {
79
lv_style_t *prim;
80
lv_style_t *sec;
81
lv_style_t *hint;
82
} label;
83
#endif
84
85
#if USE_LV_IMG != 0
86
struct {
87
lv_style_t *light;
88
lv_style_t *dark;
89
} img;
90
#endif
91
92
#if USE_LV_LINE != 0
93
struct {
94
lv_style_t *decor;
95
} line;
96
#endif
97
98
#if USE_LV_LED != 0
99
lv_style_t *led;
100
#endif
101
102
#if USE_LV_BAR != 0
103
struct {
104
lv_style_t *bg;
105
lv_style_t *indic;
106
} bar;
107
#endif
108
109
#if USE_LV_SLIDER != 0
110
struct {
111
lv_style_t *bg;
112
lv_style_t *indic;
113
lv_style_t *knob;
114
} slider;
115
#endif
116
117
#if USE_LV_LMETER != 0
118
lv_style_t *lmeter;
119
#endif
120
121
#if USE_LV_GAUGE != 0
122
lv_style_t *gauge;
123
#endif
124
125
#if USE_LV_ARC != 0
126
lv_style_t *arc;
127
#endif
128
129
#if USE_LV_PRELOAD != 0
130
lv_style_t *preload;
131
#endif
132
133
#if USE_LV_SW != 0
134
struct {
135
lv_style_t *bg;
136
lv_style_t *indic;
137
lv_style_t *knob_off;
138
lv_style_t *knob_on;
139
} sw;
140
#endif
141
142
#if USE_LV_CHART != 0
143
lv_style_t *chart;
144
#endif
145
146
#if USE_LV_CALENDAR != 0
147
struct {
148
lv_style_t *bg;
149
lv_style_t *header;
150
lv_style_t *header_pr;
151
lv_style_t *day_names;
152
lv_style_t *highlighted_days;
153
lv_style_t *inactive_days;
154
lv_style_t *week_box;
155
lv_style_t *today_box;
156
} calendar;
157
#endif
158
159
#if USE_LV_CB != 0
160
struct {
161
lv_style_t *bg;
162
struct {
163
lv_style_t *rel;
164
lv_style_t *pr;
165
lv_style_t *tgl_rel;
166
lv_style_t *tgl_pr;
167
lv_style_t *ina;
168
} box;
169
} cb;
170
#endif
171
172
#if USE_LV_BTNM != 0
173
struct {
174
lv_style_t *bg;
175
struct {
176
lv_style_t *rel;
177
lv_style_t *pr;
178
lv_style_t *tgl_rel;
179
lv_style_t *tgl_pr;
180
lv_style_t *ina;
181
} btn;
182
} btnm;
183
#endif
184
185
#if USE_LV_KB != 0
186
struct {
187
lv_style_t *bg;
188
struct {
189
lv_style_t *rel;
190
lv_style_t *pr;
191
lv_style_t *tgl_rel;
192
lv_style_t *tgl_pr;
193
lv_style_t *ina;
194
} btn;
195
} kb;
196
#endif
197
198
#if USE_LV_MBOX != 0
199
struct {
200
lv_style_t *bg;
201
struct {
202
lv_style_t *bg;
203
lv_style_t *rel;
204
lv_style_t *pr;
205
} btn;
206
} mbox;
207
#endif
208
209
#if USE_LV_PAGE != 0
210
struct {
211
lv_style_t *bg;
212
lv_style_t *scrl;
213
lv_style_t *sb;
214
} page;
215
#endif
216
217
#if USE_LV_TA != 0
218
struct {
219
lv_style_t *area;
220
lv_style_t *oneline;
221
lv_style_t *cursor;
222
lv_style_t *sb;
223
} ta;
224
#endif
225
226
#if USE_LV_SPINBOX != 0
227
struct {
228
lv_style_t *bg;
229
lv_style_t *cursor;
230
lv_style_t *sb;
231
} spinbox;
232
#endif
233
234
#if USE_LV_LIST
235
struct {
236
lv_style_t *bg;
237
lv_style_t *scrl;
238
lv_style_t *sb;
239
struct {
240
lv_style_t *rel;
241
lv_style_t *pr;
242
lv_style_t *tgl_rel;
243
lv_style_t *tgl_pr;
244
lv_style_t *ina;
245
} btn;
246
} list;
247
#endif
248
249
#if USE_LV_DDLIST != 0
250
struct {
251
lv_style_t *bg;
252
lv_style_t *bgo;
253
lv_style_t *pr;
254
lv_style_t *sel;
255
lv_style_t *sb;
256
} ddlist;
257
#endif
258
259
#if USE_LV_ROLLER != 0
260
struct {
261
lv_style_t *bg;
262
lv_style_t *sel;
263
} roller;
264
#endif
265
266
#if USE_LV_TABVIEW != 0
267
struct {
268
lv_style_t *bg;
269
lv_style_t *indic;
270
struct {
271
lv_style_t *bg;
272
lv_style_t *rel;
273
lv_style_t *pr;
274
lv_style_t *tgl_rel;
275
lv_style_t *tgl_pr;
276
} btn;
277
} tabview;
278
#endif
279
280
#if USE_LV_TILEVIEW != 0
281
struct {
282
lv_style_t *bg;
283
lv_style_t *scrl;
284
lv_style_t *sb;
285
} tileview;
286
#endif
287
288
#if USE_LV_TABLE != 0
289
struct {
290
lv_style_t *bg;
291
lv_style_t *cell;
292
} table;
293
#endif
294
295
#if USE_LV_WIN != 0
296
struct {
297
lv_style_t *bg;
298
lv_style_t *sb;
299
lv_style_t *header;
300
struct {
301
lv_style_t *bg;
302
lv_style_t *scrl;
303
} content;
304
struct {
305
lv_style_t *rel;
306
lv_style_t *pr;
307
} btn;
308
} win;
309
#endif
310
} lv_theme_t;
311
312
/**********************
313
* GLOBAL PROTOTYPES
314
**********************/
315
316
/**
317
* Set a theme for the system.
318
* From now, all the created objects will use styles from this theme by default
319
* @param th pointer to theme (return value of: 'lv_theme_init_xxx()')
320
*/
321
void lv_theme_set_current(lv_theme_t *th);
322
323
/**
324
* Get the current system theme.
325
* @return pointer to the current system theme. NULL if not set.
326
*/
327
lv_theme_t * lv_theme_get_current(void);
328
329
/**********************
330
* MACROS
331
**********************/
332
333
/**********************
334
* POST INCLUDE
335
*********************/
336
#include "lv_theme_hekate.h"
337
338
339
#ifdef __cplusplus
340
} /* extern "C" */
341
#endif
342
343
#endif /*LV_THEMES_H*/
344
345