Module properties
Available on crate feature
dep_sdl3
only.Expand description
A property is a variable that can be created and retrieved by name at runtime.
All properties are part of a property group (SDL_PropertiesID
). A property
group can be created with the SDL_CreateProperties
function and destroyed
with the SDL_DestroyProperties
function.
Properties can be added to and retrieved from a property group through the following functions:
SDL_SetPointerProperty
andSDL_GetPointerProperty
operate onvoid*
pointer types.SDL_SetStringProperty
andSDL_GetStringProperty
operate on string types.SDL_SetNumberProperty
andSDL_GetNumberProperty
operate on signed 64-bit integer types.SDL_SetFloatProperty
andSDL_GetFloatProperty
operate on floating point types.SDL_SetBooleanProperty
andSDL_GetBooleanProperty
operate on boolean types.
Properties can be removed from a group by using SDL_ClearProperty
.
Structs§
- SDL_
Property Type - SDL property type
Constants§
- SDL_
PROPERTY_ TYPE_ BOOLEAN - SDL_
PROPERTY_ TYPE_ FLOAT - SDL_
PROPERTY_ TYPE_ INVALID - SDL_
PROPERTY_ TYPE_ NUMBER - SDL_
PROPERTY_ TYPE_ POINTER - SDL_
PROPERTY_ TYPE_ STRING
Functions§
- SDL_
Clear ⚠Property - Clear a property from a group of properties.
- SDL_
Copy ⚠Properties - Copy a group of properties.
- SDL_
Create ⚠Properties - Create a group of properties.
- SDL_
Destroy ⚠Properties - Destroy a group of properties.
- SDL_
Enumerate ⚠Properties - Enumerate the properties contained in a group of properties.
- SDL_
GetBoolean ⚠Property - Get a boolean property from a group of properties.
- SDL_
GetFloat ⚠Property - Get a floating point property from a group of properties.
- SDL_
GetGlobal ⚠Properties - Get the global SDL properties.
- SDL_
GetNumber ⚠Property - Get a number property from a group of properties.
- SDL_
GetPointer ⚠Property - Get a pointer property from a group of properties.
- SDL_
GetProperty ⚠Type - Get the type of a property in a group of properties.
- SDL_
GetString ⚠Property - Get a string property from a group of properties.
- SDL_
HasProperty ⚠ - Return whether a property exists in a group of properties.
- SDL_
Lock ⚠Properties - Lock a group of properties.
- SDL_
SetBoolean ⚠Property - Set a boolean property in a group of properties.
- SDL_
SetFloat ⚠Property - Set a floating point property in a group of properties.
- SDL_
SetNumber ⚠Property - Set an integer property in a group of properties.
- SDL_
SetPointer ⚠Property - Set a pointer property in a group of properties.
- SDL_
SetPointer ⚠Property With Cleanup - Set a pointer property in a group of properties with a cleanup function that is called when the property is deleted.
- SDL_
SetString ⚠Property - Set a string property in a group of properties.
- SDL_
Unlock ⚠Properties - Unlock a group of properties.
Type Aliases§
- SDL_
Cleanup Property Callback - A callback used to free resources when a property is deleted.
- SDL_
Enumerate Properties Callback - A callback used to enumerate all the properties in a group of properties.
- SDL_
PropertiesID - SDL properties ID