GameInfo gameInfo; /* Note that some entries may be NULL. */
} ListGame;
+extern int opponentKibitzes;
extern ChessSquare gatingPiece;
extern List gameList;
extern int lastLoadGameNumber;
#define COLOR_BKGD "white"
typedef int (*FileProc) P((FILE *f, int n, char *title));
+
+int PopDown P((int n));
+int InpuBoxPopUp P((void));
void CatchDeleteWindow(Widget w, String procname);
+void PlaySound P((char *name));
+void ParseIcsTextColors P((void));
+void InitDrawingSizes P((int i, int j));
+void SendToICS P((char *buf));
+void SendToProgram P((char *message, ChessProgramState *cps));
+FILE * XsraSelFile P((Widget w, char *prompt, char *ok, char *cancel, char *failed,
+ char *init_path, char *filter, char *mode, int (*show_entry)(), char **name_return));
+
extern Widget shells[];
extern Boolean shellUp[];
+extern Widget formWidget, shellWidget, boardWidget, menuBarWidget, gameListShell, historyShell;
+extern Display *xDisplay;
+extern Window xBoardWindow;
+extern int squareSize;
+extern Pixmap xMarkPixmap, wIconPixmap, bIconPixmap;
+extern char *layoutName;
+extern Arg layoutArgs[2], formArgs[2], messageArgs[4];
+extern Pixel timerForegroundPixel, timerBackgroundPixel;
+extern int searchTime;
+extern Atom wm_delete_window;
+extern int squareSize, lineGap, defaultLineGap, useImages, useImageSqs;
+extern int shuffleOpenings;
+extern int startedFromPositionFile;
+extern char *icsTextMenuString;
+extern char ICSInputTranslations[];
+extern char *selected_fen_position;
+extern GC coordGC;
+
#define TOPLEVEL 1 /* preference item; 1 = make popup windows toplevel */
# define N_(s) s
#endif
-extern Widget formWidget, shellWidget, boardWidget, menuBarWidget;
-extern Display *xDisplay;
-extern int squareSize;
-extern Pixmap xMarkPixmap;
-
Position tagsX = -1, tagsY = -1;
void TagsPopUp(tags, msg)
#define _LL_ 100
-// imports from xboard.c
-extern Widget formWidget, shellWidget, boardWidget, menuBarWidget;
-extern Display *xDisplay;
-extern Window xBoardWindow;
-extern int squareSize;
-extern Pixmap xMarkPixmap, wIconPixmap, bIconPixmap;
-extern char *layoutName;
-
Pixmap icons[8]; // [HGM] this front-end array translates back-end icon indicator to handle
Widget outputField[2][7]; // [HGM] front-end array to translate output field to window handle
int EngineOutputIsUp();
void SetEngineColorIcon( int which );
-/* Imports from backend.c */
-extern int opponentKibitzes;
-
-/* Imports from xboard.c */
-extern Arg layoutArgs[2], formArgs[2], messageArgs[4];
-
//extern WindowPlacement wpEngineOutput;
Position engineOutputX = -1, engineOutputY = -1;
// cloned from CopyPositionProc. Abuse selected_fen_position to hold selection
-extern char *selected_fen_position;
-
Boolean SendPositionSelection(Widget w, Atom *selection, Atom *target,
Atom *type_return, XtPointer *value_return,
unsigned long *length_return, int *format_return); // from xboard.c
#define _LL_ 100
-// imports from xboard.c
-extern Widget formWidget, shellWidget, boardWidget, menuBarWidget;
-extern Display *xDisplay;
-extern Window xBoardWindow;
-extern int squareSize;
-extern Pixmap xMarkPixmap, wIconPixmap, bIconPixmap;
-extern char *layoutName;
-
Pixmap icons[8]; // [HGM] this front-end array translates back-end icon indicator to handle
Widget outputField[2][7]; // [HGM] front-end array to translate output field to window handle
-/* Imports from backend.c */
-
-/* Imports from xboard.c */
-extern Arg layoutArgs[2], formArgs[2], messageArgs[4];
-extern GC coordGC;
-
//extern WindowPlacement wpEvalGraph;
Position evalGraphX = -1, evalGraphY = -1;
void SetFocus P((Widget w, XtPointer data, XEvent *event, Boolean *b));
-extern Widget formWidget, shellWidget, boardWidget, menuBarWidget, gameListShell;
-extern Display *xDisplay;
-extern int squareSize;
-extern Pixmap xMarkPixmap;
-extern char *layoutName;
-
static Widget filterText;
static char filterString[MSG_SIZ];
static int listLength;
} GameListClosure;
static GameListClosure *glc = NULL;
-static Arg layoutArgs[] = {
- { XtNborderWidth, 0 },
- { XtNdefaultDistance, 0 }
-};
-
Widget
GameListCreate(name, callback, client_data)
char *name;
#define _LL_ 100
-extern Widget formWidget, shellWidget, boardWidget, menuBarWidget, historyShell;
-extern Display *xDisplay;
-extern int squareSize;
-extern Pixmap xMarkPixmap;
-extern char *layoutName;
-
struct History{
String *Nr,*white,*black;
int aNr; /* space actually alocated */
# define N_(s) s
#endif
-extern void SendToProgram P((char *message, ChessProgramState *cps));
-FILE * XsraSelFile P((Widget w, char *prompt, char *ok, char *cancel, char *failed,
- char *init_path, char *filter, char *mode, int (*show_entry)(), char **name_return));
-
-extern Widget formWidget, shellWidget, boardWidget, menuBarWidget;
-extern Display *xDisplay;
-extern int squareSize;
-extern Pixmap xMarkPixmap;
-extern char *layoutName;
-extern Window xBoardWindow;
-extern Arg layoutArgs[2], formArgs[2];
-Pixel timerForegroundPixel, timerBackgroundPixel;
-extern int searchTime;
-extern Atom wm_delete_window;
-extern int lineGap;
-
// [HGM] the following code for makng menu popups was cloned from the FileNamePopUp routines
static Widget previous = NULL;
}
//--------------------------- New Shuffle Game --------------------------------------------
-extern int shuffleOpenings;
-extern int startedFromPositionFile;
int shuffleUp;
Widget shuffleShell;
return;
}
if (strcmp(name, _(" OK ")) == 0) {
- int inc, mps, ok;
+ int inc, mps, ok=0;
XtSetArg(args[0], XtNstring, &txt);
XtGetValues(tcData, args, 1);
switch(tcInc) {
int values[MAX_OPTIONS];
ChessProgramState *currentCps;
static Option *currentOption;
-extern Widget shells[];
static Boolean browserUp;
void CheckCallback(Widget ww, XtPointer data, XEvent *event, Boolean *b)
String *prms;
Cardinal *nprms;
{
- int n;
if(browserUp) return; // prevent closing dialog when it has an open file-browse daughter
PopDown(prms[0][0] - '0');
}
} else {
buttonColor = *(Pixel *) vTo.addr;
}
- }
+ } else buttonColor = (Pixel) 0;
XtSetArg(args[0], XtNbackground, buttonColor);;
XtSetValues(box, args, 1);
}
void BoardOptionsOK(int n)
{
- extern int defaultLineGap, useImages, useImageSqs;
if(appData.overrideLineGap >= 0) lineGap = appData.overrideLineGap; else lineGap = defaultLineGap;
useImages = useImageSqs = 0;
MakeColors(); CreateGCs(True);
void GenericReadout(int selected)
{
int i, j;
- String name, val;
+ String val;
Arg args[16];
char buf[MSG_SIZ], **dest;
float x;
Widget w;
XtPointer client_data, call_data;
{
- String name, val;
+ String name;
Arg args[16];
char buf[MSG_SIZ];
- int i, j;
int data = (intptr_t) client_data;
currentOption = dialogOptions[data>>16]; data &= 0xFFFF;
GenericPopUp(Option *option, char *title, int dlgNr)
{
Arg args[16];
- Widget popup, layout, dialog, edit=NULL, form, last, b_ok, b_cancel, leftMargin = NULL, textField = NULL;
+ Widget popup, layout, dialog=NULL, edit=NULL, form, last, b_ok, b_cancel, leftMargin = NULL, textField = NULL;
Window root, child;
int x, y, i, j, height=999, width=1, h, c, w;
int win_x, win_y, maxWidth, maxTextWidth;
}
Option textOptions[100];
-extern char *icsTextMenuString;
void PutText P((char *text, int pos));
-SendString(char *p)
+void SendString(char *p)
{
char buf[MSG_SIZ], *q;
if(q = strstr(p, "$input")) {
GenericPopUp(tagsOptions, _("Tags"), 2);
}
-extern char ICSInputTranslations[];
char *icsText;
Option boxOptions[] = {
void PutText(char *text, int pos)
{
- Widget edit;
Arg args[16];
char buf[MSG_SIZ], *p;