sdl2-image-2.1.0.0: Haskell bindings to SDL2_image

Copyright | (c) 2015 Siniša Biđin 2021 Daniel Firth
License | MIT
Maintainer | sinisa@bidin.eu, dan.firth@homotopic.tech
Stability | experimental
Safe Haskell | None
Language | Haskell2010

SDL.Raw.Image

Contents

- Loading images
- Testing for formats
- Other

Description

Raw bindings to the `SDL2_image` library. No error-handling is done here. For more information about specific function behaviour, see the `SDL2_image` documentation.

Synopsis

- type Free = CInt
- load :: MonadIO m => CString -> m (Ptr Surface)
- load_RW :: MonadIO m => Ptr RWops -> Free -> m (Ptr Surface)
- type Format = CString
- loadTyped_RW :: MonadIO m => Ptr RWops -> Free -> Format -> m (Ptr Surface)
- loadCUR_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface)
- loadICO_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface)
- loadBMP_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface)
- loadPNM_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface)
- loadXPM_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface)
- loadXCF_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface)
- loadPCX_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface)
- loadGIF_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface)
- loadJPG_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface)
- loadTIF_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface)
- loadPNG_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface)
- loadTGA_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface)
- loadLBM_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface)
- loadXV_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface)
- loadWEBP_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface)
- isCUR :: MonadIO m => Ptr RWops -> m CInt
- isICO :: MonadIO m => Ptr RWops -> m CInt
- isBMP :: MonadIO m => Ptr RWops -> m CInt
- isPNM :: MonadIO m => Ptr RWops -> m CInt
- isXPM :: MonadIO m => Ptr RWops -> m CInt
- isXCF :: MonadIO m => Ptr RWops -> m CInt
- isPCX :: MonadIO m => Ptr RWops -> m CInt
- isGIF :: MonadIO m => Ptr RWops -> m CInt
- isJPG :: MonadIO m => Ptr RWops -> m CInt
- isTIF :: MonadIO m => Ptr RWops -> m CInt
- isPNG :: MonadIO m => Ptr RWops -> m CInt
- isLBM :: MonadIO m => Ptr RWops -> m CInt
- isXV :: MonadIO m => Ptr RWops -> m CInt
- isWEBP :: MonadIO m => Ptr RWops -> m CInt
- type InitFlags = CInt
- pattern IMG_INIT_JPG :: (Eq a, Num a) => a
- pattern IMG_INIT_PNG :: (Eq a, Num a) => a
- pattern IMG_INIT_TIF :: (Eq a, Num a) => a
- pattern IMG_INIT_WEBP :: (Eq a, Num a) => a
- init :: MonadIO m => InitFlags -> m InitFlags
- getVersion :: MonadIO m => m (Ptr Version)
- quit :: MonadIO m => m ()

# Loading images

type Free = CInt Source #

Should the `Ptr` `RWops` be freed after an operation? 1 for yes, 0 for no.

load :: MonadIO m => CString -> m (Ptr Surface) Source #

load_RW :: MonadIO m => Ptr RWops -> Free -> m (Ptr Surface) Source #

type Format = CString Source #

A case-insensitive desired format, e.g. `"jpg"` or `"PNG"`.

loadTyped_RW :: MonadIO m => Ptr RWops -> Free -> Format -> m (Ptr Surface) Source #

loadCUR_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface) Source #

loadICO_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface) Source #

loadBMP_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface) Source #

loadPNM_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface) Source #

loadXPM_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface) Source #

loadXCF_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface) Source #

loadPCX_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface) Source #

loadGIF_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface) Source #

loadJPG_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface) Source #

loadTIF_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface) Source #

loadPNG_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface) Source #

loadTGA_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface) Source #

loadLBM_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface) Source #

loadXV_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface) Source #

loadWEBP_RW :: MonadIO m => Ptr RWops -> m (Ptr Surface) Source #

# Testing for formats

isCUR :: MonadIO m => Ptr RWops -> m CInt Source #

isICO :: MonadIO m => Ptr RWops -> m CInt Source #

isBMP :: MonadIO m => Ptr RWops -> m CInt Source #

isPNM :: MonadIO m => Ptr RWops -> m CInt Source #

isXPM :: MonadIO m => Ptr RWops -> m CInt Source #

isXCF :: MonadIO m => Ptr RWops -> m CInt Source #

isPCX :: MonadIO m => Ptr RWops -> m CInt Source #

isGIF :: MonadIO m => Ptr RWops -> m CInt Source #

isJPG :: MonadIO m => Ptr RWops -> m CInt Source #

isTIF :: MonadIO m => Ptr RWops -> m CInt Source #

isPNG :: MonadIO m => Ptr RWops -> m CInt Source #

isLBM :: MonadIO m => Ptr RWops -> m CInt Source #

isXV :: MonadIO m => Ptr RWops -> m CInt Source #

isWEBP :: MonadIO m => Ptr RWops -> m CInt Source #

# Other

type InitFlags = CInt Source #

pattern IMG_INIT_JPG :: (Eq a, Num a) => a Source #

pattern IMG_INIT_PNG :: (Eq a, Num a) => a Source #

pattern IMG_INIT_TIF :: (Eq a, Num a) => a Source #

pattern IMG_INIT_WEBP :: (Eq a, Num a) => a Source #

init :: MonadIO m => InitFlags -> m InitFlags Source #

getVersion :: MonadIO m => m (Ptr Version) Source #

quit :: MonadIO m => m () Source #