Update URL's to GitLab.
[cboard.git] / src / conf.h
blobaf3ea16cdc1a6e9cd3124e9ba367391fd864dcc9
1 /* vim:tw=78:ts=8:sw=4:set ft=c: */
2 /*
3 Copyright (C) 2002-2018 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
39 CONF_BWHITE, CONF_BBLACK, CONF_BSELECTED, CONF_BCURSOR, CONF_BGRAPHICS,
40 CONF_BCOORDS, CONF_BMOVESW, CONF_BMOVESB, CONF_BCOUNT, CONF_BDWINDOW,
41 CONF_TWINDOW, CONF_TTITLE, CONF_TBORDER,
42 CONF_SWINDOW, CONF_STITLE, CONF_SBORDER, CONF_SNOTIFY, CONF_SENGINE,
43 CONF_HWINDOW, CONF_HTITLE, CONF_HBORDER,
44 CONF_MWINDOW, CONF_MTITLE, CONF_MBORDER, CONF_MPROMPT,
45 CONF_IWINDOW, CONF_ITITLE, CONF_IBORDER, CONF_IPROMPT, CONF_MENU,
46 CONF_MENUS, CONF_MENUH, CONF_HISTORY_MENU_LG, CONF_BCASTLING,
47 CONF_BENPASSANT, CONF_BATTACK, CONF_BPREVMOVE, CONF_MAX_COLORS
50 struct color_s
52 short fg; // Foreground color.
53 short bg; // Background color.
54 int attrs; // Attributes for a color terminal.
55 int nattrs; // Attributes for a non-color terminal.
58 enum
60 KEY_DEFAULT,
61 KEY_REPEAT,
62 KEY_SET
65 struct config_key_s
67 wint_t c;
68 int type;
69 wchar_t *str;
72 struct
74 int jumpcount; // KEY_UP and KEY_DOWN in history mode.
75 int linegraphics; // Board line graphics.
76 int saveprompt; // Prompt to save modified games on quit.
77 int deleteprompt; // Prompt when deleting a game.
78 int clevel; // Compression level for compressed files.
79 int validmoves; // Display valid squares a selected piece can move to.
80 struct passwd *pwd; // Used throughout (tags/home directory).
81 char *nagfile; // The pathname to the NAG data file.
82 char *configfile; // The pathname to the configuration file (default or
83 // from the command line).
84 char *ccfile; // The pathname to the Country Code data file.
85 char *savedirectory; // Directory where saved games are stored.
86 char *datadir; // ~/.cboard
87 char *engine_cmd; // Alternate chess engine command.
88 int engine_protocol; // XBoard protocol: 1 or 2
89 struct color_s color[CONF_MAX_COLORS]; // Color configuration.
90 TAG **tag; // Custom PGN tags.
91 char *pattern; // Filename filter in the file browser.
92 wchar_t **einit; /* Strings to send to the chess engine upon each reset
93 * or new game.
95 struct config_key_s **keys; // Custom commands to send to the engine.
96 int details; // Board details.
97 int showattacks; // When board details is enabled.
98 char coordsyleft;
99 char fmpolyglot; // first move with polyglot
100 char boardleft;
101 char exitdialogbox;
102 char enginecmdblacktag;
103 int utf8_pieces; // For the board only.
104 char bprevmove;
105 char *turn_cmd; // Command to be run when its human turn.
106 } config;
108 #endif