forked from arjun024/mkernel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtty.h
48 lines (36 loc) · 771 Bytes
/
tty.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef _TTY_H_
#define _TTY_H_
#include "mm.h"
#define TTY_MAX_ROW 25
#define TTY_MAX_COL 80
#define TTY_MAX_CHARS (TTY_MAX_ROW * TTY_MAX_COL)
#define ROW_COL_TO_CUR(row, col) \
(row * TTY_MAX_COL + col)
typedef enum _TTY_COLOR
{
clBlack ,
clBlue ,
clGreen ,
clCyan ,
clRed ,
clMagenta ,
clBrown ,
clLightGray ,
clDarkGray ,
clLightBlue ,
clLightGreen ,
clLightCyan ,
clLightRed ,
clLightMagenta ,
clYellow ,
clWhite
}TTY_COLOR;
void tty_init(void);
void tty_setcolor(int x, int y, TTY_COLOR front, TTY_COLOR back);
TTY_COLOR tty_get_frontcolor(int x, int y);
TTY_COLOR tty_get_backcolor(int x, int Y);
void tty_putchar(int x, int y, char c);
char tty_getchar(int x, int y);
void tty_roll_one_line();
void tty_clear();
#endif