summaryrefslogtreecommitdiff
path: root/code/fe310/eos/eve/screen/screen.c
blob: c65e8fc8abb9d77be17c4fc1112e3eb279f006f1 (plain)
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
#include <stdlib.h>
#include <string.h>

#include "eve.h"
#include "eve_kbd.h"

#include "screen.h"
#include "tile.h"

int eve_screen_init(EVEScreen *screen, uint16_t w, uint16_t h) {
    memset(screen, 0, sizeof(EVEScreen));
    screen->w = w;
    screen->h = h;
}

void eve_screen_set_kbd(EVEScreen *screen, EVEKbd *kbd) {
    screen->kbd = kbd;
}

EVEKbd *eve_screen_get_kbd(EVEScreen *screen) {
    return screen->kbd;
}

void eve_screen_show_kbd(EVEScreen *screen) {
    screen->kbd_active = 1;
}

void eve_screen_hide_kbd(EVEScreen *screen) {
    screen->kbd_active = 0;
}

void eve_screen_add_tile(EVEScreen *screen, EVETile *tile) {
    if (screen->tile_size < EVE_MAX_TILES) {
        screen->tile[screen->tile_size] = tile;
        screen->tile_size++;
    }
}

void eve_screen_handle_touch(EVEScreen *screen, uint8_t tag0, int touch_idx) {
    eve_touch_clear_opt();
}