# This file is automatically generated by scripts/sdl3/main.py. Do not edit manually.

from libc.stdint cimport *
from libc.stddef cimport wchar_t
from libcpp cimport bool as cbool
ctypedef struct va_list

from .sdl cimport *
cdef extern from "SDL3_image/SDL_image.h" nogil:
    # Definitions from SDL3_image/SDL_image.h
    int IMG_Version ()
    SDL_Surface *IMG_Load (const char *file)
    SDL_Surface *IMG_Load_IO (SDL_IOStream *src, cbool closeio)
    SDL_Surface *IMG_LoadTyped_IO (SDL_IOStream *src, cbool closeio, const char *type)
    SDL_Texture *IMG_LoadTexture (SDL_Renderer *renderer, const char *file)
    SDL_Texture *IMG_LoadTexture_IO (SDL_Renderer *renderer, SDL_IOStream *src, cbool closeio)
    SDL_Texture *IMG_LoadTextureTyped_IO (SDL_Renderer *renderer, SDL_IOStream *src, cbool closeio, const char *type)
    SDL_GPUTexture *IMG_LoadGPUTexture (SDL_GPUDevice *device, SDL_GPUCopyPass *copy_pass, const char *file, int *width, int *height)
    SDL_GPUTexture *IMG_LoadGPUTexture_IO (SDL_GPUDevice *device, SDL_GPUCopyPass *copy_pass, SDL_IOStream *src, cbool closeio, int *width, int *height)
    SDL_GPUTexture *IMG_LoadGPUTextureTyped_IO (SDL_GPUDevice *device, SDL_GPUCopyPass *copy_pass, SDL_IOStream *src, cbool closeio, const char *type, int *width, int *height)
    SDL_Surface *IMG_GetClipboardImage ()
    cbool IMG_isANI (SDL_IOStream *src)
    cbool IMG_isAVIF (SDL_IOStream *src)
    cbool IMG_isCUR (SDL_IOStream *src)
    cbool IMG_isBMP (SDL_IOStream *src)
    cbool IMG_isGIF (SDL_IOStream *src)
    cbool IMG_isICO (SDL_IOStream *src)
    cbool IMG_isJPG (SDL_IOStream *src)
    cbool IMG_isJXL (SDL_IOStream *src)
    cbool IMG_isLBM (SDL_IOStream *src)
    cbool IMG_isPCX (SDL_IOStream *src)
    cbool IMG_isPNG (SDL_IOStream *src)
    cbool IMG_isPNM (SDL_IOStream *src)
    cbool IMG_isQOI (SDL_IOStream *src)
    cbool IMG_isSVG (SDL_IOStream *src)
    cbool IMG_isTIF (SDL_IOStream *src)
    cbool IMG_isWEBP (SDL_IOStream *src)
    cbool IMG_isXCF (SDL_IOStream *src)
    cbool IMG_isXPM (SDL_IOStream *src)
    cbool IMG_isXV (SDL_IOStream *src)
    SDL_Surface *IMG_LoadAVIF_IO (SDL_IOStream *src)
    SDL_Surface *IMG_LoadBMP_IO (SDL_IOStream *src)
    SDL_Surface *IMG_LoadCUR_IO (SDL_IOStream *src)
    SDL_Surface *IMG_LoadGIF_IO (SDL_IOStream *src)
    SDL_Surface *IMG_LoadICO_IO (SDL_IOStream *src)
    SDL_Surface *IMG_LoadJPG_IO (SDL_IOStream *src)
    SDL_Surface *IMG_LoadJXL_IO (SDL_IOStream *src)
    SDL_Surface *IMG_LoadLBM_IO (SDL_IOStream *src)
    SDL_Surface *IMG_LoadPCX_IO (SDL_IOStream *src)
    SDL_Surface *IMG_LoadPNG_IO (SDL_IOStream *src)
    SDL_Surface *IMG_LoadPNM_IO (SDL_IOStream *src)
    SDL_Surface *IMG_LoadSVG_IO (SDL_IOStream *src)
    SDL_Surface *IMG_LoadSizedSVG_IO (SDL_IOStream *src, int width, int height)
    SDL_Surface *IMG_LoadQOI_IO (SDL_IOStream *src)
    SDL_Surface *IMG_LoadTGA_IO (SDL_IOStream *src)
    SDL_Surface *IMG_LoadTIF_IO (SDL_IOStream *src)
    SDL_Surface *IMG_LoadWEBP_IO (SDL_IOStream *src)
    SDL_Surface *IMG_LoadXCF_IO (SDL_IOStream *src)
    SDL_Surface *IMG_LoadXPM_IO (SDL_IOStream *src)
    SDL_Surface *IMG_LoadXV_IO (SDL_IOStream *src)
    SDL_Surface *IMG_ReadXPMFromArray (char **xpm)
    SDL_Surface *IMG_ReadXPMFromArrayToRGB888 (char **xpm)
    cbool IMG_Save (SDL_Surface *surface, const char *file)
    cbool IMG_SaveTyped_IO (SDL_Surface *surface, SDL_IOStream *dst, cbool closeio, const char *type)
    cbool IMG_SaveAVIF (SDL_Surface *surface, const char *file, int quality)
    cbool IMG_SaveAVIF_IO (SDL_Surface *surface, SDL_IOStream *dst, cbool closeio, int quality)
    cbool IMG_SaveBMP (SDL_Surface *surface, const char *file)
    cbool IMG_SaveBMP_IO (SDL_Surface *surface, SDL_IOStream *dst, cbool closeio)
    cbool IMG_SaveCUR (SDL_Surface *surface, const char *file)
    cbool IMG_SaveCUR_IO (SDL_Surface *surface, SDL_IOStream *dst, cbool closeio)
    cbool IMG_SaveGIF (SDL_Surface *surface, const char *file)
    cbool IMG_SaveGIF_IO (SDL_Surface *surface, SDL_IOStream *dst, cbool closeio)
    cbool IMG_SaveICO (SDL_Surface *surface, const char *file)
    cbool IMG_SaveICO_IO (SDL_Surface *surface, SDL_IOStream *dst, cbool closeio)
    cbool IMG_SaveJPG (SDL_Surface *surface, const char *file, int quality)
    cbool IMG_SaveJPG_IO (SDL_Surface *surface, SDL_IOStream *dst, cbool closeio, int quality)
    cbool IMG_SavePNG (SDL_Surface *surface, const char *file)
    cbool IMG_SavePNG_IO (SDL_Surface *surface, SDL_IOStream *dst, cbool closeio)
    cbool IMG_SaveTGA (SDL_Surface *surface, const char *file)
    cbool IMG_SaveTGA_IO (SDL_Surface *surface, SDL_IOStream *dst, cbool closeio)
    cbool IMG_SaveWEBP (SDL_Surface *surface, const char *file, float quality)
    cbool IMG_SaveWEBP_IO (SDL_Surface *surface, SDL_IOStream *dst, cbool closeio, float quality)
    cdef struct IMG_Animation:
        int w
        int h
        int count
        SDL_Surface **frames
        int *delays
    IMG_Animation *IMG_LoadAnimation (const char *file)
    IMG_Animation *IMG_LoadAnimation_IO (SDL_IOStream *src, cbool closeio)
    IMG_Animation *IMG_LoadAnimationTyped_IO (SDL_IOStream *src, cbool closeio, const char *type)
    IMG_Animation *IMG_LoadANIAnimation_IO (SDL_IOStream *src)
    IMG_Animation *IMG_LoadAPNGAnimation_IO (SDL_IOStream *src)
    IMG_Animation *IMG_LoadAVIFAnimation_IO (SDL_IOStream *src)
    IMG_Animation *IMG_LoadGIFAnimation_IO (SDL_IOStream *src)
    IMG_Animation *IMG_LoadWEBPAnimation_IO (SDL_IOStream *src)
    cbool IMG_SaveAnimation (IMG_Animation *anim, const char *file)
    cbool IMG_SaveAnimationTyped_IO (IMG_Animation *anim, SDL_IOStream *dst, cbool closeio, const char *type)
    cbool IMG_SaveANIAnimation_IO (IMG_Animation *anim, SDL_IOStream *dst, cbool closeio)
    cbool IMG_SaveAPNGAnimation_IO (IMG_Animation *anim, SDL_IOStream *dst, cbool closeio)
    cbool IMG_SaveAVIFAnimation_IO (IMG_Animation *anim, SDL_IOStream *dst, cbool closeio, int quality)
    cbool IMG_SaveGIFAnimation_IO (IMG_Animation *anim, SDL_IOStream *dst, cbool closeio)
    cbool IMG_SaveWEBPAnimation_IO (IMG_Animation *anim, SDL_IOStream *dst, cbool closeio, int quality)
    SDL_Cursor *IMG_CreateAnimatedCursor (IMG_Animation *anim, int hot_x, int hot_y)
    void IMG_FreeAnimation (IMG_Animation *anim)
    cdef struct IMG_AnimationEncoder
    IMG_AnimationEncoder *IMG_CreateAnimationEncoder (const char *file)
    IMG_AnimationEncoder *IMG_CreateAnimationEncoder_IO (SDL_IOStream *dst, cbool closeio, const char *type)
    IMG_AnimationEncoder *IMG_CreateAnimationEncoderWithProperties (SDL_PropertiesID props)
    cbool IMG_AddAnimationEncoderFrame (IMG_AnimationEncoder *encoder, SDL_Surface *surface, Uint64 duration)
    cbool IMG_CloseAnimationEncoder (IMG_AnimationEncoder *encoder)
    cdef enum IMG_AnimationDecoderStatus:
        IMG_DECODER_STATUS_INVALID
        IMG_DECODER_STATUS_OK
        IMG_DECODER_STATUS_FAILED
        IMG_DECODER_STATUS_COMPLETE
    cdef struct IMG_AnimationDecoder
    IMG_AnimationDecoder *IMG_CreateAnimationDecoder (const char *file)
    IMG_AnimationDecoder *IMG_CreateAnimationDecoder_IO (SDL_IOStream *src, cbool closeio, const char *type)
    IMG_AnimationDecoder *IMG_CreateAnimationDecoderWithProperties (SDL_PropertiesID props)
    SDL_PropertiesID IMG_GetAnimationDecoderProperties (IMG_AnimationDecoder *decoder)
    cbool IMG_GetAnimationDecoderFrame (IMG_AnimationDecoder *decoder, SDL_Surface **frame, Uint64 *duration)
    IMG_AnimationDecoderStatus IMG_GetAnimationDecoderStatus (IMG_AnimationDecoder *decoder)
    cbool IMG_ResetAnimationDecoder (IMG_AnimationDecoder *decoder)
    cbool IMG_CloseAnimationDecoder (IMG_AnimationDecoder *decoder)

    int SDL_MUSTLOCK(SDL_Surface *surface)

    cdef enum:
        SDL_IMAGE_MAJOR_VERSION
        SDL_IMAGE_MINOR_VERSION
        SDL_IMAGE_MICRO_VERSION
