Update copyright year to 2015.
[cboard.git] / src / colors.h
blob1402115d9196ff85f2ea4bba96b459f90d7a0d1e
1 /* vim:tw=78:ts=8:sw=4:set ft=c: */
2 /*
3 Copyright (C) 2002-2015 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 {
23 A_FG_B_BG, A_FG_B_FG, A_BG_B_BG, B_FG_A_BG, B_BG_B_FG, A_BG_A_FG,
24 A_BG_B_FG, B_BG_A_FG
27 #define CP_BOARD_COORDS ((COLORS) ? \
28 COLOR_PAIR(1) | config.color[CONF_BCOORDS].attrs : \
29 config.color[CONF_BCOORDS].nattrs)
31 #define CP_BOARD_GRAPHICS ((COLORS) ? \
32 COLOR_PAIR(2) | config.color[CONF_BGRAPHICS].attrs : \
33 config.color[CONF_BGRAPHICS].nattrs)
35 #define CP_BOARD_WHITE ((COLORS) ? \
36 COLOR_PAIR(3) | config.color[CONF_BWHITE].attrs : \
37 config.color[CONF_BWHITE].nattrs)
39 #define CP_BOARD_BLACK ((COLORS) ? \
40 COLOR_PAIR(4) | config.color[CONF_BBLACK].attrs : \
41 config.color[CONF_BBLACK].nattrs)
43 #define CP_BOARD_SELECTED ((COLORS) ? \
44 COLOR_PAIR(5) | config.color[CONF_BSELECTED].attrs : \
45 config.color[CONF_BSELECTED].nattrs)
47 #define CP_BOARD_CURSOR ((COLORS) ? \
48 COLOR_PAIR(6) | config.color[CONF_BCURSOR].attrs : \
49 config.color[CONF_BCURSOR].nattrs)
51 #define CP_STATUS_WINDOW ((COLORS) ? \
52 COLOR_PAIR(7) | config.color[CONF_SWINDOW].attrs : \
53 config.color[CONF_SWINDOW].nattrs)
55 #define CP_STATUS_BORDER ((COLORS) ? \
56 COLOR_PAIR(8) | config.color[CONF_SBORDER].attrs : \
57 config.color[CONF_SBORDER].nattrs)
59 #define CP_STATUS_TITLE ((COLORS) ? \
60 COLOR_PAIR(9) | config.color[CONF_STITLE].attrs : \
61 config.color[CONF_STITLE].nattrs)
63 #define CP_STATUS_ENGINE ((COLORS) ? \
64 COLOR_PAIR(10) | config.color[CONF_SENGINE].attrs : \
65 config.color[CONF_SENGINE].nattrs)
67 #define CP_STATUS_NOTIFY ((COLORS) ? \
68 COLOR_PAIR(11) | config.color[CONF_SNOTIFY].attrs : \
69 config.color[CONF_SNOTIFY].nattrs)
71 #define CP_TAG_WINDOW ((COLORS) ? \
72 COLOR_PAIR(12) | config.color[CONF_TWINDOW].attrs : \
73 config.color[CONF_TWINDOW].nattrs)
75 #define CP_TAG_BORDER ((COLORS) ? \
76 COLOR_PAIR(13) | config.color[CONF_TBORDER].attrs : \
77 config.color[CONF_TBORDER].nattrs)
79 #define CP_TAG_TITLE ((COLORS) ? \
80 COLOR_PAIR(14) | config.color[CONF_TTITLE].attrs : \
81 config.color[CONF_TTITLE].nattrs)
83 #define CP_HISTORY_WINDOW ((COLORS) ? \
84 COLOR_PAIR(15) | config.color[CONF_HWINDOW].attrs : \
85 config.color[CONF_HWINDOW].nattrs)
87 #define CP_HISTORY_BORDER ((COLORS) ? \
88 COLOR_PAIR(16) | config.color[CONF_HBORDER].attrs : \
89 config.color[CONF_HBORDER].nattrs)
91 #define CP_HISTORY_TITLE ((COLORS) ? \
92 COLOR_PAIR(17) | config.color[CONF_HTITLE].attrs : \
93 config.color[CONF_HTITLE].nattrs)
95 #define CP_MESSAGE_WINDOW ((COLORS) ? \
96 COLOR_PAIR(18) | config.color[CONF_MWINDOW].attrs : \
97 config.color[CONF_MWINDOW].nattrs)
99 #define CP_MESSAGE_BORDER ((COLORS) ? \
100 COLOR_PAIR(19) | config.color[CONF_MBORDER].attrs : \
101 config.color[CONF_MBORDER].nattrs)
103 #define CP_MESSAGE_TITLE ((COLORS) ? \
104 COLOR_PAIR(20) | config.color[CONF_MTITLE].attrs : \
105 config.color[CONF_MTITLE].nattrs)
107 #define CP_MESSAGE_PROMPT ((COLORS) ? \
108 COLOR_PAIR(21) | config.color[CONF_MPROMPT].attrs : \
109 config.color[CONF_MPROMPT].nattrs)
111 #define CP_INPUT_WINDOW ((COLORS) ? \
112 COLOR_PAIR(22) | config.color[CONF_IWINDOW].attrs : \
113 config.color[CONF_IWINDOW].nattrs)
115 #define CP_INPUT_BORDER ((COLORS) ? \
116 COLOR_PAIR(23) | config.color[CONF_IBORDER].attrs : \
117 config.color[CONF_IBORDER].nattrs)
119 #define CP_INPUT_TITLE ((COLORS) ? \
120 COLOR_PAIR(24) | config.color[CONF_ITITLE].attrs : \
121 config.color[CONF_ITITLE].nattrs)
123 #define CP_INPUT_PROMPT ((COLORS) ? \
124 COLOR_PAIR(25) | config.color[CONF_IPROMPT].attrs : \
125 config.color[CONF_IPROMPT].nattrs)
127 #define CP_BOARD_MOVES_WHITE ((COLORS) ? \
128 COLOR_PAIR(26) | config.color[CONF_BMOVESW].attrs : \
129 config.color[CONF_BMOVESW].nattrs)
131 #define CP_BOARD_MOVES_BLACK ((COLORS) ? \
132 COLOR_PAIR(27) | config.color[CONF_BMOVESB].attrs : \
133 config.color[CONF_BMOVESB].nattrs)
135 #define CP_BOARD_COUNT ((COLORS) ? \
136 COLOR_PAIR(28) | config.color[CONF_BCOUNT].attrs : \
137 config.color[CONF_BCOUNT].nattrs)
139 #define CP_BOARD_WINDOW ((COLORS) ? \
140 COLOR_PAIR(29) | config.color[CONF_BDWINDOW].attrs : \
141 config.color[CONF_BDWINDOW].nattrs)
143 #define CP_MENU ((COLORS) ? \
144 COLOR_PAIR(30) | config.color[CONF_MENU].attrs : \
145 config.color[CONF_MENU].nattrs)
147 #define CP_MENU_SELECTED ((COLORS) ? \
148 COLOR_PAIR(31) | config.color[CONF_MENUS].attrs : \
149 config.color[CONF_MENUS].nattrs)
151 #define CP_MENU_HIGHLIGHT ((COLORS) ? \
152 COLOR_PAIR(32) | config.color[CONF_MENUH].attrs : \
153 config.color[CONF_MENUH].nattrs)
155 #define CP_HISTORY_MENU_LG ((COLORS) ? \
156 COLOR_PAIR(33) | config.color[CONF_HISTORY_MENU_LG].attrs : \
157 config.color[CONF_HISTORY_MENU_LG].nattrs)
159 #define CP_BOARD_W_W ((COLORS) ? \
160 COLOR_PAIR(34) | config.color[CONF_BWHITE].attrs : \
161 config.color[CONF_BWHITE].nattrs)
163 #define CP_BOARD_W_B ((COLORS) ? \
164 COLOR_PAIR(35) | config.color[CONF_BBLACK].attrs : \
165 config.color[CONF_BWHITE].nattrs)
167 #define CP_BOARD_B_B ((COLORS) ? \
168 COLOR_PAIR(36) | config.color[CONF_BBLACK].attrs : \
169 config.color[CONF_BBLACK].nattrs)
171 #define CP_BOARD_B_W ((COLORS) ? \
172 COLOR_PAIR(37) | config.color[CONF_BWHITE].attrs : \
173 config.color[CONF_BBLACK].nattrs)
175 #define CP_BOARD_CASTLING ((COLORS) ? \
176 COLOR_PAIR(38) | config.color[CONF_BCASTLING].attrs : \
177 config.color[CONF_BCASTLING].nattrs)
179 #define CP_BOARD_ENPASSANT ((COLORS) ? \
180 COLOR_PAIR(39) | config.color[CONF_BENPASSANT].attrs : \
181 config.color[CONF_BENPASSANT].nattrs)
183 #define CP_BOARD_ATTACK ((COLORS) ? \
184 COLOR_PAIR(40) | config.color[CONF_BATTACK].attrs : \
185 config.color[CONF_BATTACK].nattrs)
187 #define CP_BOARD_PREVMOVE ((COLORS) ? \
188 COLOR_PAIR(41) | config.color[CONF_BPREVMOVE].attrs : \
189 config.color[CONF_BPREVMOVE].nattrs)
191 void init_color_pairs();
192 void set_default_colors();
193 chtype mix_cp(chtype a, chtype b, attr_t, int which);
195 #endif