Files
ci2/include/ci2_window.h
2026-04-21 17:36:13 -05:00

26 lines
653 B
C

#ifndef CI2_WINDOW_H
#define CI2_WINDOW_H
#include <stdint.h>
#include <stdbool.h>
// Opaque type for a window
typedef struct CI2_Window CI2_Window;
// Initializes the platform layer (must be called before creating a window)
bool platform_init(void);
// Creates a window, returns NULL on failure
CI2_Window* platform_create_window(const char* title, int width, int height);
// Polls platform events. Returns false if the window should close
bool platform_poll_events(CI2_Window* window);
// Destroys a window
void platform_destroy_window(CI2_Window* window);
// Shuts down the platform layer
void platform_shutdown(void);
#endif // CI2_WINDOW_H