Fix multi-leg promotions
[xboard.git] / winboard / winboard.h
index 9d8e6ea..40a425e 100644 (file)
@@ -2,10 +2,11 @@
  * WinBoard.h -- Definitions for Windows NT front end to XBoard\r
  *\r
  * Copyright 1991 by Digital Equipment Corporation, Maynard,\r
- * Massachusetts. \r
+ * Massachusetts.\r
  *\r
  * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006,\r
- * 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.\r
+ * 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Free\r
+ * Software Foundation, Inc.\r
  *\r
  * Enhancements Copyright 2005 Alessandro Scotti\r
  *\r
@@ -85,6 +86,7 @@ typedef struct {
 typedef struct {\r
   char* name;\r
   void* data;\r
+  int flag; // [HGM] needed to indicate if data was malloc'ed or not\r
 } MySound;\r
 \r
 typedef struct {\r
@@ -105,7 +107,7 @@ VOID InitAppData(LPSTR);
 VOID InitDrawingColors(VOID);\r
 VOID InitDrawingSizes(BoardSize boardSize, int flags);\r
 VOID InitMenuChecks(VOID);\r
-VOID ICSInitScript(VOID);\r
+int  ICSInitScript(VOID);\r
 BOOL CenterWindow(HWND hwndChild, HWND hwndParent);\r
 VOID ResizeEditPlusButtons(HWND hDlg, HWND hText, int sizeX, int sizeY, int newSizeX, int newSizeY);\r
 VOID PromotionPopup(HWND hwnd);\r
@@ -131,8 +133,14 @@ VOID ParseFontName(char *name, MyFontParams *mfp);
 void InitComboStrings(HANDLE hwndCombo, char **cd);\r
 BOOLEAN MyLoadSound(MySound *ms);\r
 BOOLEAN MyPlaySound(MySound *ms);\r
-VOID ExitArgError(char *msg, char *badArg);\r
+VOID ExitArgError(char *msg, char *badArg, Boolean quit);\r
 void SaveSettings(char* name);\r
+BOOL BrowseForFolder( const char * title, char * path );\r
+VOID TourneyPopup();\r
+VOID LoadEnginePopUp();\r
+VOID LoadOptionsPopup(HWND hDlg);\r
+VOID InitTextures();\r
+void ThemeOptionsPopup(HWND hwnd);\r
 \r
 /* Constants */\r
 \r
@@ -143,7 +151,8 @@ void SaveSettings(char* name);
 #define COMMENT_FONT 4\r
 #define EDITTAGS_FONT 5\r
 #define MOVEHISTORY_FONT 6\r
-#define NUM_FONTS 7\r
+#define GAMELIST_FONT 7\r
+#define NUM_FONTS 8\r
 \r
 /* Positions of some menu items.  Origin is zero and separator lines count. */\r
 /* It's gross that these are needed. */\r
@@ -186,7 +195,7 @@ typedef enum {
 extern WindowPlacement placementTab[NUM_WINDOWS];\r
 extern HWND hwndTab[NUM_WINDOWS]; // this remains pure front-end.\r
 \r
-void Translate( HWND hDlg, int id);
+void Translate( HWND hDlg, int id);\r
 VOID InitWindowPlacement( WindowPlacement * wp );\r
 VOID RestoreWindowPlacement( HWND hWnd, WindowPlacement * wp );\r
 VOID ReattachAfterMove( LPRECT lprcOldPos, int new_x, int new_y, HWND hWndChild, WindowPlacement * pwpChild );\r
@@ -195,18 +204,28 @@ BOOL GetActualPlacement( HWND hWnd, WindowPlacement * wp );
 \r
 VOID MoveHistoryPopUp();\r
 VOID MoveHistoryPopDown();\r
-VOID MoveHistorySet( char movelist[][2*MOVE_LEN], int first, int last, int current, ChessProgramStats_Move * pvInfo );\r
 extern HWND moveHistoryDialog;\r
 \r
-VOID EvalGraphSet( int first, int last, int current, ChessProgramStats_Move * pvInfo );\r
 VOID EvalGraphPopUp();\r
 VOID EvalGraphPopDown();\r
 extern HWND evalGraphDialog;\r
 \r
 extern HWND engineOutputDialog;\r
 \r
+struct GameListStats\r
+{\r
+    int white_wins;\r
+    int black_wins;\r
+    int drawn;\r
+    int unfinished;\r
+};\r
+\r
+int GameListToListBox( HWND hDlg, BOOL boReset, char * pszFilter, struct GameListStats * stats, BOOL byPos, BOOL narrow );\r
 VOID ShowGameListProc(void);\r
 extern HWND gameListDialog;\r
 \r
 VOID EditTagsProc(void);\r
 extern HWND editTagsDialog;\r
+extern int screenWidth, screenHeight;\r
+extern RECT screenGeometry; // Top-left coordiate of the screen can be different from (0,0)\r
+\r