aboutsummaryrefslogtreecommitdiff
path: root/sdl2/video.ha
diff options
context:
space:
mode:
authorAutumn! <autumnull@posteo.net>2023-05-24 20:37:00 +0000
committerDrew DeVault <sir@cmpwn.com>2023-06-04 09:23:18 +0200
commit3ca5d97376151d6f1a4a1787b6609c470a05a82c (patch)
tree624e7cdf0711f30512b9ce03c67fd9356073b1ad /sdl2/video.ha
parentadded some missing bindings (diff)
downloadhare-chip8-3ca5d97376151d6f1a4a1787b6609c470a05a82c.tar.gz
Use types::c:: instead of char and strings::
Signed-off-by: Autumn! <autumnull@posteo.net>
Diffstat (limited to '')
-rw-r--r--sdl2/video.ha8
1 files changed, 4 insertions, 4 deletions
diff --git a/sdl2/video.ha b/sdl2/video.ha
index bfcb3d0..f60d915 100644
--- a/sdl2/video.ha
+++ b/sdl2/video.ha
@@ -1,5 +1,5 @@
// TODO: Flesh me out
-use strings;
+use types::c;
// The type used to identify a window. (Opaque)
export type SDL_Window = void;
@@ -33,12 +33,12 @@ export type SDL_WindowFlags = enum u32 {
export def SDL_WINDOWPOS_UNDEFINED: int = 0x1FFF0000;
export def SDL_WINDOWPOS_CENTERED: int = 0x2FFF0000;
-@symbol("SDL_CreateWindow") fn _SDL_CreateWindow(title: const *char,
+@symbol("SDL_CreateWindow") fn _SDL_CreateWindow(title: const *c::char,
x: int, y: int, w: int, h: int, flags: SDL_WindowFlags) nullable *SDL_Window;
// Create a window with the specified position, dimensions, and flags.
//
-// 'title' is the title of the window, in UTF-8 encoding. See [[strings::to_c]]
+// 'title' is the title of the window, in UTF-8 encoding. See [[types::c::fromstr]]
// to prepare a suitable string.
//
// 'x' and 'y' set the position of the window, or use [[SDL_WINDOWPOS_CENTERED]] or
@@ -78,7 +78,7 @@ export fn SDL_CreateWindow(
h: int,
flags: SDL_WindowFlags,
) (*SDL_Window | error) = {
- let title = strings::to_c(title);
+ let title = c::fromstr(title);
defer free(title);
return wrapptr(_SDL_CreateWindow(title, x, y, w, h, flags))?: *SDL_Window;
};