ttheme.h - ltk - Socket-based GUI for X11 (WIP)
HTML git clone git://lumidify.org/ltk.git (fast, but not encrypted)
HTML git clone https://lumidify.org/git/ltk.git (encrypted, but very slow)
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
ttheme.h (1278B)
---
1 #ifndef _LTK_THEME_H_
2 #define _LTK_THEME_H_
3
4 #include "ltk.h"
5
6 typedef enum {
7 THEME_STRING,
8 THEME_COLOR,
9 THEME_INT,
10 THEME_BOOL,
11 THEME_BORDERSIDES
12 } ltk_theme_datatype;
13
14 typedef struct {
15 char *key;
16 ltk_theme_datatype type;
17 /* Note: Bool and int are both integers, but they are
18 separate just to make it a bit clearer */
19 union {
20 char **str;
21 ltk_color *color;
22 int *i;
23 int *b;
24 ltk_border_sides *border;
25 } ptr;
26 /* Note: The default color is also given as a string
27 because it has to be allocated first (it is only a
28 different entry in the union in order to make it
29 a bit clearer) */
30 union {
31 char *str;
32 char *color;
33 int i;
34 int b;
35 ltk_border_sides border;
36 } defaultval;
37 int min, max; /* only for integers */
38 int initialized;
39 } ltk_theme_parseinfo;
40
41 /* FIXME: this only needs renderdata, not window */
42 /* Both return 1 on error, 0 on success */
43 int ltk_theme_handle_value(ltk_window *window, char *debug_name, const char *prop, const char *value, ltk_theme_parseinfo *parseinfo, size_t len, int *sorted);
44 int ltk_theme_fill_defaults(ltk_window *window, char *debug_name, ltk_theme_parseinfo *parseinfo, size_t len);
45 void ltk_theme_uninitialize(ltk_window *window, ltk_theme_parseinfo *parseinfo, size_t len);
46
47 #endif /* _LTK_THEME_H_ */