// SPDX-License-Identifier: MPL-2.0
#ifndef SH_LIB_QUEUE_H
#define SH_LIB_QUEUE_H
#include "std/type.h"
#include "std/status.h"
#include "devs/input/event.h"
// Keyboard events queue structure
typedef struct {
  sh_kbd_EVENT *buffer;
  sh_uint32 capacity;
  sh_uint32 write_index;
} sh_queue_KBD_EVENT;
// Initialize an event queue
SH_STATUS sh_queue_event_init(sh_queue_KBD_EVENT *q,sh_uint32 capacity);
// Push a keyboard event to the provided queue
SH_STATUS sh_queue_event_push(sh_queue_KBD_EVENT *q,sh_kbd_EVENT ev);
// Destroy the provided keyboard event queue
SH_STATUS sh_queue_event_destroy(sh_queue_KBD_EVENT *q);
#endif
