diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2015-02-03 22:30:05 +0100 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-02-03 22:30:05 +0100 |
commit | f5f29ceeb99bf56c477e41a61cdb5d55d2e988d2 (patch) | |
tree | b145c3949354294bd1f5b56c52c3349fdc42b655 /CRT.h | |
parent | c3a7b2f134a9eb311bbd771333f000c1b9f9bed9 (diff) |
Make the implementation of color schemes declarative.
Diffstat (limited to 'CRT.h')
-rw-r--r-- | CRT.h | 21 |
1 files changed, 13 insertions, 8 deletions
@@ -11,13 +11,6 @@ in the source distribution for its full text. #define ColorPair(i,j) COLOR_PAIR((7-i)*8+j) -#define COLORSCHEME_DEFAULT 0 -#define COLORSCHEME_MONOCHROME 1 -#define COLORSCHEME_BLACKONWHITE 2 -#define COLORSCHEME_BLACKONWHITE2 3 -#define COLORSCHEME_MIDNIGHT 4 -#define COLORSCHEME_BLACKNIGHT 5 - #define Black COLOR_BLACK #define Red COLOR_RED #define Green COLOR_GREEN @@ -42,6 +35,16 @@ typedef enum TreeStr_ { TREE_STR_COUNT } TreeStr; +typedef enum ColorSchemes_ { + COLORSCHEME_DEFAULT = 0, + COLORSCHEME_MONOCHROME = 1, + COLORSCHEME_BLACKONWHITE = 2, + COLORSCHEME_LIGHTTERMINAL = 3, + COLORSCHEME_MIDNIGHT = 4, + COLORSCHEME_BLACKNIGHT = 5, + LAST_COLORSCHEME = 6, +} ColorSchemes; + typedef enum ColorElements_ { RESET_COLOR, DEFAULT_COLOR, @@ -115,7 +118,9 @@ extern const char **CRT_treeStr; extern bool CRT_utf8; -extern int CRT_colors[LAST_COLORELEMENT]; +int* CRT_colors; + +extern int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT]; extern int CRT_cursorX; |