diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-12 00:09:38 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-12 00:09:38 +0300 |
| commit | 624d1371304a5ae4b3429ad5e4267aac7cd03dfd (patch) | |
| tree | 32de069f6eec83686521fc4bf39cc9874b123e93 /src/common/input.h | |
| parent | e813252e685d761235ad45e170d97c9375f51958 (diff) | |
missing impls and hardening
Diffstat (limited to 'src/common/input.h')
| -rw-r--r-- | src/common/input.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/common/input.h b/src/common/input.h new file mode 100644 index 0000000..d7264f6 --- /dev/null +++ b/src/common/input.h @@ -0,0 +1,19 @@ +#ifndef YASL_INPUT_H +#define YASL_INPUT_H + +#include "yasl/yasl.h" + +/* Each queued string and the last successfully polled string are owned here. */ +struct input_queue { + struct yasl_input_event *events; + size_t head, count, capacity; + char *last_text; + struct yasl_surface *reset_surface; + bool reset_pending; +}; + +bool input_queue_push(struct input_queue *q, const struct yasl_input_event *ev); +bool input_queue_pop(struct input_queue *q, struct yasl_input_event *ev); +void input_queue_clear(struct input_queue *q); + +#endif |
