* Massachusetts.
*
* Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006,
- * 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ * 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
*
* The following terms apply to Digital Equipment Corporation's copyright
* interest in XBoard:
#include "childio.h"
#include "xgamelist.h"
#include "xhistory.h"
-#include "xevalgraph.h"
#include "menus.h"
#include "board.h"
#include "dialogs.h"
Boolean TempBackwardActive = False;
void ManInner P((Widget w, XEvent *event, String *prms, Cardinal *nprms));
void DisplayMove P((int moveNumber));
-void ICSInitScript P((void));
void update_ics_width P(());
int CopyMemoProc P(());
XtSetArg(args[1], XtNforeground, &buttonForegroundPixel);
XtGetValues(optList[W_PAUSE].handle, args, 2);
}
- AppendEnginesToMenu(appData.recentEngineList);
xBoardWindow = XtWindow(boardWidget);
if(item) ((MenuProc *) item->proc) ();
}
-static void
-MenuEngineSelect (Widget w, caddr_t addr, caddr_t index)
-{
- RecentEngineEvent((int) (intptr_t) addr);
-}
-
-void
-AppendMenuItem (char *msg, int n)
-{
- CreateMenuItem((Widget) optList[W_ENGIN].textValue, msg, (XtCallbackProc) MenuEngineSelect, n);
-}
-
void
SetupDropMenu ()
{
MovePV(event->xmotion.x, event->xmotion.y, lineGap + BOARD_HEIGHT * (squareSize + lineGap));
}
-static int savedIndex; /* gross that this is global */
+extern int savedIndex; /* gross that this is global */
void
CommentClick (Widget w, XEvent * event, String * params, Cardinal * nParams)
LoadVariation( index, val ); // [HGM] also does the actual moving to it, now
}
-void
-EditCommentPopUp (int index, char *title, char *text)
-{
- savedIndex = index;
- if (text == NULL) text = "";
- NewCommentPopup(title, text, index);
-}
-
-void
-CommentPopUp (char *title, char *text)
-{
- savedIndex = currentMove; // [HGM] vari
- NewCommentPopup(title, text, currentMove);
-}
-
-void
-CommentPopDown ()
-{
- PopDown(CommentDlg);
-}
-
/* Disable all user input other than deleting the window */
static int frozen = 0;
}
}
+#define INPUT_SOURCE_BUF_SIZE 8192
+
+typedef struct {
+ CPKind kind;
+ int fd;
+ int lineByLine;
+ char *unused;
+ InputCallback func;
+ XtInputId xid;
+ char buf[INPUT_SOURCE_BUF_SIZE];
+ VOIDSTAR closure;
+} InputSource;
+
void
DoInputCallback (caddr_t closure, int *source, XtInputId *xid)
{
if(displ) DisplayLogos(&optList[W_WHITE-1], &optList[W_BLACK+1]);
return;
}
-