Cleanse back-end code of all references to X11 types
[xboard.git] / xboard.h
index 119d604..ca2a705 100644 (file)
--- a/xboard.h
+++ b/xboard.h
@@ -1,9 +1,11 @@
 /*
  * xboard.h -- Parameter definitions for X front end
- * $Id$
  *
- * Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts.
- * Enhancements Copyright 1992-95 Free Software Foundation, Inc.
+ * Copyright 1991 by Digital Equipment Corporation, Maynard,
+ * Massachusetts.
+ *
+ * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006,
+ * 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
  *
  * The following terms apply to Digital Equipment Corporation's copyright
  * interest in XBoard:
  * SOFTWARE.
  * ------------------------------------------------------------------------
  *
- * The following terms apply to the enhanced version of XBoard distributed
- * by the Free Software Foundation:
+ * The following terms apply to the enhanced version of XBoard
+ * distributed by the Free Software Foundation:
  * ------------------------------------------------------------------------
- * This program is free software; you can redistribute it and/or modify
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * ------------------------------------------------------------------------
- */
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
 
 #include <stdio.h>
 
 #define ICS_LOGON    ".icsrc"
-#define INFOFILE     "xboard.info"
 #define MANPAGE      "xboard.6"
-#define CLOCK_FONT   "-*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*"
-#define COORD_FONT   "-*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*"
-#define DEFAULT_FONT "-*-helvetica-medium-r-normal--*-*-*-*-*-*-*-*"
+#if ENABLE_NLS
+#define CLOCK_FONT_NAME \
+  "-*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*," \
+  "-misc-fixed-bold-r-normal--*-*-*-*-*-*-*-*," \
+  "-*-*-*-*-*-*-*-*-*-*-*-*-*-*"
+#define COORD_FONT_NAME \
+  "-*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*," \
+  "-misc-fixed-bold-r-normal--*-*-*-*-*-*-*-*," \
+  "-*-*-*-*-*-*-*-*-*-*-*-*-*-*"
+#define DEFAULT_FONT_NAME \
+  "-*-helvetica-medium-r-normal--*-*-*-*-*-*-*-*," \
+  "-misc-fixed-medium-r-normal--*-*-*-*-*-*-*-*," \
+  "-*-*-*-*-*-*-*-*-*-*-*-*-*-*"
+#else
+#define CLOCK_FONT_NAME         "-*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*"
+#define COORD_FONT_NAME         "-*-helvetica-bold-r-normal--*-*-*-*-*-*-*-*"
+#define DEFAULT_FONT_NAME       "-*-helvetica-medium-r-normal--*-*-*-*-*-*-*-*"
+#endif
 #define COLOR_SHOUT             "green"
 #define COLOR_SSHOUT            "green,black,1"
 #define COLOR_CHANNEL1          "cyan"
@@ -64,6 +81,7 @@
 #define COLOR_REQUEST           "red"
 #define COLOR_SEEK              "blue"
 #define COLOR_NORMAL            "default"
