sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Bindgen.PixelsShims.Safe

Synopsis

Documentation

lithon_SDL_DEFINE_PIXELFOURCC Source #

Arguments

:: Uint8
a
the first character of the FourCC code.
-> Uint8
b
the second character of the FourCC code.
-> Uint8
c
the third character of the FourCC code.
-> Uint8
d
the fourth character of the FourCC code.
-> IO SDL_PixelFormat 

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.

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 Source #

Arguments

:: SDL_PixelFormat
format
an SDL_PixelFormat to check.
-> IO CInt 

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.

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 Source #

Arguments

:: SDL_PixelFormat
format
an SDL_PixelFormat to check.
-> IO CInt 

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.

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 Source #

Arguments

:: SDL_PixelFormat
format
an SDL_PixelFormat to check.
-> IO CBool 

Determine if an SDL_PixelFormat is an indexed format.

The SDL_ISPIXELFORMAT_INDEXED macro as a function.

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 Source #

Arguments

:: SDL_PixelFormat
format
an SDL_PixelFormat to check.
-> IO CBool 

Determine if an SDL_PixelFormat is a packed format.

The SDL_ISPIXELFORMAT_PACKED macro as a function.

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 Source #

Arguments

:: SDL_PixelFormat
format
an SDL_PixelFormat to check.
-> IO CBool 

Determine if an SDL_PixelFormat is an array format.

The SDL_ISPIXELFORMAT_ARRAY macro as a function.

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 Source #

Arguments

:: SDL_PixelFormat
format
an SDL_PixelFormat to check.
-> IO CBool 

Determine if an SDL_PixelFormat is a 10-bit format.

The SDL_ISPIXELFORMAT_10BIT macro as a function.

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 Source #

Arguments

:: SDL_PixelFormat
format
an SDL_PixelFormat to check.
-> IO CBool 

Determine if an SDL_PixelFormat is a floating point format.

The SDL_ISPIXELFORMAT_FLOAT macro as a function.

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 Source #

Arguments

:: SDL_PixelFormat
format
an SDL_PixelFormat to check.
-> IO CBool 

Determine if an SDL_PixelFormat has an alpha channel.

The SDL_ISPIXELFORMAT_ALPHA macro as a function.

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 Source #

Arguments

:: SDL_PixelFormat
format
an SDL_PixelFormat to check.
-> IO CBool 

Determine if an SDL_PixelFormat is a "FourCC" format.

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

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 Source #

Arguments

:: SDL_ColorType
type
the type of the new format.
-> SDL_ColorRange
range
the range of the new format.
-> SDL_ColorPrimaries
primaries
the primaries of the new format.
-> SDL_TransferCharacteristics
transfer
the transfer characteristics of the new format.
-> SDL_MatrixCoefficients
matrix
the matrix coefficients of the new format.
-> SDL_ChromaLocation
chroma
the chroma sample location of the new format.
-> IO SDL_Colorspace 

Define a custom colorspace.

The SDL_DEFINE_COLORSPACE macro as a function.

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 Source #

Arguments

:: SDL_Colorspace
cspace
an SDL_Colorspace to check.
-> IO SDL_ColorType 

Retrieve the type of an SDL_Colorspace.

The SDL_COLORSPACETYPE macro as a function.

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 Source #

Arguments

:: SDL_Colorspace
cspace
an SDL_Colorspace to check.
-> IO SDL_ColorRange 

Retrieve the range of an SDL_Colorspace.

The SDL_COLORSPACERANGE macro as a function.

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 Source #

Arguments

:: SDL_Colorspace
cspace
an SDL_Colorspace to check.
-> IO SDL_ChromaLocation 

Retrieve the chroma sample location of an SDL_Colorspace.

The SDL_COLORSPACECHROMA macro as a function.

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 Source #

Arguments

:: SDL_Colorspace
cspace
an SDL_Colorspace to check.
-> IO SDL_ColorPrimaries 

Retrieve the primaries of an SDL_Colorspace.

The SDL_COLORSPACEPRIMARIES macro as a function.

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 Source #

Arguments

:: SDL_Colorspace
cspace
an SDL_Colorspace to check.
-> IO SDL_TransferCharacteristics 

Retrieve the transfer characteristics of an SDL_Colorspace.

The SDL_COLORSPACETRANSFER macro as a function.

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 Source #

Arguments

:: SDL_Colorspace
cspace
an SDL_Colorspace to check.
-> IO SDL_MatrixCoefficients 

Retrieve the matrix coefficients of an SDL_Colorspace.

The SDL_COLORSPACEMATRIX macro as a function.

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 Source #

Arguments

:: SDL_Colorspace
cspace
an SDL_Colorspace to check.
-> IO CBool 

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

The SDL_ISCOLORSPACE_MATRIX_BT601 macro as a function.

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 Source #

Arguments

:: SDL_Colorspace
cspace
an SDL_Colorspace to check.
-> IO CBool 

Determine if an SDL_Colorspace uses BT709 matrix coefficients.

The SDL_ISCOLORSPACE_MATRIX_BT709 macro as a function.

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 Source #

Arguments

:: SDL_Colorspace
cspace
an SDL_Colorspace to check.
-> IO CBool 

Determine if an SDL_Colorspace uses BT2020_NCL matrix coefficients.

The SDL_ISCOLORSPACE_MATRIX_BT2020_NCL macro as a function.

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 Source #

Arguments

:: SDL_Colorspace
cspace
an SDL_Colorspace to check.
-> IO CBool 

Determine if an SDL_Colorspace has a limited range.

The SDL_ISCOLORSPACE_LIMITED_RANGE macro as a function.

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 Source #

Arguments

:: SDL_Colorspace
cspace
an SDL_Colorspace to check.
-> IO CBool 

Determine if an SDL_Colorspace has a full range.

The SDL_ISCOLORSPACE_FULL_RANGE macro as a function.

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