diff options
| author | KonAki <konaki@anokonaki.org> | 2026-10-08 17:19:42 +0800 |
|---|---|---|
| committer | KonAki <konaki@anokonaki.org> | 2026-10-08 17:19:42 +0800 |
| commit | f25fac99b90210cd10a77420ffa179b39be21a67 (patch) | |
| tree | 9d868c92dc4ff1d6b511a14a93ac11b77f70bf5d /kon/konwinlib.h | |
| parent | c8a5f4794d00bd0878a9ec53c29b9aef62795462 (diff) | |
Add quit command to the console
Diffstat (limited to 'kon/konwinlib.h')
| -rw-r--r-- | kon/konwinlib.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/kon/konwinlib.h b/kon/konwinlib.h index b313f93..a718147 100644 --- a/kon/konwinlib.h +++ b/kon/konwinlib.h @@ -112,6 +112,7 @@ kon_window_t *kon_createWindow(const char *title, int x, int y, int width, int h void kon_destroyWindow(kon_window_t *window); bool kon_windowShouldClose(kon_window_t *window); +void kon_setShouldClose(kon_window_t *window, bool value); void kon_setExitKey(kon_window_t *window, int key); @@ -397,6 +398,10 @@ bool kon_windowShouldClose(kon_window_t *window) { return window->shouldClose; } +void kon_setShouldClose(kon_window_t *window, bool value) { + if (window) window->shouldClose = value; +} + void kon_setExitKey(kon_window_t *window, int key) { if (!window) return; window->exitKey = key; @@ -903,6 +908,10 @@ bool kon_windowShouldClose(kon_window_t *window) { return window->shouldClose; } +void kon_setShouldClose(kon_window_t *window, bool value) { + if (window) window->shouldClose = value; +} + /* TODO: implement the rest of these */ void kon_blitPixels(kon_window_t *window, const uint32_t *pixels, int width, int height) { @@ -1252,6 +1261,10 @@ bool kon_windowShouldClose(kon_window_t *window) { return window->shouldClose; } +void kon_setShouldClose(kon_window_t *window, bool value) { + if (window) window->shouldClose = value; +} + void kon_setExitKey(kon_window_t *window, int key) { if (!window) return; |
