From 624d1371304a5ae4b3429ad5e4267aac7cd03dfd Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Mon, 12 Oct 2026 00:09:38 +0300 Subject: missing impls and hardening --- src/common/input.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/common/input.h (limited to 'src/common/input.h') 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 -- cgit v1.2.3