aboutsummaryrefslogtreecommitdiff
path: root/app/include/dxwindow.h
diff options
context:
space:
mode:
authorMarc Sunet <marc.sunet@amd.com>2025-11-21 09:41:06 -0800
committerMarc Sunet <marc.sunet@amd.com>2025-11-21 09:41:06 -0800
commit0b5491e0a2f1a9a4023e2c4eb171287bede41388 (patch)
treee82e93313f1fcfcc5622bae706aea9335dbc43ef /app/include/dxwindow.h
parentb5697421bbc73ed17ef3a8bc003571d1b6351b5c (diff)
Switch to plain C
Diffstat (limited to 'app/include/dxwindow.h')
-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*);