2 * xboard.h -- Parameter definitions for X front end
4 * Copyright 1991 by Digital Equipment Corporation, Maynard,
7 * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006,
8 * 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
10 * The following terms apply to Digital Equipment Corporation's copyright
12 * ------------------------------------------------------------------------
15 * Permission to use, copy, modify, and distribute this software and its
16 * documentation for any purpose and without fee is hereby granted,
17 * provided that the above copyright notice appear in all copies and that
18 * both that copyright notice and this permission notice appear in
19 * supporting documentation, and that the name of Digital not be
20 * used in advertising or publicity pertaining to distribution of the
21 * software without specific, written prior permission.
23 * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
24 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
25 * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
26 * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
27 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
28 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
30 * ------------------------------------------------------------------------
32 * The following terms apply to the enhanced version of XBoard
33 * distributed by the Free Software Foundation:
34 * ------------------------------------------------------------------------
36 * GNU XBoard is free software: you can redistribute it and/or modify
37 * it under the terms of the GNU General Public License as published by
38 * the Free Software Foundation, either version 3 of the License, or (at
39 * your option) any later version.
41 * GNU XBoard is distributed in the hope that it will be useful, but
42 * WITHOUT ANY WARRANTY; without even the implied warranty of
43 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
44 * General Public License for more details.
46 * You should have received a copy of the GNU General Public License
47 * along with this program. If not, see http://www.gnu.org/licenses/. *
49 *------------------------------------------------------------------------
50 ** See the file ChangeLog for a revision history. */
54 #define ICS_LOGON ".icsrc"
55 #define INFOFILE "xboard.info"
56 #define MANPAGE "xboard.6"
58 #define CLOCK_FONT_NAME \
59 "-*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*," \
60 "-misc-fixed-bold-r-normal--*-*-*-*-*-*-*-*," \
61 "-*-*-*-*-*-*-*-*-*-*-*-*-*-*"
62 #define COORD_FONT_NAME \
63 "-*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*," \
64 "-misc-fixed-bold-r-normal--*-*-*-*-*-*-*-*," \
65 "-*-*-*-*-*-*-*-*-*-*-*-*-*-*"
66 #define DEFAULT_FONT_NAME \
67 "-*-helvetica-medium-r-normal--*-*-*-*-*-*-*-*," \
68 "-misc-fixed-medium-r-normal--*-*-*-*-*-*-*-*," \
69 "-*-*-*-*-*-*-*-*-*-*-*-*-*-*"
71 #define CLOCK_FONT_NAME "-*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*"
72 #define COORD_FONT_NAME "-*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*"
73 #define DEFAULT_FONT_NAME "-*-helvetica-medium-r-normal--*-*-*-*-*-*-*-*"
75 #define COLOR_SHOUT "green"
76 #define COLOR_SSHOUT "green,black,1"
77 #define COLOR_CHANNEL1 "cyan"
78 #define COLOR_CHANNEL "cyan,black,1"
79 #define COLOR_KIBITZ "magenta,black,1"
80 #define COLOR_TELL "yellow,black,1"
81 #define COLOR_CHALLENGE "red,black,1"
82 #define COLOR_REQUEST "red"
83 #define COLOR_SEEK "blue"
84 #define COLOR_NORMAL "default"
85 #define COLOR_LOWTIMEWARNING "red"
99 #define SIZE_DEFAULTS \
100 { { "Titanic", 129, 4, 34, 14, 14, 0, 0, 1200 }, \
101 { "Colossal", 116, 4, 34, 14, 14, 0, 0, 1200 }, \
102 { "Giant", 108, 3, 34, 14, 14, 0, 0, 1024 }, \
103 { "Huge", 95, 3, 34, 14, 14, 0, 0, 1024 }, \
104 { "Big", 87, 3, 34, 14, 14, 0, 0, 864 }, \
105 { "Large", 80, 3, 34, 14, 14, 0, 0, 864 }, \
106 { "Bulky", 72, 3, 34, 12, 14, 0, 0, 864 }, \
107 { "Medium", 64, 3, 34, 12, 14, 0, 0, 768 }, \
108 { "Moderate", 58, 3, 34, 12, 14, 0, 0, 768 }, \
109 { "Average", 54, 2, 30, 11, 12, 0, 0, 600 }, \
110 { "Middling", 49, 2, 24, 10, 12, 0, 0, 600 }, \
111 { "Mediocre", 45, 2, 20, 10, 12, 1, 0, 600 }, \
112 { "Small", 40, 2, 20, 10, 12, 1, 0, 480 }, \
113 { "Slim", 37, 2, 20, 10, 12, 1, 0, 480 }, \
114 { "Petite", 33, 1, 15, 9, 11, 1, 0, 480 }, \
115 { "Dinky", 29, 1, 15, 9, 11, 1, 0, 480 }, \
116 { "Teeny", 25, 1, 12, 8, 11, 1, 1, 480 }, \
117 { "Tiny", 21, 1, 12, 8, 11, 1, 1, 0 }, \
118 { NULL, 0, 0, 0, 0, 0, 0, 0, 0 } }
120 #define BORDER_X_OFFSET 3
121 #define BORDER_Y_OFFSET 27
122 #define FIRST_CHESS_PROGRAM "fairymax"
123 #define SECOND_CHESS_PROGRAM "fairymax"
124 #define FIRST_DIRECTORY "."
125 #define SECOND_DIRECTORY "."
126 #define SOUND_BELL ""
130 #define ICS_TEXT_MENU_DEFAULT ""
131 #define SETTINGS_FILE SYSCONFDIR"/xboard.conf"
132 #define COLOR_BKGD "white"
134 typedef int (*FileProc) P((FILE *f, int n, char *title));
136 int PopDown P((int n));
137 void InputBoxPopup P((void));
138 void CatchDeleteWindow(Widget w, String procname);
139 void PlaySound P((char *name));
140 void ParseIcsTextColors P((void));
141 void InitDrawingSizes P((int i, int j));
142 void SendToICS P((char *buf));
143 void SendToProgram P((char *message, ChessProgramState *cps));
144 FILE * XsraSelFile P((Widget w, char *prompt, char *ok, char *cancel, char *failed,
145 char *init_path, char *filter, char *mode, int (*show_entry)(), char **name_return));
147 extern Widget shells[];
148 extern Boolean shellUp[];
149 extern Widget formWidget, shellWidget, boardWidget, menuBarWidget, gameListShell, historyShell;
150 extern Display *xDisplay;
151 extern Window xBoardWindow;
152 extern int squareSize;
153 extern Pixmap xMarkPixmap, wIconPixmap, bIconPixmap;
154 extern char *layoutName;
155 extern Arg layoutArgs[2], formArgs[2], messageArgs[4];
156 extern Pixel timerForegroundPixel, timerBackgroundPixel;
157 extern int searchTime;
158 extern Atom wm_delete_window;
159 extern int squareSize, lineGap, defaultLineGap, useImages, useImageSqs;
160 extern int startedFromPositionFile;
161 extern char *icsTextMenuString;
162 extern char ICSInputTranslations[];
163 extern char *selected_fen_position;
167 #define TOPLEVEL 1 /* preference item; 1 = make popup windows toplevel */