X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard.c;h=a42ef8a99dc237878fbc0602a5bd15402f4dcf94;hb=aa694af0138b799c4de3e031d15c2a9be3112b6c;hp=3e8de0bd8386342e77a2a7020fe7b9b3d584f8d6;hpb=1251e4d2bd5ff562f337e6638db71d21696b54cc;p=xboard.git diff --git a/xboard.c b/xboard.c index 3e8de0b..a42ef8a 100644 --- a/xboard.c +++ b/xboard.c @@ -199,11 +199,10 @@ extern char *getenv(); #include "backendz.h" #include "moves.h" #include "xboard.h" +#include "xboard2.h" #include "childio.h" #include "xgamelist.h" #include "xhistory.h" -#include "xevalgraph.h" -#include "xedittags.h" #include "menus.h" #include "board.h" #include "dialogs.h" @@ -322,6 +321,19 @@ WindowPlacement wpEngineOutput; WindowPlacement wpGameList; WindowPlacement wpTags; +#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; + /* This magic number is the number of intermediate frames used in each half of the animation. For short moves it's reduced @@ -1582,18 +1594,6 @@ ReadBitmap (Pixmap *pm, String name, unsigned char bits[], u_int wreq, u_int hre } void -MarkMenuItem (char *menuRef, int state) -{ - MenuItem *item = MenuNameToItem(menuRef); - - if(item) { - Arg args[2]; - XtSetArg(args[0], XtNleftBitmap, state ? xMarkPixmap : None); - XtSetValues(item->handle, args, 1); - } -} - -void EnableNamedMenuItem (char *menuRef, int state) { MenuItem *item = MenuNameToItem(menuRef); @@ -1736,8 +1736,8 @@ ReSize (WindowPlacement *wp) } else ResizeBoardWindow(BOARD_WIDTH * (squareSize + lineGap) + lineGap, BOARD_HEIGHT * (squareSize + lineGap) + lineGap, 0); w = BOARD_WIDTH * (squareSize + lineGap) + lineGap; h = BOARD_HEIGHT * (squareSize + lineGap) + lineGap; - if(optList->max > w) optList->max = w; - if(optList->value > h) optList->value = h; + if(optList[W_BOARD].max > w) optList[W_BOARD].max = w; + if(optList[W_BOARD].value > h) optList[W_BOARD].value = h; } static XtIntervalId delayedDragID = 0;