properties topic
CategoryProperties
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 and SDL_GetPointerProperty operate on
void*
pointer types. - SDL_SetStringProperty and SDL_GetStringProperty operate on string types.
- SDL_SetNumberProperty and SDL_GetNumberProperty operate on signed 64-bit integer types.
- SDL_SetFloatProperty and SDL_GetFloatProperty operate on floating point types.
- SDL_SetBooleanProperty and SDL_GetBooleanProperty operate on boolean types.
Properties can be removed from a group by using SDL_ClearProperty.
Classes
Functions
-
sdlClearProperty(
int props, String? name) → bool properties - Clear a property from a group of properties.
-
sdlCopyProperties(
int src, int dst) → bool properties - Copy a group of properties.
-
sdlCreateProperties(
) → int properties - Create a group of properties.
-
sdlDestroyProperties(
int props) → void properties - Destroy a group of properties.
-
sdlEnumerateProperties(
int props, Pointer< propertiesNativeFunction< callback, Pointer<SdlEnumeratePropertiesCallback> >NativeType> userdata) → bool - Enumerate the properties contained in a group of properties.
-
sdlGetBooleanProperty(
int props, String? name, bool defaultValue) → bool properties - Get a boolean property from a group of properties.
-
sdlGetFloatProperty(
int props, String? name, double defaultValue) → double properties - Get a floating point property from a group of properties.
-
sdlGetGlobalProperties(
) → int properties - Get the global SDL properties.
-
sdlGetNumberProperty(
int props, String? name, int defaultValue) → int properties - Get a number property from a group of properties.
-
sdlGetPointerProperty(
int props, String? name, Pointer< propertiesNativeType> defaultValue) → Pointer<NativeType> - Get a pointer property from a group of properties.
-
sdlGetPropertyType(
int props, String? name) → int properties - Get the type of a property in a group of properties.
-
sdlGetStringProperty(
int props, String? name, String? defaultValue) → String? properties - Get a string property from a group of properties.
-
sdlHasProperty(
int props, String? name) → bool properties - Return whether a property exists in a group of properties.
-
sdlLockProperties(
int props) → bool properties - Lock a group of properties.
-
sdlSetBooleanProperty(
int props, String? name, bool value) → bool properties - Set a boolean property in a group of properties.
-
sdlSetFloatProperty(
int props, String? name, double value) → bool properties - Set a floating point property in a group of properties.
-
sdlSetNumberProperty(
int props, String? name, int value) → bool properties - Set an integer property in a group of properties.
-
sdlSetPointerProperty(
int props, String? name, Pointer< propertiesNativeType> value) → bool - Set a pointer property in a group of properties.
-
sdlSetPointerPropertyWithCleanup(
int props, String? name, Pointer< propertiesNativeType> value, Pointer<NativeFunction< cleanup, Pointer<SdlCleanupPropertyCallback> >NativeType> userdata) → bool - Set a pointer property in a group of properties with a cleanup function that is called when the property is deleted.
-
sdlSetStringProperty(
int props, String? name, String? value) → bool properties - Set a string property in a group of properties.
-
sdlUnlockProperties(
int props) → void properties - Unlock a group of properties.