53 lines
1.0 KiB
C
53 lines
1.0 KiB
C
#ifndef OS_CORE_H
|
|
#define OS_CORE_H
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
//~
|
|
|
|
#include "os/generated/os_core.meta.h"
|
|
|
|
typedef struct OS_Handle OS_Handle;
|
|
struct OS_Handle
|
|
{
|
|
U64 handle[1];
|
|
};
|
|
|
|
typedef enum OS_EventKind
|
|
{
|
|
OS_EventKind_Null,
|
|
OS_EventKind_Press,
|
|
OS_EventKind_Release,
|
|
OS_EventKind_MouseMove,
|
|
OS_EventKind_COUNT
|
|
}
|
|
OS_EventKind;
|
|
|
|
typedef struct OS_Event OS_Event;
|
|
struct OS_Event
|
|
{
|
|
OS_Event *next;
|
|
OS_Event *prev;
|
|
OS_Handle window;
|
|
OS_EventKind kind;
|
|
OS_Key key;
|
|
};
|
|
|
|
|
|
typedef struct OS_EventList OS_EventList;
|
|
struct OS_EventList
|
|
{
|
|
U64 count;
|
|
OS_Event *first;
|
|
OS_Event *last;
|
|
};
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
//~
|
|
|
|
// OS memory
|
|
internal void *os_reserve(U64 size);
|
|
internal B32 os_commit(void *ptr, U64 size);
|
|
internal void os_decommit(void *ptr, U64 size);
|
|
internal void os_release(void *ptr, U64 size);
|
|
|
|
#endif /* OS_CORE_H */ |