forked from lolo859/vystem
Vystem 0.2
This commit is contained in:
19
shelter/lib/include/std/queue.h
Normal file
19
shelter/lib/include/std/queue.h
Normal file
@@ -0,0 +1,19 @@
|
||||
// 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
|
||||
Reference in New Issue
Block a user