48a4d0a272040743f0dda92933917314aeb7a889
[eightysix] / kern / src / disp.h
1 #ifndef DISP_H_
2 #define DISP_H_
3
4 #include <inttypes.h>
5 #include "con.h"
6
7 enum {
8         BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LTGREY,
9         GREY, LTBLUE, LTGREEN, LTCYAN, LTRED, LTMAGENTA, YELLOW, WHITE
10 };
11
12 enum { DISP_UNK, DISP_MDA, DISP_CGA, DISP_EGA, DISP_PGA, DISP_MCGA, DISP_VGA };
13
14 #define DISP_ATTR(fg, bg)       (((uint8_t)(bg) << 4) | ((uint8_t)(fg)))
15
16 extern struct console con_disp;
17 int disp_type;
18
19 void init_disp(void);
20
21 void clear_disp(void);
22 void scroll_disp(int line);
23
24 void set_cursor(int x, int y);
25 void set_fgcolor(int color);
26 void set_bgcolor(int color);
27
28 void draw_glyph(int x, int y, int c, int attr);
29 void draw_text(int x, int y, const char *s, int attr);
30
31 #endif  /* DISP_H_ */