diff options
Diffstat (limited to 'fw/fe310/eos/eve/eve_kbd.h')
-rw-r--r-- | fw/fe310/eos/eve/eve_kbd.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/fw/fe310/eos/eve/eve_kbd.h b/fw/fe310/eos/eve/eve_kbd.h new file mode 100644 index 0000000..b4f9874 --- /dev/null +++ b/fw/fe310/eos/eve/eve_kbd.h @@ -0,0 +1,23 @@ +#include <stdint.h> + +typedef void (*eve_kbd_input_handler_t) (void *, int); + +typedef struct EVEKbd { + EVERect g; + 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; + void *param; +} EVEKbd; + +void eve_kbd_init(EVEKbd *kbd, EVERect *g, uint32_t mem_addr, uint32_t *mem_next); +void eve_kbd_close(EVEKbd *kbd); +void eve_kbd_set_handler(EVEKbd *kbd, eve_kbd_input_handler_t putc, void *param); +int eve_kbd_touch(EVEKbd *kbd, EVETouch *touch, uint16_t evt, uint8_t tag0); +uint8_t eve_kbd_draw(EVEKbd *kbd); |