sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Bindgen.PixelsShims.FunPtr

Synopsis

Documentation

lithon_SDL_DEFINE_PIXELFOURCC :: FunPtr (Uint8 -> Uint8 -> Uint8 -> Uint8 -> IO SDL_PixelFormat) Source #

Define a custom FourCC pixel format.

The SDL_DEFINE_PIXELFOURCC macro as a function. SDL_PIXELFORMAT_YV12, for example, is the code of the characters Y, V, 1, 2.

a
the first character of the FourCC code.
b
the second character of the FourCC code.
c
the third character of the FourCC code.
d
the fourth character of the FourCC code.
Returns
a format value in the style of SDL_PixelFormat.
Thread safety
It is safe to call this function from any thread.
See also
SDL_FOURCC
C declaration
lithon_SDL_DEFINE_PIXELFOURCC, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 42:35

Since: 3.2.0

lithon_SDL_BITSPERPIXEL :: FunPtr (SDL_PixelFormat -> IO CInt) Source #

Determine an SDL_PixelFormat's bits per pixel.

The SDL_BITSPERPIXEL macro as a function. FourCC formats report zero here, as it rarely makes sense to measure them per-pixel.

format
an SDL_PixelFormat to check.
Returns
the bits-per-pixel of format.
Thread safety
It is safe to call this function from any thread.
See also
SDL_BYTESPERPIXEL
C declaration
lithon_SDL_BITSPERPIXEL, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 62:23

Since: 3.2.0

lithon_SDL_BYTESPERPIXEL :: FunPtr (SDL_PixelFormat -> IO CInt) Source #

Determine an SDL_PixelFormat's bytes per pixel.

The SDL_BYTESPERPIXEL macro as a function. FourCC formats do their best here, but many of them don't have a meaningful measurement of bytes per pixel.

format
an SDL_PixelFormat to check.
Returns
the bytes-per-pixel of format.
Thread safety
It is safe to call this function from any thread.
See also
SDL_BITSPERPIXEL
C declaration
lithon_SDL_BYTESPERPIXEL, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 83:23

Since: 3.2.0

lithon_SDL_ISPIXELFORMAT_INDEXED :: FunPtr (SDL_PixelFormat -> IO CBool) Source #

Determine if an SDL_PixelFormat is an indexed format.

The SDL_ISPIXELFORMAT_INDEXED macro as a function.

format
an SDL_PixelFormat to check.
Returns
true if the format is indexed, false otherwise.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_ISPIXELFORMAT_INDEXED, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 100:24

Since: 3.2.0

lithon_SDL_ISPIXELFORMAT_PACKED :: FunPtr (SDL_PixelFormat -> IO CBool) Source #

Determine if an SDL_PixelFormat is a packed format.

The SDL_ISPIXELFORMAT_PACKED macro as a function.

format
an SDL_PixelFormat to check.
Returns
true if the format is packed, false otherwise.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_ISPIXELFORMAT_PACKED, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 117:24

Since: 3.2.0

lithon_SDL_ISPIXELFORMAT_ARRAY :: FunPtr (SDL_PixelFormat -> IO CBool) Source #

Determine if an SDL_PixelFormat is an array format.

The SDL_ISPIXELFORMAT_ARRAY macro as a function.

format
an SDL_PixelFormat to check.
Returns
true if the format is an array, false otherwise.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_ISPIXELFORMAT_ARRAY, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 134:24

Since: 3.2.0

lithon_SDL_ISPIXELFORMAT_10BIT :: FunPtr (SDL_PixelFormat -> IO CBool) Source #

Determine if an SDL_PixelFormat is a 10-bit format.

The SDL_ISPIXELFORMAT_10BIT macro as a function.

format
an SDL_PixelFormat to check.
Returns
true if the format is 10-bit, false otherwise.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_ISPIXELFORMAT_10BIT, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 151:24

Since: 3.2.0

lithon_SDL_ISPIXELFORMAT_FLOAT :: FunPtr (SDL_PixelFormat -> IO CBool) Source #

Determine if an SDL_PixelFormat is a floating point format.

The SDL_ISPIXELFORMAT_FLOAT macro as a function.

format
an SDL_PixelFormat to check.
Returns
true if the format is a floating point, false otherwise.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_ISPIXELFORMAT_FLOAT, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 168:24

Since: 3.2.0

lithon_SDL_ISPIXELFORMAT_ALPHA :: FunPtr (SDL_PixelFormat -> IO CBool) Source #

Determine if an SDL_PixelFormat has an alpha channel.

The SDL_ISPIXELFORMAT_ALPHA macro as a function.

format
an SDL_PixelFormat to check.
Returns
true if the format has alpha, false otherwise.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_ISPIXELFORMAT_ALPHA, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 185:24

Since: 3.2.0

lithon_SDL_ISPIXELFORMAT_FOURCC :: FunPtr (SDL_PixelFormat -> IO CBool) Source #

Determine if an SDL_PixelFormat is a "FourCC" format.

The SDL_ISPIXELFORMAT_FOURCC macro as a function. This covers custom and other unusual formats.

format
an SDL_PixelFormat to check.
Returns
true if the format is a FourCC format, false otherwise.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_ISPIXELFORMAT_FOURCC, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 202:24

Since: 3.2.0

lithon_SDL_DEFINE_COLORSPACE :: FunPtr (SDL_ColorType -> SDL_ColorRange -> SDL_ColorPrimaries -> SDL_TransferCharacteristics -> SDL_MatrixCoefficients -> SDL_ChromaLocation -> IO SDL_Colorspace) Source #

Define a custom colorspace.

