ios: Move animation callback to its own typedef.

This commit is contained in:
Ryan C. Gordon 2024-06-12 15:07:39 -04:00
parent 5b0f14a936
commit 5416bd5fdc
No known key found for this signature in database
GPG key ID: FA148B892AB48044
6 changed files with 27 additions and 6 deletions

View file

@ -191,6 +191,22 @@ extern SDL_DECLSPEC int SDLCALL SDL_LinuxSetThreadPriorityAndPolicy(Sint64 threa
*/
#ifdef SDL_PLATFORM_IOS
/**
* The prototype for an Apple iOS animation callback.
*
* This datatype is only useful on Apple iOS.
*
* After passing a function pointer of this type to SDL_iOSSetAnimationCallback,
* the system will call that function pointer at a regular interval.
*
* \param userdata what was passed as `callbackParam` to SDL_iOSSetAnimationCallback as `callbackParam`.
*
* \since This datatype is available since SDL 3.0.0.
*
* \sa SDL_iOSSetAnimationCallback
*/
typedef void (SDLCALL *SDL_iOSAnimationCallback)(void *userdata);
/**
* Use this function to set the animation callback on Apple iOS.
*
@ -228,7 +244,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_LinuxSetThreadPriorityAndPolicy(Sint64 threa
*
* \sa SDL_iOSSetEventPump
*/
extern SDL_DECLSPEC int SDLCALL SDL_iOSSetAnimationCallback(SDL_Window * window, int interval, void (SDLCALL *callback)(void*), void *callbackParam);
extern SDL_DECLSPEC int SDLCALL SDL_iOSSetAnimationCallback(SDL_Window * window, int interval, SDL_iOSAnimationCallback callback, void *callbackParam);
/**
* Use this function to enable or disable the SDL event pump on Apple iOS.