1 typedef struct Cursor Cursor;
2 typedef struct Cursorinfo Cursorinfo;
9 extern void mousetrack(int, int, int, int);
10 extern void absmousetrack(int, int, int, int);
11 extern Point mousexy(void);
13 extern void mouseaccelerate(int);
14 extern int m3mouseputc(Queue*, int);
15 extern int m5mouseputc(Queue*, int);
16 extern int mouseputc(Queue*, int);
18 extern Cursorinfo cursor;
22 * Generic VGA registers.
25 MiscW = 0x03C2, /* Miscellaneous Output (W) */
26 MiscR = 0x03CC, /* Miscellaneous Output (R) */
27 Status0 = 0x03C2, /* Input status 0 (R) */
28 Status1 = 0x03DA, /* Input Status 1 (R) */
29 FeatureR = 0x03CA, /* Feature Control (R) */
30 FeatureW = 0x03DA, /* Feature Control (W) */
32 Seqx = 0x03C4, /* Sequencer Index, Data at Seqx+1 */
33 Crtx = 0x03D4, /* CRT Controller Index, Data at Crtx+1 */
34 Grx = 0x03CE, /* Graphics Controller Index, Data at Grx+1 */
35 Attrx = 0x03C0, /* Attribute Controller Index and Data */
37 PaddrW = 0x03C8, /* Palette Address Register, write */
38 Pdata = 0x03C9, /* Palette Data Register */
39 Pixmask = 0x03C6, /* Pixel Mask Register */
40 PaddrR = 0x03C7, /* Palette Address Register, read */
41 Pstatus = 0x03C7, /* DAC Status (RO) */
43 Pcolours = 256, /* Palette */
61 #define VGAMEM() 0xA0000
62 #define vgai(port) inb(port)
63 #define vgao(port, data) outb(port, data)
65 extern int vgaxi(long, uchar);
66 extern int vgaxo(long, uchar, uchar);
70 typedef struct VGAdev VGAdev;
71 typedef struct VGAcur VGAcur;
72 typedef struct VGAscr VGAscr;
77 void (*enable)(VGAscr*);
78 void (*disable)(VGAscr*);
79 void (*page)(VGAscr*, int);
80 void (*linear)(VGAscr*, int, int);
81 void (*drawinit)(VGAscr*);
82 int (*fill)(VGAscr*, Rectangle, ulong);
83 void (*ovlctl)(VGAscr*, Chan*, void*, int);
84 int (*ovlwrite)(VGAscr*, void*, int, vlong);
85 void (*flush)(VGAscr*, Rectangle);
86 void (*scaling)(VGAscr*, int);
92 void (*enable)(VGAscr*);
93 void (*disable)(VGAscr*);
94 void (*load)(VGAscr*, Cursor*);
95 int (*move)(VGAscr*, Point);
113 ulong paddr; /* frame buffer */
117 ulong io; /* device specific registers */
120 ulong colormap[Pcolours][3];
124 Memdata* gscreendata;
125 Memsubfont* memdefont;
127 int (*fill)(VGAscr*, Rectangle, ulong);
128 int (*scroll)(VGAscr*, Rectangle, Rectangle);
129 void (*blank)(VGAscr*, int);
130 ulong id; /* internal identifier for driver use */
136 extern VGAscr vgascreen[];
139 Backgnd = 0, /* black */
143 extern void mousectl(Cmdbuf*);
144 extern void mouseresize(void);
145 extern void mouseredraw(void);
148 extern int hwaccel; /* use hw acceleration; default on */
149 extern int hwblank; /* use hw blanking; default on */
150 extern int panning; /* use virtual screen panning; default off */
151 extern void addvgaseg(char*, ulong, ulong);
152 extern uchar* attachscreen(Rectangle*, ulong*, int*, int*, int*);
153 extern void flushmemscreen(Rectangle);
154 extern void cursoron(void);
155 extern void cursoroff(void);
156 extern void setcursor(Cursor*);
157 extern int screensize(int, int, int, ulong);
158 extern int screenaperture(int, int);
159 extern Rectangle physgscreenr; /* actual monitor size */
160 extern void blankscreen(int);
162 extern VGAcur swcursor;
163 extern void swcursorinit(void);
164 extern void swcursorhide(void);
165 extern void swcursoravoid(Rectangle);
166 extern void swcursorunhide(void);
169 extern void deletescreenimage(void);
170 extern void resetscreenimage(void);
171 extern int drawhasclients(void);
172 extern ulong blanktime;
173 extern void setscreenimageclipr(Rectangle);
174 extern void drawflush(void);
175 extern int drawidletime(void);
176 extern QLock drawlock;
179 extern void vgascreenwin(VGAscr*);
180 extern void vgaimageinit(ulong);
181 extern void vgalinearpci(VGAscr*);
182 extern void vgalinearaddr(VGAscr*, ulong, int);
184 extern void drawblankscreen(int);
185 extern void vgablank(VGAscr*, int);
187 extern Lock vgascreenlock;
189 #define ishwimage(i) (vgascreen[0].gscreendata && (i)->data->bdata == vgascreen[0].gscreendata->bdata)
192 void swcursorhide(void);
193 void swcursoravoid(Rectangle);
194 void swcursordraw(Point);
195 void swcursorload(Cursor *);
196 void swcursorinit(void);