Sync SDL3 wiki -> header

This commit is contained in:
SDL Wiki Bot
2024-07-26 17:05:33 +00:00
parent 5e513ecc7f
commit 2137e6eed1

View File

@@ -352,7 +352,9 @@ typedef struct SDL_KeyboardEvent
* will be inserted into the editing text. The length is the number of UTF-8 * will be inserted into the editing text. The length is the number of UTF-8
* characters that will be replaced by new typing. * characters that will be replaced by new typing.
* *
* The text string is temporary memory which will be freed in SDL_FreeTemporaryMemory() and can be claimed with SDL_ClaimTemporaryMemory(). * The text string is temporary memory which will be freed in
* SDL_FreeTemporaryMemory() and can be claimed with
* SDL_ClaimTemporaryMemory().
* *
* \since This struct is available since SDL 3.0.0. * \since This struct is available since SDL 3.0.0.
*/ */
@@ -370,7 +372,9 @@ typedef struct SDL_TextEditingEvent
/** /**
* Keyboard IME candidates event structure (event.edit_candidates.*) * Keyboard IME candidates event structure (event.edit_candidates.*)
* *
* The candidates are a single allocation of temporary memory which will be freed in SDL_FreeTemporaryMemory() and can be claimed with SDL_ClaimTemporaryMemory(). * The candidates are a single allocation of temporary memory which will be
* freed in SDL_FreeTemporaryMemory() and can be claimed with
* SDL_ClaimTemporaryMemory().
* *
* \since This struct is available since SDL 3.0.0. * \since This struct is available since SDL 3.0.0.
*/ */
@@ -389,7 +393,9 @@ typedef struct SDL_TextEditingCandidatesEvent
/** /**
* Keyboard text input event structure (event.text.*) * Keyboard text input event structure (event.text.*)
* *
* The text string is temporary memory which will be freed in SDL_FreeTemporaryMemory() and can be claimed with SDL_ClaimTemporaryMemory(). * The text string is temporary memory which will be freed in
* SDL_FreeTemporaryMemory() and can be claimed with
* SDL_ClaimTemporaryMemory().
* *
* This event will never be delivered unless text input is enabled by calling * This event will never be delivered unless text input is enabled by calling
* SDL_StartTextInput(). Text input is disabled by default! * SDL_StartTextInput(). Text input is disabled by default!
@@ -786,7 +792,9 @@ typedef struct SDL_PenButtonEvent
* An event used to drop text or request a file open by the system * An event used to drop text or request a file open by the system
* (event.drop.*) * (event.drop.*)
* *
* The source and data strings are temporary memory which will be freed in SDL_FreeTemporaryMemory() and can be claimed with SDL_ClaimTemporaryMemory(). * The source and data strings are temporary memory which will be freed in
* SDL_FreeTemporaryMemory() and can be claimed with
* SDL_ClaimTemporaryMemory().
* *
* \since This struct is available since SDL 3.0.0. * \since This struct is available since SDL 3.0.0.
*/ */
@@ -851,7 +859,9 @@ typedef struct SDL_QuitEvent
* the programmer; the only requirement is that '''type''' is a value obtained * the programmer; the only requirement is that '''type''' is a value obtained
* from SDL_RegisterEvents(). * from SDL_RegisterEvents().
* *
* If the data pointers are temporary memory, they will be automatically transfered to the thread that pulls the event from the queue, or freed if the event is flushed. * If the data pointers are temporary memory, they will be automatically
* transfered to the thread that pulls the event from the queue, or freed if
* the event is flushed.
* *
* \since This struct is available since SDL 3.0.0. * \since This struct is available since SDL 3.0.0.
*/ */
@@ -1413,7 +1423,8 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);
/** /**
* Allocate temporary memory. * Allocate temporary memory.
* *
* You can use this to allocate memory from the temporary memory pool for the current thread. * You can use this to allocate memory from the temporary memory pool for the
* current thread.
* *
* \param size the amount of memory to allocate. * \param size the amount of memory to allocate.
* \returns a pointer to the memory allocated or NULL on failure; call * \returns a pointer to the memory allocated or NULL on failure; call
@@ -1431,11 +1442,14 @@ extern SDL_DECLSPEC void * SDLCALL SDL_AllocateTemporaryMemory(size_t size);
/** /**
* Claim ownership of temporary memory. * Claim ownership of temporary memory.
* *
* This function removes memory from the temporary memory pool for the current thread and gives ownership to the application. The application should use SDL_free() to free it when it is done using it. * This function removes memory from the temporary memory pool for the current
* thread and gives ownership to the application. The application should use
* SDL_free() to free it when it is done using it.
* *
* \param mem a pointer allocated with SDL_AllocateTemporaryMemory(). * \param mem a pointer allocated with SDL_AllocateTemporaryMemory().
* \returns a pointer to the memory now owned by the application, which must * \returns a pointer to the memory now owned by the application, which must
* be freed using SDL_free(), or NULL if the memory is not in the temporary memory pool for the current thread. * be freed using SDL_free(), or NULL if the memory is not in the
* temporary memory pool for the current thread.
* *
* \threadsafety It is safe to call this function from any thread. * \threadsafety It is safe to call this function from any thread.
* *
@@ -1449,9 +1463,13 @@ extern SDL_DECLSPEC void * SDLCALL SDL_ClaimTemporaryMemory(const void *mem);
/** /**
* Free temporary memory for the current thread. * Free temporary memory for the current thread.
* *
* This function frees all temporary memory for the current thread. If you would like to hold onto a specific pointer beyond this call, you should call SDL_ClaimTemporaryMemory() to move it out of the temporary memory pool. * This function frees all temporary memory for the current thread. If you
* would like to hold onto a specific pointer beyond this call, you should
* call SDL_ClaimTemporaryMemory() to move it out of the temporary memory
* pool.
* *
* This function is automatically called in SDL_Quit() on the main thread and in SDL_CleanupTLS() when other threads complete. * This function is automatically called in SDL_Quit() on the main thread and
* in SDL_CleanupTLS() when other threads complete.
* *
* \threadsafety It is safe to call this function from any thread. * \threadsafety It is safe to call this function from any thread.
* *