Initial commit
This commit is contained in:
25
include/platform.h
Normal file
25
include/platform.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef PLATFORM_H
|
||||
#define PLATFORM_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
// Opaque type for a window
|
||||
typedef struct PlatformWindow PlatformWindow;
|
||||
|
||||
// Initializes the platform layer (must be called before creating a window)
|
||||
bool platform_init(void);
|
||||
|
||||
// Creates a window, returns NULL on failure
|
||||
PlatformWindow* platform_create_window(const char* title, int width, int height);
|
||||
|
||||
// Polls platform events. Returns false if the window should close
|
||||
bool platform_poll_events(PlatformWindow* window);
|
||||
|
||||
// Destroys a window
|
||||
void platform_destroy_window(PlatformWindow* window);
|
||||
|
||||
// Shuts down the platform layer
|
||||
void platform_shutdown(void);
|
||||
|
||||
#endif // PLATFORM_H
|
||||
Reference in New Issue
Block a user