download, progress, improved screen updates...
[oftp] / src / tgfx.h
1 #ifndef TGFX_H_
2 #define TGFX_H_
3
4 #include <stdarg.h>
5
6 enum {
7         TGFX_BLACK,
8         TGFX_BLUE,
9         TGFX_GREEN,
10         TGFX_CYAN,
11         TGFX_RED,
12         TGFX_MAGENTA,
13         TGFX_YELLOW,
14         TGFX_WHITE
15 };
16
17 /* graphics characters */
18 enum {
19         TGFX_LARROW = 256,
20         TGFX_RARROW
21 };
22
23 enum {
24         TGFX_FRAME              = 1,
25         TGFX_SHADOW             = 2
26 };
27
28 void tg_init(void);
29 void tg_cleanup(void);
30
31 void tg_redraw(void);
32
33 void tg_clear(void);
34
35 void tg_fgcolor(int col);
36 void tg_bgcolor(int col);
37 void tg_color(int col);
38 void tg_bgchar(int c);
39
40 void tg_setcursor(int x, int y);
41
42 void tg_text(int x, int y, const char *fmt, ...);
43 void tg_vtext(int x, int y, const char *fmt, va_list ap);
44
45 void tg_rect(const char *label, int x, int y, int xsz, int ysz, unsigned int flags);
46
47 int tg_gchar(int gchar);
48
49 #endif  /* TGFX_H_ */