Files
platform/include/platform.h
2026-03-07 12:08:32 -06:00

25 lines
666 B
C

#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