From 0b5491e0a2f1a9a4023e2c4eb171287bede41388 Mon Sep 17 00:00:00 2001 From: Marc Sunet Date: Fri, 21 Nov 2025 09:41:06 -0800 Subject: Switch to plain C --- app/include/dxwindow.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 app/include/dxwindow.h (limited to 'app/include') 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 @@ +#pragma once + +#include // HWND + +#include + +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(); + +Window* window_init(int width, int height, const char* title); +void window_destroy(Window**); +HWND window_handle(Window*); +void window_update(Window*); +bool window_should_close(const Window*); -- cgit v1.2.3