SDL API renaming: SDL_Alloc*/SDL_Free* -> SDL_Create*/SDL_Destroy*

Fixes https://github.com/libsdl-org/SDL/issues/6945
This commit is contained in:
Sam Lantinga
2022-12-29 15:07:59 -08:00
parent e1bd5bd071
commit 98678b5d8d
14 changed files with 84 additions and 67 deletions

View File

@@ -293,7 +293,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void);
* - data=0, mask=0: transparent
* - data=1, mask=0: inverted color if possible, black if not.
*
* Cursors created with this function must be freed with SDL_FreeCursor().
* Cursors created with this function must be freed with SDL_DestroyCursor().
*
* If you want to have a color cursor, or create your cursor from an
* SDL_Surface, you should use SDL_CreateColorCursor(). Alternately, you can
@@ -316,7 +316,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_FreeCursor
* \sa SDL_DestroyCursor
* \sa SDL_SetCursor
*/
extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
@@ -336,7 +336,7 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_CreateCursor
* \sa SDL_FreeCursor
* \sa SDL_DestroyCursor
*/
extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface,
int hot_x,
@@ -351,7 +351,7 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface,
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_FreeCursor
* \sa SDL_DestroyCursor
*/
extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateSystemCursor(SDL_SystemCursor id);
@@ -376,7 +376,7 @@ extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor);
* Get the active cursor.
*
* This function returns a pointer to the current cursor which is owned by the
* library. It is not necessary to free the cursor with SDL_FreeCursor().
* library. It is not necessary to free the cursor with SDL_DestroyCursor().
*
* \returns the active cursor or NULL if there is no mouse.
*
@@ -389,7 +389,7 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
/**
* Get the default cursor.
*
* You do not have to call SDL_FreeCursor() on the return value,
* You do not have to call SDL_DestroyCursor() on the return value,
* but it is safe to do so.
*
* \returns the default cursor on success or NULL on failure.
@@ -414,7 +414,7 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
* \sa SDL_CreateCursor
* \sa SDL_CreateSystemCursor
*/
extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
extern DECLSPEC void SDLCALL SDL_DestroyCursor(SDL_Cursor * cursor);
/**
* Show the cursor.