diff --git a/include/SDL.h b/include/SDL.h index 222a8bd99..07d3356bf 100644 --- a/include/SDL.h +++ b/include/SDL.h @@ -132,6 +132,8 @@ extern "C" { * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_InitSubSystem * \sa SDL_Quit * \sa SDL_SetMainReady @@ -148,6 +150,8 @@ extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Init * \sa SDL_Quit * \sa SDL_QuitSubSystem @@ -169,6 +173,8 @@ extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags); * * \param flags any of the flags used by SDL_Init(); see SDL_Init for details. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_InitSubSystem * \sa SDL_Quit */ @@ -183,6 +189,8 @@ extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags); * * The return value does not include SDL_INIT_NOPARACHUTE. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Init * \sa SDL_InitSubSystem */ @@ -205,6 +213,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags); * application is shutdown, but it is not wise to do this from a library or * other dynamically loaded code. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Init * \sa SDL_QuitSubSystem */ diff --git a/include/SDL_assert.h b/include/SDL_assert.h index a627b1786..4c2099302 100644 --- a/include/SDL_assert.h +++ b/include/SDL_assert.h @@ -217,6 +217,8 @@ typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)( * fails or NULL for the default handler * \param userdata a pointer that is passed to `handler` * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetAssertionHandler */ extern DECLSPEC void SDLCALL SDL_SetAssertionHandler( @@ -285,6 +287,8 @@ extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puse * \returns a list of all failed assertions or NULL if the list is empty. This * memory should not be modified or freed by the application. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_ResetAssertionReport */ extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void); @@ -297,6 +301,8 @@ extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void); * no items. In addition, any previously-triggered assertions will be reset to * a trigger_count of zero, and their always_ignore state will be false. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetAssertionReport */ extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void); diff --git a/include/SDL_atomic.h b/include/SDL_atomic.h index 5e1eae773..db0dbe95d 100644 --- a/include/SDL_atomic.h +++ b/include/SDL_atomic.h @@ -98,6 +98,8 @@ typedef int SDL_SpinLock; * \returns SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already * held. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_AtomicLock * \sa SDL_AtomicUnlock */ @@ -111,6 +113,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock); * * \param lock a pointer to a lock variable * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_AtomicTryLock * \sa SDL_AtomicUnlock */ @@ -173,6 +177,8 @@ extern _inline void SDL_CompilerBarrier (void); * * For more information on these semantics, take a look at the blog post: * http://preshing.com/20120913/acquire-and-release-semantics + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void); extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void); @@ -268,6 +274,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int * \param v the desired value * \returns the previous value of the atomic variable. * + * \since This function is available since SDL 2.0.2. + * * \sa SDL_AtomicGet */ extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v); @@ -281,6 +289,8 @@ extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v); * \param a a pointer to an SDL_atomic_t variable * \returns the current value of an atomic variable. * + * \since This function is available since SDL 2.0.2. + * * \sa SDL_AtomicSet */ extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a); @@ -297,6 +307,8 @@ extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a); * \param v the desired value to add * \returns the previous value of the atomic variable. * + * \since This function is available since SDL 2.0.2. + * * \sa SDL_AtomicDecRef * \sa SDL_AtomicIncRef */ @@ -348,6 +360,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void * * \param v the desired pointer value * \returns the previous value of the pointer. * + * \since This function is available since SDL 2.0.2. + * * \sa SDL_AtomicCASPtr * \sa SDL_AtomicGetPtr */ @@ -362,6 +376,8 @@ extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v); * \param a a pointer to a pointer * \returns the current value of a pointer. * + * \since This function is available since SDL 2.0.2. + * * \sa SDL_AtomicCASPtr * \sa SDL_AtomicSetPtr */ diff --git a/include/SDL_audio.h b/include/SDL_audio.h index dd815d031..7bfb2daa1 100644 --- a/include/SDL_audio.h +++ b/include/SDL_audio.h @@ -291,6 +291,8 @@ extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void); * \returns the name of the audio driver at the requested index, or NULL if an * invalid index was specified. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetNumAudioDrivers */ extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index); @@ -316,6 +318,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_AudioQuit */ extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name); @@ -328,6 +332,8 @@ extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name); * specific need to specify the audio driver you want to use. You should * normally use SDL_Quit() or SDL_QuitSubSystem(). * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_AudioInit */ extern DECLSPEC void SDLCALL SDL_AudioQuit(void); @@ -391,6 +397,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void); * audio device or failure to set up the audio thread; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CloseAudio * \sa SDL_LockAudio * \sa SDL_PauseAudio @@ -476,6 +484,8 @@ extern DECLSPEC int SDLCALL SDL_GetNumAudioDevices(int iscapture); * \returns the name of the audio device at the requested index, or NULL on * error. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetNumAudioDevices */ extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index, @@ -656,6 +666,8 @@ typedef enum * * \returns the SDL_AudioStatus of the audio device opened by SDL_OpenAudio(). * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetAudioDeviceStatus */ extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioStatus(void); @@ -667,6 +679,8 @@ extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioStatus(void); * SDL_OpenAudioDevice() * \returns the SDL_AudioStatus of the specified audio device. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_PauseAudioDevice */ extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev); @@ -697,6 +711,8 @@ extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioDeviceStatus(SDL_AudioDevice * * \param pause_on non-zero to pause, 0 to unpause * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetAudioStatus * \sa SDL_PauseAudioDevice */ @@ -726,6 +742,8 @@ extern DECLSPEC void SDLCALL SDL_PauseAudio(int pause_on); * \param dev a device opened by SDL_OpenAudioDevice() * \param pause_on non-zero to pause, 0 to unpause * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_LockAudioDevice */ extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev, @@ -808,6 +826,8 @@ extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev, * When the application is done with the data returned in * `audio_buf`, it should call SDL_FreeWAV() to dispose of it. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_FreeWAV * \sa SDL_LoadWAV */ @@ -834,6 +854,8 @@ extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src, * \param audio_buf a pointer to the buffer created by SDL_LoadWAV() or * SDL_LoadWAV_RW() * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_LoadWAV * \sa SDL_LoadWAV_RW */ @@ -867,6 +889,8 @@ extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf); * or a negative error code on failure; call SDL_GetError() for more * information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_ConvertAudio */ extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt, @@ -911,6 +935,8 @@ extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt, * \returns 0 if the conversion was completed successfully or a negative error * code on failure; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_BuildAudioCVT */ extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt); @@ -937,6 +963,8 @@ typedef struct _SDL_AudioStream SDL_AudioStream; * \param dst_rate The sampling rate of the desired audio output * \returns 0 on success, or -1 on error. * + * \since This function is available since SDL 2.0.7. + * * \sa SDL_AudioStreamPut * \sa SDL_AudioStreamGet * \sa SDL_AudioStreamAvailable @@ -959,6 +987,8 @@ extern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioForm * \param len The number of bytes to write to the stream * \returns 0 on success, or -1 on error. * + * \since This function is available since SDL 2.0.7. + * * \sa SDL_NewAudioStream * \sa SDL_AudioStreamGet * \sa SDL_AudioStreamAvailable @@ -976,6 +1006,8 @@ extern DECLSPEC int SDLCALL SDL_AudioStreamPut(SDL_AudioStream *stream, const vo * \param len The maximum number of bytes to fill * \returns the number of bytes read from the stream, or -1 on error * + * \since This function is available since SDL 2.0.7. + * * \sa SDL_NewAudioStream * \sa SDL_AudioStreamPut * \sa SDL_AudioStreamAvailable @@ -992,6 +1024,8 @@ extern DECLSPEC int SDLCALL SDL_AudioStreamGet(SDL_AudioStream *stream, void *bu * resample correctly, so this number might be lower than what you expect, or * even be zero. Add more data or flush the stream if you need the data now. * + * \since This function is available since SDL 2.0.7. + * * \sa SDL_NewAudioStream * \sa SDL_AudioStreamPut * \sa SDL_AudioStreamGet @@ -1009,6 +1043,8 @@ extern DECLSPEC int SDLCALL SDL_AudioStreamAvailable(SDL_AudioStream *stream); * audio gaps in the output. Generally this is intended to signal the end of * input, so the complete output becomes available. * + * \since This function is available since SDL 2.0.7. + * * \sa SDL_NewAudioStream * \sa SDL_AudioStreamPut * \sa SDL_AudioStreamGet @@ -1021,6 +1057,8 @@ extern DECLSPEC int SDLCALL SDL_AudioStreamFlush(SDL_AudioStream *stream); /** * Clear any pending data in the stream without converting it * + * \since This function is available since SDL 2.0.7. + * * \sa SDL_NewAudioStream * \sa SDL_AudioStreamPut * \sa SDL_AudioStreamGet @@ -1033,6 +1071,8 @@ extern DECLSPEC void SDLCALL SDL_AudioStreamClear(SDL_AudioStream *stream); /** * Free an audio stream * + * \since This function is available since SDL 2.0.7. + * * \sa SDL_NewAudioStream * \sa SDL_AudioStreamPut * \sa SDL_AudioStreamGet @@ -1062,6 +1102,8 @@ extern DECLSPEC void SDLCALL SDL_FreeAudioStream(SDL_AudioStream *stream); * \param volume ranges from 0 - 128, and should be set to SDL_MIX_MAXVOLUME * for full audio volume * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_MixAudioFormat */ extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src, @@ -1094,6 +1136,8 @@ extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src, * \param len the length of the audio buffer in bytes * \param volume ranges from 0 - 128, and should be set to SDL_MIX_MAXVOLUME * for full audio volume + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, @@ -1287,6 +1331,8 @@ extern DECLSPEC void SDLCALL SDL_ClearQueuedAudio(SDL_AudioDeviceID dev); * * ...and is only useful if you used the legacy SDL_OpenAudio() function. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_LockAudioDevice * \sa SDL_UnlockAudio * \sa SDL_UnlockAudioDevice @@ -1326,6 +1372,8 @@ extern DECLSPEC void SDLCALL SDL_LockAudio(void); * * \param dev the ID of the device to be locked * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_UnlockAudioDevice */ extern DECLSPEC void SDLCALL SDL_LockAudioDevice(SDL_AudioDeviceID dev); @@ -1342,6 +1390,8 @@ extern DECLSPEC void SDLCALL SDL_LockAudioDevice(SDL_AudioDeviceID dev); * * ...and is only useful if you used the legacy SDL_OpenAudio() function. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_LockAudio * \sa SDL_UnlockAudioDevice */ @@ -1355,6 +1405,8 @@ extern DECLSPEC void SDLCALL SDL_UnlockAudio(void); * * \param dev the ID of the device to be unlocked * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_LockAudioDevice */ extern DECLSPEC void SDLCALL SDL_UnlockAudioDevice(SDL_AudioDeviceID dev); @@ -1371,6 +1423,8 @@ extern DECLSPEC void SDLCALL SDL_UnlockAudioDevice(SDL_AudioDeviceID dev); * * ...and is only useful if you used the legacy SDL_OpenAudio() function. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_OpenAudio */ extern DECLSPEC void SDLCALL SDL_CloseAudio(void); @@ -1393,6 +1447,8 @@ extern DECLSPEC void SDLCALL SDL_CloseAudio(void); * * \param dev an audio device previously opened with SDL_OpenAudioDevice() * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_OpenAudioDevice */ extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev); diff --git a/include/SDL_blendmode.h b/include/SDL_blendmode.h index 374f225a0..84e3653aa 100644 --- a/include/SDL_blendmode.h +++ b/include/SDL_blendmode.h @@ -175,7 +175,7 @@ typedef enum * \returns an SDL_BlendMode that represents the chosen factors and * operations. * - * \since This function is available in SDL 2.0.6. + * \since This function is available since SDL 2.0.6. * * \sa SDL_SetRenderDrawBlendMode * \sa SDL_GetRenderDrawBlendMode diff --git a/include/SDL_clipboard.h b/include/SDL_clipboard.h index 1ed812053..8a574ccb1 100644 --- a/include/SDL_clipboard.h +++ b/include/SDL_clipboard.h @@ -45,6 +45,8 @@ extern "C" { * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetClipboardText * \sa SDL_HasClipboardText */ @@ -61,6 +63,8 @@ extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text); * on the returned pointer when done with it (even if there was an * error). * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_HasClipboardText * \sa SDL_SetClipboardText */ diff --git a/include/SDL_cpuinfo.h b/include/SDL_cpuinfo.h index 9b6ec7003..89cc74097 100644 --- a/include/SDL_cpuinfo.h +++ b/include/SDL_cpuinfo.h @@ -158,6 +158,8 @@ extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void); * * \returns SDL_TRUE if the CPU has the RDTSC instruction or SDL_FALSE if not. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Has3DNow * \sa SDL_HasAltiVec * \sa SDL_HasAVX @@ -179,6 +181,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void); * * \returns SDL_TRUE if the CPU has AltiVec features or SDL_FALSE if not. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Has3DNow * \sa SDL_HasAVX * \sa SDL_HasAVX2 @@ -199,6 +203,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void); * * \returns SDL_TRUE if the CPU has MMX features or SDL_FALSE if not. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Has3DNow * \sa SDL_HasAltiVec * \sa SDL_HasAVX @@ -219,6 +225,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void); * * \returns SDL_TRUE if the CPU has 3DNow! features or SDL_FALSE if not. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_HasAltiVec * \sa SDL_HasAVX * \sa SDL_HasAVX2 @@ -239,6 +247,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void); * * \returns SDL_TRUE if the CPU has SSE features or SDL_FALSE if not. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Has3DNow * \sa SDL_HasAltiVec * \sa SDL_HasAVX @@ -259,6 +269,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void); * * \returns SDL_TRUE if the CPU has SSE2 features or SDL_FALSE if not. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Has3DNow * \sa SDL_HasAltiVec * \sa SDL_HasAVX @@ -279,6 +291,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void); * * \returns SDL_TRUE if the CPU has SSE3 features or SDL_FALSE if not. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Has3DNow * \sa SDL_HasAltiVec * \sa SDL_HasAVX @@ -299,6 +313,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void); * * \returns SDL_TRUE if the CPU has SSE4.1 features or SDL_FALSE if not. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Has3DNow * \sa SDL_HasAltiVec * \sa SDL_HasAVX @@ -319,6 +335,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void); * * \returns SDL_TRUE if the CPU has SSE4.2 features or SDL_FALSE if not. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Has3DNow * \sa SDL_HasAltiVec * \sa SDL_HasAVX @@ -383,6 +401,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void); * * \returns SDL_TRUE if the CPU has AVX-512F features or SDL_FALSE if not. * + * \since This function is available since SDL 2.0.9. + * * \sa SDL_HasAVX */ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void); @@ -396,6 +416,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void); * * \returns SDL_TRUE if the CPU has ARM SIMD features or SDL_FALSE if not. * + * \since This function is available since SDL 2.0.12. + * * \sa SDL_HasNEON */ extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void); @@ -406,6 +428,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void); * This always returns false on CPUs that aren't using ARM instruction sets. * * \returns SDL_TRUE if the CPU has ARM NEON features or SDL_FALSE if not. + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void); @@ -432,6 +456,8 @@ extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void); * * \returns the alignment in bytes needed for available, known SIMD * instructions. + * + * \since This function is available since SDL 2.0.10. */ extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void); @@ -466,6 +492,8 @@ extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void); * allocated block might be larger due to padding, etc. * \returns a pointer to the newly-allocated block, NULL if out of memory. * + * \since This function is available since SDL 2.0.10. + * * \sa SDL_SIMDAlignment * \sa SDL_SIMDRealloc * \sa SDL_SIMDFree @@ -488,6 +516,8 @@ extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len); * memory. * \returns a pointer to the newly-reallocated block, NULL if out of memory. * + * \since This function is available since SDL 2.0.14. + * * \sa SDL_SIMDAlignment * \sa SDL_SIMDAlloc * \sa SDL_SIMDFree @@ -511,6 +541,8 @@ extern DECLSPEC void * SDLCALL SDL_SIMDRealloc(void *mem, const size_t len); * \param ptr The pointer, returned from SDL_SIMDAlloc or SDL_SIMDRealloc, to * deallocate. NULL is a legal no-op. * + * \since This function is available since SDL 2.0.10. + * * \sa SDL_SIMDAlloc * \sa SDL_SIMDRealloc */ diff --git a/include/SDL_error.h b/include/SDL_error.h index acdf3f6ba..33277c50b 100644 --- a/include/SDL_error.h +++ b/include/SDL_error.h @@ -58,6 +58,8 @@ extern "C" { * any * \returns always -1. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_ClearError * \sa SDL_GetError */ @@ -93,6 +95,8 @@ extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fm * return values of SDL function calls to determine when to * appropriately call SDL_GetError(). * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_ClearError * \sa SDL_SetError */ @@ -109,6 +113,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetError(void); * \param maxlen The size of the buffer pointed to by the errstr parameter * \returns the pointer passed in as the `errstr` parameter. * + * \since This function is available since SDL 2.0.14. + * * \sa SDL_GetError */ extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *errstr, int maxlen); @@ -116,6 +122,8 @@ extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *errstr, int maxlen); /** * Clear any previous error message for this thread. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetError * \sa SDL_SetError */ diff --git a/include/SDL_events.h b/include/SDL_events.h index c018e3b41..9718c404a 100644 --- a/include/SDL_events.h +++ b/include/SDL_events.h @@ -662,6 +662,8 @@ SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof(((SDL_Event *)NUL * polling or waiting for events (e.g. you are filtering them), then you must * call SDL_PumpEvents() to force an event queue update. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_PollEvent * \sa SDL_WaitEvent */ @@ -707,6 +709,8 @@ typedef enum * \returns the number of events actually stored or a negative error code on * failure; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_PollEvent * \sa SDL_PumpEvents * \sa SDL_PushEvent @@ -726,6 +730,8 @@ extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents, * \returns SDL_TRUE if events matching `type` are present, or SDL_FALSE if * events matching `type` are not present. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_HasEvents */ extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type); @@ -743,6 +749,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type); * \returns SDL_TRUE if events with type >= `minType` and <= `maxType` are * present, or SDL_FALSE if not. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_HasEvents */ extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType); @@ -763,6 +771,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType); * * \param type the type of event to be cleared; see SDL_EventType for details * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_FlushEvents */ extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type); @@ -786,6 +796,8 @@ extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type); * \param maxType the high end of event type to be cleared, inclusive; see * SDL_EventType for details * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_FlushEvent */ extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType); @@ -826,6 +838,8 @@ extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType); * the queue, or NULL * \returns 1 if there is a pending event or 0 if there are none available. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetEventFilter * \sa SDL_PeepEvents * \sa SDL_PushEvent @@ -849,6 +863,8 @@ extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event); * \returns 1 on success or 0 if there was an error while waiting for events; * call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_PollEvent * \sa SDL_PumpEvents * \sa SDL_WaitEventTimeout @@ -873,6 +889,8 @@ extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event); * call SDL_GetError() for more information. This also returns 0 if * the timeout elapsed without an event arriving. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_PollEvent * \sa SDL_PumpEvents * \sa SDL_WaitEvent @@ -906,6 +924,8 @@ extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event, * code on failure; call SDL_GetError() for more information. A * common reason for error is the event queue being full. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_PeepEvents * \sa SDL_PollEvent * \sa SDL_RegisterEvents @@ -960,6 +980,8 @@ typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event); * \param filter An SDL_EventFilter function to call when an event happens * \param userdata a pointer that is passed to `filter` * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_AddEventWatch * \sa SDL_EventState * \sa SDL_GetEventFilter @@ -980,6 +1002,8 @@ extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter, * be stored here * \returns SDL_TRUE on success or SDL_FALSE if there is no event filter set. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_SetEventFilter */ extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter, @@ -1006,6 +1030,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter, * \param filter an SDL_EventFilter function to call when an event happens. * \param userdata a pointer that is passed to `filter` * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_DelEventWatch * \sa SDL_SetEventFilter */ @@ -1021,6 +1047,8 @@ extern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter, * \param filter the function originally passed to SDL_AddEventWatch() * \param userdata the pointer originally passed to SDL_AddEventWatch() * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_AddEventWatch */ extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter, @@ -1037,6 +1065,8 @@ extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter, * \param filter the SDL_EventFilter function to call when an event happens * \param userdata a pointer that is passed to `filter` * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetEventFilter * \sa SDL_SetEventFilter */ @@ -1064,6 +1094,8 @@ extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter, * \returns `SDL_DISABLE` or `SDL_ENABLE`, representing the processing state * of the event before this function makes any changes to it. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetEventState */ extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state); diff --git a/include/SDL_gamecontroller.h b/include/SDL_gamecontroller.h index 685bed0d7..695201e56 100644 --- a/include/SDL_gamecontroller.h +++ b/include/SDL_gamecontroller.h @@ -189,6 +189,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, * \returns 1 if a new mapping is added, 0 if an existing mapping is updated, * -1 on error; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GameControllerMapping * \sa SDL_GameControllerMappingForGUID */ @@ -198,6 +200,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping(const char* mappingStri * Get the number of mappings installed. * * \returns the number of mappings. + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(void); @@ -206,6 +210,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(void); * * \returns the mapping string. Must be freed with SDL_free(). Returns NULL if * the index is out of range. + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_index); @@ -218,6 +224,8 @@ extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_ind * \returns a mapping string or NULL on error; call SDL_GetError() for more * information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickGetDeviceGUID * \sa SDL_JoystickGetGUID */ @@ -289,6 +297,8 @@ extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_ * \param joystick_index the device_index of a device, from zero to * SDL_NumJoysticks()-1 * \returns the controller type. + * + * \since This function is available since SDL 2.0.12. */ extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerTypeForIndex(int joystick_index); @@ -301,6 +311,8 @@ extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerTypeForIndex(in * SDL_NumJoysticks()-1 * \returns the mapping string. Must be freed with SDL_free(). Returns NULL if * no mapping is available. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index); @@ -349,6 +361,8 @@ extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL * instance id! * \returns the SDL_GameController associated with a player index. * + * \since This function is available since SDL 2.0.12. + * * \sa SDL_GameControllerGetPlayerIndex * \sa SDL_GameControllerSetPlayerIndex */ @@ -380,6 +394,8 @@ extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *g * * \param gamecontroller the game controller object to query. * \returns the controller type. + * + * \since This function is available since SDL 2.0.12. */ extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_GameController *gamecontroller); @@ -390,6 +406,8 @@ extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_Gam * * \param gamecontroller the game controller object to query. * \returns the player index for controller, or -1 if it's not available. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller); @@ -398,6 +416,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController * * \param gamecontroller the game controller object to adjust. * \param player_index Player index to assign to this controller. + * + * \since This function is available since SDL 2.0.12. */ extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index); @@ -408,6 +428,8 @@ extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController * * \param gamecontroller the game controller object to query. * \return the USB vendor ID, or zero if unavailable. + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController *gamecontroller); @@ -418,6 +440,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController *g * * \param gamecontroller the game controller object to query. * \return the USB product ID, or zero if unavailable. + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController *gamecontroller); @@ -428,6 +452,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController * * * \param gamecontroller the game controller object to query. * \return the USB product version, or zero if unavailable. + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller); @@ -439,6 +465,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameContr * * \param gamecontroller the game controller object to query. * \return the serial number, or NULL if unavailable. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC const char * SDLCALL SDL_GameControllerGetSerial(SDL_GameController *gamecontroller); @@ -450,6 +478,8 @@ extern DECLSPEC const char * SDLCALL SDL_GameControllerGetSerial(SDL_GameControl * \returns SDL_TRUE if the controller has been opened and is currently * connected, or SDL_FALSE if not. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GameControllerClose * \sa SDL_GameControllerOpen */ @@ -471,6 +501,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerGetAttached(SDL_GameControlle * \param gamecontroller the game controller object that you want to get a * joystick from * \returns a SDL_Joystick object; call SDL_GetError() for more information. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller); @@ -500,6 +532,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state); * This function is called automatically by the event loop if events are * enabled. Under such circumstances, it will not be necessary to call this * function. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void); @@ -541,6 +575,8 @@ typedef enum * \returns the SDL_GameControllerAxis enum corresponding to the input string, * or `SDL_CONTROLLER_AXIS_INVALID` if no match was found. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GameControllerGetStringForAxis */ extern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *str); @@ -555,6 +591,8 @@ extern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromStri * specified. The string returned is of the format used by * SDL_GameController mapping strings. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GameControllerGetAxisFromString */ extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis); @@ -585,6 +623,8 @@ SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller, * \param gamecontroller a game controller * \param axis an axis enum value (an SDL_GameControllerAxis value) * \returns SDL_TRUE if the controller has this axis, SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis); @@ -650,6 +690,8 @@ typedef enum * \param str string representing a SDL_GameController axis * \returns the SDL_GameControllerButton enum corresponding to the input * string, or `SDL_CONTROLLER_AXIS_INVALID` if no match was found. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *str); @@ -695,6 +737,8 @@ SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller, * \param gamecontroller a game controller * \param button a button enum value (an SDL_GameControllerButton value) * \returns SDL_TRUE if the controller has this button, SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button); @@ -716,17 +760,23 @@ extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *ga /** * Get the number of touchpads on a game controller. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller); /** * Get the number of supported simultaneous fingers on a touchpad on a game * controller. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpadFingers(SDL_GameController *gamecontroller, int touchpad); /** * Get the current state of a finger on a touchpad on a game controller. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC int SDLCALL SDL_GameControllerGetTouchpadFinger(SDL_GameController *gamecontroller, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure); @@ -736,6 +786,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerGetTouchpadFinger(SDL_GameControll * \param gamecontroller The controller to query * \param type The type of sensor to query * \returns SDL_TRUE if the sensor exists, SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasSensor(SDL_GameController *gamecontroller, SDL_SensorType type); @@ -746,6 +798,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasSensor(SDL_GameController * \param type The type of sensor to enable/disable * \param enabled Whether data reporting should be enabled * \returns 0 or -1 if an error occurred. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC int SDLCALL SDL_GameControllerSetSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type, SDL_bool enabled); @@ -755,6 +809,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerSetSensorEnabled(SDL_GameControlle * \param gamecontroller The controller to query * \param type The type of sensor to query * \returns SDL_TRUE if the sensor is enabled, SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerIsSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type); @@ -765,6 +821,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerIsSensorEnabled(SDL_GameContr * \param gamecontroller The controller to query * \param type The type of sensor to query * \return the data rate, or 0.0f if the data rate is not available. + * + * \since This function is available since SDL 2.0.16. */ extern DECLSPEC float SDLCALL SDL_GameControllerGetSensorDataRate(SDL_GameController *gamecontroller, SDL_SensorType type); @@ -779,6 +837,8 @@ extern DECLSPEC float SDLCALL SDL_GameControllerGetSensorDataRate(SDL_GameContro * \param data A pointer filled with the current sensor state * \param num_values The number of values to write to data * \return 0 or -1 if an error occurred. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC int SDLCALL SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values); @@ -795,6 +855,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerGetSensorData(SDL_GameController * * rumble motor, from 0 to 0xFFFF * \param duration_ms The duration of the rumble effect, in milliseconds * \returns 0, or -1 if rumble isn't supported on this controller + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); @@ -815,6 +877,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecon * to 0xFFFF * \param duration_ms The duration of the rumble effect, in milliseconds * \returns 0, or -1 if trigger rumble isn't supported on this controller + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC int SDLCALL SDL_GameControllerRumbleTriggers(SDL_GameController *gamecontroller, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms); @@ -824,6 +888,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerRumbleTriggers(SDL_GameController * \param gamecontroller The controller to query * \returns SDL_TRUE, or SDL_FALSE if this controller does not have a * modifiable LED + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasLED(SDL_GameController *gamecontroller); @@ -835,6 +901,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasLED(SDL_GameController *ga * \param green The intensity of the green LED * \param blue The intensity of the blue LED * \returns 0, or -1 if this controller does not have a modifiable LED + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC int SDLCALL SDL_GameControllerSetLED(SDL_GameController *gamecontroller, Uint8 red, Uint8 green, Uint8 blue); @@ -857,6 +925,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerSendEffect(SDL_GameController *gam * \param gamecontroller a game controller identifier previously returned by * SDL_GameControllerOpen() * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GameControllerOpen */ extern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecontroller); diff --git a/include/SDL_haptic.h b/include/SDL_haptic.h index e68da77d3..26e996a51 100644 --- a/include/SDL_haptic.h +++ b/include/SDL_haptic.h @@ -971,6 +971,8 @@ extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick * * * \param haptic the SDL_Haptic device to close * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_HapticOpen */ extern DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic * haptic); @@ -1034,6 +1036,8 @@ extern DECLSPEC unsigned int SDLCALL SDL_HapticQuery(SDL_Haptic * haptic); * \param haptic the SDL_Haptic device to query * \returns the number of axes on success or a negative error code on failure; * call SDL_GetError() for more information. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC int SDLCALL SDL_HapticNumAxes(SDL_Haptic * haptic); @@ -1064,6 +1068,8 @@ extern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic, * \returns the ID of the effect on success or a negative error code on * failure; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_HapticDestroyEffect * \sa SDL_HapticRunEffect * \sa SDL_HapticUpdateEffect @@ -1208,6 +1214,8 @@ extern DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic * haptic, int gain); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_HapticQuery */ extern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic, @@ -1226,6 +1234,8 @@ extern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_HapticUnpause */ extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic); @@ -1239,6 +1249,8 @@ extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_HapticPause */ extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic); @@ -1249,6 +1261,8 @@ extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic); * \param haptic the SDL_Haptic device to stop * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic); @@ -1260,6 +1274,8 @@ extern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic); * negative error code on failure; call SDL_GetError() for more * information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_HapticRumbleInit * \sa SDL_HapticRumblePlay * \sa SDL_HapticRumbleStop @@ -1291,6 +1307,8 @@ extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_HapticRumbleInit * \sa SDL_HapticRumbleStop * \sa SDL_HapticRumbleSupported @@ -1304,6 +1322,8 @@ extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float stre * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_HapticRumbleInit * \sa SDL_HapticRumblePlay * \sa SDL_HapticRumbleSupported diff --git a/include/SDL_hints.h b/include/SDL_hints.h index 5536a4373..db286a24c 100644 --- a/include/SDL_hints.h +++ b/include/SDL_hints.h @@ -1816,6 +1816,8 @@ typedef enum * \param priority the SDL_HintPriority level for the hint * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetHint * \sa SDL_SetHint */ @@ -1834,6 +1836,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name, * \param value the value of the hint variable * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetHint * \sa SDL_SetHintWithPriority */ @@ -1846,6 +1850,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name, * \param name the hint to query * \returns the string value of a hint or NULL if the hint isn't set. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_SetHint * \sa SDL_SetHintWithPriority */ @@ -1912,6 +1918,8 @@ extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name, * Clear all hints. * * This function is automatically called during SDL_Quit(). + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC void SDLCALL SDL_ClearHints(void); diff --git a/include/SDL_joystick.h b/include/SDL_joystick.h index 8cc0dbfb7..88d043686 100644 --- a/include/SDL_joystick.h +++ b/include/SDL_joystick.h @@ -124,6 +124,8 @@ typedef enum * In particular, you are guaranteed that the joystick list won't change, so * the API functions that take a joystick index will be valid, and joystick * and game controller events will not be delivered. + * + * \since This function is available since SDL 2.0.7. */ extern DECLSPEC void SDLCALL SDL_LockJoysticks(void); @@ -137,6 +139,8 @@ extern DECLSPEC void SDLCALL SDL_LockJoysticks(void); * In particular, you are guaranteed that the joystick list won't change, so * the API functions that take a joystick index will be valid, and joystick * and game controller events will not be delivered. + * + * \since This function is available since SDL 2.0.7. */ extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void); @@ -146,6 +150,8 @@ extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void); * \returns the number of attached joysticks on success or a negative error * code on failure; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickName * \sa SDL_JoystickOpen */ @@ -161,6 +167,8 @@ extern DECLSPEC int SDLCALL SDL_NumJoysticks(void); * \returns the name of the selected joystick. If no name can be found, this * function returns NULL; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickName * \sa SDL_JoystickOpen */ @@ -169,6 +177,8 @@ extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index); /** * Get the player index of a joystick, or -1 if it's not available This can be * called before any joysticks are opened. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index); @@ -183,6 +193,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index); * \returns the GUID of the selected joystick. If called on an invalid index, * this function returns a zero GUID * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickGetGUID * \sa SDL_JoystickGetGUIDString */ @@ -198,6 +210,8 @@ extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_in * on the system * \returns the USB vendor ID of the selected joystick. If called on an * invalid index, this function returns zero + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceVendor(int device_index); @@ -211,6 +225,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceVendor(int device_index); * on the system * \returns the USB product ID of the selected joystick. If called on an * invalid index, this function returns zero + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProduct(int device_index); @@ -224,6 +240,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProduct(int device_index); * on the system * \returns the product version of the selected joystick. If called on an * invalid index, this function returns zero + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_index); @@ -236,6 +254,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_in * on the system * \returns the SDL_JoystickType of the selected joystick. If called on an * invalid index, this function returns `SDL_JOYSTICK_TYPE_UNKNOWN` + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_index); @@ -249,6 +269,8 @@ extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_in * on the system * \returns the instance id of the selected joystick. If called on an invalid * index, this function returns zero + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickGetDeviceInstanceID(int device_index); @@ -267,6 +289,8 @@ extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickGetDeviceInstanceID(int devic * \returns a joystick identifier or NULL if an error occurred; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickClose * \sa SDL_JoystickInstanceID */ @@ -289,6 +313,8 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID * \param player_index the player index to get the SDL_Joystick for * \returns an SDL_Joystick on success or NULL on failure; call SDL_GetError() * for more information. + * + * \since This function is available since SDL 2.0.12. */ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_index); @@ -296,6 +322,8 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_ind * Attach a new virtual joystick. * * \returns the joystick's device index, or -1 if an error occurred. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type, int naxes, @@ -308,6 +336,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type, * \param device_index a value previously returned from * SDL_JoystickAttachVirtual() * \returns 0 on success, or -1 if an error occurred. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC int SDLCALL SDL_JoystickDetachVirtual(int device_index); @@ -316,6 +346,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickDetachVirtual(int device_index); * * \param device_index a joystick device index. * \returns SDL_TRUE if the joystick is virtual, SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index); @@ -332,6 +364,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index); * \param axis the specific axis on the virtual joystick to set. * \param value the new value for the specified axis. * \returns 0 on success, -1 on error. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value); @@ -348,6 +382,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, i * \param button the specific button on the virtual joystick to set. * \param value the new value for the specified button. * \returns 0 on success, -1 on error. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualButton(SDL_Joystick *joystick, int button, Uint8 value); @@ -364,6 +400,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualButton(SDL_Joystick *joystick, * \param hat the specific hat on the virtual joystick to set. * \param value the new value for the specified hat. * \returns 0 on success, -1 on error. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value); @@ -389,6 +427,8 @@ extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick *joystick); * * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen() * \returns the player index, or -1 if it's not available. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick); @@ -397,6 +437,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick); * * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen() * \param player_index the player index to set. + * + * \since This function is available since SDL 2.0.12. */ extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index); @@ -410,6 +452,8 @@ extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, * this function returns a zero GUID; call SDL_GetError() for more * information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickGetDeviceGUID * \sa SDL_JoystickGetGUIDString */ @@ -422,6 +466,8 @@ extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick *joyst * * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen() * \returns the USB vendor ID of the selected joystick, or 0 if unavailable. + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick *joystick); @@ -432,6 +478,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick *joystick); * * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen() * \returns the USB product ID of the selected joystick, or 0 if unavailable. + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick *joystick); @@ -442,6 +490,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick *joystick); * * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen() * \returns the product version of the selected joystick, or 0 if unavailable. + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick *joystick); @@ -453,6 +503,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick *joyst * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen() * \returns the serial number of the selected joystick, or NULL if * unavailable. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC const char * SDLCALL SDL_JoystickGetSerial(SDL_Joystick *joystick); @@ -461,6 +513,8 @@ extern DECLSPEC const char * SDLCALL SDL_JoystickGetSerial(SDL_Joystick *joystic * * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen() * \returns the SDL_JoystickType of the selected joystick. + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick *joystick); @@ -473,6 +527,8 @@ extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick *joyst * \param pszGUID buffer in which to write the ASCII string * \param cbGUID the size of pszGUID * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickGetDeviceGUID * \sa SDL_JoystickGetGUID * \sa SDL_JoystickGetGUIDFromString @@ -489,6 +545,8 @@ extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, ch * \param pchGUID string containing an ASCII representation of a GUID * \returns a SDL_JoystickGUID structure. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickGetGUIDString */ extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID); @@ -500,6 +558,8 @@ extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const cha * \returns SDL_TRUE if the joystick has been opened, SDL_FALSE if it has not; * call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickClose * \sa SDL_JoystickOpen */ @@ -512,6 +572,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick *joystick) * \returns the instance ID of the specified joystick on success or a negative * error code on failure; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickOpen */ extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick *joystick); @@ -528,6 +590,8 @@ extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick *joys * negative error code on failure; call SDL_GetError() for more * information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickGetAxis * \sa SDL_JoystickOpen */ @@ -545,6 +609,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick *joystick); * \returns the number of trackballs on success or a negative error code on * failure; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickGetBall */ extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick *joystick); @@ -556,6 +622,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick *joystick); * \returns the number of POV hats on success or a negative error code on * failure; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickGetHat * \sa SDL_JoystickOpen */ @@ -568,6 +636,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick *joystick); * \returns the number of buttons on success or a negative error code on * failure; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickGetButton * \sa SDL_JoystickOpen */ @@ -579,6 +649,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick *joystick); * This is called automatically by the event loop if any joystick events are * enabled. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickEventState */ extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void); @@ -602,6 +674,8 @@ extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void); * If `state` is `SDL_QUERY` then the current state is returned, * otherwise the new processing state is returned. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GameControllerEventState */ extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state); @@ -627,6 +701,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state); * \returns a 16-bit signed integer representing the current position of the * axis or 0 on failure; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickNumAxes */ extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick *joystick, @@ -643,6 +719,8 @@ extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick *joystick, * \param axis the axis to query; the axis indices start at index 0 * \param state Upon return, the initial value is supplied here. * \return SDL_TRUE if this axis has any initial value, or SDL_FALSE if not. + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state); @@ -681,6 +759,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick *j * \param hat the hat index to get the state from; indices start at index 0 * \returns the current hat position. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickNumHats */ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick, @@ -701,6 +781,8 @@ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickNumBalls */ extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick *joystick, @@ -714,6 +796,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick *joystick, * index 0 * \returns 1 if the specified button is pressed, 0 otherwise. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickNumButtons */ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick *joystick, @@ -732,6 +816,8 @@ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick *joystick, * rumble motor, from 0 to 0xFFFF * \param duration_ms The duration of the rumble effect, in milliseconds * \returns 0, or -1 if rumble isn't supported on this joystick + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); @@ -753,6 +839,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 lo * to 0xFFFF * \param duration_ms The duration of the rumble effect, in milliseconds * \returns 0, or -1 if trigger rumble isn't supported on this joystick + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC int SDLCALL SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms); @@ -764,6 +852,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, U * * \param joystick The joystick to query * \return SDL_TRUE if the joystick has a modifiable LED, SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasLED(SDL_Joystick *joystick); @@ -778,6 +868,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasLED(SDL_Joystick *joystick); * \param green The intensity of the green LED * \param blue The intensity of the blue LED * \returns 0 on success, -1 if this joystick does not have a modifiable LED + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC int SDLCALL SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue); @@ -798,6 +890,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickSendEffect(SDL_Joystick *joystick, const * * \param joystick The joystick device to close * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_JoystickOpen */ extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick *joystick); diff --git a/include/SDL_keyboard.h b/include/SDL_keyboard.h index 4260b5e8d..5b4fd91a6 100644 --- a/include/SDL_keyboard.h +++ b/include/SDL_keyboard.h @@ -58,6 +58,8 @@ typedef struct SDL_Keysym * Query the window which currently has keyboard focus. * * \returns the window with keyboard focus. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void); @@ -85,6 +87,8 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void); * \param numkeys if non-NULL, receives the length of the returned array * \returns a pointer to an array of key states. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_PumpEvents */ extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys); @@ -95,6 +99,8 @@ extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys); * \returns an OR'd combination of the modifier keys for the keyboard. See * SDL_Keymod for details. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetKeyboardState * \sa SDL_SetModState */ @@ -113,6 +119,8 @@ extern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void); * * \param modstate the desired SDL_Keymod for the keyboard * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetModState */ extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate); @@ -126,6 +134,8 @@ extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate); * \param scancode the desired SDL_Scancode to query * \returns the SDL_Keycode that corresponds to the given SDL_Scancode. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetKeyName * \sa SDL_GetScancodeFromKey */ @@ -140,6 +150,8 @@ extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode * \param key the desired SDL_Keycode to query * \returns the SDL_Scancode that corresponds to the given SDL_Keycode. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetKeyFromScancode * \sa SDL_GetScancodeName */ @@ -196,6 +208,8 @@ extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name); * must copy it. If the key doesn't have a name, this function * returns an empty string (""). * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetKeyFromName * \sa SDL_GetKeyFromScancode * \sa SDL_GetScancodeFromKey @@ -209,6 +223,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key); * \returns key code, or `SDLK_UNKNOWN` if the name wasn't recognized; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetKeyFromScancode * \sa SDL_GetKeyName * \sa SDL_GetScancodeFromName @@ -225,6 +241,8 @@ extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name); * * On some platforms using this function activates the screen keyboard. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_SetTextInputRect * \sa SDL_StopTextInput */ @@ -244,6 +262,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void); /** * Stop receiving any text input events. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_StartTextInput */ extern DECLSPEC void SDLCALL SDL_StopTextInput(void); @@ -254,6 +274,8 @@ extern DECLSPEC void SDLCALL SDL_StopTextInput(void); * \param rect the SDL_Rect structure representing the rectangle to receive * text (ignored if NULL) * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_StartTextInput */ extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect); diff --git a/include/SDL_loadso.h b/include/SDL_loadso.h index e6a33a0a2..837c53e55 100644 --- a/include/SDL_loadso.h +++ b/include/SDL_loadso.h @@ -57,6 +57,8 @@ extern "C" { * \returns an opaque pointer to the object handle or NULL if there was an * error; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_LoadFunction * \sa SDL_UnloadObject */ @@ -82,6 +84,8 @@ extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile); * \returns a pointer to the function or NULL if there was an error; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_LoadObject * \sa SDL_UnloadObject */ @@ -93,6 +97,8 @@ extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle, * * \param handle a valid shared object handle returned by SDL_LoadObject() * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_LoadFunction * \sa SDL_LoadObject */ diff --git a/include/SDL_locale.h b/include/SDL_locale.h index cb4b04379..858c1c9ab 100644 --- a/include/SDL_locale.h +++ b/include/SDL_locale.h @@ -85,6 +85,8 @@ typedef struct SDL_Locale * * \return array of locales, terminated with a locale with a NULL language * field. Will return NULL on error. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC SDL_Locale * SDLCALL SDL_GetPreferredLocales(void); diff --git a/include/SDL_log.h b/include/SDL_log.h index e85961ace..141891292 100644 --- a/include/SDL_log.h +++ b/include/SDL_log.h @@ -116,6 +116,8 @@ typedef enum * * \param priority the SDL_LogPriority to assign * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_LogSetPriority */ extern DECLSPEC void SDLCALL SDL_LogSetAllPriority(SDL_LogPriority priority); @@ -126,6 +128,8 @@ extern DECLSPEC void SDLCALL SDL_LogSetAllPriority(SDL_LogPriority priority); * \param category the category to assign a priority to * \param priority the SDL_LogPriority to assign * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_LogGetPriority * \sa SDL_LogSetAllPriority */ @@ -138,6 +142,8 @@ extern DECLSPEC void SDLCALL SDL_LogSetPriority(int category, * \param category the category to query * \returns the SDL_LogPriority for the requested category * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_LogSetPriority */ extern DECLSPEC SDL_LogPriority SDLCALL SDL_LogGetPriority(int category); @@ -147,6 +153,8 @@ extern DECLSPEC SDL_LogPriority SDLCALL SDL_LogGetPriority(int category); * * This is called by SDL_Quit(). * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_LogSetAllPriority * \sa SDL_LogSetPriority */ @@ -160,6 +168,8 @@ extern DECLSPEC void SDLCALL SDL_LogResetPriorities(void); * \param ... additional parameters matching % tokens in the `fmt` string, if * any * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_LogCritical * \sa SDL_LogDebug * \sa SDL_LogError @@ -179,6 +189,8 @@ extern DECLSPEC void SDLCALL SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, . * \param ... additional parameters matching % tokens in the **fmt** string, * if any * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Log * \sa SDL_LogCritical * \sa SDL_LogDebug @@ -198,6 +210,8 @@ extern DECLSPEC void SDLCALL SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRI * \param ... additional parameters matching % tokens in the **fmt** string, * if any * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Log * \sa SDL_LogCritical * \sa SDL_LogError @@ -217,6 +231,8 @@ extern DECLSPEC void SDLCALL SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING * \param ... additional parameters matching % tokens in the **fmt** string, * if any * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Log * \sa SDL_LogCritical * \sa SDL_LogDebug @@ -236,6 +252,8 @@ extern DECLSPEC void SDLCALL SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING * \param ... additional parameters matching % tokens in the **fmt** string, * if any * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Log * \sa SDL_LogCritical * \sa SDL_LogDebug @@ -255,6 +273,8 @@ extern DECLSPEC void SDLCALL SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING * \param ... additional parameters matching % tokens in the **fmt** string, * if any * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Log * \sa SDL_LogCritical * \sa SDL_LogDebug @@ -274,6 +294,8 @@ extern DECLSPEC void SDLCALL SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING * \param ... additional parameters matching % tokens in the **fmt** string, * if any * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Log * \sa SDL_LogDebug * \sa SDL_LogError @@ -294,6 +316,8 @@ extern DECLSPEC void SDLCALL SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STR * \param ... additional parameters matching % tokens in the **fmt** string, * if any * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Log * \sa SDL_LogCritical * \sa SDL_LogDebug @@ -350,6 +374,8 @@ typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_ * \param userdata a pointer filled in with the pointer that is passed to * `callback` * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_LogSetOutputFunction */ extern DECLSPEC void SDLCALL SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata); @@ -360,6 +386,8 @@ extern DECLSPEC void SDLCALL SDL_LogGetOutputFunction(SDL_LogOutputFunction *cal * \param callback an SDL_LogOutputFunction to call instead of the default * \param userdata a pointer that is passed to `callback` * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_LogGetOutputFunction */ extern DECLSPEC void SDLCALL SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata); diff --git a/include/SDL_main.h b/include/SDL_main.h index 087193b28..e5f50e7a5 100644 --- a/include/SDL_main.h +++ b/include/SDL_main.h @@ -130,6 +130,8 @@ extern SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]); * will not be changed it is necessary to define SDL_MAIN_HANDLED before * including SDL.h. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_Init */ extern DECLSPEC void SDLCALL SDL_SetMainReady(void); @@ -138,6 +140,8 @@ extern DECLSPEC void SDLCALL SDL_SetMainReady(void); /** * This can be called to set the application class at startup + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, void *hInst); extern DECLSPEC void SDLCALL SDL_UnregisterApp(void); @@ -170,6 +174,8 @@ extern DECLSPEC int SDLCALL SDL_WinRTRunApp(SDL_main_func mainFunction, void * r * \param argv The argv parameter from the application's main() function * \param mainFunction The SDL app's C-style main(), an SDL_main_func * \return the return value from mainFunction + * + * \since This function is available since SDL 2.0.10. */ extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction); diff --git a/include/SDL_messagebox.h b/include/SDL_messagebox.h index c2aef70fa..2731c9254 100644 --- a/include/SDL_messagebox.h +++ b/include/SDL_messagebox.h @@ -175,6 +175,8 @@ extern DECLSPEC int SDLCALL SDL_ShowMessageBox(const SDL_MessageBoxData *message * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_ShowMessageBox */ extern DECLSPEC int SDLCALL SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window); diff --git a/include/SDL_metal.h b/include/SDL_metal.h index 60bcb6e18..bc72ca76f 100644 --- a/include/SDL_metal.h +++ b/include/SDL_metal.h @@ -58,6 +58,8 @@ typedef void *SDL_MetalView; * The returned handle can be casted directly to a NSView or UIView. To access * the backing CAMetalLayer, call SDL_Metal_GetLayer(). * + * \since This function is available since SDL 2.0.12. + * * \sa SDL_Metal_DestroyView * \sa SDL_Metal_GetLayer */ @@ -69,6 +71,8 @@ extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window); * This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was * called after SDL_CreateWindow. * + * \since This function is available since SDL 2.0.12. + * * \sa SDL_Metal_CreateView */ extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view); @@ -76,6 +80,8 @@ extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view); /** * Get a pointer to the backing CAMetalLayer for the given view. * + * \since This function is available since SDL 2.0.14. + * * \sa SDL_MetalCreateView */ extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view); @@ -87,6 +93,8 @@ extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view); * \param window SDL_Window from which the drawable size should be queried * \param w Pointer to variable for storing the width in pixels, may be NULL * + * \since This function is available since SDL 2.0.14. + * * \sa SDL_GetWindowSize * \sa SDL_CreateWindow */ diff --git a/include/SDL_misc.h b/include/SDL_misc.h index 7cd4d5788..ff0fa9527 100644 --- a/include/SDL_misc.h +++ b/include/SDL_misc.h @@ -64,7 +64,7 @@ extern "C" { * \returns 0 on success, or -1 on error; call SDL_GetError() for more * information. * - * \since This function is available in SDL 2.0.14 and newer + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC int SDLCALL SDL_OpenURL(const char *url); diff --git a/include/SDL_mouse.h b/include/SDL_mouse.h index 8fbe38f8a..c41055f40 100644 --- a/include/SDL_mouse.h +++ b/include/SDL_mouse.h @@ -75,6 +75,8 @@ typedef enum * Get the window which currently has mouse focus. * * \returns the window with mouse focus. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void); @@ -93,6 +95,8 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void); * focus window * \returns a 32-bit button bitmask of the current button state. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetGlobalMouseState * \sa SDL_GetRelativeMouseState * \sa SDL_PumpEvents @@ -141,6 +145,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetGlobalMouseState(int *x, int *y); * \param y a pointer filled with the last recorded y coordinate of the mouse * \returns a 32-bit button bitmask of the relative button state. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetMouseState */ extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y); @@ -158,6 +164,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y); * \param x the x coordinate within the window * \param y the y coordinate within the window * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_WarpMouseGlobal */ extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window, @@ -204,6 +212,8 @@ extern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(int x, int y); * * If relative mode is not supported, this returns -1. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetRelativeMouseMode */ extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled); @@ -250,6 +260,8 @@ extern DECLSPEC int SDLCALL SDL_CaptureMouse(SDL_bool enabled); * * \returns SDL_TRUE if relative mode is enabled or SDL_FALSE otherwise. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_SetRelativeMouseMode */ extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void); @@ -289,6 +301,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void); * \returns a new cursor with the specified parameters on success or NULL on * failure; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_FreeCursor * \sa SDL_SetCursor * \sa SDL_ShowCursor @@ -339,6 +353,8 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateSystemCursor(SDL_SystemCursor id); * * \param cursor a cursor to make active * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateCursor * \sa SDL_GetCursor * \sa SDL_ShowCursor @@ -353,6 +369,8 @@ extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor); * * \returns the active cursor or NULL if there is no mouse. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_SetCursor */ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void); @@ -376,6 +394,8 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void); * * \param cursor the cursor to free * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateColorCursor * \sa SDL_CreateCursor * \sa SDL_CreateSystemCursor @@ -397,6 +417,8 @@ extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor); * cursor is hidden, or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateCursor * \sa SDL_SetCursor */ diff --git a/include/SDL_mutex.h b/include/SDL_mutex.h index 2f27f19ac..7b0820893 100644 --- a/include/SDL_mutex.h +++ b/include/SDL_mutex.h @@ -71,6 +71,8 @@ typedef struct SDL_mutex SDL_mutex; * \returns the initialized and unlocked mutex or NULL on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_DestroyMutex * \sa SDL_LockMutex * \sa SDL_TryLockMutex @@ -91,6 +93,8 @@ extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void); * * \param mutex the mutex to lock * \return 0, or -1 on error. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex); #define SDL_mutexP(m) SDL_LockMutex(m) @@ -108,6 +112,8 @@ extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex); * \returns 0, `SDL_MUTEX_TIMEDOUT`, or -1 on error; call SDL_GetError() for * more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateMutex * \sa SDL_DestroyMutex * \sa SDL_LockMutex @@ -129,6 +135,8 @@ extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex); * * \param mutex the mutex to unlock. * \returns 0, or -1 on error. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex); #define SDL_mutexV(m) SDL_UnlockMutex(m) @@ -144,6 +152,8 @@ extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex); * * \param mutex the mutex to destroy * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateMutex * \sa SDL_LockMutex * \sa SDL_TryLockMutex @@ -176,6 +186,8 @@ typedef struct SDL_semaphore SDL_sem; * \returns a new semaphore or NULL on failure; call SDL_GetError() for more * information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_DestroySemaphore * \sa SDL_SemPost * \sa SDL_SemTryWait @@ -193,6 +205,8 @@ extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value); * * \param sem the semaphore to destroy * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateSemaphore * \sa SDL_SemPost * \sa SDL_SemTryWait @@ -217,6 +231,8 @@ extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateSemaphore * \sa SDL_DestroySemaphore * \sa SDL_SemPost @@ -240,6 +256,8 @@ extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem); * block, or a negative error code on failure; call SDL_GetError() * for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateSemaphore * \sa SDL_DestroySemaphore * \sa SDL_SemPost @@ -263,6 +281,8 @@ extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem); * succeed in the allotted time, or a negative error code on failure; * call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateSemaphore * \sa SDL_DestroySemaphore * \sa SDL_SemPost @@ -279,6 +299,8 @@ extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateSemaphore * \sa SDL_DestroySemaphore * \sa SDL_SemTryWait @@ -294,6 +316,8 @@ extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem); * \param sem the semaphore to query * \returns the current value of the semaphore. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateSemaphore */ extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem); @@ -316,6 +340,8 @@ typedef struct SDL_cond SDL_cond; * \returns a new condition variable or NULL on failure; call SDL_GetError() * for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CondBroadcast * \sa SDL_CondSignal * \sa SDL_CondWait @@ -329,6 +355,8 @@ extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void); * * \param cond the condition variable to destroy * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CondBroadcast * \sa SDL_CondSignal * \sa SDL_CondWait @@ -344,6 +372,8 @@ extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CondBroadcast * \sa SDL_CondWait * \sa SDL_CondWaitTimeout @@ -359,6 +389,8 @@ extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CondSignal * \sa SDL_CondWait * \sa SDL_CondWaitTimeout @@ -385,6 +417,8 @@ extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond); * \returns 0 when it is signaled or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CondBroadcast * \sa SDL_CondSignal * \sa SDL_CondWaitTimeout @@ -412,6 +446,8 @@ extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex); * the condition is not signaled in the allotted time, or a negative * error code on failure; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CondBroadcast * \sa SDL_CondSignal * \sa SDL_CondWait diff --git a/include/SDL_pixels.h b/include/SDL_pixels.h index a6d464c71..fcfd649c5 100644 --- a/include/SDL_pixels.h +++ b/include/SDL_pixels.h @@ -367,6 +367,8 @@ extern DECLSPEC const char* SDLCALL SDL_GetPixelFormatName(Uint32 format); * \returns SDL_TRUE on success or SDL_FALSE if the conversion wasn't * possible; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_MasksToPixelFormatEnum */ extern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(Uint32 format, @@ -389,6 +391,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(Uint32 format, * \param Amask the alpha mask for the format * \returns one of the SDL_PixelFormatEnum values * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_PixelFormatEnumToMasks */ extern DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp, @@ -408,6 +412,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp, * \returns the new SDL_PixelFormat structure or NULL on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_FreeFormat */ extern DECLSPEC SDL_PixelFormat * SDLCALL SDL_AllocFormat(Uint32 pixel_format); @@ -417,6 +423,8 @@ extern DECLSPEC SDL_PixelFormat * SDLCALL SDL_AllocFormat(Uint32 pixel_format); * * \param format the SDL_PixelFormat structure to free * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_AllocFormat */ extern DECLSPEC void SDLCALL SDL_FreeFormat(SDL_PixelFormat *format); @@ -431,6 +439,8 @@ extern DECLSPEC void SDLCALL SDL_FreeFormat(SDL_PixelFormat *format); * there wasn't enough memory); call SDL_GetError() for more * information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_FreePalette */ extern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors); @@ -443,6 +453,8 @@ extern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_AllocPalette * \sa SDL_FreePalette */ @@ -459,6 +471,8 @@ extern DECLSPEC int SDLCALL SDL_SetPixelFormatPalette(SDL_PixelFormat * format, * \returns 0 on success or a negative error code if not all of the colors * could be set; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_AllocPalette * \sa SDL_CreateRGBSurface */ @@ -471,6 +485,8 @@ extern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette, * * \param palette the SDL_Palette structure to be freed * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_AllocPalette */ extern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette); @@ -499,6 +515,8 @@ extern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette); * \param b the blue component of the pixel in the range 0-255 * \returns a pixel value * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetRGB * \sa SDL_GetRGBA * \sa SDL_MapRGBA @@ -532,6 +550,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat * format, * \param a the alpha component of the pixel in the range 0-255 * \returns a pixel value * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetRGB * \sa SDL_GetRGBA * \sa SDL_MapRGB @@ -555,6 +575,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormat * format, * \param g a pointer filled in with the green component * \param b a pointer filled in with the blue component * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetRGBA * \sa SDL_MapRGB * \sa SDL_MapRGBA @@ -582,6 +604,8 @@ extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel, * \param b a pointer filled in with the blue component * \param a a pointer filled in with the alpha component * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetRGB * \sa SDL_MapRGB * \sa SDL_MapRGBA @@ -597,6 +621,8 @@ extern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel, * \param gamma a gamma value where 0.0 is black and 1.0 is identity * \param ramp an array of 256 values filled in with the gamma ramp * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_SetWindowGammaRamp */ extern DECLSPEC void SDLCALL SDL_CalculateGammaRamp(float gamma, Uint16 * ramp); diff --git a/include/SDL_platform.h b/include/SDL_platform.h index 1516da38c..8dc0cbcb5 100644 --- a/include/SDL_platform.h +++ b/include/SDL_platform.h @@ -219,6 +219,8 @@ extern "C" { * * \returns the name of the platform. If the correct platform name is not * available, returns a string beginning with the text "Unknown". + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void); diff --git a/include/SDL_power.h b/include/SDL_power.h index 872be1840..1a484ee2c 100644 --- a/include/SDL_power.h +++ b/include/SDL_power.h @@ -72,6 +72,8 @@ typedef enum * a NULL here if you don't care, will return -1 if we can't * determine a value, or we're not running on a battery * \returns an SDL_PowerState enum representing the current battery state. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct); diff --git a/include/SDL_rect.h b/include/SDL_rect.h index a17ea44f3..cf6390991 100644 --- a/include/SDL_rect.h +++ b/include/SDL_rect.h @@ -161,6 +161,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A, * \param B an SDL_Rect structure representing the second rectangle * \param result an SDL_Rect structure filled in with the union of rectangles * `A` and `B` + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A, const SDL_Rect * B, @@ -180,6 +182,8 @@ extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A, * rectangle * \returns SDL_TRUE if any points were enclosed or SDL_FALSE if all the * points were outside of the clipping rectangle. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints(const SDL_Point * points, int count, @@ -201,6 +205,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints(const SDL_Point * points, * \param X2 a pointer to the ending X-coordinate of the line * \param Y2 a pointer to the ending Y-coordinate of the line * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect * rect, int *X1, diff --git a/include/SDL_render.h b/include/SDL_render.h index 8596931b4..330e4425b 100644 --- a/include/SDL_render.h +++ b/include/SDL_render.h @@ -177,6 +177,8 @@ extern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateRenderer * \sa SDL_GetNumRenderDrivers */ @@ -195,6 +197,8 @@ extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index, * \returns 0 on success, or -1 on error; call SDL_GetError() for more * information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateRenderer * \sa SDL_CreateWindow */ @@ -213,6 +217,8 @@ extern DECLSPEC int SDLCALL SDL_CreateWindowAndRenderer( * \returns a valid rendering context or NULL if there was an error; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateSoftwareRenderer * \sa SDL_DestroyRenderer * \sa SDL_GetNumRenderDrivers @@ -234,6 +240,8 @@ extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window, * \returns a valid rendering context or NULL if there was an error; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateRenderer * \sa SDL_CreateWindowRenderer * \sa SDL_DestroyRenderer @@ -247,6 +255,8 @@ extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface * * \returns the rendering context on success or NULL on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateRenderer */ extern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window); @@ -260,6 +270,8 @@ extern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateRenderer */ extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer, @@ -300,6 +312,8 @@ extern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer, * was active, the format was unsupported, or the width or height * were out of range; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateTextureFromSurface * \sa SDL_DestroyTexture * \sa SDL_QueryTexture @@ -328,6 +342,8 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer, * \returns the created texture or NULL on failure; call SDL_GetError() for * more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateTexture * \sa SDL_DestroyTexture * \sa SDL_QueryTexture @@ -348,6 +364,8 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateTexture */ extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture, @@ -373,6 +391,8 @@ extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetTextureColorMod * \sa SDL_SetTextureAlphaMod */ @@ -390,6 +410,8 @@ extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetTextureAlphaMod * \sa SDL_SetTextureColorMod */ @@ -413,6 +435,8 @@ extern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetTextureAlphaMod * \sa SDL_SetTextureColorMod */ @@ -427,6 +451,8 @@ extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetTextureColorMod * \sa SDL_SetTextureAlphaMod */ @@ -444,6 +470,8 @@ extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetTextureBlendMode * \sa SDL_RenderCopy */ @@ -458,6 +486,8 @@ extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_SetTextureBlendMode */ extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture, @@ -472,6 +502,8 @@ extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture, * \param scaleMode the SDL_ScaleMode to use for texture scaling. * \returns 0 on success, or -1 if the texture is not valid. * + * \since This function is available since SDL 2.0.12. + * * \sa SDL_GetTextureScaleMode */ extern DECLSPEC int SDLCALL SDL_SetTextureScaleMode(SDL_Texture * texture, @@ -484,6 +516,8 @@ extern DECLSPEC int SDLCALL SDL_SetTextureScaleMode(SDL_Texture * texture, * \param scaleMode a pointer filled in with the current scale mode. * \return 0 on success, or -1 if the texture is not valid. * + * \since This function is available since SDL 2.0.12. + * * \sa SDL_SetTextureScaleMode */ extern DECLSPEC int SDLCALL SDL_GetTextureScaleMode(SDL_Texture * texture, @@ -496,6 +530,9 @@ extern DECLSPEC int SDLCALL SDL_GetTextureScaleMode(SDL_Texture * texture, * \param userdata the pointer to associate with the texture. * \returns 0 on success, or -1 if the texture is not valid. * + * \since This function is available since SDL git HEAD (in development, not + * in an official release yet). + * * \sa SDL_GetTextureUserData */ extern DECLSPEC int SDLCALL SDL_SetTextureUserData(SDL_Texture * texture, @@ -508,6 +545,9 @@ extern DECLSPEC int SDLCALL SDL_SetTextureUserData(SDL_Texture * texture, * \return the pointer associated with the texture, or NULL if the texture is * not valid. * + * \since This function is available since SDL git HEAD (in development, not + * in an official release yet). + * * \sa SDL_SetTextureUserData */ extern DECLSPEC void * SDLCALL SDL_GetTextureUserData(SDL_Texture * texture); @@ -535,6 +575,8 @@ extern DECLSPEC void * SDLCALL SDL_GetTextureUserData(SDL_Texture * texture); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateTexture * \sa SDL_LockTexture * \sa SDL_UnlockTexture @@ -593,6 +635,8 @@ extern DECLSPEC int SDLCALL SDL_UpdateYUVTexture(SDL_Texture * texture, * \param UVpitch the number of bytes between rows of pixel data for the UV * plane. * \return 0 on success, or -1 if the texture is not valid. + * + * \since This function is available since SDL 2.0.16. */ extern DECLSPEC int SDLCALL SDL_UpdateNVTexture(SDL_Texture * texture, const SDL_Rect * rect, @@ -622,6 +666,8 @@ extern DECLSPEC int SDLCALL SDL_UpdateNVTexture(SDL_Texture * texture, * or was not created with `SDL_TEXTUREACCESS_STREAMING`; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_UnlockTexture */ extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture, @@ -655,6 +701,8 @@ extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture, * \returns 0 on success, or -1 if the texture is not valid or was not created * with `SDL_TEXTUREACCESS_STREAMING` * + * \since This function is available since SDL 2.0.12. + * * \sa SDL_LockTexture * \sa SDL_UnlockTexture */ @@ -675,6 +723,8 @@ extern DECLSPEC int SDLCALL SDL_LockTextureToSurface(SDL_Texture *texture, * * \param texture a texture locked by SDL_LockTexture() * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_LockTexture */ extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture); @@ -821,6 +871,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * render * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RenderGetViewport */ extern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer, @@ -832,6 +884,8 @@ extern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer, * \param renderer the rendering context * \param rect an SDL_Rect structure filled in with the current drawing area * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RenderSetViewport */ extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer, @@ -847,6 +901,8 @@ extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RenderGetClipRect * \sa SDL_RenderIsClipEnabled */ @@ -861,6 +917,8 @@ extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer, * \param rect an SDL_Rect structure filled in with the current clipping area * or an empty rectangle if clipping is disabled * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RenderIsClipEnabled * \sa SDL_RenderSetClipRect */ @@ -937,6 +995,8 @@ extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetRenderDrawColor * \sa SDL_RenderClear * \sa SDL_RenderDrawLine @@ -967,6 +1027,8 @@ extern DECLSPEC int SDLCALL SDL_SetRenderDrawColor(SDL_Renderer * renderer, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_SetRenderDrawColor */ extern DECLSPEC int SDLCALL SDL_GetRenderDrawColor(SDL_Renderer * renderer, @@ -983,6 +1045,8 @@ extern DECLSPEC int SDLCALL SDL_GetRenderDrawColor(SDL_Renderer * renderer, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetRenderDrawBlendMode * \sa SDL_RenderDrawLine * \sa SDL_RenderDrawLines @@ -1004,6 +1068,8 @@ extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_SetRenderDrawBlendMode */ extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer, @@ -1037,6 +1103,8 @@ extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RenderDrawLine * \sa SDL_RenderDrawLines * \sa SDL_RenderDrawPoints @@ -1061,6 +1129,8 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RenderDrawLine * \sa SDL_RenderDrawLines * \sa SDL_RenderDrawPoint @@ -1142,6 +1212,8 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RenderDrawLine * \sa SDL_RenderDrawLines * \sa SDL_RenderDrawPoint @@ -1166,6 +1238,8 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RenderDrawLine * \sa SDL_RenderDrawLines * \sa SDL_RenderDrawPoint @@ -1194,6 +1268,8 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RenderDrawLine * \sa SDL_RenderDrawLines * \sa SDL_RenderDrawPoint @@ -1219,6 +1295,8 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RenderDrawLine * \sa SDL_RenderDrawLines * \sa SDL_RenderDrawPoint @@ -1253,6 +1331,8 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RenderCopyEx * \sa SDL_SetTextureAlphaMod * \sa SDL_SetTextureBlendMode @@ -1295,6 +1375,8 @@ extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RenderCopy * \sa SDL_SetTextureAlphaMod * \sa SDL_SetTextureBlendMode @@ -1316,6 +1398,8 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer, * \param x The x coordinate of the point. * \param y The y coordinate of the point. * \return 0 on success, or -1 on error + * + * \since This function is available since SDL 2.0.10. */ extern DECLSPEC int SDLCALL SDL_RenderDrawPointF(SDL_Renderer * renderer, float x, float y); @@ -1327,6 +1411,8 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPointF(SDL_Renderer * renderer, * \param points The points to draw * \param count The number of points to draw * \return 0 on success, or -1 on error + * + * \since This function is available since SDL 2.0.10. */ extern DECLSPEC int SDLCALL SDL_RenderDrawPointsF(SDL_Renderer * renderer, const SDL_FPoint * points, @@ -1341,6 +1427,8 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPointsF(SDL_Renderer * renderer, * \param x2 The x coordinate of the end point. * \param y2 The y coordinate of the end point. * \return 0 on success, or -1 on error + * + * \since This function is available since SDL 2.0.10. */ extern DECLSPEC int SDLCALL SDL_RenderDrawLineF(SDL_Renderer * renderer, float x1, float y1, float x2, float y2); @@ -1353,6 +1441,8 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawLineF(SDL_Renderer * renderer, * \param points The points along the lines * \param count The number of points, drawing count-1 lines * \return 0 on success, or -1 on error + * + * \since This function is available since SDL 2.0.10. */ extern DECLSPEC int SDLCALL SDL_RenderDrawLinesF(SDL_Renderer * renderer, const SDL_FPoint * points, @@ -1365,6 +1455,8 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawLinesF(SDL_Renderer * renderer, * \param rect A pointer to the destination rectangle, or NULL to outline the * entire rendering target. * \return 0 on success, or -1 on error + * + * \since This function is available since SDL 2.0.10. */ extern DECLSPEC int SDLCALL SDL_RenderDrawRectF(SDL_Renderer * renderer, const SDL_FRect * rect); @@ -1377,6 +1469,8 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRectF(SDL_Renderer * renderer, * \param rects A pointer to an array of destination rectangles. * \param count The number of rectangles. * \return 0 on success, or -1 on error + * + * \since This function is available since SDL 2.0.10. */ extern DECLSPEC int SDLCALL SDL_RenderDrawRectsF(SDL_Renderer * renderer, const SDL_FRect * rects, @@ -1390,6 +1484,8 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRectsF(SDL_Renderer * renderer, * \param rect A pointer to the destination rectangle, or NULL for the entire * rendering target. * \return 0 on success, or -1 on error + * + * \since This function is available since SDL 2.0.10. */ extern DECLSPEC int SDLCALL SDL_RenderFillRectF(SDL_Renderer * renderer, const SDL_FRect * rect); @@ -1402,6 +1498,8 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRectF(SDL_Renderer * renderer, * \param rects A pointer to an array of destination rectangles. * \param count The number of rectangles. * \return 0 on success, or -1 on error + * + * \since This function is available since SDL 2.0.10. */ extern DECLSPEC int SDLCALL SDL_RenderFillRectsF(SDL_Renderer * renderer, const SDL_FRect * rects, @@ -1418,6 +1516,8 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRectsF(SDL_Renderer * renderer, * \param dstrect A pointer to the destination rectangle, or NULL for the * entire rendering target. * \return 0 on success, or -1 on error + * + * \since This function is available since SDL 2.0.10. */ extern DECLSPEC int SDLCALL SDL_RenderCopyF(SDL_Renderer * renderer, SDL_Texture * texture, @@ -1442,6 +1542,8 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyF(SDL_Renderer * renderer, * \param flip An SDL_RendererFlip value stating which flipping actions should * be performed on the texture * \return 0 on success, or -1 on error + * + * \since This function is available since SDL 2.0.10. */ extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer, SDL_Texture * texture, @@ -1465,6 +1567,9 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer, * \param num_indices Number of indices. * \return 0 on success, or -1 if the operation is not supported * + * \since This function is available since SDL git HEAD (in development, not + * in an official release yet). + * * \sa SDL_Vertex */ extern DECLSPEC int SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer, @@ -1490,6 +1595,9 @@ extern DECLSPEC int SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer, * \param num_indices Number of indices. * \param size_indices Index size: 1 (byte), 2 (short), 4 (int) * \return 0 on success, or -1 if the operation is not supported + * + * \since This function is available since SDL git HEAD (in development, not + * in an official release yet). */ extern DECLSPEC int SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer, SDL_Texture *texture, @@ -1521,6 +1629,8 @@ extern DECLSPEC int SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer, * \param pitch the pitch of the `pixels` parameter * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, @@ -1548,6 +1658,8 @@ extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer, * * \param renderer the rendering context * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RenderClear * \sa SDL_RenderDrawLine * \sa SDL_RenderDrawLines @@ -1570,6 +1682,8 @@ extern DECLSPEC void SDLCALL SDL_RenderPresent(SDL_Renderer * renderer); * * \param texture the texture to destroy * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateTexture * \sa SDL_CreateTextureFromSurface */ @@ -1580,6 +1694,8 @@ extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture); * * \param renderer the rendering context * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateRenderer */ extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer); @@ -1661,6 +1777,8 @@ extern DECLSPEC int SDLCALL SDL_GL_BindTexture(SDL_Texture *texture, float *texw * \param texture the texture to unbind from the current OpenGL/ES/ES2 context * \returns 0 on success, or -1 if the operation is not supported * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GL_BindTexture * \sa SDL_GL_MakeCurrent */ @@ -1676,6 +1794,8 @@ extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture); * \returns a `CAMetalLayer *` on success, or NULL if the renderer isn't a * Metal renderer * + * \since This function is available since SDL 2.0.8. + * * \sa SDL_RenderGetMetalCommandEncoder */ extern DECLSPEC void *SDLCALL SDL_RenderGetMetalLayer(SDL_Renderer * renderer); @@ -1690,6 +1810,8 @@ extern DECLSPEC void *SDLCALL SDL_RenderGetMetalLayer(SDL_Renderer * renderer); * \returns an `id` on success, or NULL if the * renderer isn't a Metal renderer. * + * \since This function is available since SDL 2.0.8. + * * \sa SDL_RenderGetMetalLayer */ extern DECLSPEC void *SDLCALL SDL_RenderGetMetalCommandEncoder(SDL_Renderer * renderer); @@ -1700,6 +1822,9 @@ extern DECLSPEC void *SDLCALL SDL_RenderGetMetalCommandEncoder(SDL_Renderer * re * \param renderer The renderer to toggle * \param vsync 1 for on, 0 for off. All other values are reserved * \returns a 0 int on success, or non-zero on failure + * + * \since This function is available since SDL git HEAD (in development, not + * in an official release yet). */ extern DECLSPEC int SDLCALL SDL_RenderSetVSync(SDL_Renderer* renderer, int vsync); diff --git a/include/SDL_rwops.h b/include/SDL_rwops.h index 6f73fcb4c..b29c32bb6 100644 --- a/include/SDL_rwops.h +++ b/include/SDL_rwops.h @@ -206,6 +206,8 @@ typedef struct SDL_RWops * \returns a pointer to the SDL_RWops structure that is created, or NULL on * failure; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RWclose * \sa SDL_RWFromConstMem * \sa SDL_RWFromFP @@ -243,6 +245,8 @@ extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp, SDL_bool autoclose); * \returns a pointer to the SDL_RWops structure that is created, or NULL on * failure; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RWclose * \sa SDL_RWFromConstMem * \sa SDL_RWFromFile @@ -275,6 +279,8 @@ extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(void * fp, * \returns a pointer to a new SDL_RWops structure, or NULL if it fails; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RWclose * \sa SDL_RWFromConstMem * \sa SDL_RWFromFile @@ -308,6 +314,8 @@ extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size); * \returns a pointer to a new SDL_RWops structure, or NULL if it fails; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RWclose * \sa SDL_RWFromConstMem * \sa SDL_RWFromFile @@ -342,6 +350,8 @@ extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem, * \returns a pointer to the allocated memory on success, or NULL on failure; * call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_FreeRW */ extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void); @@ -364,6 +374,8 @@ extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void); * * \param area the SDL_RWops structure to be freed * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_AllocRW */ extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area); @@ -380,7 +392,7 @@ extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area); * unknown or a negative error code on failure; call SDL_GetError() * for more information. * - * \since This function is available since SDL 2.0.0. + * \since This function is available since SDL 2.0.10. */ extern DECLSPEC Sint64 SDLCALL SDL_RWsize(SDL_RWops *context); @@ -406,6 +418,8 @@ extern DECLSPEC Sint64 SDLCALL SDL_RWsize(SDL_RWops *context); * \param whence any of `RW_SEEK_SET`, `RW_SEEK_CUR`, `RW_SEEK_END` * \returns the final offset in the data stream after the seek or -1 on error. * + * \since This function is available since SDL 2.0.10. + * * \sa SDL_RWclose * \sa SDL_RWFromConstMem * \sa SDL_RWFromFile @@ -430,6 +444,8 @@ extern DECLSPEC Sint64 SDLCALL SDL_RWseek(SDL_RWops *context, * \returns the current offset in the stream, or -1 if the information can not * be determined. * + * \since This function is available since SDL 2.0.10. + * * \sa SDL_RWclose * \sa SDL_RWFromConstMem * \sa SDL_RWFromFile @@ -459,6 +475,8 @@ extern DECLSPEC Sint64 SDLCALL SDL_RWtell(SDL_RWops *context); * \returns the number of objects read, or 0 at error or end of file; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.10. + * * \sa SDL_RWclose * \sa SDL_RWFromConstMem * \sa SDL_RWFromFile @@ -489,6 +507,8 @@ extern DECLSPEC size_t SDLCALL SDL_RWread(SDL_RWops *context, * \returns the number of objects written, which will be less than **num** on * error; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.10. + * * \sa SDL_RWclose * \sa SDL_RWFromConstMem * \sa SDL_RWFromFile @@ -519,6 +539,8 @@ extern DECLSPEC size_t SDLCALL SDL_RWwrite(SDL_RWops *context, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.10. + * * \sa SDL_RWFromConstMem * \sa SDL_RWFromFile * \sa SDL_RWFromFP @@ -542,6 +564,8 @@ extern DECLSPEC int SDLCALL SDL_RWclose(SDL_RWops *context); * \param datasize if not NULL, will store the number of bytes read * \param freesrc if non-zero, calls SDL_RWclose() on `src` before returning * \returns the data, or NULL if there was an error. + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, @@ -559,6 +583,8 @@ extern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_RWops *src, * \param file the path to read all available data from * \param datasize if not NULL, will store the number of bytes read * \returns the data, or NULL if there was an error. + * + * \since This function is available since SDL 2.0.10. */ extern DECLSPEC void *SDLCALL SDL_LoadFile(const char *file, size_t *datasize); @@ -592,6 +618,8 @@ extern DECLSPEC Uint8 SDLCALL SDL_ReadU8(SDL_RWops * src); * \param src the stream from which to read data * \returns 16 bits of data in the native byte order of the platform. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_ReadBE16 */ extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src); @@ -606,6 +634,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src); * \param src the stream from which to read data * \returns 16 bits of data in the native byte order of the platform. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_ReadLE16 */ extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src); @@ -620,6 +650,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src); * \param src the stream from which to read data * \returns 32 bits of data in the native byte order of the platform. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_ReadBE32 */ extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src); @@ -634,6 +666,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src); * \param src the stream from which to read data * \returns 32 bits of data in the native byte order of the platform. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_ReadLE32 */ extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src); @@ -648,6 +682,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src); * \param src the stream from which to read data * \returns 64 bits of data in the native byte order of the platform. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_ReadBE64 */ extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src); @@ -662,6 +698,8 @@ extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src); * \param src the stream from which to read data * \returns 64 bits of data in the native byte order of the platform. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_ReadLE64 */ extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src); @@ -700,6 +738,8 @@ extern DECLSPEC size_t SDLCALL SDL_WriteU8(SDL_RWops * dst, Uint8 value); * \param value the data to be written, in native format * \returns 1 on successful write, 0 on error. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_WriteBE16 */ extern DECLSPEC size_t SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value); @@ -715,6 +755,8 @@ extern DECLSPEC size_t SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value); * \param value the data to be written, in native format * \returns 1 on successful write, 0 on error. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_WriteLE16 */ extern DECLSPEC size_t SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value); @@ -731,6 +773,8 @@ extern DECLSPEC size_t SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value); * \param value the data to be written, in native format * \returns 1 on successful write, 0 on error. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_WriteBE32 */ extern DECLSPEC size_t SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value); @@ -746,6 +790,8 @@ extern DECLSPEC size_t SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value); * \param value the data to be written, in native format * \returns 1 on successful write, 0 on error. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_WriteLE32 */ extern DECLSPEC size_t SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value); @@ -762,6 +808,8 @@ extern DECLSPEC size_t SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value); * \param value the data to be written, in native format * \returns 1 on successful write, 0 on error. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_WriteBE64 */ extern DECLSPEC size_t SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value); @@ -777,6 +825,8 @@ extern DECLSPEC size_t SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value); * \param value the data to be written, in native format * \returns 1 on successful write, 0 on error. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_WriteLE64 */ extern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value); diff --git a/include/SDL_sensor.h b/include/SDL_sensor.h index 3bab8a4e8..243ca6d96 100644 --- a/include/SDL_sensor.h +++ b/include/SDL_sensor.h @@ -133,6 +133,8 @@ typedef enum * In particular, you are guaranteed that the sensor list won't change, so the * API functions that take a sensor index will be valid, and sensor events * will not be delivered. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC void SDLCALL SDL_LockSensors(void); extern DECLSPEC void SDLCALL SDL_UnlockSensors(void); @@ -141,6 +143,8 @@ extern DECLSPEC void SDLCALL SDL_UnlockSensors(void); * Count the number of sensors attached to the system right now. * * \returns the number of sensors detected. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC int SDLCALL SDL_NumSensors(void); @@ -149,6 +153,8 @@ extern DECLSPEC int SDLCALL SDL_NumSensors(void); * * \param device_index The sensor to obtain name from * \returns the sensor name, or NULL if `device_index` is out of range. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC const char *SDLCALL SDL_SensorGetDeviceName(int device_index); @@ -158,6 +164,8 @@ extern DECLSPEC const char *SDLCALL SDL_SensorGetDeviceName(int device_index); * \param device_index The sensor to get the type from * \returns the SDL_SensorType, or `SDL_SENSOR_INVALID` if `device_index` is * out of range. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index); @@ -167,6 +175,8 @@ extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index) * \param device_index The sensor to check * \returns the sensor platform dependent type, or -1 if `device_index` is out * of range. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC int SDLCALL SDL_SensorGetDeviceNonPortableType(int device_index); @@ -175,6 +185,8 @@ extern DECLSPEC int SDLCALL SDL_SensorGetDeviceNonPortableType(int device_index) * * \param device_index The sensor to get instance id from * \returns the sensor instance ID, or -1 if `device_index` is out of range. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_index); @@ -183,6 +195,8 @@ extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_in * * \param device_index The sensor to open * \returns an SDL_Sensor sensor object, or NULL if an error occurred. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index); @@ -191,6 +205,8 @@ extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index); * * \param instance_id The sensor from instance id * \returns an SDL_Sensor object. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorFromInstanceID(SDL_SensorID instance_id); @@ -199,6 +215,8 @@ extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorFromInstanceID(SDL_SensorID instan * * \param sensor The SDL_Sensor object * \returns the sensor name, or NULL if `sensor` is NULL. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC const char *SDLCALL SDL_SensorGetName(SDL_Sensor *sensor); @@ -208,6 +226,8 @@ extern DECLSPEC const char *SDLCALL SDL_SensorGetName(SDL_Sensor *sensor); * \param sensor The SDL_Sensor object to inspect * \returns the SDL_SensorType type, or `SDL_SENSOR_INVALID` if `sensor` is * NULL. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor); @@ -216,6 +236,8 @@ extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor); * * \param sensor The SDL_Sensor object to inspect * \returns the sensor platform dependent type, or -1 if `sensor` is NULL. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC int SDLCALL SDL_SensorGetNonPortableType(SDL_Sensor *sensor); @@ -224,6 +246,8 @@ extern DECLSPEC int SDLCALL SDL_SensorGetNonPortableType(SDL_Sensor *sensor); * * \param sensor The SDL_Sensor object to inspect * \returns the sensor instance ID, or -1 if `sensor` is NULL. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor); @@ -236,6 +260,8 @@ extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor) * \param data A pointer filled with the current sensor state * \param num_values The number of values to write to data * \returns 0 or -1 if an error occurred. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC int SDLCALL SDL_SensorGetData(SDL_Sensor * sensor, float *data, int num_values); @@ -243,6 +269,8 @@ extern DECLSPEC int SDLCALL SDL_SensorGetData(SDL_Sensor * sensor, float *data, * Close a sensor previously opened with SDL_SensorOpen(). * * \param sensor The SDL_Sensor object to close + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC void SDLCALL SDL_SensorClose(SDL_Sensor * sensor); @@ -254,6 +282,8 @@ extern DECLSPEC void SDLCALL SDL_SensorClose(SDL_Sensor * sensor); * * This needs to be called from the thread that initialized the sensor * subsystem. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC void SDLCALL SDL_SensorUpdate(void); diff --git a/include/SDL_shape.h b/include/SDL_shape.h index 8903e043a..4b27204be 100644 --- a/include/SDL_shape.h +++ b/include/SDL_shape.h @@ -62,6 +62,8 @@ extern "C" { * and ::SDL_WINDOW_FULLSCREEN is always unset. * \return the window created, or NULL if window creation failed. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_DestroyWindow */ extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags); @@ -73,6 +75,8 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,un * \return SDL_TRUE if the window is a window that can be shaped, SDL_FALSE if * the window is unshaped or NULL. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateShapedWindow */ extern DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow(const SDL_Window *window); @@ -116,6 +120,8 @@ typedef struct SDL_WindowShapeMode { * argument, or SDL_NONSHAPEABLE_WINDOW if the SDL_Window given does * not reference a valid shaped window. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_WindowShapeMode * \sa SDL_GetShapedWindowMode */ @@ -133,6 +139,8 @@ extern DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window,SDL_Surface *s * window, or SDL_WINDOW_LACKS_SHAPE if the SDL_Window given is a * shapeable window currently lacking a shape. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_WindowShapeMode * \sa SDL_SetWindowShape */ diff --git a/include/SDL_stdinc.h b/include/SDL_stdinc.h index f43b01399..476e2e393 100644 --- a/include/SDL_stdinc.h +++ b/include/SDL_stdinc.h @@ -415,6 +415,8 @@ typedef void (SDLCALL *SDL_free_func)(void *mem); /** * Get the current set of SDL memory functions + * + * \since This function is available since SDL 2.0.7. */ extern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func, SDL_calloc_func *calloc_func, @@ -423,6 +425,8 @@ extern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func /** * Replace SDL's memory allocation functions with a custom set + * + * \since This function is available since SDL 2.0.7. */ extern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func, SDL_calloc_func calloc_func, @@ -431,6 +435,8 @@ extern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func, /** * Get the number of outstanding (unfreed) allocations + * + * \since This function is available since SDL 2.0.7. */ extern DECLSPEC int SDLCALL SDL_GetNumAllocations(void); @@ -650,6 +656,8 @@ extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, /** * This function converts a string between encodings in one pass, returning a * string that must be freed with SDL_free() or NULL on error. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode, const char *fromcode, diff --git a/include/SDL_surface.h b/include/SDL_surface.h index 3b695a1b5..29ebfb663 100644 --- a/include/SDL_surface.h +++ b/include/SDL_surface.h @@ -149,6 +149,8 @@ typedef enum * \returns the new SDL_Surface structure that is created or NULL if it fails; * call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateRGBSurfaceFrom * \sa SDL_CreateRGBSurfaceWithFormat * \sa SDL_FreeSurface @@ -175,6 +177,8 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface * \returns the new SDL_Surface structure that is created or NULL if it fails; * call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.5. + * * \sa SDL_CreateRGBSurface * \sa SDL_CreateRGBSurfaceFrom * \sa SDL_FreeSurface @@ -204,6 +208,8 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat * \returns the new SDL_Surface structure that is created or NULL if it fails; * call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateRGBSurface * \sa SDL_CreateRGBSurfaceWithFormat * \sa SDL_FreeSurface @@ -240,6 +246,8 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels, * \returns the new SDL_Surface structure that is created or NULL if it fails; * call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.5. + * * \sa SDL_CreateRGBSurfaceFrom * \sa SDL_CreateRGBSurfaceWithFormat * \sa SDL_FreeSurface @@ -254,6 +262,8 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom * * \param surface the SDL_Surface to free. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateRGBSurface * \sa SDL_CreateRGBSurfaceFrom * \sa SDL_LoadBMP @@ -270,6 +280,8 @@ extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface); * \param palette the SDL_Palette structure to use * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface, SDL_Palette * palette); @@ -290,6 +302,8 @@ extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_MUSTLOCK * \sa SDL_UnlockSurface */ @@ -300,6 +314,8 @@ extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface); * * \param surface the SDL_Surface structure to be unlocked * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_LockSurface */ extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface); @@ -319,6 +335,8 @@ extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface); * \returns a pointer to a new SDL_Surface structure or NULL if there was an * error; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_FreeSurface * \sa SDL_RWFromFile * \sa SDL_LoadBMP @@ -349,6 +367,8 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_LoadBMP_RW * \sa SDL_SaveBMP */ @@ -374,6 +394,8 @@ extern DECLSPEC int SDLCALL SDL_SaveBMP_RW * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_BlitSurface * \sa SDL_LockSurface * \sa SDL_UnlockSurface @@ -389,6 +411,8 @@ extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface, * \param surface the SDL_Surface structure to query * \returns SDL_TRUE if the surface is RLE enabled, SDL_FALSE otherwise. * + * \since This function is available since SDL 2.0.14. + * * \sa SDL_SetSurfaceRLE */ extern DECLSPEC SDL_bool SDLCALL SDL_HasSurfaceRLE(SDL_Surface * surface); @@ -412,6 +436,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSurfaceRLE(SDL_Surface * surface); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_BlitSurface * \sa SDL_GetColorKey */ @@ -426,6 +452,8 @@ extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface, * \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 */ @@ -444,6 +472,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasColorKey(SDL_Surface * surface); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_BlitSurface * \sa SDL_SetColorKey */ @@ -466,6 +496,8 @@ extern DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface * surface, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetSurfaceColorMod * \sa SDL_SetSurfaceAlphaMod */ @@ -483,6 +515,8 @@ extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetSurfaceAlphaMod * \sa SDL_SetSurfaceColorMod */ @@ -503,6 +537,8 @@ extern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetSurfaceAlphaMod * \sa SDL_SetSurfaceColorMod */ @@ -517,6 +553,8 @@ extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetSurfaceColorMod * \sa SDL_SetSurfaceAlphaMod */ @@ -535,6 +573,8 @@ extern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetSurfaceBlendMode */ extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface, @@ -548,6 +588,8 @@ extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_SetSurfaceBlendMode */ extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface, @@ -568,6 +610,8 @@ extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface, * \returns SDL_TRUE if the rectangle intersects the surface, otherwise * SDL_FALSE and blits will be completely clipped. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_BlitSurface * \sa SDL_GetClipRect */ @@ -585,6 +629,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface, * \param rect an SDL_Rect structure filled in with the clipping rectangle for * the surface * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_BlitSurface * \sa SDL_SetClipRect */ @@ -618,6 +664,8 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_DuplicateSurface(SDL_Surface * surface) * \returns the new SDL_Surface structure that is created or NULL if it fails; * call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_AllocFormat * \sa SDL_ConvertSurfaceFormat * \sa SDL_CreateRGBSurface @@ -641,6 +689,8 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface * \returns the new SDL_Surface structure that is created or NULL if it fails; * call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_AllocFormat * \sa SDL_ConvertSurface * \sa SDL_CreateRGBSurface @@ -661,6 +711,8 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat * \param dst_pitch the pitch of the destination pixels, in bytes * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height, Uint32 src_format, @@ -687,6 +739,8 @@ extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_FillRects */ extern DECLSPEC int SDLCALL SDL_FillRect @@ -711,6 +765,8 @@ extern DECLSPEC int SDLCALL SDL_FillRect * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_FillRect */ extern DECLSPEC int SDLCALL SDL_FillRects @@ -782,6 +838,8 @@ extern DECLSPEC int SDLCALL SDL_FillRects * SDL_UpperBlit() has been replaced by SDL_BlitSurface(), which is merely a * macro for this function with a less confusing name. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_BlitSurface */ extern DECLSPEC int SDLCALL SDL_UpperBlit @@ -806,6 +864,8 @@ extern DECLSPEC int SDLCALL SDL_UpperBlit * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_BlitSurface */ extern DECLSPEC int SDLCALL SDL_LowerBlit @@ -818,6 +878,8 @@ extern DECLSPEC int SDLCALL SDL_LowerBlit * format. * * Please use SDL_BlitScaled() instead. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src, const SDL_Rect * srcrect, @@ -843,6 +905,8 @@ extern DECLSPEC int SDLCALL SDL_SoftStretchLinear(SDL_Surface * src, * SDL_UpperBlitScaled() has been replaced by SDL_BlitScaled(), which is * merely a macro for this function with a less confusing name. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_BlitScaled */ extern DECLSPEC int SDLCALL SDL_UpperBlitScaled @@ -864,6 +928,8 @@ extern DECLSPEC int SDLCALL SDL_UpperBlitScaled * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_BlitScaled */ extern DECLSPEC int SDLCALL SDL_LowerBlitScaled @@ -872,17 +938,23 @@ extern DECLSPEC int SDLCALL SDL_LowerBlitScaled /** * Set the YUV conversion mode + * + * \since This function is available since SDL 2.0.8. */ extern DECLSPEC void SDLCALL SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode); /** * Get the YUV conversion mode + * + * \since This function is available since SDL 2.0.8. */ extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionMode(void); /** * Get the YUV conversion mode, returning the correct mode for the resolution * when the current conversion mode is SDL_YUV_CONVERSION_AUTOMATIC + * + * \since This function is available since SDL 2.0.8. */ extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionModeForResolution(int width, int height); diff --git a/include/SDL_system.h b/include/SDL_system.h index 433d0bf87..f54300dc6 100644 --- a/include/SDL_system.h +++ b/include/SDL_system.h @@ -51,7 +51,7 @@ typedef void (SDLCALL * SDL_WindowsMessageHook)(void *userdata, void *hWnd, unsi * \param callback The SDL_WindowsMessageHook function to call. * \param userdata a pointer to pass to every iteration of `callback` * - * \since This function is available since SDL 2.0.16. + * \since This function is available since SDL 2.0.4. */ extern DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata); @@ -136,6 +136,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *a * \param threadID the Unix thread ID to change priority of. * \param priority The new, Unix-specific, priority value. * \returns 0 on success, or -1 on error. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority); @@ -271,6 +273,8 @@ extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void); * - API level 10: Android 2.3.3 * * \returns the Android API level. + * + * \since This function is available since SDL 2.0.12. */ extern DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void); @@ -278,6 +282,8 @@ extern DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void); * Query if the application is running on Android TV. * * \returns SDL_TRUE if this is Android TV, SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.0.8. */ extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void); @@ -285,6 +291,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void); * Query if the application is running on a Chromebook. * * \returns SDL_TRUE if this is a Chromebook, SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void); @@ -292,11 +300,15 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void); * Query if the application is running on a Samsung DeX docking station. * * \returns SDL_TRUE if this is a DeX docking station, SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void); /** * Trigger the Android system back button behavior. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC void SDLCALL SDL_AndroidBackButton(void); @@ -367,6 +379,8 @@ extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void); * * \param permission The permission to request. * \returns SDL_TRUE if the permission was granted, SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.0.14. */ extern DECLSPEC SDL_bool SDLCALL SDL_AndroidRequestPermission(const char *permission); @@ -493,6 +507,8 @@ extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathT * Detects the device family of WinRT plattform at runtime. * * \returns a value from the SDL_WinRT_DeviceFamily enum. + * + * \since This function is available since SDL 2.0.8. */ extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily(); @@ -504,6 +520,8 @@ extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily(); * If SDL can't determine this, it will return SDL_FALSE. * * \returns SDL_TRUE if the device is a tablet, SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.0.9. */ extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void); diff --git a/include/SDL_thread.h b/include/SDL_thread.h index 5626447a8..10ec43b95 100644 --- a/include/SDL_thread.h +++ b/include/SDL_thread.h @@ -199,6 +199,8 @@ SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const siz * new thread could not be created; call SDL_GetError() for more * information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateThreadWithStackSize * \sa SDL_WaitThread */ @@ -244,6 +246,8 @@ SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data); * new thread could not be created; call SDL_GetError() for more * information. * + * \since This function is available since SDL 2.0.9. + * * \sa SDL_WaitThread */ extern DECLSPEC SDL_Thread *SDLCALL @@ -261,6 +265,8 @@ SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const siz * \returns a pointer to a UTF-8 string that names the specified thread, or * NULL if it doesn't have a name. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateThread */ extern DECLSPEC const char *SDLCALL SDL_GetThreadName(SDL_Thread *thread); @@ -277,6 +283,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetThreadName(SDL_Thread *thread); * * \returns the ID of the current thread. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetThreadID */ extern DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void); @@ -292,6 +300,8 @@ extern DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void); * \returns the ID of the specified thread, or the ID of the current thread if * `thread` is NULL. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_ThreadID */ extern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread); @@ -306,6 +316,8 @@ extern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread); * \param priority the SDL_ThreadPriority to set * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority); @@ -337,6 +349,8 @@ extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority); * from the thread function by its 'return', or NULL to not * receive such value back. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateThread * \sa SDL_DetachThread */ @@ -434,6 +448,8 @@ extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void (SD /** * Cleanup all TLS data for this thread. + * + * \since This function is available since SDL 2.0.16. */ extern DECLSPEC void SDLCALL SDL_TLSCleanup(void); diff --git a/include/SDL_timer.h b/include/SDL_timer.h index b23686bc3..dca71f3c5 100644 --- a/include/SDL_timer.h +++ b/include/SDL_timer.h @@ -45,6 +45,8 @@ extern "C" { * \returns an unsigned 32-bit value representing the number of milliseconds * since the SDL library initialized. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_TICKS_PASSED */ extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void); @@ -78,6 +80,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void); * * \returns the current counter value. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetPerformanceFrequency */ extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceCounter(void); @@ -101,6 +105,8 @@ extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceFrequency(void); * scheduling. * * \param ms the number of milliseconds to delay + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms); @@ -147,6 +153,8 @@ typedef int SDL_TimerID; * \returns a timer ID or 0 if an error occurs; call SDL_GetError() for more * information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RemoveTimer */ extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval, @@ -160,6 +168,8 @@ extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval, * \returns SDL_TRUE if the timer is removed or SDL_FALSE if the timer wasn't * found. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_AddTimer */ extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID id); diff --git a/include/SDL_touch.h b/include/SDL_touch.h index f370a6730..f9a8545b8 100644 --- a/include/SDL_touch.h +++ b/include/SDL_touch.h @@ -97,6 +97,8 @@ extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index); /** * Get the type of the given touch device. + * + * \since This function is available since SDL 2.0.10. */ extern DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID); @@ -123,6 +125,8 @@ extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID); * \returns a pointer to the SDL_Finger object or NULL if no object at the * given ID and index could be found. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_RecordGesture */ extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index); diff --git a/include/SDL_version.h b/include/SDL_version.h index 3746fb221..cdd4bcb4f 100644 --- a/include/SDL_version.h +++ b/include/SDL_version.h @@ -118,6 +118,8 @@ typedef struct SDL_version * * \param ver the SDL_version structure that contains the version information * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetRevision */ extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver); @@ -145,6 +147,8 @@ extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver); * \returns an arbitrary string, uniquely identifying the exact revision of * the SDL library in use. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetVersion */ extern DECLSPEC const char *SDLCALL SDL_GetRevision(void); @@ -166,6 +170,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetRevision(void); * * \returns zero, always, in modern SDL releases. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetRevision */ extern SDL_DEPRECATED DECLSPEC int SDLCALL SDL_GetRevisionNumber(void); diff --git a/include/SDL_video.h b/include/SDL_video.h index 75bae55c8..f0132621e 100644 --- a/include/SDL_video.h +++ b/include/SDL_video.h @@ -286,6 +286,8 @@ typedef enum * \returns a number >= 1 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetVideoDriver */ extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void); @@ -299,6 +301,8 @@ extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void); * \param index the index of a video driver * \returns the name of the video driver with the given **index**. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetNumVideoDrivers */ extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index); @@ -325,6 +329,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetNumVideoDrivers * \sa SDL_GetVideoDriver * \sa SDL_InitSubSystem @@ -337,6 +343,8 @@ extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name); * * This function closes all windows, and restores the original video mode. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_VideoInit */ extern DECLSPEC void SDLCALL SDL_VideoQuit(void); @@ -390,6 +398,8 @@ extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetNumVideoDisplays */ extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect); @@ -458,6 +468,8 @@ extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, fl * \returns The SDL_DisplayOrientation enum value of the display, or * `SDL_ORIENTATION_UNKNOWN` if it isn't available. * + * \since This function is available since SDL 2.0.9. + * * \sa SDL_GetNumVideoDisplays */ extern DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex); @@ -497,6 +509,8 @@ extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetNumDisplayModes */ extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex, @@ -516,6 +530,8 @@ extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetCurrentDisplayMode * \sa SDL_GetDisplayMode * \sa SDL_SetWindowDisplayMode @@ -536,6 +552,8 @@ extern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(int displayIndex, SDL_Disp * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetDesktopDisplayMode * \sa SDL_GetDisplayMode * \sa SDL_GetNumVideoDisplays @@ -562,6 +580,8 @@ extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_Disp * \returns the passed in value `closest` or NULL if no matching video mode * was available; call SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetDisplayMode * \sa SDL_GetNumDisplayModes */ @@ -575,6 +595,8 @@ extern DECLSPEC SDL_DisplayMode * SDLCALL SDL_GetClosestDisplayMode(int displayI * success or a negative error code on failure; call SDL_GetError() * for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetDisplayBounds * \sa SDL_GetNumVideoDisplays */ @@ -594,6 +616,8 @@ extern DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window * window); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetWindowDisplayMode * \sa SDL_SetWindowFullscreen */ @@ -609,6 +633,8 @@ extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_SetWindowDisplayMode * \sa SDL_SetWindowFullscreen */ @@ -624,6 +650,9 @@ extern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window * window, * \param size the size of the ICC profile * \returns the raw ICC profile data on success or NULL on failure; call * SDL_GetError() for more information. + * + * \since This function is available since SDL git HEAD (in development, not + * in an official release yet). */ extern DECLSPEC void* SDLCALL SDL_GetWindowICCProfile(SDL_Window * window, size_t* size); @@ -634,6 +663,8 @@ extern DECLSPEC void* SDLCALL SDL_GetWindowICCProfile(SDL_Window * window, size_ * \returns the pixel format of the window on success or * SDL_PIXELFORMAT_UNKNOWN on failure; call SDL_GetError() for more * information. + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window); @@ -721,6 +752,8 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title, * \returns the window that was created or NULL on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateWindow * \sa SDL_DestroyWindow */ @@ -752,6 +785,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowID(SDL_Window * window); * \returns the window associated with `id` or NULL if it doesn't exist; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetWindowID */ extern DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(Uint32 id); @@ -762,6 +797,8 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(Uint32 id); * \param window the window to query * \returns a mask of the SDL_WindowFlags associated with `window` * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateWindow * \sa SDL_HideWindow * \sa SDL_MaximizeWindow @@ -780,6 +817,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window * window); * \param window the window to change * \param title the desired window title in UTF-8 format * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetWindowTitle */ extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window, @@ -792,6 +831,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window, * \returns the title of the window in UTF-8 format or "" if there is no * title. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_SetWindowTitle */ extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window); @@ -801,6 +842,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window); * * \param window the window to change * \param icon an SDL_Surface structure containing the icon for the window + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window, SDL_Surface * icon); @@ -815,6 +858,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window, * \param userdata the associated pointer * \returns the previous value associated with `name`. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetWindowData */ extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window, @@ -828,6 +873,8 @@ extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window, * \param name the name of the pointer * \returns the value associated with `name`. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_SetWindowData */ extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window, @@ -844,6 +891,8 @@ extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window, * \param y the y coordinate of the window in screen coordinates, or * `SDL_WINDOWPOS_CENTERED` or `SDL_WINDOWPOS_UNDEFINED` * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetWindowPosition */ extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window, @@ -861,6 +910,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window, * \param y a pointer filled in with the y position of the window, in screen * coordinates, may be NULL * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_SetWindowPosition */ extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window, @@ -883,6 +934,8 @@ extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window, * \param h the height of the window in pixels, in screen coordinates, must be * > 0 * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetWindowSize * \sa SDL_SetWindowDisplayMode */ @@ -907,6 +960,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w, * \param h a pointer filled in with the height of the window, in screen * coordinates, may be NULL * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GL_GetDrawableSize * \sa SDL_Vulkan_GetDrawableSize * \sa SDL_SetWindowSize @@ -957,6 +1012,8 @@ extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window, * \param min_w the minimum width of the window in pixels * \param min_h the minimum height of the window in pixels * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetWindowMinimumSize * \sa SDL_SetWindowMaximumSize */ @@ -972,6 +1029,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window, * \param h a pointer filled in with the minimum height of the window, may be * NULL * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetWindowMaximumSize * \sa SDL_SetWindowMinimumSize */ @@ -985,6 +1044,8 @@ extern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window * window, * \param max_w the maximum width of the window in pixels * \param max_h the maximum height of the window in pixels * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetWindowMaximumSize * \sa SDL_SetWindowMinimumSize */ @@ -1000,6 +1061,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window, * \param h a pointer filled in with the maximum height of the window, may be * NULL * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetWindowMinimumSize * \sa SDL_SetWindowMaximumSize */ @@ -1066,6 +1129,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowAlwaysOnTop(SDL_Window * window, * * \param window the window to show * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_HideWindow * \sa SDL_RaiseWindow */ @@ -1076,6 +1141,8 @@ extern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_Window * window); * * \param window the window to hide * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_ShowWindow */ extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window * window); @@ -1084,6 +1151,8 @@ extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window * window); * Raise a window above other windows and set the input focus. * * \param window the window to raise + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window * window); @@ -1092,6 +1161,8 @@ extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window * window); * * \param window the window to maximize * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_MinimizeWindow * \sa SDL_RestoreWindow */ @@ -1102,6 +1173,8 @@ extern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_Window * window); * * \param window the window to minimize * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_MaximizeWindow * \sa SDL_RestoreWindow */ @@ -1112,6 +1185,8 @@ extern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_Window * window); * * \param window the window to restore * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_MaximizeWindow * \sa SDL_MinimizeWindow */ @@ -1155,6 +1230,8 @@ extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window, * \returns the surface associated with the window, or NULL on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_UpdateWindowSurface * \sa SDL_UpdateWindowSurfaceRects */ @@ -1172,6 +1249,8 @@ extern DECLSPEC SDL_Surface * SDLCALL SDL_GetWindowSurface(SDL_Window * window); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetWindowSurface * \sa SDL_UpdateWindowSurfaceRects */ @@ -1192,6 +1271,8 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetWindowSurface * \sa SDL_UpdateWindowSurface */ @@ -1210,6 +1291,8 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window, * \param window the window for which the input grab mode should be set * \param grabbed SDL_TRUE to grab input or SDL_FALSE to release input * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetGrabbedWindow * \sa SDL_GetWindowGrab */ @@ -1239,6 +1322,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window * window, * * \param window The window for which the mouse grab mode should be set. * + * \since This function is available since SDL 2.0.16. + * * \sa SDL_GetWindowMouseGrab * \sa SDL_SetWindowKeyboardGrab * \sa SDL_SetWindowGrab @@ -1252,6 +1337,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowMouseGrab(SDL_Window * window, * \param window the window to query * \returns SDL_TRUE if input is grabbed, SDL_FALSE otherwise. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_SetWindowGrab */ extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window); @@ -1262,6 +1349,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window); * \param window the window to query * \returns SDL_TRUE if keyboard is grabbed, and SDL_FALSE otherwise. * + * \since This function is available since SDL 2.0.16. + * * \sa SDL_SetWindowKeyboardGrab * \sa SDL_GetWindowGrab */ @@ -1273,6 +1362,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowKeyboardGrab(SDL_Window * window); * \param window the window to query * \returns SDL_TRUE if mouse is grabbed, and SDL_FALSE otherwise. * + * \since This function is available since SDL 2.0.16. + * * \sa SDL_SetWindowKeyboardGrab * \sa SDL_GetWindowGrab */ @@ -1311,6 +1402,8 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_GetGrabbedWindow(void); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetWindowBrightness * \sa SDL_SetWindowGammaRamp */ @@ -1329,6 +1422,8 @@ extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float b * \returns the brightness for the display where 0.0 is completely dark and * 1.0 is normal brightness. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_SetWindowBrightness */ extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window); @@ -1428,6 +1523,8 @@ extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GetWindowGammaRamp */ extern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window, @@ -1454,6 +1551,8 @@ extern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window, * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_SetWindowGammaRamp */ extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window, @@ -1558,6 +1657,8 @@ extern DECLSPEC int SDLCALL SDL_FlashWindow(SDL_Window * window, SDL_FlashOperat * * \param window the window to destroy * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_CreateWindow * \sa SDL_CreateWindowFrom */ @@ -1626,6 +1727,8 @@ extern DECLSPEC void SDLCALL SDL_DisableScreenSaver(void); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GL_GetProcAddress * \sa SDL_GL_UnloadLibrary */ @@ -1676,6 +1779,8 @@ extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path); * \returns a pointer to the named OpenGL function. The returned pointer * should be cast to the appropriate function signature. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GL_ExtensionSupported * \sa SDL_GL_LoadLibrary * \sa SDL_GL_UnloadLibrary @@ -1685,6 +1790,8 @@ extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc); /** * Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary(). * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GL_LoadLibrary */ extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void); @@ -1734,6 +1841,8 @@ extern DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GL_GetAttribute * \sa SDL_GL_ResetAttributes */ @@ -1747,6 +1856,8 @@ extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value); * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GL_ResetAttributes * \sa SDL_GL_SetAttribute */ @@ -1767,6 +1878,8 @@ extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value); * \returns the OpenGL context associated with `window` or NULL on error; call * SDL_GetError() for more details. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GL_DeleteContext * \sa SDL_GL_MakeCurrent */ @@ -1783,6 +1896,8 @@ extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window * * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GL_CreateContext */ extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window * window, @@ -1895,6 +2010,8 @@ extern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void); * extra. * * \param window the window to change + * + * \since This function is available since SDL 2.0.0. */ extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window); @@ -1903,6 +2020,8 @@ extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window); * * \param context the OpenGL context to be deleted * + * \since This function is available since SDL 2.0.0. + * * \sa SDL_GL_CreateContext */ extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context); diff --git a/include/SDL_vulkan.h b/include/SDL_vulkan.h index 006c5aaf8..ab86a0b86 100644 --- a/include/SDL_vulkan.h +++ b/include/SDL_vulkan.h @@ -101,7 +101,7 @@ typedef VkSurfaceKHR SDL_vulkanSurface; /* for compatibility with Tizen */ * \returns 0 on success or -1 if the library couldn't be loaded; call * SDL_GetError() for more information. * - * \since This function is available in SDL 2.0.8 + * \since This function is available since SDL 2.0.6. * * \sa SDL_Vulkan_GetVkInstanceProcAddr * \sa SDL_Vulkan_UnloadLibrary @@ -115,13 +115,15 @@ extern DECLSPEC int SDLCALL SDL_Vulkan_LoadLibrary(const char *path); * creating an SDL_Window with the `SDL_WINDOW_VULKAN` flag. * * \returns the function pointer for `vkGetInstanceProcAddr` or NULL on error. + * + * \since This function is available since SDL 2.0.6. */ extern DECLSPEC void *SDLCALL SDL_Vulkan_GetVkGetInstanceProcAddr(void); /** * Unload the Vulkan library previously loaded by SDL_Vulkan_LoadLibrary() * - * \since This function is available in SDL 2.0.8 + * \since This function is available since SDL 2.0.6. * * \sa SDL_Vulkan_LoadLibrary */ @@ -151,7 +153,7 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void); * Vulkan instance extensions * \returns SDL_TRUE on success, SDL_FALSE on error. * - * \since This function is available in SDL 2.0.8 + * \since This function is available since SDL 2.0.6. * * \sa SDL_Vulkan_CreateSurface */ @@ -172,7 +174,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(SDL_Window *wi * created surface * \returns SDL_TRUE on success, SDL_FALSE on error. * - * \since This function is available in SDL 2.0.8 + * \since This function is available since SDL 2.0.6. * * \sa SDL_Vulkan_GetInstanceExtensions * \sa SDL_Vulkan_GetDrawableSize @@ -193,7 +195,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(SDL_Window *window, * \param w Pointer to the variable to write the width to or NULL * \param h Pointer to the variable to write the height to or NULL * - * \since This function is available in SDL 2.0.8 + * \since This function is available since SDL 2.0.6. * * \sa SDL_GetWindowSize * \sa SDL_CreateWindow