imgCreateAnimatedCursor function image

Pointer<SdlCursor> imgCreateAnimatedCursor(
  1. Pointer<ImgAnimation> anim,
  2. int hotX,
  3. int hotY
)

Create an animated cursor from an animation.

\param anim an animation to use to create an animated cursor. \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_image 3.4.0.

\sa IMG_LoadAnimation \sa IMG_LoadAnimation_IO \sa IMG_LoadAnimationTyped_IO

extern SDL_DECLSPEC SDL_Cursor * SDLCALL IMG_CreateAnimatedCursor(IMG_Animation *anim, int hot_x, int hot_y)

Implementation

Pointer<SdlCursor> imgCreateAnimatedCursor(
  Pointer<ImgAnimation> anim,
  int hotX,
  int hotY,
) {
  final imgCreateAnimatedCursorLookupFunction = _libImage
      .lookupFunction<
        Pointer<SdlCursor> Function(
          Pointer<ImgAnimation> anim,
          Int32 hotX,
          Int32 hotY,
        ),
        Pointer<SdlCursor> Function(
          Pointer<ImgAnimation> anim,
          int hotX,
          int hotY,
        )
      >('IMG_CreateAnimatedCursor');
  return imgCreateAnimatedCursorLookupFunction(anim, hotX, hotY);
}