| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Properties
Contents
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 createProperties function and destroyed with the destroyProperties function.
Properties can be added to and retrieved from a property group through the following functions:
setPointerPropertyandgetPointerPropertyoperate onvoid*pointer types.setStringPropertyandgetStringPropertyoperate on string types.setNumberPropertyandgetNumberPropertyoperate on signed 64-bit integer types.setFloatPropertyandgetFloatPropertyoperate on floating point types.setBooleanPropertyandgetBooleanPropertyoperate on boolean types.
Properties can be removed from a group by using clearProperty. An ID that represents a properties set.
FFI conventions
Unsuffixed aliases are unsafe foreign imports; aliases suffixed Safe are safe. Functions whose callbacks fire during the call export only the Safe alias (the genuine unsafe import stays reachable under SDL3.Sys.Bindgen.Properties.Unsafe); functions curated unsafe-only export only the unsuffixed one. Each alias's documentation records its flavor and rationale.
Full conventions: SDL3.Sys.
Since: 3.2.0
Synopsis
- module SDL3.Sys.Bindgen.Properties
- getGlobalProperties :: IO SDL_PropertiesID
- getGlobalPropertiesSafe :: IO SDL_PropertiesID
- createProperties :: IO SDL_PropertiesID
- createPropertiesSafe :: IO SDL_PropertiesID
- copyProperties :: SDL_PropertiesID -> SDL_PropertiesID -> IO Bool
- copyPropertiesSafe :: SDL_PropertiesID -> SDL_PropertiesID -> IO Bool
- lockProperties :: SDL_PropertiesID -> IO Bool
- lockPropertiesSafe :: SDL_PropertiesID -> IO Bool
- unlockProperties :: SDL_PropertiesID -> IO ()
- unlockPropertiesSafe :: SDL_PropertiesID -> IO ()
- setPointerPropertyWithCleanupSafe :: SDL_PropertiesID -> PtrConst CChar -> Ptr Void -> SDL_CleanupPropertyCallback -> Ptr Void -> IO Bool
- setPointerProperty :: SDL_PropertiesID -> PtrConst CChar -> Ptr Void -> IO Bool
- setPointerPropertySafe :: SDL_PropertiesID -> PtrConst CChar -> Ptr Void -> IO Bool
- setStringProperty :: SDL_PropertiesID -> PtrConst CChar -> PtrConst CChar -> IO Bool
- setStringPropertySafe :: SDL_PropertiesID -> PtrConst CChar -> PtrConst CChar -> IO Bool
- setNumberProperty :: SDL_PropertiesID -> PtrConst CChar -> Int64 -> IO Bool
- setNumberPropertySafe :: SDL_PropertiesID -> PtrConst CChar -> Int64 -> IO Bool
- setFloatProperty :: SDL_PropertiesID -> PtrConst CChar -> Float -> IO Bool
- setFloatPropertySafe :: SDL_PropertiesID -> PtrConst CChar -> Float -> IO Bool
- setBooleanProperty :: SDL_PropertiesID -> PtrConst CChar -> Bool -> IO Bool
- setBooleanPropertySafe :: SDL_PropertiesID -> PtrConst CChar -> Bool -> IO Bool
- hasProperty :: SDL_PropertiesID -> PtrConst CChar -> IO Bool
- hasPropertySafe :: SDL_PropertiesID -> PtrConst CChar -> IO Bool
- getPropertyType :: SDL_PropertiesID -> PtrConst CChar -> IO SDL_PropertyType
- getPropertyTypeSafe :: SDL_PropertiesID -> PtrConst CChar -> IO SDL_PropertyType
- getPointerProperty :: SDL_PropertiesID -> PtrConst CChar -> Ptr Void -> IO (Ptr Void)
- getPointerPropertySafe :: SDL_PropertiesID -> PtrConst CChar -> Ptr Void -> IO (Ptr Void)
- getStringProperty :: SDL_PropertiesID -> PtrConst CChar -> PtrConst CChar -> IO (PtrConst CChar)
- getStringPropertySafe :: SDL_PropertiesID -> PtrConst CChar -> PtrConst CChar -> IO (PtrConst CChar)
- getNumberProperty :: SDL_PropertiesID -> PtrConst CChar -> Int64 -> IO Int64
- getNumberPropertySafe :: SDL_PropertiesID -> PtrConst CChar -> Int64 -> IO Int64
- getFloatProperty :: SDL_PropertiesID -> PtrConst CChar -> Float -> IO Float
- getFloatPropertySafe :: SDL_PropertiesID -> PtrConst CChar -> Float -> IO Float
- getBooleanProperty :: SDL_PropertiesID -> PtrConst CChar -> Bool -> IO Bool
- getBooleanPropertySafe :: SDL_PropertiesID -> PtrConst CChar -> Bool -> IO Bool
- clearProperty :: SDL_PropertiesID -> PtrConst CChar -> IO Bool
- clearPropertySafe :: SDL_PropertiesID -> PtrConst CChar -> IO Bool
- enumeratePropertiesSafe :: SDL_PropertiesID -> SDL_EnumeratePropertiesCallback -> Ptr Void -> IO Bool
- destroyProperties :: SDL_PropertiesID -> IO ()
- destroyPropertiesSafe :: SDL_PropertiesID -> IO ()
Documentation
module SDL3.Sys.Bindgen.Properties
Function aliases
getGlobalProperties :: IO SDL_PropertiesID Source #
Get the global SDL properties.
- Returns
- a valid property ID on success or 0 on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetGlobalProperties. The safe flavor isgetGlobalPropertiesSafe. - C declaration
SDL_GetGlobalProperties, defined atSDL3/SDL_properties.h 118:46
Since: 3.2.0
getGlobalPropertiesSafe :: IO SDL_PropertiesID Source #
Get the global SDL properties.
- Returns
- a valid property ID on success or 0 on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetGlobalProperties. The unsafe flavor isgetGlobalProperties. - C declaration
SDL_GetGlobalProperties, defined atSDL3/SDL_properties.h 118:46
Since: 3.2.0
createProperties :: IO SDL_PropertiesID Source #
Create a group of properties.
All properties are automatically destroyed when quit is called.
- Returns
- an ID for a new group of properties, or 0 on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
destroyProperties
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_CreateProperties. The safe flavor iscreatePropertiesSafe. - C declaration
SDL_CreateProperties, defined atSDL3/SDL_properties.h 134:46
Since: 3.2.0
createPropertiesSafe :: IO SDL_PropertiesID Source #
Create a group of properties.
All properties are automatically destroyed when quit is called.
- Returns
- an ID for a new group of properties, or 0 on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
destroyProperties
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_CreateProperties. The unsafe flavor iscreateProperties. - C declaration
SDL_CreateProperties, defined atSDL3/SDL_properties.h 134:46
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> SDL_PropertiesID |
|
| -> IO Bool |
Copy a group of properties.
Copy all the properties from one group of properties to another, with the exception of properties requiring cleanup (set using ), which will not be copied. Any property that already exists on setPointerPropertyWithCleanupSafedst will be overwritten.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread. This function acquires simultaneous mutex locks on both the source and destination property sets.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_CopyProperties. The safe flavor iscopyPropertiesSafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_CopyProperties, defined atSDL3/SDL_properties.h 155:34
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> SDL_PropertiesID |
|
| -> IO Bool |
Copy a group of properties.
Copy all the properties from one group of properties to another, with the exception of properties requiring cleanup (set using ), which will not be copied. Any property that already exists on setPointerPropertyWithCleanupSafedst will be overwritten.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread. This function acquires simultaneous mutex locks on both the source and destination property sets.
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_CopyProperties. The unsafe flavor iscopyProperties. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_CopyProperties, defined atSDL3/SDL_properties.h 155:34
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> IO Bool |
Lock a group of properties.
Obtain a multi-threaded lock for these properties. Other threads will wait while trying to lock these properties until they are unlocked. Properties must be unlocked before they are destroyed.
The lock is automatically taken when setting individual properties, this function is only needed when you want to set several properties atomically or want to guarantee that properties being queried aren't freed in another thread.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
unlockProperties
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_LockProperties. The safe flavor islockPropertiesSafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_LockProperties, defined atSDL3/SDL_properties.h 179:34
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> IO Bool |
Lock a group of properties.
Obtain a multi-threaded lock for these properties. Other threads will wait while trying to lock these properties until they are unlocked. Properties must be unlocked before they are destroyed.
The lock is automatically taken when setting individual properties, this function is only needed when you want to set several properties atomically or want to guarantee that properties being queried aren't freed in another thread.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
unlockProperties
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_LockProperties. The unsafe flavor islockProperties. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_LockProperties, defined atSDL3/SDL_properties.h 179:34
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> IO () |
Unlock a group of properties.
- Thread safety
- It is safe to call this function from any thread.
- See also
lockProperties
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_UnlockProperties. The safe flavor isunlockPropertiesSafe. - C declaration
SDL_UnlockProperties, defined atSDL3/SDL_properties.h 192:34
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> IO () |
Unlock a group of properties.
- Thread safety
- It is safe to call this function from any thread.
- See also
lockProperties
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_UnlockProperties. The unsafe flavor isunlockProperties. - C declaration
SDL_UnlockProperties, defined atSDL3/SDL_properties.h 192:34
Since: 3.2.0
setPointerPropertyWithCleanupSafe Source #
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> Ptr Void |
|
| -> SDL_CleanupPropertyCallback |
|
| -> Ptr Void |
|
| -> IO Bool |
Set a pointer property in a group of properties with a cleanup function that is called when the property is deleted.
The cleanup function is also called if setting the property fails for any reason.
For simply setting basic data types, like numbers, bools, or strings, use setNumberProperty, setBooleanProperty, or setStringProperty instead, as those functions will handle cleanup on your behalf. This function is only for more complex, custom data.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
getPointerProperty,setPointerProperty,SDL_CleanupPropertyCallback
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_SetPointerPropertyWithCleanup. The unsafe import is not exported : invokes the cleanup callback synchronously on failure or overwrite. If your callback is a non-Haskell function pointer that never re-enters the Haskell runtime, the unsafe import remains available asSDL3.Sys.Bindgen.Properties.Unsafe.sDL_SetPointerPropertyWithCleanup. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_SetPointerPropertyWithCleanup, defined atSDL3/SDL_properties.h 247:34
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> Ptr Void |
|
| -> IO Bool |
Set a pointer property in a group of properties.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
getPointerProperty,hasProperty,setBooleanProperty,setFloatProperty,setNumberProperty,setPointerPropertyWithCleanupSafe,setStringProperty
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_SetPointerProperty. The safe flavor issetPointerPropertySafe: overwriting a cleanup property invokes its cleanup synchronously. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_SetPointerProperty, defined atSDL3/SDL_properties.h 270:34
Since: 3.2.0
setPointerPropertySafe Source #
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> Ptr Void |
|
| -> IO Bool |
Set a pointer property in a group of properties.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
getPointerProperty,hasProperty,setBooleanProperty,setFloatProperty,setNumberProperty,setPointerPropertyWithCleanupSafe,setStringProperty
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_SetPointerProperty. The unsafe flavor issetPointerProperty: overwriting a cleanup property invokes its cleanup synchronously. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_SetPointerProperty, defined atSDL3/SDL_properties.h 270:34
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> PtrConst CChar |
|
| -> IO Bool |
Set a string property in a group of properties.
This function makes a copy of the string; the caller does not have to preserve the data after this call completes.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
getStringProperty
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_SetStringProperty. The safe flavor issetStringPropertySafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_SetStringProperty, defined atSDL3/SDL_properties.h 290:34
Since: 3.2.0
setStringPropertySafe Source #
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> PtrConst CChar |
|
| -> IO Bool |
Set a string property in a group of properties.
This function makes a copy of the string; the caller does not have to preserve the data after this call completes.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
getStringProperty
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_SetStringProperty. The unsafe flavor issetStringProperty. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_SetStringProperty, defined atSDL3/SDL_properties.h 290:34
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> Int64 |
|
| -> IO Bool |
Set an integer property in a group of properties.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
getNumberProperty
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_SetNumberProperty. The safe flavor issetNumberPropertySafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_SetNumberProperty, defined atSDL3/SDL_properties.h 307:34
Since: 3.2.0
setNumberPropertySafe Source #
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> Int64 |
|
| -> IO Bool |
Set an integer property in a group of properties.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
getNumberProperty
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_SetNumberProperty. The unsafe flavor issetNumberProperty. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_SetNumberProperty, defined atSDL3/SDL_properties.h 307:34
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> Float |
|
| -> IO Bool |
Set a floating point property in a group of properties.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
getFloatProperty
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_SetFloatProperty. The safe flavor issetFloatPropertySafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_SetFloatProperty, defined atSDL3/SDL_properties.h 324:34
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> Float |
|
| -> IO Bool |
Set a floating point property in a group of properties.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
getFloatProperty
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_SetFloatProperty. The unsafe flavor issetFloatProperty. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_SetFloatProperty, defined atSDL3/SDL_properties.h 324:34
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> Bool |
|
| -> IO Bool |
Set a boolean property in a group of properties.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
getBooleanProperty
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_SetBooleanProperty. The safe flavor issetBooleanPropertySafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_SetBooleanProperty, defined atSDL3/SDL_properties.h 341:34
Since: 3.2.0
setBooleanPropertySafe Source #
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> Bool |
|
| -> IO Bool |
Set a boolean property in a group of properties.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
getBooleanProperty
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_SetBooleanProperty. The unsafe flavor issetBooleanProperty. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_SetBooleanProperty, defined atSDL3/SDL_properties.h 341:34
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> IO Bool |
Return whether a property exists in a group of properties.
- Returns
- true if the property exists, or false if it doesn't.
- Thread safety
- It is safe to call this function from any thread.
- See also
getPropertyType
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_HasProperty. The safe flavor ishasPropertySafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_HasProperty, defined atSDL3/SDL_properties.h 356:34
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> IO Bool |
Return whether a property exists in a group of properties.
- Returns
- true if the property exists, or false if it doesn't.
- Thread safety
- It is safe to call this function from any thread.
- See also
getPropertyType
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_HasProperty. The unsafe flavor ishasProperty. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_HasProperty, defined atSDL3/SDL_properties.h 356:34
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> IO SDL_PropertyType |
Get the type of a property in a group of properties.
- Returns
- the type of the property, or SDL_PROPERTY_TYPE_INVALID if it is not set.
- Thread safety
- It is safe to call this function from any thread.
- See also
hasProperty
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetPropertyType. The safe flavor isgetPropertyTypeSafe. - C declaration
SDL_GetPropertyType, defined atSDL3/SDL_properties.h 372:46
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> IO SDL_PropertyType |
Get the type of a property in a group of properties.
- Returns
- the type of the property, or SDL_PROPERTY_TYPE_INVALID if it is not set.
- Thread safety
- It is safe to call this function from any thread.
- See also
hasProperty
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetPropertyType. The unsafe flavor isgetPropertyType. - C declaration
SDL_GetPropertyType, defined atSDL3/SDL_properties.h 372:46
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> Ptr Void |
|
| -> IO (Ptr Void) |
Get a pointer property from a group of properties.
By convention, the names of properties that SDL exposes on objects will start with "SDL.", and properties that SDL uses internally will start with "SDL.internal.". These should be considered read-only and should not be modified by applications.
- Returns
- the value of the property, or
default_valueif it is not set or not a pointer property. - Thread safety
- It is safe to call this function from any thread, although the data returned is not protected and could potentially be freed if you call
orsetPointerPropertyon these properties from another thread. If you need to avoid this, useclearPropertyandlockProperties.unlockProperties - See also
getBooleanProperty,getFloatProperty,getNumberProperty,getPropertyType,getStringProperty,hasProperty,setPointerProperty
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetPointerProperty. The safe flavor isgetPointerPropertySafe. - C declaration
SDL_GetPointerProperty, defined atSDL3/SDL_properties.h 405:36
Since: 3.2.0
getPointerPropertySafe Source #
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> Ptr Void |
|
| -> IO (Ptr Void) |
Get a pointer property from a group of properties.
By convention, the names of properties that SDL exposes on objects will start with "SDL.", and properties that SDL uses internally will start with "SDL.internal.". These should be considered read-only and should not be modified by applications.
- Returns
- the value of the property, or
default_valueif it is not set or not a pointer property. - Thread safety
- It is safe to call this function from any thread, although the data returned is not protected and could potentially be freed if you call
orsetPointerPropertyon these properties from another thread. If you need to avoid this, useclearPropertyandlockProperties.unlockProperties - See also
getBooleanProperty,getFloatProperty,getNumberProperty,getPropertyType,getStringProperty,hasProperty,setPointerProperty
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetPointerProperty. The unsafe flavor isgetPointerProperty. - C declaration
SDL_GetPointerProperty, defined atSDL3/SDL_properties.h 405:36
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> PtrConst CChar |
|
| -> IO (PtrConst CChar) |
Get a string property from a group of properties.
- Returns
- the value of the property, or
default_valueif it is not set or not a string property. - Thread safety
- It is safe to call this function from any thread, although the data returned is not protected and could potentially be freed if you call
orsetStringPropertyon these properties from another thread. If you need to avoid this, useclearPropertyandlockProperties.unlockProperties - See also
getPropertyType,hasProperty,setStringProperty
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetStringProperty. The safe flavor isgetStringPropertySafe. - C declaration
SDL_GetStringProperty, defined atSDL3/SDL_properties.h 429:42
Since: 3.2.0
getStringPropertySafe Source #
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> PtrConst CChar |
|
| -> IO (PtrConst CChar) |
Get a string property from a group of properties.
- Returns
- the value of the property, or
default_valueif it is not set or not a string property. - Thread safety
- It is safe to call this function from any thread, although the data returned is not protected and could potentially be freed if you call
orsetStringPropertyon these properties from another thread. If you need to avoid this, useclearPropertyandlockProperties.unlockProperties - See also
getPropertyType,hasProperty,setStringProperty
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetStringProperty. The unsafe flavor isgetStringProperty. - C declaration
SDL_GetStringProperty, defined atSDL3/SDL_properties.h 429:42
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> Int64 |
|
| -> IO Int64 |
Get a number property from a group of properties.
You can use to query whether the property exists and is a number property.getPropertyType
- Returns
- the value of the property, or
default_valueif it is not set or not a number property. - Thread safety
- It is safe to call this function from any thread.
- See also
getPropertyType,hasProperty,setNumberProperty
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetNumberProperty. The safe flavor isgetNumberPropertySafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_GetNumberProperty, defined atSDL3/SDL_properties.h 451:36
Since: 3.2.0
getNumberPropertySafe Source #
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> Int64 |
|
| -> IO Int64 |
Get a number property from a group of properties.
You can use to query whether the property exists and is a number property.getPropertyType
- Returns
- the value of the property, or
default_valueif it is not set or not a number property. - Thread safety
- It is safe to call this function from any thread.
- See also
getPropertyType,hasProperty,setNumberProperty
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetNumberProperty. The unsafe flavor isgetNumberProperty. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_GetNumberProperty, defined atSDL3/SDL_properties.h 451:36
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> Float |
|
| -> IO Float |
Get a floating point property from a group of properties.
You can use to query whether the property exists and is a floating point property.getPropertyType
- Returns
- the value of the property, or
default_valueif it is not set or not a float property. - Thread safety
- It is safe to call this function from any thread.
- See also
getPropertyType,hasProperty,setFloatProperty
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetFloatProperty. The safe flavor isgetFloatPropertySafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_GetFloatProperty, defined atSDL3/SDL_properties.h 473:35
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> Float |
|
| -> IO Float |
Get a floating point property from a group of properties.
You can use to query whether the property exists and is a floating point property.getPropertyType
- Returns
- the value of the property, or
default_valueif it is not set or not a float property. - Thread safety
- It is safe to call this function from any thread.
- See also
getPropertyType,hasProperty,setFloatProperty
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetFloatProperty. The unsafe flavor isgetFloatProperty. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_GetFloatProperty, defined atSDL3/SDL_properties.h 473:35
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> Bool |
|
| -> IO Bool |
Get a boolean property from a group of properties.
You can use to query whether the property exists and is a boolean property.getPropertyType
- Returns
- the value of the property, or
default_valueif it is not set or not a boolean property. - Thread safety
- It is safe to call this function from any thread.
- See also
getPropertyType,hasProperty,setBooleanProperty
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetBooleanProperty. The safe flavor isgetBooleanPropertySafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_GetBooleanProperty, defined atSDL3/SDL_properties.h 495:34
Since: 3.2.0
getBooleanPropertySafe Source #
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> Bool |
|
| -> IO Bool |
Get a boolean property from a group of properties.
You can use to query whether the property exists and is a boolean property.getPropertyType
- Returns
- the value of the property, or
default_valueif it is not set or not a boolean property. - Thread safety
- It is safe to call this function from any thread.
- See also
getPropertyType,hasProperty,setBooleanProperty
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetBooleanProperty. The unsafe flavor isgetBooleanProperty. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_GetBooleanProperty, defined atSDL3/SDL_properties.h 495:34
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> IO Bool |
Clear a property from a group of properties.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_ClearProperty. The safe flavor isclearPropertySafe: clearing a cleanup property invokes its cleanup synchronously. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_ClearProperty, defined atSDL3/SDL_properties.h 509:34
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> PtrConst CChar |
|
| -> IO Bool |
Clear a property from a group of properties.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_ClearProperty. The unsafe flavor isclearProperty: clearing a cleanup property invokes its cleanup synchronously. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_ClearProperty, defined atSDL3/SDL_properties.h 509:34
Since: 3.2.0
enumeratePropertiesSafe Source #
Arguments
| :: SDL_PropertiesID |
|
| -> SDL_EnumeratePropertiesCallback |
|
| -> Ptr Void |
|
| -> IO Bool |
Enumerate the properties contained in a group of properties.
The callback function is called for each property in the group of properties. The properties are locked during enumeration.
- Returns
- true on success or false on failure; call
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_EnumerateProperties. The unsafe import is not exported : invokes the callback per property synchronously. If your callback is a non-Haskell function pointer that never re-enters the Haskell runtime, the unsafe import remains available asSDL3.Sys.Bindgen.Properties.Unsafe.sDL_EnumerateProperties. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_EnumerateProperties, defined atSDL3/SDL_properties.h 546:34
Since: 3.2.0
Arguments
| :: SDL_PropertiesID |
|
| -> IO () |
Destroy a group of properties.
All properties are deleted and their cleanup functions will be called, if any.
- Thread safety
- This function should not be called while these properties are locked or other threads might be setting or getting values from these properties.
- See also
createProperties
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_DestroyProperties. The safe flavor isdestroyPropertiesSafe: invokes cleanup callbacks synchronously. - C declaration
SDL_DestroyProperties, defined atSDL3/SDL_properties.h 564:34
Since: 3.2.0
destroyPropertiesSafe Source #
Arguments
| :: SDL_PropertiesID |
|
| -> IO () |
Destroy a group of properties.
All properties are deleted and their cleanup functions will be called, if any.
- Thread safety
- This function should not be called while these properties are locked or other threads might be setting or getting values from these properties.
- See also
createProperties
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_DestroyProperties. The unsafe flavor isdestroyProperties: invokes cleanup callbacks synchronously. - C declaration
SDL_DestroyProperties, defined atSDL3/SDL_properties.h 564:34
Since: 3.2.0