blob: 14caa362d3eebb9d2661fa8cf41371259c93ad77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#pragma once
#include <WinDef.h> // HWND
#include <stdbool.h>
typedef struct Window Window;
/// Initialise the window subsystem.
///
/// This function must be called at the start of your application before any
/// Windows are created.
bool window_global_init();
/// Terminate the window subsystem.
///
/// This function should be called at the end of your application. Any existing
/// Windows are destroyed and are invalid beyond this call.
void window_global_quit();
/// Return the last Window error.
const char* window_get_error();
/// Initialize the window.
Window* window_init(int width, int height, const char* title);
/// Destroy the window.
void window_destroy(Window**);
/// Return the Windows handle.
HWND window_handle(Window*);
/// Update the window, poll for events.
void window_update(Window*);
/// Return whether the user has requested that the window should be closed.
bool window_should_close(const Window*);
|