void
ParseBoard12 (char *string)
{
+#if ZIPPY
+ int i, takeback;
+ char *bookHit = NULL; // [HGM] book
+#endif
GameMode newGameMode;
- int gamenum, newGame, newMove, relation, basetime, increment, ics_flip = 0, i;
- int j, k, n, moveNum, white_stren, black_stren, white_time, black_time, takeback;
+ int gamenum, newGame, newMove, relation, basetime, increment, ics_flip = 0;
+ int j, k, n, moveNum, white_stren, black_stren, white_time, black_time;
int double_push, castle_ws, castle_wl, castle_bs, castle_bl, irrev_count;
char to_play, board_chars[200];
char move_str[MSG_SIZ], str[MSG_SIZ], elapsed_time[MSG_SIZ];
int fromX, fromY, toX, toY;
char promoChar;
int ranks=1, files=0; /* [HGM] ICS80: allow variable board size */
- char *bookHit = NULL; // [HGM] book
Boolean weird = FALSE, reqFlag = FALSE;
fromX = fromY = toX = toY = -1;
#include "lists.h"
+typedef int (*FileProc) P((FILE *f, int n, char *title));
+
extern char *wbOptions;
extern int gotPremove;
extern GameMode gameMode;
extern int tinyLayout, smallLayout;
extern Boolean mcMode;
+void MarkMenuItem P((char *menuRef, int state));
char *CmailMsg P((void));
/* Tord: Added the useFEN960 parameter in PositionToFEN() below */
char *PositionToFEN P((int move, char* useFEN960));
{
fileProc = proc; /* I can't see a way not */
fileOpenMode = openMode; /* to use globals here */
-#ifdef TODO_GTK
- { // [HGM] use file-selector dialog stolen from Ghostview
- // int index; // this is not supported yet
- Browse(BoardWindow, label, (def[0] ? def : NULL), filter, False, openMode, &openName, &openFP);
- }
-#else
- FileNamePopUpGTK(label, def, filter, proc, False, openMode, &openName, &openFP);
-#endif
+ FileNamePopUpWrapper(label, def, filter, proc, False, openMode, &openName, &openFP);
}
void
void SendText P((int n));
void DisplayLogos P((Option *left, Option *right));
void Browse P((DialogClass dlg, char *label, char *proposed, char *ext,
- Boolean pathFlag, char *mode, char **name, FILE **fp));
+ Boolean pathFlag, char *mode, char **name, FILE **fp));
+void FileNamePopUpWrapper P((char *label, char *def, char *filter, FileProc proc,
+ Boolean pathFlag, char *openMode, char **openName, FILE **openFP));
void InitDrawingParams P((int reload)); // in draw.c
void InitDrawingHandle P((Option *opt));
int boardWidth, boardHeight;
static int oldWidth, oldHeight;
static VariantClass oldVariant;
- static int oldMono = -1, oldTwoBoards = 0;
+ static int oldTwoBoards = 0;
if(!mainOptions[W_BOARD].handle) return;
SelectPieces(gameInfo.variant);
- oldMono = -10; // kludge to force recreation of animation masks
oldVariant = gameInfo.variant;
}
CreateAnimVars();
- oldMono = appData.monoMode;
}
void
return;
}
-void FileNamePopUpGTK(label, def, filter, proc, pathFlag, openMode, name, fp)
+void FileNamePopUpWrapper(label, def, filter, proc, pathFlag, openMode, name, fp)
char *label;
char *def;
char *filter;
void NewTagsPopup P((char *text, char *msg));
int AppendText P((Option *opt, char *s));
void NewCommentPopup P((char *title, char *text, int index));
+void GetActualPlacement P((GtkWidget *shell, WindowPlacement *wp));
#ifdef TODO_GTK
void CatchDeleteWindow(Widget w, String procname);
void GenericPopDown P((Widget w, XEvent *event, String *prms, Cardinal *nprms));
if(mb[i].handle == RADIO) gtk_check_menu_item_set_draw_as_radio(GTK_CHECK_MENU_ITEM(entry), True);
} else
entry = gtk_menu_item_new_with_label(msg);
- gtk_signal_connect_object (GTK_OBJECT (entry), "activate", GTK_SIGNAL_FUNC(MenuSelect), (gpointer) (n<<16)+i);
+ gtk_signal_connect_object (GTK_OBJECT (entry), "activate", GTK_SIGNAL_FUNC(MenuSelect), (gpointer) (intptr_t) ((n<<16)+i));
gtk_widget_show(entry);
} else entry = gtk_separator_menu_item_new();
gtk_menu_append(GTK_MENU (menu), entry);
static gboolean
GameListEvent(GtkWidget *widget, GdkEvent *event, gpointer gdata)
{
- int n = (int) gdata;
+ int n = (intptr_t) gdata;
if(n == 4) {
if(((GdkEventKey *) event)->keyval != GDK_Return) return FALSE;
case 5: // game list
g_signal_connect(opt->handle, "button-press-event", G_CALLBACK (GameListEvent), (gpointer) 0 );
case 4: // game-list filter
- g_signal_connect(opt->handle, "key-press-event", G_CALLBACK (GameListEvent), (gpointer) nr );
+ g_signal_connect(opt->handle, "key-press-event", G_CALLBACK (GameListEvent), (gpointer) (intptr_t) nr );
break;
case 6: // engine output (uses generic textview callback)
break;
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_OUT);
if(option[i].textValue) // generic callback for double-clicking listbox item
- g_signal_connect(list, "button-press-event", G_CALLBACK(ListCallback), (gpointer) (dlgNr<<16 | i) );
+ g_signal_connect(list, "button-press-event", G_CALLBACK(ListCallback), (gpointer) (intptr_t) (dlgNr<<16 | i) );
/* never has label, so let listbox occupy all columns */
Pack(hbox, table, sw, left, left+r, top, GTK_EXPAND);
typedef void MenuProc P((void));
-typedef int (*FileProc) P((FILE *f, int n, char *title));
typedef struct {
char *string;
extern Menu menuBar[];
-void MarkMenuItem P((char *menuRef, int state));
void ErrorPopUp P((char *title, char *text, int modal));
void AppendEnginesToMenu P((char *list));
void LoadGameProc P((void));
}
void
-FileNamePopUpGTK(char *label, char *def, char *filter, FileProc proc, Boolean pathFlag, char *openMode, char **openName, FILE **openFP)
+FileNamePopUpWrapper (char *label, char *def, char *filter, FileProc proc, Boolean pathFlag, char *openMode, char **openName, FILE **openFP)
{
Browse(BoardWindow, label, (def[0] ? def : NULL), filter, False, openMode, openName, openFP);
}