1 
2 #ifndef __FE_NCURSES_H
3 #define __FE_NCURSES_H
4 
5 #include "pfqmessage.h"
6 
7 #include <ncurses.h>
8 
9 #define MSG_MAX_ROWS	500
10 #define MSG_MAX_COLS	80
11 
12 WINDOW *mainwnd;
13 WINDOW *lwnd;
14 WINDOW *mwnd, *mwndb;
15 WINDOW *bwnd, *bwndb;
16 WINDOW *hwnd;
17 int    bwnd_height;
18 
19 char *bline;
20 
21 int CURROW;	// Current screen row
22 int CURMSG;	// Current message
23 int PREVROW;	// Previous row (before change of CURROW)
24 int PREVMSG;	// Previous message
25 int FIRSTMSG;	// First msg shown in the list
26 int FIRSTROW;	// First row for the list
27 int MAXROW;	// Last row for the list
28 int COL1, COL2; // From/To columns for queue list
29 
30 int goto_msg(int);
31 int goto_next();
32 int goto_prev();
33 int goto_first();
34 int goto_last();
35 int goto_nextpage();
36 int goto_prevpage();
37 
38 extern int CURMSG;
39 
40 #define CP_HEAD		2
41 #define CP_MSG		3
42 #define CP_TAG		4
43 #define CP_DIALOG	5
44 #define CP_OPTDIS	6
45 #define CP_OPTENA	7
46 
47 struct msg_list_t {
48 	char id[20];
49 };
50 
51 // Interface
52 int 		fe_init();
53 void		fe_close();
54 const char* 	fe_current_id();
55 
56 void		msg_show_body();
57 
58 #endif
59