Update copyright year to 2015.
[cboard.git] / src / conf.h
blob3b954d125e7ae6e7761541c78c516b7791a1b1f0
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 CONF_H
20 #define CONF_H
22 #ifdef HAVE_CONFIG_H
23 #include <config.h>
24 #endif
26 #include <wchar.h>
28 #ifdef HAVE_LIMITS_H
29 #include <limits.h>
30 #endif
32 #ifdef HAVE_SYS_PARAM_H
33 #include <sys/param.h>
34 #endif
36 // See init_color_pairs() in colors.c.
37 enum {
38 CONF_BWHITE, CONF_BBLACK, CONF_BSELECTED, CONF_BCURSOR, CONF_BGRAPHICS,
39 CONF_BCOORDS, CONF_BMOVESW, CONF_BMOVESB, CONF_BCOUNT, CONF_BDWINDOW,
40 CONF_TWINDOW, CONF_TTITLE, CONF_TBORDER,
41 CONF_SWINDOW, CONF_STITLE, CONF_SBORDER, CONF_SNOTIFY, CONF_SENGINE,
42 CONF_HWINDOW, CONF_HTITLE, CONF_HBORDER,
43 CONF_MWINDOW, CONF_MTITLE, CONF_MBORDER, CONF_MPROMPT,
44 CONF_IWINDOW, CONF_ITITLE, CONF_IBORDER, CONF_IPROMPT, CONF_MENU,
45 CONF_MENUS, CONF_MENUH, CONF_HISTORY_MENU_LG, CONF_BCASTLING,
46 CONF_BENPASSANT, CONF_BATTACK, CONF_BPREVMOVE, CONF_MAX_COLORS
49 struct color_s {
50 short fg; // Foreground color.
51 short bg; // Background color.
52 int attrs; // Attributes for a color terminal.
53 int nattrs; // Attributes for a non-color terminal.
56 enum {
57 KEY_DEFAULT,
58 KEY_REPEAT,
59 KEY_SET
62 struct config_key_s {
63 wint_t c;
64 int type;
65 wchar_t *str;
68 struct {
69 int jumpcount; // KEY_UP and KEY_DOWN in history mode.
70 int linegraphics; // Board line graphics.
71 int saveprompt; // Prompt to save modified games on quit.
72 int deleteprompt; // Prompt when deleting a game.
73 int clevel; // Compression level for compressed files.
74 int validmoves; // Display valid squares a selected piece can move to.
75 struct passwd *pwd; // Used throughout (tags/home directory).
76 char *nagfile; // The pathname to the NAG data file.
77 char *configfile; // The pathname to the configuration file (default or
78 // from the command line).
79 char *ccfile; // The pathname to the Country Code data file.
80 char *savedirectory; // Directory where saved games are stored.
81 char *datadir; // ~/.cboard
82 char *engine_cmd; // Alternate chess engine command.
83 int engine_protocol; // XBoard protocol: 1 or 2
84 struct color_s color[CONF_MAX_COLORS]; // Color configuration.
85 TAG **tag; // Custom PGN tags.
86 char *pattern; // Filename filter in the file browser.
87 wchar_t **einit; /* Strings to send to the chess engine upon each reset
88 * or new game.
90 struct config_key_s **keys; // Custom commands to send to the engine.
91 int details; // Board details.
92 int showattacks; // When board details is enabled.
93 char coordsyleft;
94 char fmpolyglot; // first move with polyglot
95 char boardleft;
96 char exitdialogbox;
97 char enginecmdblacktag;
98 int utf8_pieces; // For the board only.
99 char bprevmove;
100 } config;
102 #endif