summaryrefslogtreecommitdiff
path: root/src/kernel/dev/display.h
blob: 963b5e60ce7fa372dffedcfacb41e548b3037c6c (plain) (blame)
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
#ifndef DEF_DEV_DISPLAY_H
#define DEF_DEV_DISPLAY_H

#include <vfs/node.h>

#define TC_BLACK 0
#define TC_BLUE 1
#define TC_GREEN 2
#define TC_TURQUOISE 3
#define TC_RED 4
#define TC_PURPLE 5
#define TC_BROWN 6
#define TC_LIGHTGRAY 7
#define TC_MAKE_LIGHT 8
#define TC_MAKE_DARK (~8)
#define TC_WHITE 15

class vt;
class display : public node {

	public:
	vt *connected_vt;

	display(node* parent) : node(parent, FT_DEV) {
		connected_vt = 0;
	}
	virtual ~display() {}
	virtual display* as_display() { return this; }

	virtual int text_w() = 0;
	virtual int text_h() = 0;
	virtual void text_setcsr(int l, int c, bool visible) = 0;
	virtual void text_put(int l, int c, int ch, uint8_t fgcolor, uint8_t bgcolor) = 0;
	virtual void text_scroll(int n, uint8_t fgcolor, uint8_t bgcolor) = 0;
};

#endif