diff options
author | Paul Duncan <pabs@pablotron.org> | 2019-01-15 00:10:46 -0500 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2019-01-15 00:10:46 -0500 |
commit | dec30a82819f93903004a3e9d46bf22f352942b4 (patch) | |
tree | 46b06f9f7de3d0b3a5fa446dc13cf7727d0e87c3 /src/sdl/theme.h | |
parent | 7fdd6f36c8181115c60b781dc97b71107fb7da65 (diff) | |
download | sok-dec30a82819f93903004a3e9d46bf22f352942b4.tar.bz2 sok-dec30a82819f93903004a3e9d46bf22f352942b4.zip |
add theme.[hc] and refactor draw.c
Diffstat (limited to 'src/sdl/theme.h')
-rw-r--r-- | src/sdl/theme.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/sdl/theme.h b/src/sdl/theme.h new file mode 100644 index 0000000..562df3f --- /dev/null +++ b/src/sdl/theme.h @@ -0,0 +1,37 @@ +#ifndef THEME_H +#define THEME_H + +#include "text-style.h" +#include "bg-style.h" + +typedef enum { + TEXT_STYLE_TITLE, + TEXT_STYLE_MOVES, + TEXT_STYLE_HELP, + TEXT_STYLE_LAST, +} text_style_id_t; + +typedef enum { + BG_STYLE_NORMAL, + BG_STYLE_WON, + BG_STYLE_LAST, +} bg_style_id_t; + +typedef struct { + text_style_t text_styles[TEXT_STYLE_LAST]; + bg_style_t bg_styles[BG_STYLE_LAST]; +} theme_t; + +const theme_t *theme_get_default(); + +const text_style_t *theme_get_text_style( + const theme_t * const, + const text_style_id_t +); + +const bg_style_t *theme_get_bg_style( + const theme_t * const, + const bg_style_id_t +); + +#endif /* THEME_H */ |