sdlHasColorKey function

bool sdlHasColorKey(
  1. Pointer<SdlSurface> surface
)

Returns whether the surface has a color key

It is safe to pass a NULL surface here; it will return SDL_FALSE.

\param surface the SDL_Surface structure to query \return SDL_TRUE if the surface has a color key, SDL_FALSE otherwise.

\since This function is available since SDL 2.0.9.

\sa SDL_SetColorKey \sa SDL_GetColorKey

extern DECLSPEC SDL_bool SDLCALL SDL_HasColorKey(SDL_Surface * surface)

Implementation

bool sdlHasColorKey(Pointer<SdlSurface> surface) {
  final sdlHasColorKeyLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Pointer<SdlSurface> surface),
      int Function(Pointer<SdlSurface> surface)>('SDL_HasColorKey');
  return sdlHasColorKeyLookupFunction(surface) == 1;
}