summaryrefslogtreecommitdiff
path: root/code/fe310/eos/eve/eve_kbd.h
blob: 01bd950ab5156de246f6efc0292f05188ecc10eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdint.h>

typedef void (*eve_kbd_input_handler_t) (void *, int);

typedef struct EVEKbd {
    uint16_t w;
    uint16_t h;
    uint32_t mem_addr;
    uint16_t mem_size;
    uint8_t key_count;
    uint8_t key_down;
    uint8_t key_modifier;
    uint8_t key_modifier_sticky;
    uint8_t key_modifier_lock;
    char active;
    eve_kbd_input_handler_t putc;
} EVEKbd;

void eve_kbd_init(EVEKbd *kbd, uint32_t mem_addr, uint32_t *mem_next);
void eve_kbd_set_handler(EVEKbd *kbd, eve_kbd_input_handler_t putc);
int eve_kbd_touch(EVEKbd *kbd, uint8_t tag0, int touch_idx, void *w);
uint8_t eve_kbd_draw(EVEKbd *kbd);