def setSoundFonts(paths): """ ``int Mix_SetSoundFonts(char const *)`` """ paths_c = u8(paths) rc = lib.Mix_SetSoundFonts(paths_c) return rc
def loadMUS(file): """ ``Mix_Music * Mix_LoadMUS(char const *)`` """ file_c = u8(file) rc = lib.Mix_LoadMUS(file_c) return Music(rc)
def setMusicCMD(command): """ ``int Mix_SetMusicCMD(char const *)`` """ command_c = u8(command) rc = lib.Mix_SetMusicCMD(command_c) return rc
def load(file): """ ``SDL_Surface * IMG_Load(char const *)`` """ file_c = u8(file) rc = lib.IMG_Load(file_c) if rc == ffi.NULL: raise SDLError() return SDL_Surface(rc)
def savePNG(surface, file): """ ``int IMG_SavePNG(SDL_Surface *, char const *)`` """ surface_c = unbox(surface, 'SDL_Surface *') file_c = u8(file) rc = lib.IMG_SavePNG(surface_c, file_c) return rc
def loadTexture(renderer, file): """ ``SDL_Texture * IMG_LoadTexture(SDL_Renderer *, char const *)`` """ renderer_c = unbox(renderer, 'SDL_Renderer *') file_c = u8(file) rc = lib.IMG_LoadTexture(renderer_c, file_c) return SDL_Texture(rc)
def loadTyped_RW(src, freesrc, type): """ ``SDL_Surface * IMG_LoadTyped_RW(SDL_RWops *, int, char const *)`` """ src_c = unbox(src, 'SDL_RWops *') freesrc_c = freesrc type_c = u8(type) rc = lib.IMG_LoadTyped_RW(src_c, freesrc_c, type_c) if rc == ffi.NULL: raise SDLError() return SDL_Surface(rc)
def loadTextureTyped_RW(renderer, src, freesrc, type): """ ``SDL_Texture * IMG_LoadTextureTyped_RW(SDL_Renderer *, SDL_RWops *, int, char const *)`` """ renderer_c = unbox(renderer, 'SDL_Renderer *') src_c = unbox(src, 'SDL_RWops *') freesrc_c = freesrc type_c = u8(type) rc = lib.IMG_LoadTextureTyped_RW(renderer_c, src_c, freesrc_c, type_c) return SDL_Texture(rc)