X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwinboard.h;h=115dd8634d63e9900bbc8fd4a3081de89731261e;hb=bf07cc0c5232c7cd486fab118defa0815ff89183;hp=a16496cac7d0b23311737f6599baee6ed10680ed;hpb=d413d3ed517beac460ae9ed147e6200a57125bb5;p=xboard.git diff --git a/winboard/winboard.h b/winboard/winboard.h index a16496c..115dd86 100644 --- a/winboard/winboard.h +++ b/winboard/winboard.h @@ -2,9 +2,12 @@ * WinBoard.h -- Definitions for Windows NT front end to XBoard * * Copyright 1991 by Digital Equipment Corporation, Maynard, - * Massachusetts. Enhancements Copyright - * 1992-2001,2002,2003,2004,2005,2006,2007,2008,2009 Free Software - * Foundation, Inc. + * Massachusetts. + * + * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, + * 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. + * + * Enhancements Copyright 2005 Alessandro Scotti * * The following terms apply to Digital Equipment Corporation's copyright * interest in XBoard: @@ -56,6 +59,7 @@ typedef struct { char faceName[LF_FACESIZE]; float pointSize; BYTE bold, italic, underline, strikeout; + BYTE charset; } MyFontParams; typedef struct { @@ -81,6 +85,7 @@ typedef struct { typedef struct { char* name; void* data; + int flag; // [HGM] needed to indicate if data was malloc'ed or not } MySound; typedef struct { @@ -117,8 +122,6 @@ VOID ChangeBoardSize(BoardSize newSize); BOOL APIENTRY MyCreateFont(HWND hwnd, MyFont *font); VOID ErrorPopDown(VOID); VOID EnsureOnScreen(int *x, int *y, int minX, int minY); -typedef char GetFunc(void *getClosure); -VOID ParseArgs(GetFunc get, void *cl); HBITMAP DoLoadBitmap(HINSTANCE hinst, char *piece, int squareSize, char *suffix); COLORREF ParseColorName(char *name); @@ -129,7 +132,11 @@ VOID ParseFontName(char *name, MyFontParams *mfp); void InitComboStrings(HANDLE hwndCombo, char **cd); BOOLEAN MyLoadSound(MySound *ms); BOOLEAN MyPlaySound(MySound *ms); -VOID ExitArgError(char *msg, char *badArg); +VOID ExitArgError(char *msg, char *badArg, Boolean quit); +void SaveSettings(char* name); +BOOL BrowseForFolder( const char * title, char * path ); +VOID TourneyPopup(); +VOID LoadEnginePopUp(); /* Constants */ @@ -140,14 +147,13 @@ VOID ExitArgError(char *msg, char *badArg); #define COMMENT_FONT 4 #define EDITTAGS_FONT 5 #define MOVEHISTORY_FONT 6 -#define NUM_FONTS 7 +#define GAMELIST_FONT 7 +#define NUM_FONTS 8 /* Positions of some menu items. Origin is zero and separator lines count. */ /* It's gross that these are needed. */ -#define ACTION_POS 2 /* Posn of "Action" on menu bar */ -#define OPTIONS_POS 4 /* Posn of "Options" on menu bar */ -#define ICS_POS 4 /* Posn of "ICS " on Options menu */ -#define SOUNDS_POS 6 /* Posn of "Sounds" on Options menu */ +#define ACTION_POS 4 /* Posn of "Action" on menu bar */ +#define OPTIONS_POS 6 /* Posn of "Options" on menu bar */ /* end grossness */ extern MyFont *font[NUM_SIZES][NUM_FONTS]; @@ -166,31 +172,46 @@ extern MyFont *font[NUM_SIZES][NUM_FONTS]; #define OUTLINE_PIECE 1 #define WHITE_PIECE 2 -/* Some definitions required by MSVC 4.1 */ -#ifndef WM_MOUSEWHEEL -#define WM_MOUSEWHEEL 0x020A -#endif -#ifndef SCF_DEFAULT -#define SCF_DEFAULT 0x0000 -#define SCF_ALL 0x0004 -#endif - #define COPY_TMP "wbcopy.tmp" #define PASTE_TMP "wbpaste.tmp" -/* [AS] Layout management */ -typedef struct { - Boolean visible; - int x; - int y; - int width; - int height; -} WindowPlacement; +/* variables */ +extern HINSTANCE hInst; +extern HWND hwndMain; +extern BoardSize boardSize; -VOID InitWindowPlacement( WindowPlacement * wp ); +// [HGM] Some stuff to allo a platform-independent reference to windows +// This should be moved to frontend.h in due time -VOID RestoreWindowPlacement( HWND hWnd, WindowPlacement * wp ); +typedef enum { + W_Main, W_Console, W_Comment, W_Tags, W_GameList, + W_MoveHist, W_EngineOut, NUM_WINDOWS +} WindowID; -VOID ReattachAfterMove( LPRECT lprcOldPos, int new_x, int new_y, HWND hWndChild, WindowPlacement * pwpChild ); +extern WindowPlacement placementTab[NUM_WINDOWS]; +extern HWND hwndTab[NUM_WINDOWS]; // this remains pure front-end. +void Translate( HWND hDlg, int id); +VOID InitWindowPlacement( WindowPlacement * wp ); +VOID RestoreWindowPlacement( HWND hWnd, WindowPlacement * wp ); +VOID ReattachAfterMove( LPRECT lprcOldPos, int new_x, int new_y, HWND hWndChild, WindowPlacement * pwpChild ); VOID ReattachAfterSize( LPRECT lprcOldPos, int new_w, int new_h, HWND hWndChild, WindowPlacement * pwpChild ); +BOOL GetActualPlacement( HWND hWnd, WindowPlacement * wp ); + +VOID MoveHistoryPopUp(); +VOID MoveHistoryPopDown(); +VOID MoveHistorySet( char movelist[][2*MOVE_LEN], int first, int last, int current, ChessProgramStats_Move * pvInfo ); +extern HWND moveHistoryDialog; + +VOID EvalGraphSet( int first, int last, int current, ChessProgramStats_Move * pvInfo ); +VOID EvalGraphPopUp(); +VOID EvalGraphPopDown(); +extern HWND evalGraphDialog; + +extern HWND engineOutputDialog; + +VOID ShowGameListProc(void); +extern HWND gameListDialog; + +VOID EditTagsProc(void); +extern HWND editTagsDialog;