8 char **formats; /* in same order as in module's default formats */
9 char **expanded_formats; /* this contains the formats after
10 expanding {templates} */
18 int default_color; /* default color to use with text with default
19 background. default is -1 which means the
20 default color set by terminal */
21 unsigned int info_eol:1; /* show the timestamp/servertag at the
22 end of the line, not at beginning */
26 int replace_keys[256]; /* index to replace_values for each char */
27 GSList *replace_values;
28 GHashTable *abstracts;
33 typedef struct _FORMAT_REC FORMAT_REC;
35 extern GSList *themes;
36 extern THEME_REC *current_theme;
37 extern GHashTable *default_formats;
39 THEME_REC *theme_create(const char *path, const char *name);
40 void theme_destroy(THEME_REC *rec);
42 THEME_REC *theme_load(const char *name);
44 #define theme_register(formats) theme_register_module(MODULE_NAME, formats)
45 #define theme_unregister() theme_unregister_module(MODULE_NAME)
46 void theme_register_module(const char *module, FORMAT_REC *formats);
47 void theme_unregister_module(const char *module);
49 #define EXPAND_FLAG_IGNORE_REPLACES 0x01 /* don't use the character replaces when expanding */
50 #define EXPAND_FLAG_IGNORE_EMPTY 0x02 /* if abstract's argument is empty, or the argument is a $variable that is empty, don't try to expand it (ie. {xx }, but not {xx}) */
51 #define EXPAND_FLAG_RECURSIVE_MASK 0x0f
53 #define EXPAND_FLAG_ROOT 0x10
54 #define EXPAND_FLAG_LASTCOLOR_ARG 0x20
56 char *theme_format_expand(THEME_REC *theme, const char *format);
57 char *theme_format_expand_data(THEME_REC *theme, const char **format,
58 char default_fg, char default_bg,
59 char *save_last_fg, char *save_last_bg,
62 void themes_init(void);
63 void themes_deinit(void);