aboutsummaryrefslogtreecommitdiff
path: root/app/include
diff options
context:
space:
mode:
Diffstat (limited to 'app/include')
-rw-r--r--app/include/dxwindow.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/app/include/dxwindow.h b/app/include/dxwindow.h
new file mode 100644
index 0000000..7e5a373
--- /dev/null
+++ b/app/include/dxwindow.h
@@ -0,0 +1,28 @@
1#pragma once
2
3#include <WinDef.h> // HWND
4
5#include <stdbool.h>
6
7typedef struct Window Window;
8
9/// Initialise the window subsystem.
10///
11/// This function must be called at the start of your application before any
12/// Windows are created.
13bool window_global_init();
14
15/// Terminate the window subsystem.
16///
17/// This function should be called at the end of your application. Any existing
18/// Windows are destroyed and are invalid beyond this call.
19void window_global_quit();
20
21/// Return the last Window error.
22const char* window_get_error();
23
24Window* window_init(int width, int height, const char* title);
25void window_destroy(Window**);
26HWND window_handle(Window*);
27void window_update(Window*);
28bool window_should_close(const Window*);