sdlGetSurfaceImages function
- Pointer<
SdlSurface> surface, - Pointer<
Int32> count
Get an array including all versions of a surface.
This returns all versions of a surface, with the surface being queried as the first element in the returned array.
Freeing the array of surfaces does not affect the surfaces in the array. They are still referenced by the surface being queried and will be cleaned up normally.
\param surface the SDL_Surface structure to query. \param count a pointer filled in with the number of surface pointers returned, may be NULL. \returns a NULL terminated array of SDL_Surface pointers or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
\since This function is available since SDL 3.1.3.
\sa SDL_AddSurfaceAlternateImage \sa SDL_RemoveSurfaceAlternateImages \sa SDL_SurfaceHasAlternateImages
extern SDL_DECLSPEC SDL_Surface ** SDLCALL SDL_GetSurfaceImages(SDL_Surface *surface, int *count)
Implementation
Pointer<Pointer<SdlSurface>> sdlGetSurfaceImages(
Pointer<SdlSurface> surface, Pointer<Int32> count) {
final sdlGetSurfaceImagesLookupFunction = libSdl3.lookupFunction<
Pointer<Pointer<SdlSurface>> Function(
Pointer<SdlSurface> surface, Pointer<Int32> count),
Pointer<Pointer<SdlSurface>> Function(Pointer<SdlSurface> surface,
Pointer<Int32> count)>('SDL_GetSurfaceImages');
return sdlGetSurfaceImagesLookupFunction(surface, count);
}