diff options
Diffstat (limited to 'src/keyboard.h')
| -rw-r--r-- | src/keyboard.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/keyboard.h b/src/keyboard.h index 439e60d..1a437fc 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -13,16 +13,23 @@ struct key { uint8_t mod; }; -struct keyboard {}; +struct keyboard { + uint32_t reactor_event_id; + bool has_data; +}; struct keyboard_update { struct key keys[32]; uint32_t nkeys; }; -struct keyboard keyboard_create(); +struct reactor; + +struct keyboard keyboard_create(struct reactor *reactor); + +struct keyboard_update keyboard_begin_frame(struct keyboard *kbd, + struct reactor *reactor); -struct keyboard_update keyboard_begin_frame(struct keyboard *kbd); void keyboard_end_frame(struct keyboard *kbd); bool key_equal(struct key *key, uint8_t mod, uint8_t c); |
