include: A ton of little documentation tweaks, fixes, and improvements.

This is just stuff I noticed while working on the wikiheaders updates. A
thorough pass over all the docs would not be terrible, and maybe a simple
script to check for consistency (does everything have a `\since` on it? etc)
might be nice, too.
This commit is contained in:
Ryan C. Gordon
2024-04-08 22:36:57 -04:00
parent 645073961d
commit ad090d2444
45 changed files with 1565 additions and 833 deletions

View File

@@ -45,7 +45,7 @@ typedef Uint32 SDL_PropertiesID;
/**
* SDL property type
*/
typedef enum
typedef enum SDL_PropertyType
{
SDL_PROPERTY_TYPE_INVALID,
SDL_PROPERTY_TYPE_POINTER,
@@ -56,7 +56,7 @@ typedef enum
} SDL_PropertyType;
/**
* Get the global SDL properties
* Get the global SDL properties.
*
* \returns a valid property ID on success or 0 on failure; call
* SDL_GetError() for more information.
@@ -69,7 +69,7 @@ typedef enum
extern DECLSPEC SDL_PropertiesID SDLCALL SDL_GetGlobalProperties(void);
/**
* Create a set of properties
* Create a set of properties.
*
* All properties are automatically destroyed when SDL_Quit() is called.
*
@@ -85,7 +85,7 @@ extern DECLSPEC SDL_PropertiesID SDLCALL SDL_GetGlobalProperties(void);
extern DECLSPEC SDL_PropertiesID SDLCALL SDL_CreateProperties(void);
/**
* Copy a set of properties
* Copy a set of properties.
*
* Copy all the properties from one set of properties to another, with the
* exception of properties requiring cleanup (set using
@@ -104,7 +104,7 @@ extern DECLSPEC SDL_PropertiesID SDLCALL SDL_CreateProperties(void);
extern DECLSPEC int SDLCALL SDL_CopyProperties(SDL_PropertiesID src, SDL_PropertiesID dst);
/**
* Lock a set of properties
* Lock a set of properties.
*
* Obtain a multi-threaded lock for these properties. Other threads will wait
* while trying to lock these properties until they are unlocked. Properties
@@ -128,7 +128,7 @@ extern DECLSPEC int SDLCALL SDL_CopyProperties(SDL_PropertiesID src, SDL_Propert
extern DECLSPEC int SDLCALL SDL_LockProperties(SDL_PropertiesID props);
/**
* Unlock a set of properties
* Unlock a set of properties.
*
* \param props the properties to unlock
*
@@ -142,7 +142,7 @@ extern DECLSPEC void SDLCALL SDL_UnlockProperties(SDL_PropertiesID props);
/**
* Set a property on a set of properties with a cleanup function that is
* called when the property is deleted
* called when the property is deleted.
*
* The cleanup function is also called if setting the property fails for any
* reason.
@@ -166,7 +166,7 @@ extern DECLSPEC void SDLCALL SDL_UnlockProperties(SDL_PropertiesID props);
extern DECLSPEC int SDLCALL SDL_SetPropertyWithCleanup(SDL_PropertiesID props, const char *name, void *value, void (SDLCALL *cleanup)(void *userdata, void *value), void *userdata);
/**
* Set a property on a set of properties
* Set a property on a set of properties.
*
* \param props the properties to modify
* \param name the name of the property to modify
@@ -189,7 +189,7 @@ extern DECLSPEC int SDLCALL SDL_SetPropertyWithCleanup(SDL_PropertiesID props, c
extern DECLSPEC int SDLCALL SDL_SetProperty(SDL_PropertiesID props, const char *name, void *value);
/**
* Set a string property on a set of properties
* Set a string property on a set of properties.
*
* This function makes a copy of the string; the caller does not have to
* preserve the data after this call completes.
@@ -209,7 +209,7 @@ extern DECLSPEC int SDLCALL SDL_SetProperty(SDL_PropertiesID props, const char *
extern DECLSPEC int SDLCALL SDL_SetStringProperty(SDL_PropertiesID props, const char *name, const char *value);
/**
* Set an integer property on a set of properties
* Set an integer property on a set of properties.
*
* \param props the properties to modify
* \param name the name of the property to modify
@@ -226,7 +226,7 @@ extern DECLSPEC int SDLCALL SDL_SetStringProperty(SDL_PropertiesID props, const
extern DECLSPEC int SDLCALL SDL_SetNumberProperty(SDL_PropertiesID props, const char *name, Sint64 value);
/**
* Set a floating point property on a set of properties
* Set a floating point property on a set of properties.
*
* \param props the properties to modify
* \param name the name of the property to modify
@@ -243,7 +243,7 @@ extern DECLSPEC int SDLCALL SDL_SetNumberProperty(SDL_PropertiesID props, const
extern DECLSPEC int SDLCALL SDL_SetFloatProperty(SDL_PropertiesID props, const char *name, float value);
/**
* Set a boolean property on a set of properties
* Set a boolean property on a set of properties.
*
* \param props the properties to modify
* \param name the name of the property to modify
@@ -275,7 +275,7 @@ extern DECLSPEC int SDLCALL SDL_SetBooleanProperty(SDL_PropertiesID props, const
extern DECLSPEC SDL_bool SDLCALL SDL_HasProperty(SDL_PropertiesID props, const char *name);
/**
* Get the type of a property on a set of properties
* Get the type of a property on a set of properties.
*
* \param props the properties to query
* \param name the name of the property to query
@@ -291,7 +291,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasProperty(SDL_PropertiesID props, const c
extern DECLSPEC SDL_PropertyType SDLCALL SDL_GetPropertyType(SDL_PropertiesID props, const char *name);
/**
* Get a property on a set of properties
* Get a property on a set of properties.
*
* By convention, the names of properties that SDL exposes on objects will
* start with "SDL.", and properties that SDL uses internally will start with
@@ -323,7 +323,7 @@ extern DECLSPEC SDL_PropertyType SDLCALL SDL_GetPropertyType(SDL_PropertiesID pr
extern DECLSPEC void *SDLCALL SDL_GetProperty(SDL_PropertiesID props, const char *name, void *default_value);
/**
* Get a string property on a set of properties
* Get a string property on a set of properties.
*
* \param props the properties to query
* \param name the name of the property to query
@@ -342,7 +342,7 @@ extern DECLSPEC void *SDLCALL SDL_GetProperty(SDL_PropertiesID props, const char
extern DECLSPEC const char *SDLCALL SDL_GetStringProperty(SDL_PropertiesID props, const char *name, const char *default_value);
/**
* Get a number property on a set of properties
* Get a number property on a set of properties.
*
* You can use SDL_GetPropertyType() to query whether the property exists and
* is a number property.
@@ -364,7 +364,7 @@ extern DECLSPEC const char *SDLCALL SDL_GetStringProperty(SDL_PropertiesID props
extern DECLSPEC Sint64 SDLCALL SDL_GetNumberProperty(SDL_PropertiesID props, const char *name, Sint64 default_value);
/**
* Get a floating point property on a set of properties
* Get a floating point property on a set of properties.
*
* You can use SDL_GetPropertyType() to query whether the property exists and
* is a floating point property.
@@ -386,7 +386,7 @@ extern DECLSPEC Sint64 SDLCALL SDL_GetNumberProperty(SDL_PropertiesID props, con
extern DECLSPEC float SDLCALL SDL_GetFloatProperty(SDL_PropertiesID props, const char *name, float default_value);
/**
* Get a boolean property on a set of properties
* Get a boolean property on a set of properties.
*
* You can use SDL_GetPropertyType() to query whether the property exists and
* is a boolean property.
@@ -408,7 +408,7 @@ extern DECLSPEC float SDLCALL SDL_GetFloatProperty(SDL_PropertiesID props, const
extern DECLSPEC SDL_bool SDLCALL SDL_GetBooleanProperty(SDL_PropertiesID props, const char *name, SDL_bool default_value);
/**
* Clear a property on a set of properties
* Clear a property on a set of properties.
*
* \param props the properties to modify
* \param name the name of the property to clear
@@ -424,7 +424,7 @@ extern DECLSPEC int SDLCALL SDL_ClearProperty(SDL_PropertiesID props, const char
typedef void (SDLCALL *SDL_EnumeratePropertiesCallback)(void *userdata, SDL_PropertiesID props, const char *name);
/**
* Enumerate the properties on a set of properties
* Enumerate the properties on a set of properties.
*
* The callback function is called for each property on the set of properties.
* The properties are locked during enumeration.
@@ -442,7 +442,7 @@ typedef void (SDLCALL *SDL_EnumeratePropertiesCallback)(void *userdata, SDL_Prop
extern DECLSPEC int SDLCALL SDL_EnumerateProperties(SDL_PropertiesID props, SDL_EnumeratePropertiesCallback callback, void *userdata);
/**
* Destroy a set of properties
* Destroy a set of properties.
*
* All properties are deleted and their cleanup functions will be called, if
* any.