1 /**********************************************************************
2 Freeciv - Copyright (C) 2005 - The Freeciv Project
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 ***********************************************************************/
14 /**********************************************************************
15 Reading and using the themespec files, which describe
16 the files and contents of themes.
17 ***********************************************************************/
18 #ifndef FC__THEMESPEC_H
19 #define FC__THEMESPEC_H
22 #include "log.h" /* enum log_level */
28 #include "themebackgrounds.h"
29 #include "themecolors.h"
31 struct sprite
; /* opaque; gui-dep */
35 extern struct theme
*theme
;
37 const char **get_theme_list(void);
39 struct theme
*theme_read_toplevel(const char *theme_name
);
40 void theme_free(struct theme
*ftheme
);
41 void theme_load_sprites(struct theme
*t
);
42 void theme_free_sprites(struct theme
*t
);
44 void themespec_try_read(const char *theme_name
);
45 void themespec_reread(const char *theme_name
);
47 struct sprite
*theme_lookup_sprite_tag_alt(struct theme
*t
,
49 const char *tag
, const char *alt
,
53 struct theme_color_system
;
54 struct theme_color_system
*theme_get_color_system(const struct theme
*t
);
56 struct theme_background_system
;
57 struct theme_background_system
*theme_get_background_system(const struct theme
*t
);
59 char *themespec_gfx_filename(const char *gfx_filename
);
61 /* theme accessor functions. */
62 const char *theme_get_name(const struct theme
*t
);
63 const char *theme_font_filename(const struct theme
*t
);
64 int theme_default_font_size(const struct theme
*t
);
66 #endif /* FC__THEMESPEC_H */