15 |
|
int (*getcur)(); /* get cursor position */ |
16 |
|
int (*comout)(); /* command line output */ |
17 |
|
int (*comin)(); /* command line input */ |
18 |
+ |
int (*flush)(); /* flush output */ |
19 |
|
double pixaspect; /* pixel aspect ratio */ |
20 |
|
int xsiz, ysiz; /* device size */ |
21 |
|
int inpready; /* input ready on device */ |
34 |
|
#define COM_GETCUR 2 |
35 |
|
#define COM_COMOUT 3 |
36 |
|
#define COM_COMIN 4 |
37 |
< |
#define NREQUESTS 5 /* number of valid requests */ |
37 |
> |
#define COM_FLUSH 5 |
38 |
> |
#define NREQUESTS 6 /* number of valid requests */ |
39 |
|
|
40 |
|
extern struct device { /* interactive device */ |
41 |
|
char *name; /* device name */ |
43 |
|
struct driver *(*init)(); /* initialize device */ |
44 |
|
} devtable[]; /* supported devices */ |
45 |
|
|
46 |
+ |
extern char dev_default[]; /* default device name */ |
47 |
+ |
|
48 |
|
#define MB1 ('\n') /* mouse button 1 */ |
49 |
|
#define MB2 ('\r') /* mouse button 2 */ |
50 |
|
#define MB3 (' ') /* mouse button 3 */ |
79 |
|
* int xmin, ymin, xmax, ymax; |
80 |
|
* { |
81 |
|
* Paint a half-open rectangle from (xmin,ymin) to (xmax,ymax) |
82 |
< |
* with the color col. Can call repaint() if necessary. |
82 |
> |
* with the color col. |
83 |
|
* } |
84 |
|
* (*dev->getcur)(xp, yp) |
85 |
|
* int *xp, *yp; |
103 |
|
* assuming the in buffer is big enough. Unless prompt is NULL, |
104 |
|
* the driver may substitute its own rview command. This is |
105 |
|
* the most reliable way to repaint areas of the screen. |
106 |
< |
* If the user enters an unrecognized control character is entered, |
106 |
> |
* If the user enters an unrecognized control character, |
107 |
|
* terminate input and return the string with only that character. |
108 |
|
* The input string should not contain a newline. The routines in |
109 |
|
* editline.c may be useful. Comin must work in consort with comout. |
110 |
+ |
* } |
111 |
+ |
* (*dev->flush)() |
112 |
+ |
* { |
113 |
+ |
* Flush output to the display. This is guaranteed to be called |
114 |
+ |
* frequently enough to keep the display up to date. |
115 |
+ |
* This is an ideal time to check for device input. |
116 |
+ |
* This function can be NULL for devices that don't need it. |
117 |
|
* } |
118 |
|
* xsiz, ysiz |
119 |
|
* The maximum allowable x and y dimensions. If any |