The SDL_DEFINE_COLORSPACE macro as a function.

type
the type of the new format.
range
the range of the new format.
primaries
the primaries of the new format.
transfer
the transfer characteristics of the new format.
matrix
the matrix coefficients of the new format.
chroma
the chroma sample location of the new format.
Returns
a format value in the style of SDL_Colorspace.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_DEFINE_COLORSPACE, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 224:34

Since: 3.2.0

lithon_SDL_COLORSPACETYPE :: FunPtr (SDL_Colorspace -> IO SDL_ColorType) Source #

Retrieve the type of an SDL_Colorspace.

The SDL_COLORSPACETYPE macro as a function.

cspace
an SDL_Colorspace to check.
Returns
the SDL_ColorType of cspace.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_COLORSPACETYPE, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 241:33

Since: 3.2.0

lithon_SDL_COLORSPACERANGE :: FunPtr (SDL_Colorspace -> IO SDL_ColorRange) Source #

Retrieve the range of an SDL_Colorspace.

The SDL_COLORSPACERANGE macro as a function.

cspace
an SDL_Colorspace to check.
Returns
the SDL_ColorRange of cspace.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_COLORSPACERANGE, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 258:34

Since: 3.2.0

lithon_SDL_COLORSPACECHROMA :: FunPtr (SDL_Colorspace -> IO SDL_ChromaLocation) Source #

Retrieve the chroma sample location of an SDL_Colorspace.

The SDL_COLORSPACECHROMA macro as a function.

cspace
an SDL_Colorspace to check.
Returns
the SDL_ChromaLocation of cspace.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_COLORSPACECHROMA, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 275:38

Since: 3.2.0

lithon_SDL_COLORSPACEPRIMARIES :: FunPtr (SDL_Colorspace -> IO SDL_ColorPrimaries) Source #

Retrieve the primaries of an SDL_Colorspace.

The SDL_COLORSPACEPRIMARIES macro as a function.

cspace
an SDL_Colorspace to check.
Returns
the SDL_ColorPrimaries of cspace.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_COLORSPACEPRIMARIES, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 292:38

Since: 3.2.0

lithon_SDL_COLORSPACETRANSFER :: FunPtr (SDL_Colorspace -> IO SDL_TransferCharacteristics) Source #

Retrieve the transfer characteristics of an SDL_Colorspace.

The SDL_COLORSPACETRANSFER macro as a function.

cspace
an SDL_Colorspace to check.
Returns
the SDL_TransferCharacteristics of cspace.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_COLORSPACETRANSFER, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 309:47

Since: 3.2.0

lithon_SDL_COLORSPACEMATRIX :: FunPtr (SDL_Colorspace -> IO SDL_MatrixCoefficients) Source #

Retrieve the matrix coefficients of an SDL_Colorspace.

The SDL_COLORSPACEMATRIX macro as a function.

cspace
an SDL_Colorspace to check.
Returns
the SDL_MatrixCoefficients of cspace.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_COLORSPACEMATRIX, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 326:42

Since: 3.2.0

lithon_SDL_ISCOLORSPACE_MATRIX_BT601 :: FunPtr (SDL_Colorspace -> IO CBool) Source #

Determine if an SDL_Colorspace uses BT601 (or BT470BG) matrix coefficients.

The SDL_ISCOLORSPACE_MATRIX_BT601 macro as a function.

cspace
an SDL_Colorspace to check.
Returns
true if BT601 or BT470BG, false otherwise.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_ISCOLORSPACE_MATRIX_BT601, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 343:24

Since: 3.2.0

lithon_SDL_ISCOLORSPACE_MATRIX_BT709 :: FunPtr (SDL_Colorspace -> IO CBool) Source #

Determine if an SDL_Colorspace uses BT709 matrix coefficients.

The SDL_ISCOLORSPACE_MATRIX_BT709 macro as a function.

cspace
an SDL_Colorspace to check.
Returns
true if BT709, false otherwise.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_ISCOLORSPACE_MATRIX_BT709, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 360:24

Since: 3.2.0

lithon_SDL_ISCOLORSPACE_MATRIX_BT2020_NCL :: FunPtr (SDL_Colorspace -> IO CBool) Source #

Determine if an SDL_Colorspace uses BT2020_NCL matrix coefficients.

The SDL_ISCOLORSPACE_MATRIX_BT2020_NCL macro as a function.

cspace
an SDL_Colorspace to check.
Returns
true if BT2020_NCL, false otherwise.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_ISCOLORSPACE_MATRIX_BT2020_NCL, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 377:24

Since: 3.2.0

lithon_SDL_ISCOLORSPACE_LIMITED_RANGE :: FunPtr (SDL_Colorspace -> IO CBool) Source #

Determine if an SDL_Colorspace has a limited range.

The SDL_ISCOLORSPACE_LIMITED_RANGE macro as a function.

cspace
an SDL_Colorspace to check.
Returns
true if limited range, false otherwise.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_ISCOLORSPACE_LIMITED_RANGE, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 394:24

Since: 3.2.0

lithon_SDL_ISCOLORSPACE_FULL_RANGE :: FunPtr (SDL_Colorspace -> IO CBool) Source #

Determine if an SDL_Colorspace has a full range.

The SDL_ISCOLORSPACE_FULL_RANGE macro as a function.

cspace
an SDL_Colorspace to check.
Returns
true if full range, false otherwise.
Thread safety
It is safe to call this function from any thread.
C declaration
lithon_SDL_ISCOLORSPACE_FULL_RANGE, defined at sdl3-bindgen-sys/SDL_pixels_shims.h 411:24

Since: 3.2.0