no shared lib under Cygwin
[fw/sdcc] / sim / ucsim / gui.src / serio.src / frontend.hh
1 /******************************************************************************
2  * to emulate the serial input and output of an 8051 controller               *
3  * frontend.hh - ncurses frontend                                             *
4  ******************************************************************************/
5 #include <sys/types.h>
6 #include <curses.h>
7 #include "config.h"
8
9 struct COORDS_S
10 {
11         int min_x;
12         int max_x;
13         int min_y;
14         int max_y;
15 };
16 typedef struct COORDS_S COORDS;
17
18 struct COORDINATES_S
19 {
20         int x;
21         int y;
22 };
23 typedef struct COORDINATES_S COORDINATES;
24
25
26 class Viewer
27 {
28         public:
29                 Viewer();
30                 ~Viewer();
31                 void DrawBox(void);
32                 void AddStrOutWin(char *string);
33                 void GetStrInWin(char *string);
34                 void AddChOutWin(char b);
35                 char GetChInWin(void);
36
37         private:
38                 WINDOW *inp, *outp;
39                 COORDS win_c, inp_c, outp_c;
40                 COORDINATES topleft, bottomright, current;
41                 int middle_y, middle_x;
42 };