aboutsummaryrefslogtreecommitdiff
path: root/vendor/sdl3/include/SDL_properties.h
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sdl3/include/SDL_properties.h')
-rw-r--r--vendor/sdl3/include/SDL_properties.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/vendor/sdl3/include/SDL_properties.h b/vendor/sdl3/include/SDL_properties.h
index 1f47d5f4a..8e87dfce4 100644
--- a/vendor/sdl3/include/SDL_properties.h
+++ b/vendor/sdl3/include/SDL_properties.h
@@ -59,7 +59,7 @@ extern "C" {
#endif
/**
- * SDL properties ID
+ * An ID that represents a properties set.
*
* \since This datatype is available since SDL 3.2.0.
*/
@@ -81,6 +81,31 @@ typedef enum SDL_PropertyType
} SDL_PropertyType;
/**
+ * A generic property for naming things.
+ *
+ * This property is intended to be added to any SDL_PropertiesID that needs a
+ * generic name associated with the property set. It is not guaranteed that
+ * any property set will include this key, but it is convenient to have a
+ * standard key that any piece of code could reasonably agree to use.
+ *
+ * For example, the properties associated with an SDL_Texture might have a
+ * name string of "player sprites", or an SDL_AudioStream might have
+ * "background music", etc. This might also be useful for an SDL_IOStream to
+ * list the path to its asset.
+ *
+ * There is no format for the value set with this key; it is expected to be
+ * human-readable and informational in nature, possibly for logging or
+ * debugging purposes.
+ *
+ * SDL does not currently set this property on any objects it creates, but
+ * this may change in later versions; it is currently expected that apps and
+ * external libraries will take advantage of it, when appropriate.
+ *
+ * \since This macro is available since SDL 3.4.0.
+ */
+#define SDL_PROP_NAME_STRING "SDL.name"
+
+/**
* Get the global SDL properties.
*
* \returns a valid property ID on success or 0 on failure; call
@@ -119,7 +144,9 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_CreateProperties(void);
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
- * \threadsafety It is safe to call this function from any thread.
+ * \threadsafety It is safe to call this function from any thread. This
+ * function acquires simultaneous mutex locks on both the source
+ * and destination property sets.
*
* \since This function is available since SDL 3.2.0.
*/