docs: Added more '\threadsafety` tags.

Reference Issue #7140.
This commit is contained in:
Ryan C. Gordon
2024-10-24 14:36:06 -04:00
parent 731853077a
commit 10e52e1899
7 changed files with 127 additions and 14 deletions

View File

@@ -49,6 +49,8 @@ extern "C" {
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
* \threadsafety You may only call this function from the main thread.
*
* \since This function is available since SDL 3.1.3.
*
* \sa SDL_GetClipboardText
@@ -66,6 +68,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetClipboardText(const char *text);
* SDL_GetError() for more information. This should be freed with
* SDL_free() when it is no longer needed.
*
* \threadsafety You may only call this function from the main thread.
*
* \since This function is available since SDL 3.1.3.
*
* \sa SDL_HasClipboardText
@@ -78,6 +82,8 @@ extern SDL_DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
*
* \returns true if the clipboard has text, or false if it does not.
*
* \threadsafety You may only call this function from the main thread.
*
* \since This function is available since SDL 3.1.3.
*
* \sa SDL_GetClipboardText
@@ -92,6 +98,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasClipboardText(void);
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
* \threadsafety You may only call this function from the main thread.
*
* \since This function is available since SDL 3.1.3.
*
* \sa SDL_GetPrimarySelectionText
@@ -109,6 +117,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetPrimarySelectionText(const char *text);
* failure; call SDL_GetError() for more information. This should be
* freed with SDL_free() when it is no longer needed.
*
* \threadsafety You may only call this function from the main thread.
*
* \since This function is available since SDL 3.1.3.
*
* \sa SDL_HasPrimarySelectionText
@@ -122,6 +132,8 @@ extern SDL_DECLSPEC char * SDLCALL SDL_GetPrimarySelectionText(void);
*
* \returns true if the primary selection has text, or false if it does not.
*
* \threadsafety You may only call this function from the main thread.
*
* \since This function is available since SDL 3.1.3.
*
* \sa SDL_GetPrimarySelectionText
@@ -187,6 +199,8 @@ typedef void (SDLCALL *SDL_ClipboardCleanupCallback)(void *userdata);
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
* \threadsafety You may only call this function from the main thread.
*
* \since This function is available since SDL 3.1.3.
*
* \sa SDL_ClearClipboardData
@@ -201,6 +215,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetClipboardData(SDL_ClipboardDataCallback
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
* \threadsafety You may only call this function from the main thread.
*
* \since This function is available since SDL 3.1.3.
*
* \sa SDL_SetClipboardData
@@ -219,6 +235,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ClearClipboardData(void);
* for more information. This should be freed with SDL_free() when it
* is no longer needed.
*
* \threadsafety You may only call this function from the main thread.
*
* \since This function is available since SDL 3.1.3.
*
* \sa SDL_HasClipboardData
@@ -233,6 +251,8 @@ extern SDL_DECLSPEC void * SDLCALL SDL_GetClipboardData(const char *mime_type, s
* \returns true if there exists data in clipboard for the provided mime type,
* false if it does not.
*
* \threadsafety You may only call this function from the main thread.
*
* \since This function is available since SDL 3.1.3.
*
* \sa SDL_SetClipboardData
@@ -249,6 +269,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasClipboardData(const char *mime_type);
* failure; call SDL_GetError() for more information. This should be
* freed with SDL_free() when it is no longer needed.
*
* \threadsafety You may only call this function from the main thread.
*
* \since This function is available since SDL 3.1.3.
*
* \sa SDL_SetClipboardData