+#define COLOR_LOWTIMEWARNING    "red"
 
 typedef struct {
     char *name;
@@ -85,10 +103,10 @@ typedef struct {
   { "Big",      87, 3, 34, 14, 14, 0, 0, 864 }, \
   { "Large",    80, 3, 34, 14, 14, 0, 0, 864 }, \
   { "Bulky",    72, 3, 34, 12, 14, 0, 0, 864 }, \
-  { "Medium",   64, 3, 34, 12, 14, 0, 0, 768 }, \
-  { "Moderate", 58, 3, 34, 12, 14, 0, 0, 768 }, \
-  { "Average",  54, 2, 30, 11, 12, 0, 0, 600 }, \
-  { "Middling", 49, 2, 24, 10, 12, 0, 0, 600 }, \
+  { "Medium",   64, 3, 34, 12, 14, 1, 0, 768 }, \
+  { "Moderate", 58, 3, 34, 12, 14, 1, 0, 768 }, \
+  { "Average",  54, 2, 30, 11, 12, 1, 0, 600 }, \
+  { "Middling", 49, 2, 24, 10, 12, 1, 0, 600 }, \
   { "Mediocre", 45, 2, 20, 10, 12, 1, 0, 600 }, \
   { "Small",    40, 2, 20, 10, 12, 1, 0, 480 }, \
   { "Slim",     37, 2, 20, 10, 12, 1, 0, 480 }, \
@@ -96,22 +114,57 @@ typedef struct {
   { "Dinky",    29, 1, 15, 9,  11, 1, 0, 480 }, \
   { "Teeny",    25, 1, 12, 8,  11, 1, 1, 480 }, \
   { "Tiny",     21, 1, 12, 8,  11, 1, 1, 0 }, \
-  { NULL, 0, 0, 0, 0, 0, 0 } }
+  {   NULL,      0, 0,  0, 0,   0, 0, 0, 0 } }
 
 #define BORDER_X_OFFSET 3
 #define BORDER_Y_OFFSET 27
-#define FIRST_CHESS_PROGRAM    "gnuchessx"
-#define SECOND_CHESS_PROGRAM   "gnuchessx"
+#define FIRST_CHESS_PROGRAM    "fairymax"
+#define SECOND_CHESS_PROGRAM   "fairymax"
+#define FIRST_DIRECTORY         "."
+#define SECOND_DIRECTORY        "."
+#define SOUND_BELL              ""
+#define ICS_NAMES               ""
+#define FCP_NAMES               ""
+#define SCP_NAMES               ""
+#define ICS_TEXT_MENU_DEFAULT   ""
+#define SETTINGS_FILE           SYSCONFDIR"/xboard.conf"
+#define COLOR_BKGD              "white"
 
-/* Default to no flashing (the "usual" XBoard behavior) */
-#define FLASH_COUNT    0               /* Number of times to flash */
-#define FLASH_RATE     5               /* Flashes per second */
+void NewTagsPopup P((char *text, char *msg));
+int AppendText P((Option *opt, char *s));
+void NewCommentPopup P((char *title, char *text, int index));
+void CatchDeleteWindow(Widget w, String procname);
+void GenericPopDown P((Widget w, XEvent *event, String *prms, Cardinal *nprms));
+void SetFocus(Widget w, XtPointer data, XEvent *event, Boolean *b); // from xoptions.c
+void TypeInProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms));
+Widget CreateMenuItem P((Widget menu, char *msg, XtCallbackProc CB, int n));
+void WheelProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms));
+void TabProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms));
+void GenericMenu P((Widget w, XEvent *event, String *prms, Cardinal *nprms));
 
-/* Default delay per character (in msec) while sending login script */
-#define MS_LOGIN_DELAY  0
+// from xengineoutput.c
+void SelectPV P((Widget w, XEvent * event, String * params, Cardinal * nParams));
+void StopPV P((Widget w, XEvent * event, String * params, Cardinal * nParams));
+
+extern char memoTranslations[];
+
+
+extern Widget shells[];
+extern int dialogError;
+extern Widget formWidget, shellWidget, boardWidget, menuBarWidget;
+extern Display *xDisplay;
+extern Window xBoardWindow;
+extern int squareSize;
+extern Pixmap xMarkPixmap, wIconPixmap, bIconPixmap;
+extern char *layoutName;
+extern Pixel timerForegroundPixel, timerBackgroundPixel, dialogColor, buttonColor;
+extern Atom wm_delete_window;
+extern int useImages, useImageSqs;
+extern char ICSInputTranslations[];
+extern char *selected_fen_position;
+extern GC coordGC;
+extern Dimension textHeight; // of message widget in board window
 
-typedef int (*FileProc) P((FILE *f, int n, char *title));
-void CatchDeleteWindow(Widget w, String procname);
 
 #define TOPLEVEL 1 /* preference item; 1 = make popup windows toplevel */