X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=kern%2Fsrc%2Fdisp.h;fp=kern%2Fsrc%2Fdisp.h;h=48a4d0a272040743f0dda92933917314aeb7a889;hb=88e57cf7f2581900eb31cb835a18ad414e37786c;hp=0000000000000000000000000000000000000000;hpb=5145ed1e2adefc9c66e20681532a3a7cd6c2de01;p=eightysix diff --git a/kern/src/disp.h b/kern/src/disp.h new file mode 100644 index 0000000..48a4d0a --- /dev/null +++ b/kern/src/disp.h @@ -0,0 +1,31 @@ +#ifndef DISP_H_ +#define DISP_H_ + +#include +#include "con.h" + +enum { + BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LTGREY, + GREY, LTBLUE, LTGREEN, LTCYAN, LTRED, LTMAGENTA, YELLOW, WHITE +}; + +enum { DISP_UNK, DISP_MDA, DISP_CGA, DISP_EGA, DISP_PGA, DISP_MCGA, DISP_VGA }; + +#define DISP_ATTR(fg, bg) (((uint8_t)(bg) << 4) | ((uint8_t)(fg))) + +extern struct console con_disp; +int disp_type; + +void init_disp(void); + +void clear_disp(void); +void scroll_disp(int line); + +void set_cursor(int x, int y); +void set_fgcolor(int color); +void set_bgcolor(int color); + +void draw_glyph(int x, int y, int c, int attr); +void draw_text(int x, int y, const char *s, int attr); + +#endif /* DISP_H_ */