2 * xgamelist.c -- Game list window, part of X front end for XBoard
4 * Copyright 1995, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
5 * ------------------------------------------------------------------------
7 * GNU XBoard is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or (at
10 * your option) any later version.
12 * GNU XBoard is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see http://www.gnu.org/licenses/. *
20 *------------------------------------------------------------------------
21 ** See the file ChangeLog for a revision history. */
28 #include <sys/types.h>
33 #else /* not STDC_HEADERS */
34 extern char *getenv();
37 # else /* not HAVE_STRING_H */
39 # endif /* not HAVE_STRING_H */
40 #endif /* not STDC_HEADERS */
51 #include "xgamelist.h"
55 char gameListTranslations[] =
56 "<Btn4Down>: WheelProc(-3) \n \
57 <Btn5Down>: WheelProc(3) \n \
58 <Btn1Down>: LoadSelectedProc(100) Set() \n \
59 <Btn1Up>(2): LoadSelectedProc(0) \n \
60 <Key>Home: LoadSelectedProc(-2) \n \
61 <Key>End: LoadSelectedProc(2) \n \
62 Ctrl<Key>Up: LoadSelectedProc(-3) \n \
63 Ctrl<Key>Down: LoadSelectedProc(3) \n \
64 <Key>Up: LoadSelectedProc(-1) \n \
65 <Key>Down: LoadSelectedProc(1) \n \
66 <Key>Left: LoadSelectedProc(-1) \n \
67 <Key>Right: LoadSelectedProc(1) \n \
68 <Key>Prior: LoadSelectedProc(-4) \n \
69 <Key>Next: LoadSelectedProc(4) \n \
70 <Key>Return: LoadSelectedProc(0) \n";
71 char filterTranslations[] =
72 "<Key>Return: SetFilterProc() \n";
77 LoadSelectedProc (Widget w, XEvent *event, String *prms, Cardinal *nprms)
79 if(GameListClicks(atoi(prms[0]))) return; // if no game loaded, no focus transfer
80 XSync(xDisplay, False);
81 XSetInputFocus(xDisplay, XtWindow(boardWidget), RevertToPointerRoot, CurrentTime);
85 SetFilterProc (Widget w, XEvent *event, String *prms, Cardinal *nprms)