changes from H.G. Muller; version 4.3.14
[xboard.git] / xboard.h
1 /*\r
2  * xboard.h -- Parameter definitions for X front end\r
3  * $Id: xboard.h,v 2.1 2003/10/27 19:21:00 mann Exp $\r
4  *\r
5  * Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts.\r
6  * Enhancements Copyright 1992-95 Free Software Foundation, Inc.\r
7  *\r
8  * The following terms apply to Digital Equipment Corporation's copyright\r
9  * interest in XBoard:\r
10  * ------------------------------------------------------------------------\r
11  * All Rights Reserved\r
12  *\r
13  * Permission to use, copy, modify, and distribute this software and its\r
14  * documentation for any purpose and without fee is hereby granted,\r
15  * provided that the above copyright notice appear in all copies and that\r
16  * both that copyright notice and this permission notice appear in\r
17  * supporting documentation, and that the name of Digital not be\r
18  * used in advertising or publicity pertaining to distribution of the\r
19  * software without specific, written prior permission.\r
20  *\r
21  * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING\r
22  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL\r
23  * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR\r
24  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,\r
25  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\r
26  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS\r
27  * SOFTWARE.\r
28  * ------------------------------------------------------------------------\r
29  *\r
30  * The following terms apply to the enhanced version of XBoard distributed\r
31  * by the Free Software Foundation:\r
32  * ------------------------------------------------------------------------\r
33  * This program is free software; you can redistribute it and/or modify\r
34  * it under the terms of the GNU General Public License as published by\r
35  * the Free Software Foundation; either version 2 of the License, or\r
36  * (at your option) any later version.\r
37  *\r
38  * This program is distributed in the hope that it will be useful,\r
39  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
40  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
41  * GNU General Public License for more details.\r
42  *\r
43  * You should have received a copy of the GNU General Public License\r
44  * along with this program; if not, write to the Free Software\r
45  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
46  * ------------------------------------------------------------------------\r
47  */\r
48 \r
49 #include <stdio.h>\r
50 \r
51 #define ICS_LOGON    ".icsrc"\r
52 #define INFOFILE     "xboard.info"\r
53 #define MANPAGE      "xboard.6"\r
54 #define CLOCK_FONT   "-*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*"\r
55 #define COORD_FONT   "-*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*"\r
56 #define DEFAULT_FONT "-*-helvetica-medium-r-normal--*-*-*-*-*-*-*-*"\r
57 #define COLOR_SHOUT             "green"\r
58 #define COLOR_SSHOUT            "green,black,1"\r
59 #define COLOR_CHANNEL1          "cyan"\r
60 #define COLOR_CHANNEL           "cyan,black,1"\r
61 #define COLOR_KIBITZ            "magenta,black,1"\r
62 #define COLOR_TELL              "yellow,black,1"\r
63 #define COLOR_CHALLENGE         "red,black,1"\r
64 #define COLOR_REQUEST           "red"\r
65 #define COLOR_SEEK              "blue"\r
66 #define COLOR_NORMAL            "default"\r
67 \r
68 typedef struct {\r
69     char *name;\r
70     int squareSize;\r
71     int lineGap;\r
72     int clockFontPxlSize;\r
73     int coordFontPxlSize;\r
74     int fontPxlSize;\r
75     int smallLayout;\r
76     int tinyLayout;\r
77     int minScreenSize;\r
78 } SizeDefaults;\r
79 \r
80 #define SIZE_DEFAULTS \\r
81 { { "Titanic",  129, 4, 34, 14, 14, 0, 0, 1200 }, \\r
82   { "Colossal", 116, 4, 34, 14, 14, 0, 0, 1200 }, \\r
83   { "Giant",    108, 3, 34, 14, 14, 0, 0, 1024 }, \\r
84   { "Huge",     95, 3, 34, 14, 14, 0, 0, 1024 }, \\r
85   { "Big",      87, 3, 34, 14, 14, 0, 0, 864 }, \\r
86   { "Large",    80, 3, 34, 14, 14, 0, 0, 864 }, \\r
87   { "Bulky",    72, 3, 34, 12, 14, 0, 0, 864 }, \\r
88   { "Medium",   64, 3, 34, 12, 14, 0, 0, 768 }, \\r
89   { "Moderate", 58, 3, 34, 12, 14, 0, 0, 768 }, \\r
90   { "Average",  54, 2, 30, 11, 12, 0, 0, 600 }, \\r
91   { "Middling", 49, 2, 24, 10, 12, 0, 0, 600 }, \\r
92   { "Mediocre", 45, 2, 20, 10, 12, 1, 0, 600 }, \\r
93   { "Small",    40, 2, 20, 10, 12, 1, 0, 480 }, \\r
94   { "Slim",     37, 2, 20, 10, 12, 1, 0, 480 }, \\r
95   { "Petite",   33, 1, 15, 9,  11, 1, 0, 480 }, \\r
96   { "Dinky",    29, 1, 15, 9,  11, 1, 0, 480 }, \\r
97   { "Teeny",    25, 1, 12, 8,  11, 1, 1, 480 }, \\r
98   { "Tiny",     21, 1, 12, 8,  11, 1, 1, 0 }, \\r
99   { NULL, 0, 0, 0, 0, 0, 0 } }\r
100 \r
101 #define BORDER_X_OFFSET 3\r
102 #define BORDER_Y_OFFSET 27\r
103 #define FIRST_CHESS_PROGRAM     "./fmax"\r
104 #define SECOND_CHESS_PROGRAM    "./fmax"\r
105 #define FIRST_DIRECTORY         "./Fairy-Max"\r
106 #define SECOND_DIRECTORY        "./Fairy-Max"\r
107 \r
108 /* Default to no flashing (the "usual" XBoard behavior) */\r
109 #define FLASH_COUNT     0               /* Number of times to flash */\r
110 #define FLASH_RATE      5               /* Flashes per second */\r
111 \r
112 /* Default delay per character (in msec) while sending login script */\r
113 #define MS_LOGIN_DELAY  0\r
114 \r
115 typedef int (*FileProc) P((FILE *f, int n, char *title));\r
116 void CatchDeleteWindow(Widget w, String procname);\r
117 \r
118 #define TOPLEVEL 1 /* preference item; 1 = make popup windows toplevel */\r
119 \r