Browse Source

properties: Added SDL_PROP_NAME_STRING.

Fixes #14155.
Ryan C. Gordon 3 days ago
parent
commit
9a7cd95ac3
1 changed files with 16 additions and 0 deletions
  1. 16 0
      include/SDL3/SDL_properties.h

+ 16 - 0
include/SDL3/SDL_properties.h

@@ -80,6 +80,22 @@ typedef enum SDL_PropertyType
     SDL_PROPERTY_TYPE_BOOLEAN
 } SDL_PropertyType;
 
+/**
+ * A generic property for naming things.
+ *
+ * This property is intended to be added to any property set that needs the
+ * set named, or needs a generic name for the object that the properties are
+ * associated with. It is not guaranteed that any property set will include
+ * this property, but it is convenient to have a standard property name that
+ * any piece of code could reasonable agree to use.
+ *
+ * There is no format for the value set with this key; it is expected to be
+ * human-readable.
+ *
+ * \since This macro is available since SDL 3.4.0.
+ */
+#define SDL_PROP_NAME_STRING "SDL.name"
+
 /**
  * Get the global SDL properties.
  *