| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Pixels
Contents
Description
SDL offers facilities for pixel management.
Largely these facilities deal with pixel format: what does this set of bits represent?
If you mostly want to think of a pixel as some combination of red, green, blue, and maybe alpha intensities, this is all pretty straightforward, and in many cases, is enough information to build a perfectly fine game.
However, the actual definition of a pixel is more complex than that:
Pixels are a representation of a color in a particular color space.
The first characteristic of a color space is the color type. SDL understands two different color types, RGB and YCbCr, or in SDL also referred to as YUV.
RGB colors consist of red, green, and blue channels of color that are added together to represent the colors we see on the screen.
https://en.wikipedia.org/wiki/RGB_color_model
YCbCr colors represent colors as a Y luma brightness component and red and blue chroma color offsets. This color representation takes advantage of the fact that the human eye is more sensitive to brightness than the color in an image. The Cb and Cr components are often compressed and have lower resolution than the luma component.
https://en.wikipedia.org/wiki/YCbCr
When the color information in YCbCr is compressed, the Y pixels are left at full resolution and each Cr and Cb pixel represents an average of the color information in a block of Y pixels. The chroma location determines where in that block of pixels the color information is coming from.
The color range defines how much of the pixel to use when converting a pixel into a color on the display. When the full color range is used, the entire numeric range of the pixel bits is significant. When narrow color range is used, for historical reasons, the pixel uses only a portion of the numeric range to represent colors.
The color primaries and white point are a definition of the colors in the color space relative to the standard XYZ color space.
https://en.wikipedia.org/wiki/CIE_1931_color_space
The transfer characteristic, or opto-electrical transfer function (OETF), is the way a color is converted from mathematically linear space into a non-linear output signals.
https://en.wikipedia.org/wiki/Rec._709#Transfer_characteristics
The matrix coefficients are used to convert between YCbCr and RGB colors. A fully opaque 8-bit alpha value.
- See also
sDL_ALPHA_TRANSPARENT
FFI conventions
Unsuffixed aliases are unsafe foreign imports; aliases suffixed Safe are safe. Functions whose callbacks fire during the call export only the Safe alias (the genuine unsafe import stays reachable under SDL3.Sys.Bindgen.Pixels.Unsafe); functions curated unsafe-only export only the unsuffixed one. Each alias's documentation records its flavor and rationale.
The C shims are functions this package defines in C over what the FFI cannot call directly (variadic functions, function-like macros), each named after what it wraps; the same flavor rules apply. Their raw imports live under SDL3.Sys.Bindgen.PixelsShims.
Full conventions: SDL3.Sys.
Since: 3.2.0
Synopsis
- module SDL3.Sys.Bindgen.Pixels
- getPixelFormatName :: SDL_PixelFormat -> IO (PtrConst CChar)
- getPixelFormatNameSafe :: SDL_PixelFormat -> IO (PtrConst CChar)
- getMasksForPixelFormat :: SDL_PixelFormat -> Ptr CInt -> Ptr Uint32 -> Ptr Uint32 -> Ptr Uint32 -> Ptr Uint32 -> IO Bool
- getMasksForPixelFormatSafe :: SDL_PixelFormat -> Ptr CInt -> Ptr Uint32 -> Ptr Uint32 -> Ptr Uint32 -> Ptr Uint32 -> IO Bool
- getPixelFormatForMasks :: Int32 -> Word32 -> Word32 -> Word32 -> Word32 -> IO SDL_PixelFormat
- getPixelFormatForMasksSafe :: Int32 -> Word32 -> Word32 -> Word32 -> Word32 -> IO SDL_PixelFormat
- getPixelFormatDetails :: SDL_PixelFormat -> IO (PtrConst SDL_PixelFormatDetails)
- getPixelFormatDetailsSafe :: SDL_PixelFormat -> IO (PtrConst SDL_PixelFormatDetails)
- createPalette :: Int32 -> IO (Ptr SDL_Palette)
- createPaletteSafe :: Int32 -> IO (Ptr SDL_Palette)
- setPaletteColors :: Ptr SDL_Palette -> PtrConst SDL_Color -> Int32 -> Int32 -> IO Bool
- setPaletteColorsSafe :: Ptr SDL_Palette -> PtrConst SDL_Color -> Int32 -> Int32 -> IO Bool
- destroyPalette :: Ptr SDL_Palette -> IO ()
- destroyPaletteSafe :: Ptr SDL_Palette -> IO ()
- mapRGB :: PtrConst SDL_PixelFormatDetails -> PtrConst SDL_Palette -> Word8 -> Word8 -> Word8 -> IO Word32
- mapRGBSafe :: PtrConst SDL_PixelFormatDetails -> PtrConst SDL_Palette -> Word8 -> Word8 -> Word8 -> IO Word32
- mapRGBA :: PtrConst SDL_PixelFormatDetails -> PtrConst SDL_Palette -> Word8 -> Word8 -> Word8 -> Word8 -> IO Word32
- mapRGBASafe :: PtrConst SDL_PixelFormatDetails -> PtrConst SDL_Palette -> Word8 -> Word8 -> Word8 -> Word8 -> IO Word32
- getRGB :: Word32 -> PtrConst SDL_PixelFormatDetails -> PtrConst SDL_Palette -> Ptr Uint8 -> Ptr Uint8 -> Ptr Uint8 -> IO ()
- getRGBSafe :: Word32 -> PtrConst SDL_PixelFormatDetails -> PtrConst SDL_Palette -> Ptr Uint8 -> Ptr Uint8 -> Ptr Uint8 -> IO ()
- getRGBA :: Word32 -> PtrConst SDL_PixelFormatDetails -> PtrConst SDL_Palette -> Ptr Uint8 -> Ptr Uint8 -> Ptr Uint8 -> Ptr Uint8 -> IO ()
- getRGBASafe :: Word32 -> PtrConst SDL_PixelFormatDetails -> PtrConst SDL_Palette -> Ptr Uint8 -> Ptr Uint8 -> Ptr Uint8 -> Ptr Uint8 -> IO ()
- definePixelFourCC :: Word8 -> Word8 -> Word8 -> Word8 -> IO SDL_PixelFormat
- bitsPerPixel :: SDL_PixelFormat -> IO Int32
- bytesPerPixel :: SDL_PixelFormat -> IO Int32
- isPixelFormatIndexed :: SDL_PixelFormat -> IO Bool
- isPixelFormatPacked :: SDL_PixelFormat -> IO Bool
- isPixelFormatArray :: SDL_PixelFormat -> IO Bool
- isPixelFormat10Bit :: SDL_PixelFormat -> IO Bool
- isPixelFormatFloat :: SDL_PixelFormat -> IO Bool
- isPixelFormatAlpha :: SDL_PixelFormat -> IO Bool
- isPixelFormatFourCC :: SDL_PixelFormat -> IO Bool
- defineColorspace :: SDL_ColorType -> SDL_ColorRange -> SDL_ColorPrimaries -> SDL_TransferCharacteristics -> SDL_MatrixCoefficients -> SDL_ChromaLocation -> IO SDL_Colorspace
- colorspaceType :: SDL_Colorspace -> IO SDL_ColorType
- colorspaceRange :: SDL_Colorspace -> IO SDL_ColorRange
- colorspaceChroma :: SDL_Colorspace -> IO SDL_ChromaLocation
- colorspacePrimaries :: SDL_Colorspace -> IO SDL_ColorPrimaries
- colorspaceTransfer :: SDL_Colorspace -> IO SDL_TransferCharacteristics
- colorspaceMatrix :: SDL_Colorspace -> IO SDL_MatrixCoefficients
- isColorspaceMatrixBT601 :: SDL_Colorspace -> IO Bool
- isColorspaceMatrixBT709 :: SDL_Colorspace -> IO Bool
- isColorspaceMatrixBT2020NCL :: SDL_Colorspace -> IO Bool
- isColorspaceLimitedRange :: SDL_Colorspace -> IO Bool
- isColorspaceFullRange :: SDL_Colorspace -> IO Bool
Documentation
module SDL3.Sys.Bindgen.Pixels
Function aliases
Arguments
| :: SDL_PixelFormat |
|
| -> IO (PtrConst CChar) |
Get the human readable name of a pixel format.
- Returns
- the human readable name of the specified pixel format or "SDL_PIXELFORMAT_UNKNOWN" if the format isn't recognized.
- Thread safety
- It is safe to call this function from any thread.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetPixelFormatName. The safe flavor isgetPixelFormatNameSafe. - C declaration
SDL_GetPixelFormatName, defined atSDL3/SDL_pixels.h 1185:42
Since: 3.2.0
getPixelFormatNameSafe Source #
Arguments
| :: SDL_PixelFormat |
|
| -> IO (PtrConst CChar) |
Get the human readable name of a pixel format.
- Returns
- the human readable name of the specified pixel format or "SDL_PIXELFORMAT_UNKNOWN" if the format isn't recognized.
- Thread safety
- It is safe to call this function from any thread.
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetPixelFormatName. The unsafe flavor isgetPixelFormatName. - C declaration
SDL_GetPixelFormatName, defined atSDL3/SDL_pixels.h 1185:42
Since: 3.2.0
getMasksForPixelFormat Source #
Arguments
| :: SDL_PixelFormat |
|
| -> Ptr CInt |
|
| -> Ptr Uint32 |
|
| -> Ptr Uint32 |
|
| -> Ptr Uint32 |
|
| -> Ptr Uint32 |
|
| -> IO Bool |
Convert one of the enumerated pixel formats to a bpp value and RGBA masks.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
getPixelFormatForMasks
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetMasksForPixelFormat. The safe flavor isgetMasksForPixelFormatSafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_GetMasksForPixelFormat, defined atSDL3/SDL_pixels.h 1205:34
Since: 3.2.0
getMasksForPixelFormatSafe Source #
Arguments
| :: SDL_PixelFormat |
|
| -> Ptr CInt |
|
| -> Ptr Uint32 |
|
| -> Ptr Uint32 |
|
| -> Ptr Uint32 |
|
| -> Ptr Uint32 |
|
| -> IO Bool |
Convert one of the enumerated pixel formats to a bpp value and RGBA masks.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
getPixelFormatForMasks
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetMasksForPixelFormat. The unsafe flavor isgetMasksForPixelFormat. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_GetMasksForPixelFormat, defined atSDL3/SDL_pixels.h 1205:34
Since: 3.2.0
getPixelFormatForMasks Source #
Arguments
| :: Int32 |
|
| -> Word32 |
|
| -> Word32 |
|
| -> Word32 |
|
| -> Word32 |
|
| -> IO SDL_PixelFormat |
Convert a bpp value and RGBA masks to an enumerated pixel format.
This will return SDL_PIXELFORMAT_UNKNOWN if the conversion wasn't possible.
- Returns
- the
SDL_PixelFormatvalue corresponding to the format masks, or SDL_PIXELFORMAT_UNKNOWN if there isn't a match. - Thread safety
- It is safe to call this function from any thread.
- See also
getMasksForPixelFormat
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetPixelFormatForMasks. The safe flavor isgetPixelFormatForMasksSafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_GetPixelFormatForMasks, defined atSDL3/SDL_pixels.h 1227:45
Since: 3.2.0
getPixelFormatForMasksSafe Source #
Arguments
| :: Int32 |
|
| -> Word32 |
|
| -> Word32 |
|
| -> Word32 |
|
| -> Word32 |
|
| -> IO SDL_PixelFormat |
Convert a bpp value and RGBA masks to an enumerated pixel format.
This will return SDL_PIXELFORMAT_UNKNOWN if the conversion wasn't possible.
- Returns
- the
SDL_PixelFormatvalue corresponding to the format masks, or SDL_PIXELFORMAT_UNKNOWN if there isn't a match. - Thread safety
- It is safe to call this function from any thread.
- See also
getMasksForPixelFormat
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetPixelFormatForMasks. The unsafe flavor isgetPixelFormatForMasks. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_GetPixelFormatForMasks, defined atSDL3/SDL_pixels.h 1227:45
Since: 3.2.0
getPixelFormatDetails Source #
Arguments
| :: SDL_PixelFormat |
|
| -> IO (PtrConst SDL_PixelFormatDetails) |
Create an SDL_PixelFormatDetails structure corresponding to a pixel format.
Returned structure may come from a shared global cache (i.e. not newly allocated), and hence should not be modified, especially the palette. Weird errors such as Blit combination not supported may occur.
- Returns
- a pointer to a
SDL_PixelFormatDetailsstructure or NULL on failure; callgetErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetPixelFormatDetails. The safe flavor isgetPixelFormatDetailsSafe. - C declaration
SDL_GetPixelFormatDetails, defined atSDL3/SDL_pixels.h 1244:60
Since: 3.2.0
getPixelFormatDetailsSafe Source #
Arguments
| :: SDL_PixelFormat |
|
| -> IO (PtrConst SDL_PixelFormatDetails) |
Create an SDL_PixelFormatDetails structure corresponding to a pixel format.
Returned structure may come from a shared global cache (i.e. not newly allocated), and hence should not be modified, especially the palette. Weird errors such as Blit combination not supported may occur.
- Returns
- a pointer to a
SDL_PixelFormatDetailsstructure or NULL on failure; callgetErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetPixelFormatDetails. The unsafe flavor isgetPixelFormatDetails. - C declaration
SDL_GetPixelFormatDetails, defined atSDL3/SDL_pixels.h 1244:60
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> IO (Ptr SDL_Palette) |
Create a palette structure with the specified number of color entries.
The palette entries are initialized to white.
- Returns
- a new
SDL_Palettestructure on success or NULL on failure (e.g. if there wasn't enough memory); callgetErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
destroyPalette,setPaletteColors,setSurfacePalette
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_CreatePalette. The safe flavor iscreatePaletteSafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_CreatePalette, defined atSDL3/SDL_pixels.h 1264:43
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> IO (Ptr SDL_Palette) |
Create a palette structure with the specified number of color entries.
The palette entries are initialized to white.
- Returns
- a new
SDL_Palettestructure on success or NULL on failure (e.g. if there wasn't enough memory); callgetErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
destroyPalette,setPaletteColors,setSurfacePalette
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_CreatePalette. The unsafe flavor iscreatePalette. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_CreatePalette, defined atSDL3/SDL_pixels.h 1264:43
Since: 3.2.0
Arguments
| :: Ptr SDL_Palette |
|
| -> PtrConst SDL_Color |
|
| -> Int32 |
|
| -> Int32 |
|
| -> IO Bool |
Set a range of colors in a palette.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread, as long as the palette is not modified or destroyed in another thread.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_SetPaletteColors. The safe flavor issetPaletteColorsSafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_SetPaletteColors, defined atSDL3/SDL_pixels.h 1281:34
Since: 3.2.0
Arguments
| :: Ptr SDL_Palette |
|
| -> PtrConst SDL_Color |
|
| -> Int32 |
|
| -> Int32 |
|
| -> IO Bool |
Set a range of colors in a palette.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread, as long as the palette is not modified or destroyed in another thread.
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_SetPaletteColors. The unsafe flavor issetPaletteColors. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_SetPaletteColors, defined atSDL3/SDL_pixels.h 1281:34
Since: 3.2.0
Arguments
| :: Ptr SDL_Palette |
|
| -> IO () |
Free a palette created with .createPalette
- Thread safety
- It is safe to call this function from any thread, as long as the palette is not modified or destroyed in another thread.
- See also
createPalette
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_DestroyPalette. The safe flavor isdestroyPaletteSafe. - C declaration
SDL_DestroyPalette, defined atSDL3/SDL_pixels.h 1295:34
Since: 3.2.0
Arguments
| :: Ptr SDL_Palette |
|
| -> IO () |
Free a palette created with .createPalette
- Thread safety
- It is safe to call this function from any thread, as long as the palette is not modified or destroyed in another thread.
- See also
createPalette
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_DestroyPalette. The unsafe flavor isdestroyPalette. - C declaration
SDL_DestroyPalette, defined atSDL3/SDL_pixels.h 1295:34
Since: 3.2.0
Arguments
| :: PtrConst SDL_PixelFormatDetails |
|
| -> PtrConst SDL_Palette |
|
| -> Word8 |
|
| -> Word8 |
|
| -> Word8 |
|
| -> IO Word32 |
Map an RGB triple to an opaque pixel value for a given pixel format.
This function maps the RGB color value to the specified pixel format and returns the pixel value best approximating the given RGB color value for the given pixel format.
If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned.
If the specified pixel format has an alpha component it will be returned as all 1 bits (fully opaque).
If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).
- Returns
- a pixel value.
- Thread safety
- It is safe to call this function from any thread, as long as the palette is not modified.
- See also
getPixelFormatDetails,getRGB,mapRGBA,mapSurfaceRGB
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_MapRGB. The safe flavor ismapRGBSafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_MapRGB, defined atSDL3/SDL_pixels.h 1333:36
Since: 3.2.0
Arguments
| :: PtrConst SDL_PixelFormatDetails |
|
| -> PtrConst SDL_Palette |
|
| -> Word8 |
|
| -> Word8 |
|
| -> Word8 |
|
| -> IO Word32 |
Map an RGB triple to an opaque pixel value for a given pixel format.
This function maps the RGB color value to the specified pixel format and returns the pixel value best approximating the given RGB color value for the given pixel format.
If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned.
If the specified pixel format has an alpha component it will be returned as all 1 bits (fully opaque).
If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).
- Returns
- a pixel value.
- Thread safety
- It is safe to call this function from any thread, as long as the palette is not modified.
- See also
getPixelFormatDetails,getRGB,mapRGBA,mapSurfaceRGB
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_MapRGB. The unsafe flavor ismapRGB. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_MapRGB, defined atSDL3/SDL_pixels.h 1333:36
Since: 3.2.0
Arguments
| :: PtrConst SDL_PixelFormatDetails |
|
| -> PtrConst SDL_Palette |
|
| -> Word8 |
|
| -> Word8 |
|
| -> Word8 |
|
| -> Word8 |
|
| -> IO Word32 |
Map an RGBA quadruple to a pixel value for a given pixel format.
This function maps the RGBA color value to the specified pixel format and returns the pixel value best approximating the given RGBA color value for the given pixel format.
If the specified pixel format has no alpha component the alpha value will be ignored (as it will be in formats with a palette).
If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned.
If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).
- Returns
- a pixel value.
- Thread safety
- It is safe to call this function from any thread, as long as the palette is not modified.
- See also
getPixelFormatDetails,getRGBA,mapRGB,mapSurfaceRGBA
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_MapRGBA. The safe flavor ismapRGBASafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_MapRGBA, defined atSDL3/SDL_pixels.h 1372:36
Since: 3.2.0
Arguments
| :: PtrConst SDL_PixelFormatDetails |
|
| -> PtrConst SDL_Palette |
|
| -> Word8 |
|
| -> Word8 |
|
| -> Word8 |
|
| -> Word8 |
|
| -> IO Word32 |
Map an RGBA quadruple to a pixel value for a given pixel format.
This function maps the RGBA color value to the specified pixel format and returns the pixel value best approximating the given RGBA color value for the given pixel format.
If the specified pixel format has no alpha component the alpha value will be ignored (as it will be in formats with a palette).
If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned.
If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).
- Returns
- a pixel value.
- Thread safety
- It is safe to call this function from any thread, as long as the palette is not modified.
- See also
getPixelFormatDetails,getRGBA,mapRGB,mapSurfaceRGBA
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_MapRGBA. The unsafe flavor ismapRGBA. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_MapRGBA, defined atSDL3/SDL_pixels.h 1372:36
Since: 3.2.0
Arguments
| :: Word32 |
|
| -> PtrConst SDL_PixelFormatDetails |
|
| -> PtrConst SDL_Palette |
|
| -> Ptr Uint8 |
|
| -> Ptr Uint8 |
|
| -> Ptr Uint8 |
|
| -> IO () |
Get RGB values from a pixel in the specified format.
This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB component (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
- Thread safety
- It is safe to call this function from any thread, as long as the palette is not modified.
- See also
getPixelFormatDetails,getRGBA,mapRGB,mapRGBA
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetRGB. The safe flavor isgetRGBSafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_GetRGB, defined atSDL3/SDL_pixels.h 1400:34
Since: 3.2.0
Arguments
| :: Word32 |
|
| -> PtrConst SDL_PixelFormatDetails |
|
| -> PtrConst SDL_Palette |
|
| -> Ptr Uint8 |
|
| -> Ptr Uint8 |
|
| -> Ptr Uint8 |
|
| -> IO () |
Get RGB values from a pixel in the specified format.
This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB component (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
- Thread safety
- It is safe to call this function from any thread, as long as the palette is not modified.
- See also
getPixelFormatDetails,getRGBA,mapRGB,mapRGBA
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetRGB. The unsafe flavor isgetRGB. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_GetRGB, defined atSDL3/SDL_pixels.h 1400:34
Since: 3.2.0
Arguments
| :: Word32 |
|
| -> PtrConst SDL_PixelFormatDetails |
|
| -> PtrConst SDL_Palette |
|
| -> Ptr Uint8 |
|
| -> Ptr Uint8 |
|
| -> Ptr Uint8 |
|
| -> Ptr Uint8 |
|
| -> IO () |
Get RGBA values from a pixel in the specified format.
This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB component (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
If the surface has no alpha component, the alpha will be returned as 0xff (100% opaque).
- Thread safety
- It is safe to call this function from any thread, as long as the palette is not modified.
- See also
getPixelFormatDetails,getRGB,mapRGB,mapRGBA
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetRGBA. The safe flavor isgetRGBASafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_GetRGBA, defined atSDL3/SDL_pixels.h 1432:34
Since: 3.2.0
Arguments
| :: Word32 |
|
| -> PtrConst SDL_PixelFormatDetails |
|
| -> PtrConst SDL_Palette |
|
| -> Ptr Uint8 |
|
| -> Ptr Uint8 |
|
| -> Ptr Uint8 |
|
| -> Ptr Uint8 |
|
| -> IO () |
Get RGBA values from a pixel in the specified format.
This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB component (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
If the surface has no alpha component, the alpha will be returned as 0xff (100% opaque).
- Thread safety
- It is safe to call this function from any thread, as long as the palette is not modified.
- See also
getPixelFormatDetails,getRGB,mapRGB,mapRGBA
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetRGBA. The unsafe flavor isgetRGBA. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_GetRGBA, defined atSDL3/SDL_pixels.h 1432:34
Since: 3.2.0
C shims
Arguments
| :: Word8 |
|
| -> Word8 |
|
| -> Word8 |
|
| -> Word8 |
|
| -> 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
fourCC
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_DEFINE_PIXELFOURCC. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
lithon_SDL_DEFINE_PIXELFOURCC, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 42:35
Since: 3.2.0
Arguments
| :: SDL_PixelFormat |
|
| -> IO Int32 |
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
bytesPerPixel
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_BITSPERPIXEL. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
lithon_SDL_BITSPERPIXEL, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 62:23
Since: 3.2.0
Arguments
| :: SDL_PixelFormat |
|
| -> IO Int32 |
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
bitsPerPixel
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_BYTESPERPIXEL. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
lithon_SDL_BYTESPERPIXEL, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 83:23
Since: 3.2.0
Arguments
| :: SDL_PixelFormat |
|
| -> IO Bool |
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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_ISPIXELFORMAT_INDEXED. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
lithon_SDL_ISPIXELFORMAT_INDEXED, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 100:24
Since: 3.2.0
Arguments
| :: SDL_PixelFormat |
|
| -> IO Bool |
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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_ISPIXELFORMAT_PACKED. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
lithon_SDL_ISPIXELFORMAT_PACKED, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 117:24
Since: 3.2.0
Arguments
| :: SDL_PixelFormat |
|
| -> IO Bool |
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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_ISPIXELFORMAT_ARRAY. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
lithon_SDL_ISPIXELFORMAT_ARRAY, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 134:24
Since: 3.2.0
Arguments
| :: SDL_PixelFormat |
|
| -> IO Bool |
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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_ISPIXELFORMAT_10BIT. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
lithon_SDL_ISPIXELFORMAT_10BIT, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 151:24
Since: 3.2.0
Arguments
| :: SDL_PixelFormat |
|
| -> IO Bool |
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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_ISPIXELFORMAT_FLOAT. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
lithon_SDL_ISPIXELFORMAT_FLOAT, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 168:24
Since: 3.2.0
Arguments
| :: SDL_PixelFormat |
|
| -> IO Bool |
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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_ISPIXELFORMAT_ALPHA. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
lithon_SDL_ISPIXELFORMAT_ALPHA, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 185:24
Since: 3.2.0
Arguments
| :: SDL_PixelFormat |
|
| -> IO Bool |
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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_ISPIXELFORMAT_FOURCC. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
lithon_SDL_ISPIXELFORMAT_FOURCC, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 202:24
Since: 3.2.0
Arguments
| :: SDL_ColorType |
|
| -> SDL_ColorRange |
|
| -> SDL_ColorPrimaries |
|
| -> SDL_TransferCharacteristics |
|
| -> SDL_MatrixCoefficients |
|
| -> SDL_ChromaLocation |
|
| -> 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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_DEFINE_COLORSPACE. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - C declaration
lithon_SDL_DEFINE_COLORSPACE, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 224:34
Since: 3.2.0
Arguments
| :: SDL_Colorspace |
|
| -> 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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_COLORSPACETYPE. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - C declaration
lithon_SDL_COLORSPACETYPE, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 241:33
Since: 3.2.0
Arguments
| :: SDL_Colorspace |
|
| -> 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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_COLORSPACERANGE. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - C declaration
lithon_SDL_COLORSPACERANGE, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 258:34
Since: 3.2.0
Arguments
| :: SDL_Colorspace |
|
| -> 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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_COLORSPACECHROMA. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - C declaration
lithon_SDL_COLORSPACECHROMA, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 275:38
Since: 3.2.0
Arguments
| :: SDL_Colorspace |
|
| -> 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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_COLORSPACEPRIMARIES. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - C declaration
lithon_SDL_COLORSPACEPRIMARIES, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 292:38
Since: 3.2.0
Arguments
| :: SDL_Colorspace |
|
| -> 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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_COLORSPACETRANSFER. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - C declaration
lithon_SDL_COLORSPACETRANSFER, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 309:47
Since: 3.2.0
Arguments
| :: SDL_Colorspace |
|
| -> 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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_COLORSPACEMATRIX. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - C declaration
lithon_SDL_COLORSPACEMATRIX, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 326:42
Since: 3.2.0
isColorspaceMatrixBT601 Source #
Arguments
| :: SDL_Colorspace |
|
| -> IO Bool |
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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_ISCOLORSPACE_MATRIX_BT601. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
lithon_SDL_ISCOLORSPACE_MATRIX_BT601, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 343:24
Since: 3.2.0
isColorspaceMatrixBT709 Source #
Arguments
| :: SDL_Colorspace |
|
| -> IO Bool |
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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_ISCOLORSPACE_MATRIX_BT709. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
lithon_SDL_ISCOLORSPACE_MATRIX_BT709, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 360:24
Since: 3.2.0
isColorspaceMatrixBT2020NCL Source #
Arguments
| :: SDL_Colorspace |
|
| -> IO Bool |
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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_ISCOLORSPACE_MATRIX_BT2020_NCL. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
lithon_SDL_ISCOLORSPACE_MATRIX_BT2020_NCL, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 377:24
Since: 3.2.0
isColorspaceLimitedRange Source #
Arguments
| :: SDL_Colorspace |
|
| -> IO Bool |
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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_ISCOLORSPACE_LIMITED_RANGE. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
lithon_SDL_ISCOLORSPACE_LIMITED_RANGE, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 394:24
Since: 3.2.0
isColorspaceFullRange Source #
Arguments
| :: SDL_Colorspace |
|
| -> IO Bool |
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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
lithon_SDL_ISCOLORSPACE_FULL_RANGE. The safe import is not exported : pure bit manipulation on immediate values; cannot block, lock, or call back. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
lithon_SDL_ISCOLORSPACE_FULL_RANGE, defined atsdl3-bindgen-sys/SDL_pixels_shims.h 411:24
Since: 3.2.0