card-os/include/user/card-os.h
2026-05-26 07:38:31 -04:00

38 lines
538 B
C

#ifndef CARD_OS_USER
#define CARD_OS_USER
#include <stdint.h>
typedef enum
{
OS_CMD_SBRK,
OS_CMD_DRAW_RECT,
OS_CMD_GET_BUTTON
} os_command;
typedef struct
{
os_command command;
void* data;
} os_message;
typedef void (*os_call_fn)(os_message*);
typedef struct
{
uint8_t r, g, b;
uint16_t x, y, w, h;
} card_os_rect;
typedef enum
{
OS_BUTTON_LEFT,
OS_BUTTON_MIDDLE,
OS_BUTTON_RIGHT
} card_os_button;
void card_os_put_rect(card_os_rect rect);
int card_os_get_button(card_os_button button);
#endif // CARD_OS_USER