3333 }
3434
3535{ *
36- * SDL properties ID
36+ * An ID that represents a properties set.
3737 *
38- * \since This datatype is available since SDL 3.1.3 .
38+ * \since This datatype is available since SDL 3.2.0 .
3939 }
4040type
4141 PPSDL_PropertiesID = ^PSDL_PropertiesID;
4545{ *
4646 * SDL property type
4747 *
48- * \since This enum is available since SDL 3.1.3 .
48+ * \since This enum is available since SDL 3.2.0 .
4949 }
5050
5151PPSDL_PropertyType = ^PSDL_PropertyType;
@@ -59,13 +59,41 @@ const
5959 SDL_PROPERTY_TYPE_FLOAT = TSDL_PropertyType(4 );
6060 SDL_PROPERTY_TYPE_BOOLEAN = TSDL_PropertyType(5 );
6161
62+ { **
63+ * A generic property for naming things.
64+ *
65+ * This property is intended to be added to any SDL_PropertiesID that needs a
66+ * generic name associated with the property set. It is not guaranteed that
67+ * any property set will include this key, but it is convenient to have a
68+ * standard key that any piece of code could reasonably agree to use.
69+ *
70+ * For example, the properties associated with an SDL_Texture might have a
71+ * name string of "player sprites", or an SDL_AudioStream might have
72+ * "background music", etc. This might also be useful for an SDL_IOStream to
73+ * list the path to its asset.
74+ *
75+ * There is no format for the value set with this key; it is expected to be
76+ * human-readable and informational in nature, possibly for logging or
77+ * debugging purposes.
78+ *
79+ * SDL does not currently set this property on any objects it creates, but
80+ * this may change in later versions; it is currently expected that apps and
81+ * external libraries will take advantage of it, when appropriate.
82+ *
83+ * \since This macro is available since SDL 3.4.0.
84+ *}
85+ const
86+ SDL_PROP_NAME_STRING = ' SDL.name' ;
87+
6288{ *
6389 * Get the global SDL properties.
6490 *
6591 * \returns a valid property ID on success or 0 on failure; call
6692 * SDL_GetError() for more information.
6793 *
68- * \since This function is available since SDL 3.1.3.
94+ * \threadsafety It is safe to call this function from any thread.
95+ *
96+ * \since This function is available since SDL 3.2.0.
6997 }
7098function SDL_GetGlobalProperties : TSDL_PropertiesID; cdecl;
7199 external SDL_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _SDL_GetGlobalProperties' { $ENDIF} { $ENDIF} ;
@@ -80,7 +108,7 @@ function SDL_GetGlobalProperties: TSDL_PropertiesID; cdecl;
80108 *
81109 * \threadsafety It is safe to call this function from any thread.
82110 *
83- * \since This function is available since SDL 3.1.3 .
111+ * \since This function is available since SDL 3.2.0 .
84112 *
85113 * \sa SDL_DestroyProperties
86114 }
@@ -100,9 +128,11 @@ function SDL_CreateProperties: TSDL_PropertiesID; cdecl;
100128 * \returns true on success or false on failure; call SDL_GetError() for more
101129 * information.
102130 *
103- * \threadsafety It is safe to call this function from any thread.
131+ * \threadsafety It is safe to call this function from any thread. This
132+ * function acquires simultaneous mutex locks on both the source
133+ * and destination property sets.
104134 *
105- * \since This function is available since SDL 3.1.3 .
135+ * \since This function is available since SDL 3.2.0 .
106136 }
107137function SDL_CopyProperties (src: TSDL_PropertiesID; dst: TSDL_PropertiesID): Boolean; cdecl;
108138 external SDL_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _SDL_CopyProperties' { $ENDIF} { $ENDIF} ;
@@ -125,7 +155,7 @@ function SDL_CopyProperties(src: TSDL_PropertiesID; dst: TSDL_PropertiesID): Boo
125155 *
126156 * \threadsafety It is safe to call this function from any thread.
127157 *
128- * \since This function is available since SDL 3.1.3 .
158+ * \since This function is available since SDL 3.2.0 .
129159 *
130160 * \sa SDL_UnlockProperties
131161 }
@@ -139,7 +169,7 @@ function SDL_LockProperties(props: TSDL_PropertiesID): Boolean; cdecl;
139169 *
140170 * \threadsafety It is safe to call this function from any thread.
141171 *
142- * \since This function is available since SDL 3.1.3 .
172+ * \since This function is available since SDL 3.2.0 .
143173 *
144174 * \sa SDL_LockProperties
145175 }
@@ -164,7 +194,7 @@ procedure SDL_UnlockProperties(props: TSDL_PropertiesID); cdecl;
164194 * \threadsafety This callback may fire without any locks held; if this is a
165195 * concern, the app should provide its own locking.
166196 *
167- * \since This datatype is available since SDL 3.1.3 .
197+ * \since This datatype is available since SDL 3.2.0 .
168198 *
169199 * \sa SDL_SetPointerPropertyWithCleanup
170200 }
194224 *
195225 * \threadsafety It is safe to call this function from any thread.
196226 *
197- * \since This function is available since SDL 3.1.3 .
227+ * \since This function is available since SDL 3.2.0 .
198228 *
199229 * \sa SDL_GetPointerProperty
200230 * \sa SDL_SetPointerProperty
@@ -214,7 +244,7 @@ function SDL_SetPointerPropertyWithCleanup(props: TSDL_PropertiesID; name: PAnsi
214244 *
215245 * \threadsafety It is safe to call this function from any thread.
216246 *
217- * \since This function is available since SDL 3.1.3 .
247+ * \since This function is available since SDL 3.2.0 .
218248 *
219249 * \sa SDL_GetPointerProperty
220250 * \sa SDL_HasProperty
@@ -241,7 +271,7 @@ function SDL_SetPointerProperty(props: TSDL_PropertiesID; name: PAnsiChar; value
241271 *
242272 * \threadsafety It is safe to call this function from any thread.
243273 *
244- * \since This function is available since SDL 3.1.3 .
274+ * \since This function is available since SDL 3.2.0 .
245275 *
246276 * \sa SDL_GetStringProperty
247277 }
@@ -259,7 +289,7 @@ function SDL_SetStringProperty(props: TSDL_PropertiesID; name: PAnsiChar; value:
259289 *
260290 * \threadsafety It is safe to call this function from any thread.
261291 *
262- * \since This function is available since SDL 3.1.3 .
292+ * \since This function is available since SDL 3.2.0 .
263293 *
264294 * \sa SDL_GetNumberProperty
265295 }
@@ -277,7 +307,7 @@ function SDL_SetNumberProperty(props: TSDL_PropertiesID; name: PAnsiChar; value:
277307 *
278308 * \threadsafety It is safe to call this function from any thread.
279309 *
280- * \since This function is available since SDL 3.1.3 .
310+ * \since This function is available since SDL 3.2.0 .
281311 *
282312 * \sa SDL_GetFloatProperty
283313 }
@@ -295,7 +325,7 @@ function SDL_SetFloatProperty(props: TSDL_PropertiesID; name: PAnsiChar; value:
295325 *
296326 * \threadsafety It is safe to call this function from any thread.
297327 *
298- * \since This function is available since SDL 3.1.3 .
328+ * \since This function is available since SDL 3.2.0 .
299329 *
300330 * \sa SDL_GetBooleanProperty
301331 }
@@ -311,7 +341,7 @@ function SDL_SetBooleanProperty(props: TSDL_PropertiesID; name: PAnsiChar; value
311341 *
312342 * \threadsafety It is safe to call this function from any thread.
313343 *
314- * \since This function is available since SDL 3.1.3 .
344+ * \since This function is available since SDL 3.2.0 .
315345 *
316346 * \sa SDL_GetPropertyType
317347 }
@@ -328,7 +358,7 @@ function SDL_HasProperty(props: TSDL_PropertiesID; name: PAnsiChar): Boolean; cd
328358 *
329359 * \threadsafety It is safe to call this function from any thread.
330360 *
331- * \since This function is available since SDL 3.1.3 .
361+ * \since This function is available since SDL 3.2.0 .
332362 *
333363 * \sa SDL_HasProperty
334364 }
@@ -356,7 +386,7 @@ function SDL_GetPropertyType(props: TSDL_PropertiesID; name: PAnsiChar): TSDL_Pr
356386 * If you need to avoid this, use SDL_LockProperties() and
357387 * SDL_UnlockProperties().
358388 *
359- * \since This function is available since SDL 3.1.3 .
389+ * \since This function is available since SDL 3.2.0 .
360390 *
361391 * \sa SDL_GetBooleanProperty
362392 * \sa SDL_GetFloatProperty
@@ -385,7 +415,7 @@ function SDL_GetPointerProperty(props: TSDL_PropertiesID; name: PAnsiChar; defau
385415 * If you need to avoid this, use SDL_LockProperties() and
386416 * SDL_UnlockProperties().
387417 *
388- * \since This function is available since SDL 3.1.3 .
418+ * \since This function is available since SDL 3.2.0 .
389419 *
390420 * \sa SDL_GetPropertyType
391421 * \sa SDL_HasProperty
@@ -408,7 +438,7 @@ function SDL_GetStringProperty(props: TSDL_PropertiesID; name: PAnsiChar; defaul
408438 *
409439 * \threadsafety It is safe to call this function from any thread.
410440 *
411- * \since This function is available since SDL 3.1.3 .
441+ * \since This function is available since SDL 3.2.0 .
412442 *
413443 * \sa SDL_GetPropertyType
414444 * \sa SDL_HasProperty
@@ -431,7 +461,7 @@ function SDL_GetNumberProperty(props: TSDL_PropertiesID; name: PAnsiChar; defaul
431461 *
432462 * \threadsafety It is safe to call this function from any thread.
433463 *
434- * \since This function is available since SDL 3.1.3 .
464+ * \since This function is available since SDL 3.2.0 .
435465 *
436466 * \sa SDL_GetPropertyType
437467 * \sa SDL_HasProperty
@@ -454,7 +484,7 @@ function SDL_GetFloatProperty(props: TSDL_PropertiesID; name: PAnsiChar; default
454484 *
455485 * \threadsafety It is safe to call this function from any thread.
456486 *
457- * \since This function is available since SDL 3.1.3 .
487+ * \since This function is available since SDL 3.2.0 .
458488 *
459489 * \sa SDL_GetPropertyType
460490 * \sa SDL_HasProperty
@@ -473,7 +503,7 @@ function SDL_GetBooleanProperty(props: TSDL_PropertiesID; name: PAnsiChar; defau
473503 *
474504 * \threadsafety It is safe to call this function from any thread.
475505 *
476- * \since This function is available since SDL 3.1.3 .
506+ * \since This function is available since SDL 3.2.0 .
477507 }
478508function SDL_ClearProperty (props: TSDL_PropertiesID; name : PAnsiChar): Boolean; cdecl;
479509 external SDL_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _SDL_ClearProperty' { $ENDIF} { $ENDIF} ;
@@ -491,7 +521,7 @@ function SDL_ClearProperty(props: TSDL_PropertiesID; name: PAnsiChar): Boolean;
491521 * \threadsafety SDL_EnumerateProperties holds a lock on `props` during this
492522 * callback.
493523 *
494- * \since This datatype is available since SDL 3.1.3 .
524+ * \since This datatype is available since SDL 3.2.0 .
495525 *
496526 * \sa SDL_EnumerateProperties
497527 }
512542 *
513543 * \threadsafety It is safe to call this function from any thread.
514544 *
515- * \since This function is available since SDL 3.1.3 .
545+ * \since This function is available since SDL 3.2.0 .
516546 }
517547function SDL_EnumerateProperties (props: TSDL_PropertiesID; callback: TSDL_EnumeratePropertiesCallback; userdata: Pointer): Boolean; cdecl;
518548 external SDL_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _SDL_EnumerateProperties' { $ENDIF} { $ENDIF} ;
@@ -529,7 +559,7 @@ function SDL_EnumerateProperties(props: TSDL_PropertiesID; callback: TSDL_Enumer
529559 * locked or other threads might be setting or getting values
530560 * from these properties.
531561 *
532- * \since This function is available since SDL 3.1.3 .
562+ * \since This function is available since SDL 3.2.0 .
533563 *
534564 * \sa SDL_CreateProperties
535565 }
0 commit comments