2 * 'textual user interface'
4 * $Id: tui.h,v 1.11 2008/07/14 12:35:23 wmcbrine Exp $
6 * Author : P.J. Kunst <kunst@prl.philips.nl>
16 #define A_ATTR (A_ATTRIBUTES ^ A_COLOR) /* A_BLINK, A_REVERSE, A_BOLD */
18 #define A_ATTR (A_ATTRIBUTES) /* standard UNIX attributes */
22 #define KEY_ESC 0x1b /* Escape */
24 typedef void (*FUNC
)(void);
28 char *name
; /* item label */
29 FUNC func
; /* (pointer to) function */
30 char *desc
; /* function description */
33 /* ANSI C function prototypes: */
37 WINDOW
*bodywin(void);
42 void titlemsg(char *msg
);
43 void bodymsg(char *msg
);
44 void errormsg(char *msg
);
45 void statusmsg(char *msg
);
47 bool keypressed(void);
52 void startmenu(menu
*mp
, char *title
);
53 void domenu(menu
*mp
);
55 int weditstr(WINDOW
*win
, char *buf
, int field
);
56 WINDOW
*winputbox(WINDOW
*win
, int nlines
, int ncols
);
57 int getstrings(char *desc
[], char *buf
[], int field
);
59 #define editstr(s,f) (weditstr(stdscr,s,f))
60 #define mveditstr(y,x,s,f) (move(y,x)==ERR?ERR:editstr(s,f))
61 #define mvweditstr(w,y,x,s,f) (wmove(w,y,x)==ERR?ERR:weditstr(w,s,f))
63 #define inputbox(l,c) (winputbox(stdscr,l,c))
64 #define mvinputbox(y,x,l,c) (move(y,x)==ERR?w:inputbox(l,c))
65 #define mvwinputbox(w,y,x,l,c) (wmove(w,y,x)==ERR?w:winputbox(w,l,c))