فهرست منبع

properties: Added SDL_PROP_NAME_STRING.

Fixes #14155.
Ryan C. Gordon 3 روز پیش
والد
کامیت
9a7cd95ac3
1فایلهای تغییر یافته به همراه16 افزوده شده و 0 حذف شده
  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_PROPERTY_TYPE_BOOLEAN
 } SDL_PropertyType;
 } 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.
  * Get the global SDL properties.
  *
  *