Some compile fixes, not enough
[erwise] / Ui / Ui.h
1 /* $Id: Ui.h,v 1.3 1992/04/28 00:34:53 kny Exp kny $ */
2
3
4 #define UI_OK       0
5 #define UI_ERROR    1
6 #define UI_NOTFOUND 2
7
8 #define UI_NONE  0
9 #define UI_SHIFT 1
10 #define UI_CTRL  4
11
12
13 /*
14  * Config defines
15  */
16 #define C_GLOBALSETTINGS  "GlobalSettings"
17
18 #define C_TOPMARGIN      "topmargin"
19 #define C_BOTTOMMARGIN   "bottommargin"
20 #define C_LEFTMARGIN     "leftmargin"
21 #define C_RIGHTMARGIN    "rightmargin"
22 #define C_WIDTH          "width"
23 #define C_HEIGHT         "height"
24 #define C_ONEPAGEMODE     "onepagemode"
25 #define C_FIXEDWIDTHMODE  "fixedwidthmode"
26 #define C_FIXEDWIDTH      "fixedwidth"
27 #define C_DOUBLECLICKTIME "doubleclicktime"
28
29 #define C_SEARCH          "search"
30 #define C_CONTROLPANEL    "controlpanel"
31 #define C_LIST            "list"
32 #define C_RECALL          "recall"
33 #define C_PAGESETTINGS    "pagesettings"
34
35 #define C_DEFAULTS        "Defaults"
36 #define C_DEFAULTSTABLE   "defaultstable"
37
38
39 typedef enum {
40     uiVTint,
41     uiVTdouble,
42     uiVTstring
43 } uiVarType_t;
44
45
46 extern int UiInitialize(int argc, char *argv[],
47                          void *(*configpf) (void *table, char *item),
48                          void *(*configsetpf) (void *table, char *item,
49                                                 void *value));
50 extern void UiMainLoop(void);
51
52 extern int UiDisplaySelectionBox(void (*callback) (char *filename));
53
54 extern int UiDisplayPage(char *address, HText_t * prevhtext, HText_t * htext,
55                           HTextObject_t * htextobject, char *title);
56 extern int UiDeletePage(char *address, HText_t * htext);
57 extern int UiSetCursor(char *address, HText_t * htext,
58                         HTextObject_t * htextobject);
59
60 extern int UiDisplaySearchDialog(int type);
61
62 extern int UiDisplayPageSettingsDialog(int type);
63
64 extern int UiDisplayListDialog(char **listitems, char **addresses, int nitems,
65                                 void (*callback) (char *topaddress,
66                                                    char *address,
67                                                    char *parentaddress));
68
69 extern int UiDisplayRecallDialog(char **listitems, int nitems,
70                                   void (*callback) (char *topaddress,
71                                                      char *address,
72                                                    char *parentaddress));
73
74 extern int UiAttachCallback(char *actionname,
75                              void (*callback) (char *address,
76                                                 HText_t * htext,
77                                              HTextObject_t * htextobject,
78                                                 void *parameter),
79                              void *parameter);
80 extern int UiBindKey(char *keyname, int modifier,
81                       void (*callback) (char *address,
82                                          HText_t * htext,
83                                          HTextObject_t * htextobject,
84                                          void *parameter),
85                       void *parameter);
86 extern int UiBindVariable(char *varname, void *variable, uiVarType_t type);
87 extern int UiUpdateVariable(char *varname);
88 extern void UiGetNextAction(void (*helponactioncb) (char *actionstring));
89 extern int UiAddTimeOut(int timeout, void (*callback) (void *data),
90                          void *data);
91 extern void UiDeleteTimeOut(int timoutid);
92 extern int UiAddInputFD(int fd, void (*callback) (void *data), void *data);
93 extern void UiDeleteInputFD(int inputid);
94 extern void UiAddStringToCutBuffer(char *data);
95 void UiDisplayPopup(void (*callback) (char *address, char *topaddress,
96                                        char *parentaddress),
97                      char *topaddress, char **items, int nitems);
98
99 extern void UiShowInfo(void);
100
101 extern int UiDisplayControlPanel(void);
102
103 extern int UiDisplayFileSelection(void (*callback) (char *topaddress,
104                                                      HText_t * htext,
105                                              HTextObject_t * htextobject,
106                                                      void *parameter));