module "/pliant/language/context.pli"
module "/pliant/language/unsafe.pli"

constant sdl_library "libSDL.so" #linux
#constant sdl_library "SDL.dll" #win32

public

 function SDL_RWFromFile file mode -> ops
  arg CStr file mode
  arg Address ops
  external sdl_library "SDL_RWFromFile"

 function SDL_RWFromFP fp autoclose -> ops
  arg Address fp ops
  arg Int autoclose
  external sdl_library "SDL_RWFromFP"

 function SDL_RWFromMem mem size -> ops
  arg Address mem ops
  arg Int size
  external sdl_library "SDL_RWFromMem"

 function SDL_AllocRW -> ops
  arg Address ops
  external sdl_library "SDL_AllocRW"

 function SDL_FreeRW ops
  arg Address ops
  external sdl_library "SDL_FreeRW"