Fix build failure.
[cboard.git] / src / colors.h
blobba5fe0dc9a5ba7c62a14a27b62f80dbdfd2a6a55
1 /* vim:tw=78:ts=8:sw=4:set ft=c: */
2 /*
3 Copyright (C) 2002-2019 Ben Kibbey <bjk@luxsci.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef COLORS_H
20 #define COLORS_H
22 enum
24 A_FG_B_BG, A_FG_B_FG, A_BG_B_BG, B_FG_A_BG, B_BG_B_FG, A_BG_A_FG,
25 A_BG_B_FG, B_BG_A_FG
28 #define CP_BOARD_COORDS ((COLORS) ? \
29 COLOR_PAIR(1) | config.color[CONF_BCOORDS].attrs : \
30 config.color[CONF_BCOORDS].nattrs)
32 #define CP_BOARD_GRAPHICS ((COLORS) ? \
33 COLOR_PAIR(2) | config.color[CONF_BGRAPHICS].attrs : \
34 config.color[CONF_BGRAPHICS].nattrs)
36 #define CP_BOARD_WHITE ((COLORS) ? \
37 COLOR_PAIR(3) | config.color[CONF_BWHITE].attrs : \
38 config.color[CONF_BWHITE].nattrs)
40 #define CP_BOARD_BLACK ((COLORS) ? \
41 COLOR_PAIR(4) | config.color[CONF_BBLACK].attrs : \
42 config.color[CONF_BBLACK].nattrs)
44 #define CP_BOARD_SELECTED ((COLORS) ? \
45 COLOR_PAIR(5) | config.color[CONF_BSELECTED].attrs : \
46 config.color[CONF_BSELECTED].nattrs)
48 #define CP_BOARD_CURSOR ((COLORS) ? \
49 COLOR_PAIR(6) | config.color[CONF_BCURSOR].attrs : \
50 config.color[CONF_BCURSOR].nattrs)
52 #define CP_STATUS_WINDOW ((COLORS) ? \
53 COLOR_PAIR(7) | config.color[CONF_SWINDOW].attrs : \
54 config.color[CONF_SWINDOW].nattrs)
56 #define CP_STATUS_BORDER ((COLORS) ? \
57 COLOR_PAIR(8) | config.color[CONF_SBORDER].attrs : \
58 config.color[CONF_SBORDER].nattrs)
60 #define CP_STATUS_TITLE ((COLORS) ? \
61 COLOR_PAIR(9) | config.color[CONF_STITLE].attrs : \
62 config.color[CONF_STITLE].nattrs)
64 #define CP_STATUS_ENGINE ((COLORS) ? \
65 COLOR_PAIR(10) | config.color[CONF_SENGINE].attrs : \
66 config.color[CONF_SENGINE].nattrs)
68 #define CP_STATUS_NOTIFY ((COLORS) ? \
69 COLOR_PAIR(11) | config.color[CONF_SNOTIFY].attrs : \
70 config.color[CONF_SNOTIFY].nattrs)
72 #define CP_TAG_WINDOW ((COLORS) ? \
73 COLOR_PAIR(12) | config.color[CONF_TWINDOW].attrs : \
74 config.color[CONF_TWINDOW].nattrs)
76 #define CP_TAG_BORDER ((COLORS) ? \
77 COLOR_PAIR(13) | config.color[CONF_TBORDER].attrs : \
78 config.color[CONF_TBORDER].nattrs)
80 #define CP_TAG_TITLE ((COLORS) ? \
81 COLOR_PAIR(14) | config.color[CONF_TTITLE].attrs : \
82 config.color[CONF_TTITLE].nattrs)
84 #define CP_HISTORY_WINDOW ((COLORS) ? \
85 COLOR_PAIR(15) | config.color[CONF_HWINDOW].attrs : \
86 config.color[CONF_HWINDOW].nattrs)
88 #define CP_HISTORY_BORDER ((COLORS) ? \
89 COLOR_PAIR(16) | config.color[CONF_HBORDER].attrs : \
90 config.color[CONF_HBORDER].nattrs)
92 #define CP_HISTORY_TITLE ((COLORS) ? \
93 COLOR_PAIR(17) | config.color[CONF_HTITLE].attrs : \
94 config.color[CONF_HTITLE].nattrs)
96 #define CP_MESSAGE_WINDOW ((COLORS) ? \
97 COLOR_PAIR(18) | config.color[CONF_MWINDOW].attrs : \
98 config.color[CONF_MWINDOW].nattrs)
100 #define CP_MESSAGE_BORDER ((COLORS) ? \
101 COLOR_PAIR(19) | config.color[CONF_MBORDER].attrs : \
102 config.color[CONF_MBORDER].nattrs)
104 #define CP_MESSAGE_TITLE ((COLORS) ? \
105 COLOR_PAIR(20) | config.color[CONF_MTITLE].attrs : \
106 config.color[CONF_MTITLE].nattrs)
108 #define CP_MESSAGE_PROMPT ((COLORS) ? \
109 COLOR_PAIR(21) | config.color[CONF_MPROMPT].attrs : \
110 config.color[CONF_MPROMPT].nattrs)
112 #define CP_INPUT_WINDOW ((COLORS) ? \
113 COLOR_PAIR(22) | config.color[CONF_IWINDOW].attrs : \
114 config.color[CONF_IWINDOW].nattrs)
116 #define CP_INPUT_BORDER ((COLORS) ? \
117 COLOR_PAIR(23) | config.color[CONF_IBORDER].attrs : \
118 config.color[CONF_IBORDER].nattrs)
120 #define CP_INPUT_TITLE ((COLORS) ? \
121 COLOR_PAIR(24) | config.color[CONF_ITITLE].attrs : \
122 config.color[CONF_ITITLE].nattrs)
124 #define CP_INPUT_PROMPT ((COLORS) ? \
125 COLOR_PAIR(25) | config.color[CONF_IPROMPT].attrs : \
126 config.color[CONF_IPROMPT].nattrs)
128 #define CP_BOARD_MOVES_WHITE ((COLORS) ? \
129 COLOR_PAIR(26) | config.color[CONF_BMOVESW].attrs : \
130 config.color[CONF_BMOVESW].nattrs)
132 #define CP_BOARD_MOVES_BLACK ((COLORS) ? \
133 COLOR_PAIR(27) | config.color[CONF_BMOVESB].attrs : \
134 config.color[CONF_BMOVESB].nattrs)
136 #define CP_BOARD_COUNT ((COLORS) ? \
137 COLOR_PAIR(28) | config.color[CONF_BCOUNT].attrs : \
138 config.color[CONF_BCOUNT].nattrs)
140 #define CP_BOARD_WINDOW ((COLORS) ? \
141 COLOR_PAIR(29) | config.color[CONF_BDWINDOW].attrs : \
142 config.color[CONF_BDWINDOW].nattrs)
144 #define CP_MENU ((COLORS) ? \
145 COLOR_PAIR(30) | config.color[CONF_MENU].attrs : \
146 config.color[CONF_MENU].nattrs)
148 #define CP_MENU_SELECTED ((COLORS) ? \
149 COLOR_PAIR(31) | config.color[CONF_MENUS].attrs : \
150 config.color[CONF_MENUS].nattrs)
152 #define CP_MENU_HIGHLIGHT ((COLORS) ? \
153 COLOR_PAIR(32) | config.color[CONF_MENUH].attrs : \
154 config.color[CONF_MENUH].nattrs)
156 #define CP_HISTORY_MENU_LG ((COLORS) ? \
157 COLOR_PAIR(33) | config.color[CONF_HISTORY_MENU_LG].attrs : \
158 config.color[CONF_HISTORY_MENU_LG].nattrs)
160 #define CP_BOARD_W_W ((COLORS) ? \
161 COLOR_PAIR(34) | config.color[CONF_BWHITE].attrs : \
162 config.color[CONF_BWHITE].nattrs)
164 #define CP_BOARD_W_B ((COLORS) ? \
165 COLOR_PAIR(35) | config.color[CONF_BBLACK].attrs : \
166 config.color[CONF_BWHITE].nattrs)
168 #define CP_BOARD_B_B ((COLORS) ? \
169 COLOR_PAIR(36) | config.color[CONF_BBLACK].attrs : \
170 config.color[CONF_BBLACK].nattrs)
172 #define CP_BOARD_B_W ((COLORS) ? \
173 COLOR_PAIR(37) | config.color[CONF_BWHITE].attrs : \
174 config.color[CONF_BBLACK].nattrs)
176 #define CP_BOARD_CASTLING ((COLORS) ? \
177 COLOR_PAIR(38) | config.color[CONF_BCASTLING].attrs : \
178 config.color[CONF_BCASTLING].nattrs)
180 #define CP_BOARD_ENPASSANT ((COLORS) ? \
181 COLOR_PAIR(39) | config.color[CONF_BENPASSANT].attrs : \
182 config.color[CONF_BENPASSANT].nattrs)
184 #define CP_BOARD_ATTACK ((COLORS) ? \
185 COLOR_PAIR(40) | config.color[CONF_BATTACK].attrs : \
186 config.color[CONF_BATTACK].nattrs)
188 #define CP_BOARD_PREVMOVE ((COLORS) ? \
189 COLOR_PAIR(41) | config.color[CONF_BPREVMOVE].attrs : \
190 config.color[CONF_BPREVMOVE].nattrs)
192 void init_color_pairs ();
193 void set_default_colors ();
194 chtype mix_cp (chtype a, chtype b, attr_t, int which);
196 #endif