USING: alien alien.c-types alien.libraries alien.syntax combinators system ; IN: sdl.ffi << "sdl" { { [ os linux? ] [ "libSDL.so" ] } { [ os macosx? ] [ "libSDL.dylib" ] } { [ os windows? ] [ "SDL.dll" ] } } cond "cdecl" add-library >> C-TYPE: SDL_Surface LIBRARY: sdl FUNCTION: SDL_Surface* SDL_SetVideoMode ( int width, int height, int bpp, uint flags ) ; FUNCTION: void SDL_Delay ( int ms ) ; FUNCTION: void SDL_Quit ( ) ; 640 480 32 0 SDL_SetVideoMode 2000 SDL_Delay SDL_Quit