8 char **formats; /* in same order as in module's default formats */
9 char **expanded_formats; /* this contains the formats after
10 expanding {templates} */
20 int default_color; /* default color to use with text with default
21 background. default is -1 which means the
22 default color set by terminal */
23 unsigned int info_eol:1; /* show the timestamp/servertag at the
24 end of the line, not at beginning */
28 int replace_keys[256]; /* index to replace_values for each char */
29 GSList *replace_values;
30 GHashTable *abstracts;
35 typedef struct _FORMAT_REC FORMAT_REC;
37 extern GSList *themes;
38 extern THEME_REC *current_theme;
39 extern GHashTable *default_formats;
41 THEME_REC *theme_create(const char *path, const char *name);
42 void theme_destroy(THEME_REC *rec);
44 THEME_REC *theme_load(const char *name);
46 #define theme_register(formats) theme_register_module(MODULE_NAME, formats)
47 #define theme_unregister() theme_unregister_module(MODULE_NAME)
48 void theme_register_module(const char *module, FORMAT_REC *formats);
49 void theme_unregister_module(const char *module);
51 #define EXPAND_FLAG_IGNORE_REPLACES 0x01 /* don't use the character replaces when expanding */
52 #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}) */
53 #define EXPAND_FLAG_RECURSIVE_MASK 0x0f
55 #define EXPAND_FLAG_ROOT 0x10
56 #define EXPAND_FLAG_LASTCOLOR_ARG 0x20
58 char *theme_format_expand(THEME_REC *theme, const char *format);
59 char *theme_format_expand_data(THEME_REC *theme, const char **format,
60 char default_fg, char default_bg,
61 char *save_last_fg, char *save_last_bg,
64 void themes_init(void);
65 void themes_deinit(void);