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
3694 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_LINE != 0
86
struct {
87
lv_style_t *decor;
88
} line;
89
#endif
90
91
#if USE_LV_LED != 0
92
lv_style_t *led;
93
#endif
94
95
#if USE_LV_BAR != 0
96
struct {
97
lv_style_t *bg;
98
lv_style_t *indic;
99
} bar;
100
#endif
101
102
#if USE_LV_SLIDER != 0
103
struct {
104
lv_style_t *bg;
105
lv_style_t *indic;
106
lv_style_t *knob;
107
} slider;
108
#endif
109
110
#if USE_LV_LMETER != 0
111
lv_style_t *lmeter;
112
#endif
113
114
#if USE_LV_GAUGE != 0
115
lv_style_t *gauge;
116
#endif
117
118
#if USE_LV_ARC != 0
119
lv_style_t *arc;
120
#endif
121
122
#if USE_LV_PRELOAD != 0
123
lv_style_t *preload;
124
#endif
125
126
#if USE_LV_SW != 0
127
struct {
128
lv_style_t *bg;
129
lv_style_t *indic;
130
lv_style_t *knob_off;
131
lv_style_t *knob_on;
132
} sw;
133
#endif
134
135
#if USE_LV_CHART != 0
136
lv_style_t *chart;
137
#endif
138
139
#if USE_LV_CALENDAR != 0
140
struct {
141
lv_style_t *bg;
142
lv_style_t *header;
143
lv_style_t *header_pr;
144
lv_style_t *day_names;
145
lv_style_t *highlighted_days;
146
lv_style_t *inactive_days;
147
lv_style_t *week_box;
148
lv_style_t *today_box;
149
} calendar;
150
#endif
151
152
#if USE_LV_CB != 0
153
struct {
154
lv_style_t *bg;
155
struct {
156
lv_style_t *rel;
157
lv_style_t *pr;
158
lv_style_t *tgl_rel;
159
lv_style_t *tgl_pr;
160
lv_style_t *ina;
161
} box;
162
} cb;
163
#endif
164
165
#if USE_LV_BTNM != 0
166
struct {
167
lv_style_t *bg;
168
struct {
169
lv_style_t *rel;
170
lv_style_t *pr;
171
lv_style_t *tgl_rel;
172
lv_style_t *tgl_pr;
173
lv_style_t *ina;
174
} btn;
175
} btnm;
176
#endif
177
178
#if USE_LV_KB != 0
179
struct {
180
lv_style_t *bg;
181
struct {
182
lv_style_t *rel;
183
lv_style_t *pr;
184
lv_style_t *tgl_rel;
185
lv_style_t *tgl_pr;
186
lv_style_t *ina;
187
} btn;
188
} kb;
189
#endif
190
191
#if USE_LV_MBOX != 0
192
struct {
193
lv_style_t *bg;
194
struct {
195
lv_style_t *bg;
196
lv_style_t *rel;
197
lv_style_t *pr;
198
} btn;
199
} mbox;
200
#endif
201
202
#if USE_LV_PAGE != 0
203
struct {
204
lv_style_t *bg;
205
lv_style_t *scrl;
206
lv_style_t *sb;
207
} page;
208
#endif
209
210
#if USE_LV_TA != 0
211
struct {
212
lv_style_t *area;
213
lv_style_t *oneline;
214
lv_style_t *cursor;
215
lv_style_t *sb;
216
} ta;
217
#endif
218
219
#if USE_LV_SPINBOX != 0
220
struct {
221
lv_style_t *bg;
222
lv_style_t *cursor;
223
lv_style_t *sb;
224
} spinbox;
225
#endif
226
227
#if USE_LV_LIST
228
struct {
229
lv_style_t *bg;
230
lv_style_t *scrl;
231
lv_style_t *sb;
232
struct {
233
lv_style_t *rel;
234
lv_style_t *pr;
235
lv_style_t *tgl_rel;
236
lv_style_t *tgl_pr;
237
lv_style_t *ina;
238
} btn;
239
} list;
240
#endif
241
242
#if USE_LV_DDLIST != 0
243
struct {
244
lv_style_t *bg;
245
lv_style_t *bgo;
246
lv_style_t *pr;
247
lv_style_t *sel;
248
lv_style_t *sb;
249
} ddlist;
250
#endif
251
252
#if USE_LV_ROLLER != 0
253
struct {
254
lv_style_t *bg;
255
lv_style_t *sel;
256
} roller;
257
#endif
258
259
#if USE_LV_TABVIEW != 0
260
struct {
261
lv_style_t *bg;
262
lv_style_t *indic;
263
struct {
264
lv_style_t *bg;
265
lv_style_t *rel;
266
lv_style_t *pr;
267
lv_style_t *tgl_rel;
268
lv_style_t *tgl_pr;
269
} btn;
270
} tabview;
271
#endif
272
273
#if USE_LV_TILEVIEW != 0
274
struct {
275
lv_style_t *bg;
276
lv_style_t *scrl;
277
lv_style_t *sb;
278
} tileview;
279
#endif
280
281
#if USE_LV_TABLE != 0
282
struct {
283
lv_style_t *bg;
284
lv_style_t *cell;
285
} table;
286
#endif
287
288
#if USE_LV_WIN != 0
289
struct {
290
lv_style_t *bg;
291
lv_style_t *sb;
292
lv_style_t *header;
293
struct {
294
lv_style_t *bg;
295
lv_style_t *scrl;
296
} content;
297
struct {
298
lv_style_t *rel;
299
lv_style_t *pr;
300
} btn;
301
} win;
302
#endif
303
} lv_theme_t;
304
305
/**********************
306
* GLOBAL PROTOTYPES
307
**********************/
308
309
/**
310
* Set a theme for the system.
311
* From now, all the created objects will use styles from this theme by default
312
* @param th pointer to theme (return value of: 'lv_theme_init_xxx()')
313
*/
314
void lv_theme_set_current(lv_theme_t *th);
315
316
/**
317
* Get the current system theme.
318
* @return pointer to the current system theme. NULL if not set.
319
*/
320
lv_theme_t * lv_theme_get_current(void);
321
322
/**********************
323
* MACROS
324
**********************/
325
326
/**********************
327
* POST INCLUDE
328
*********************/
329
#include "lv_theme_hekate.h"
330
331
332
#ifdef __cplusplus
333
} /* extern "C" */
334
#endif
335
336
#endif /*LV_THEMES_H*/
337
338