def loadWEBP_RW(src): """ ``SDL_Surface * IMG_LoadWEBP_RW(SDL_RWops *)`` """ src_c = unbox(src, 'SDL_RWops *') rc = lib.IMG_LoadWEBP_RW(src_c) return SDL_Surface(rc)
def loadPCX_RW(src): """ ``SDL_Surface * IMG_LoadPCX_RW(SDL_RWops *)`` """ src_c = unbox(src, 'SDL_RWops *') rc = lib.IMG_LoadPCX_RW(src_c) if rc == ffi.NULL: raise SDLError() return SDL_Surface(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 readXPMFromArray(xpm): """ ``SDL_Surface * IMG_ReadXPMFromArray(char * *)`` """ xpm_c = unbox(xpm, 'char * *') rc = lib.IMG_ReadXPMFromArray(xpm_c) if rc == ffi.NULL: raise SDLError() return SDL_Surface(rc)
def load_RW(src, freesrc): """ ``SDL_Surface * IMG_Load_RW(SDL_RWops *, int)`` """ src_c = unbox(src, 'SDL_RWops *') freesrc_c = freesrc rc = lib.IMG_Load_RW(src_c, freesrc_c) if rc == ffi.NULL: raise SDLError() return SDL_Surface(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)