X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=common.h;h=0a6a1634f20662c4e9f16fb0d30ba838e61ab141;hb=50ffaff1de1b05f1bf76dd842e734eff2974afd4;hp=2044c03a7a7cfe54d6fd6684eab9e3fbce4492e7;hpb=ac9d48038a86a672579abbcbbc53b17e2515ba13;p=xboard.git diff --git a/common.h b/common.h index 2044c03..0a6a163 100644 --- a/common.h +++ b/common.h @@ -81,7 +81,14 @@ int pclose(FILE *); #endif #else +#ifdef X11 #include +#else +typedef char Boolean; +typedef char *String; +#define True 1 +#define False 0 +#endif #endif #endif @@ -218,6 +225,14 @@ int pclose(FILE *); #define ZIPPY_MAX_GAMES 0 #define ZIPPY_REPLAY_TIMEOUT 120 +typedef VOIDSTAR ProcRef; +#define NoProc ((ProcRef) 0) +typedef VOIDSTAR InputSourceRef; + +typedef void (*DelayedEventCallback) P((void)); + +typedef enum { Press, Release } ClickType; + typedef enum { BeginningOfGame, MachinePlaysWhite, MachinePlaysBlack, AnalyzeMode, AnalyzeFile, TwoMachinesPlay, @@ -408,13 +423,15 @@ typedef struct { Boolean firstPlaysBlack; Boolean noChessProgram; char *host[ENGINES]; - char *pngDirectory; - char *svgDirectory; + char *themeNames; + char *pieceDirectory; + char *border; char *soundDirectory; char *remoteShell; char *remoteUser; float timeDelay; char *timeControl; + Boolean trueColors; Boolean icsActive; char *icsHost; char *icsPort; @@ -541,6 +558,7 @@ typedef struct { Boolean hideThinkingFromHuman; /* If true, program thinking is generated but not displayed in human/computer matches */ Boolean useBitmaps; Boolean useFont; + Boolean useBorder; char * liteBackTextureFile; /* Name of texture bitmap for lite squares */ char * darkBackTextureFile; /* Name of texture bitmap for dark squares */ int liteBackTextureMode; @@ -777,6 +795,11 @@ extern WindowPlacement wpTags; extern int chatCount; extern char chatPartner[MAX_CHAT][MSG_SIZ]; +// Some prototypes of routines so general they should be available everywhere +/* If status == 0, we are exiting with a benign message, not an error */ +void DisplayFatalError P((String message, int error, int status)); +void DisplayError P((String message, int error)); + // [HGM] generally useful macros; there are way too many memory leaks... #define FREE(x) if(x) free(x) #define ASSIGN(x, y) if(x) free(x); x = strdup(y)