api: Added SDL_GetNumProperties().

Fixes #14761.
This commit is contained in:
Ryan C. Gordon
2026-07-10 23:55:36 -04:00
parent d11e3e087a
commit 82141a2439
8 changed files with 64 additions and 3 deletions

View File

@@ -508,6 +508,21 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetBooleanProperty(SDL_PropertiesID props,
*/
extern SDL_DECLSPEC bool SDLCALL SDL_ClearProperty(SDL_PropertiesID props, const char *name);
/**
* Get the current number of items in a group of properties.
*
* For an invalid SDL_PropertiesID, this returns zero and does not set an
* error message.
*
* \param props the properties to query.
* \returns the number of property items available.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.6.0.
*/
extern SDL_DECLSPEC int SDLCALL SDL_GetNumProperties(SDL_PropertiesID props);
/**
* A callback used to enumerate all the properties in a group of properties.
*