sdlGetSurfacePalette function surface
Get the palette used by a surface.
\param surface the SDL_Surface structure to query. \returns a pointer to the palette used by the surface, or NULL if there is no palette used.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.2.0.
\sa SDL_SetSurfacePalette
extern SDL_DECLSPEC SDL_Palette * SDLCALL SDL_GetSurfacePalette(SDL_Surface *surface)
Implementation
Pointer<SdlPalette> sdlGetSurfacePalette(Pointer<SdlSurface> surface) {
final sdlGetSurfacePaletteLookupFunction = _libSdl
.lookupFunction<
Pointer<SdlPalette> Function(Pointer<SdlSurface> surface),
Pointer<SdlPalette> Function(Pointer<SdlSurface> surface)
>('SDL_GetSurfacePalette');
return sdlGetSurfacePaletteLookupFunction(surface);
}