aboutsummaryrefslogtreecommitdiff
path: root/vendor/hare-sdl2/sdl2/sdl2.ha
diff options
context:
space:
mode:
authorPolesznyák Márk <contact@pml68.dev>2026-04-06 23:44:45 +0200
committerPolesznyák Márk <contact@pml68.dev>2026-04-06 23:44:45 +0200
commit6637fdded6f3c5fba7e7a378ca7e30d0db11f27d (patch)
tree40f8868ae2140680645b1f90f4a1fc2a378920b3 /vendor/hare-sdl2/sdl2/sdl2.ha
parentdocs: add README (diff)
parentAdd ! after c::fromstr calls to handle nomem (diff)
downloadhare-chip8-6637fdded6f3c5fba7e7a378ca7e30d0db11f27d.tar.gz
Add 'vendor/hare-sdl2/' from commit 'fb6008be0b79a2a24b1ac960316a83f7873b4f39'
git-subtree-dir: vendor/hare-sdl2 git-subtree-mainline: ed088aa81ac23fa48d5ae48ee739c97e0fcb4490 git-subtree-split: fb6008be0b79a2a24b1ac960316a83f7873b4f39
Diffstat (limited to '')
-rw-r--r--vendor/hare-sdl2/sdl2/sdl2.ha23
1 files changed, 23 insertions, 0 deletions
diff --git a/vendor/hare-sdl2/sdl2/sdl2.ha b/vendor/hare-sdl2/sdl2/sdl2.ha
new file mode 100644
index 0000000..7035e04
--- /dev/null
+++ b/vendor/hare-sdl2/sdl2/sdl2.ha
@@ -0,0 +1,23 @@
+export def SDL_INIT_TIMER: uint = 0x00000001u;
+export def SDL_INIT_AUDIO: uint = 0x00000010u;
+export def SDL_INIT_VIDEO: uint = 0x00000020u;
+export def SDL_INIT_JOYSTICK: uint = 0x00000200u;
+export def SDL_INIT_HAPTIC: uint = 0x00001000u;
+export def SDL_INIT_GAMECONTROLLER: uint = 0x00002000u;
+export def SDL_INIT_EVENTS: uint = 0x00004000u;
+export def SDL_INIT_SENSOR: uint = 0x00008000u;
+export def SDL_INIT_NOPARACHUTE: uint = 0x00100000u;
+export def SDL_INIT_EVERYTHING: uint = SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO
+ | SDL_INIT_EVENTS | SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC
+ | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR;
+
+@symbol("SDL_Init") fn _SDL_Init(flags: uint) int;
+
+// This function initializes the subsystems specified by 'flags'.
+export fn SDL_Init(flags: uint) (void | error) = {
+ return wrapvoid(_SDL_Init(flags));
+};
+
+// This function cleans up all initialized subsystems. You should call it upon
+// all exit conditions.
+export @symbol("SDL_Quit") fn SDL_Quit() void;