unleashed-firmware/applications/gui/gui_event.h

26 lines
491 B
C
Raw Normal View History

#pragma once
#include <stdint.h>
#include <input/input.h>
typedef enum {
2020-10-15 15:13:18 +00:00
GuiMessageTypeRedraw = 0x00,
GuiMessageTypeInput = 0x01,
} GuiMessageType;
typedef struct {
2020-10-15 15:13:18 +00:00
GuiMessageType type;
InputEvent input;
void* data;
2020-10-15 15:13:18 +00:00
} GuiMessage;
2020-10-15 15:05:28 +00:00
typedef struct GuiEvent GuiEvent;
2020-10-15 15:05:28 +00:00
GuiEvent* gui_event_alloc();
2020-10-15 15:05:28 +00:00
void gui_event_free(GuiEvent* gui_event);
2020-10-15 15:13:18 +00:00
void gui_event_messsage_send(GuiEvent* gui_event, GuiMessage* message);
2020-10-15 15:13:18 +00:00
GuiMessage gui_event_message_next(GuiEvent* gui_event);