Makefile: add .c files as prerequisites where needed
[glg-os.git] / terminal.h
blob51d269b7c375a68e5ca92d3f8a672865fdfdd847
1 /* terminal.h
3 * module for graphical output on the terminal
4 *********************************************/
6 #ifndef __TERMINAL_H__
7 #define __TERMINAL_H__
9 /* Hardware text mode color constants. */
10 typedef enum {
11 COLOR_BLACK = 0,
12 COLOR_BLUE = 1,
13 COLOR_GREEN = 2,
14 COLOR_CYAN = 3,
15 COLOR_RED = 4,
16 COLOR_MAGENTA = 5,
17 COLOR_BROWN = 6,
18 COLOR_LIGHT_GREY = 7,
19 COLOR_DARK_GREY = 8,
20 COLOR_LIGHT_BLUE = 9,
21 COLOR_LIGHT_GREEN = 10,
22 COLOR_LIGHT_CYAN = 11,
23 COLOR_LIGHT_RED = 12,
24 COLOR_LIGHT_MAGENTA = 13,
25 COLOR_LIGHT_BROWN = 14,
26 COLOR_WHITE = 15,
27 } VGAColor;
29 /* clear the terminal */
30 void term_clear(void);
32 /* initialize terminal to default values and draw all entries */
33 void term_init(size_t max_width, size_t max_height, uint8_t fg, uint8_t bg);
35 /* draw char using current term settings, and update cursor position */
36 void term_putChar(char c);
38 /* draw string using current term settings, and update cursor position */
39 void term_putStr(const char *str);
41 /* set terminal color */
42 void term_setcolor(uint8_t fg, uint8_t bg);
44 #endif