diff options
Diffstat (limited to 'app/include')
| -rw-r--r-- | app/include/dxwindow.h | 28 |
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 | |||
| 7 | typedef 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. | ||
| 13 | bool 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. | ||
| 19 | void window_global_quit(); | ||
| 20 | |||
| 21 | /// Return the last Window error. | ||
| 22 | const char* window_get_error(); | ||
| 23 | |||
| 24 | Window* window_init(int width, int height, const char* title); | ||
| 25 | void window_destroy(Window**); | ||
| 26 | HWND window_handle(Window*); | ||
| 27 | void window_update(Window*); | ||
| 28 | bool window_should_close(const Window*); | ||
