projects
/
oftp
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
input events and empty UNIX functions
[oftp]
/
src
/
main.c
1
#include "tgfx.h"
2
#include "input.h"
3
4
int main(void)
5
{
6
union event ev;
7
8
init_input();
9
10
tg_bgchar(' ');
11
tg_clear();
12
13
tg_bgcolor(1);
14
tg_rect("Remote", 0, 0, 40, 23, TGFX_FRAME);
15
tg_rect("Local", 40, 0, 40, 23, TGFX_FRAME);
16
17
tg_fgcolor(7);
18
tg_text(0, 24, "fooolalala bar");
19
/* tg_setcursor(2, 24);*/
20
21
while(wait_input(&ev)) {
22
switch(ev.type) {
23
case EV_KEY:
24
if(ev.key.key == 27) goto done;
25
break;
26
27
default:
28
break;
29
}
30
}
31
32
done:
33
tg_bgchar(' ');
34
tg_bgcolor(0);
35
tg_fgcolor(7);
36
tg_clear();
37
38
cleanup_input();
39
return 0;
40
}