Remove one level of indirection on ICSInputBoxPopUp
[xboard.git] / dialogs.h
1 /*
2  * dialogs.h -- shared variables for generic dialog popup of XBoard
3  *
4  * Copyright 2000, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
5  * ------------------------------------------------------------------------
6  *
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.
11  *
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.
16  *
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/.  *
19  *
20  *------------------------------------------------------------------------
21  ** See the file ChangeLog for a revision history.  */
22
23 typedef enum {
24 TransientDlg=0, CommentDlg, TagsDlg, TextMenuDlg, InputBoxDlg, ErrorDlg, BrowserDlg, HistoryDlg, NrOfDialogs
25 } DialogClass;
26
27 typedef void ButtonCallback(int n);
28 typedef int OKCallback(int n);
29
30 extern char commentTranslations[];
31 extern char historyTranslations[];
32 extern Pixel timerBackgroundPixel;
33 extern int values[];
34 extern ChessProgramState *currentCps;
35 extern int dialogError;
36 extern ButtonCallback *comboCallback;
37
38 extern WindowPlacement wpComment, wpTags, wpMoveHistory;
39 extern char *marked[];
40 extern Boolean shellUp[];
41 extern Option textOptions[], boxOptions[];
42
43
44 int DialogExists P((DialogClass n));
45 int GenericPopUp P((Option *option, char *title, DialogClass dlgNr));
46 int GenericReadout P((Option *currentOption, int selected));
47 int PopDown P((DialogClass n));
48 int AppendText P((Option *opt, char *s));
49 void SetColor P((char *colorName, Option *box));
50 void ColorChanged P((Widget w, XtPointer data, XEvent *event, Boolean *b));
51 void SetInsertPos P((Option *opt, int pos));
52 void HardSetFocus P((Option *opt));
53 void GetWidgetText  P((Option *opt, char **buf));
54 void SetWidgetText  P((Option *opt, char *buf, int n));
55 void GetWidgetState  P((Option *opt, int *state));
56 void SetWidgetState  P((Option *opt, int state));
57 void SetDialogTitle  P((DialogClass dlg, char *title));
58 void AddHandler  P((Option *opt, int nr));
59 void SendText P((int n));
60
61 void InitDrawingParams P(()); // in xboard.c
62 void ErrorPopUp P((char *title, char *text, int modal));
63
64 void BoxAutoPopUp P((char *buf));
65 void IcsKey P((int n));
66 void ICSInputBoxPopUp P((void));
67
68