sdlCreateColorCursor function

Pointer<SdlCursor> sdlCreateColorCursor(
  1. Pointer<SdlSurface> surface,
  2. int hotX,
  3. int hotY
)

Create a color cursor.

\param surface an SDL_Surface structure representing the cursor image \param hot_x the x position of the cursor hot spot \param hot_y the y position of the cursor hot spot \returns the new cursor on success or NULL on failure; call SDL_GetError() for more information.

\since This function is available since SDL 2.0.0.

\sa SDL_CreateCursor \sa SDL_FreeCursor

extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface, int hot_x, int hot_y)

Implementation

Pointer<SdlCursor> sdlCreateColorCursor(
    Pointer<SdlSurface> surface, int hotX, int hotY) {
  final sdlCreateColorCursorLookupFunction = libSdl2.lookupFunction<
      Pointer<SdlCursor> Function(
          Pointer<SdlSurface> surface, Int32 hotX, Int32 hotY),
      Pointer<SdlCursor> Function(Pointer<SdlSurface> surface, int hotX,
          int hotY)>('SDL_CreateColorCursor');
  return sdlCreateColorCursorLookupFunction(surface, hotX, hotY);
}