Kanzi Graphics Engine
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
kzu_property_manager.h File Reference

Property manager. More...

Macros

#define KZU_PROPERTY_MANAGER_FLAG_NON_COPYABLE
 Flag to indicate that the property will not be copied when copying properties. More...
 
#define KZU_PROPERTY_MANAGER_FLAG_REMOVED
 Flag to indicate that the property has been removed from a prefab template node. More...
 
#define KZU_PROPERTY_MANAGER_FLAG_CHANGED
 Flag to indicate that the property has been changed in a prefab template node. More...
 

Typedefs

typedef kzsError(* KzuPropertyNotificationHandler )(const void *object, const struct KzuPropertyType *propertyType, enum KzuPropertyNotificationReason reason, void *userData)
 Property notification handler function definition. More...
 
typedef kzsError(* KzuPropertyModifierCallback )(const void *object, const struct KzuPropertyType *propertyType, void *valueSource, enum KzuPropertyNotificationReason reason, void *userData)
 Property modifier callback function. More...
 

Enumerations

enum  KzuPropertyNotificationReason { KZU_PROPERTY_NOTIFICATION_REASON_CHANGED, KZU_PROPERTY_NOTIFICATION_REASON_REMOVED }
 Property notification reason. More...
 
enum  KzuPropertyValuePrecedence { KZU_PROPERTY_VALUE_PRECEDENCE_CLASS, KZU_PROPERTY_VALUE_PRECEDENCE_STYLE, KZU_PROPERTY_VALUE_PRECEDENCE_STATE_MANAGER, KZU_PROPERTY_VALUE_PRECEDENCE_LOCAL }
 Property value precedence. More...
 

Functions

kzsError kzuPropertyManagerCreate (const struct KzcMemoryManager *memoryManager, struct KzuPropertyManager **out_propertyManager)
 Create a property manager. More...
 
kzsError kzuPropertyManagerDelete (struct KzuPropertyManager *propertyManager)
 Delete a property manager. More...
 
kzsError kzuPropertyManagerRemoveProperties (const struct KzuPropertyManager *propertyManager)
 Removes properties from property manager. More...
 
kzsError kzuPropertyManagerRemoveLocalValue (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyType *propertyType)
 Remove the local value (i.e. More...
 
kzsError kzuPropertyManagerUnlinkProperties (const struct KzuPropertyManager *propertyManager, const void *object)
 Unlink all property entries associated with an object. More...
 
kzsError kzuPropertyManagerRemoveKZBProperties (const struct KzuPropertyManager *propertyManager, const void *object)
 Remove all properties associated with an object that are originated from .KZB data. More...
 
kzsError kzuPropertyManagerGetPropertyTypes (const struct KzuPropertyManager *propertyManager, const struct KzcMemoryManager *memoryManager, const void *object, struct KzcDynamicArray **out_propertyTypes)
 Get all property types associated with an object. More...
 
kzsError kzuPropertyManagerGetAllPropertyTypes (const struct KzuPropertyManager *propertyManager, const struct KzcMemoryManager *memoryManager, const void *object, struct KzcDynamicArray **out_propertyTypes)
 Get all property types associated with an object. More...
 
kzBool kzuPropertyManagerHasValue (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyType *propertyType)
 Check if any value of propertyType is associated with an object. More...
 
kzBool kzuPropertyManagerHasLocalValue (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyType *propertyType)
 Check if a local value (i.e. More...
 
kzBool kzuPropertyManagerIsPropertyEqual (const struct KzuPropertyManager *propertyManager, const void *object1, const void *object2, const struct KzuPropertyType *propertyType)
 Compare the property value of two objects. More...
 
kzsError kzuPropertyManagerCopyProperty (const struct KzuPropertyManager *propertyManager, const void *sourceObject, const void *targetObject, const struct KzuPropertyType *propertyType)
 Copy a property of given type from source object to target object. More...
 
kzsError kzuPropertyManagerCopyProperties (const struct KzuPropertyManager *propertyManager, const void *sourceObject, const void *targetObject)
 Copy all properties from source object to target object. More...
 
kzsError kzuPropertyManagerCopyObjectToTargetManager (const struct KzcMemoryManager *memoryManager, const struct KzuPropertyManager *sourcePropertyManager, const void *object, const struct KzuPropertyManager *targetPropertyManager)
 Copies all properties of object from source property manager to target property manager. More...
 
kzsError kzuPropertyManagerResolveResourceURLs (const struct KzuPropertyManager *propertyManager, const void *object, struct KzuResourceManager *resourceManager)
 Resolves properties with a resource URL value by acquiring the resources. More...
 
kzsError kzuPropertyManagerCopyToTargetManager (const struct KzuPropertyManager *propertyManager, const struct KzuPropertyManager *targetPropertyManager)
 Copies all properties to target property manager. More...
 
kzsError kzuPropertyManagerSetPropertyFlag (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyType *propertyType, kzU32 flag)
 Set a flag for a property. More...
 
kzsError kzuPropertyManagerClearPropertyFlag (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyType *propertyType, kzU32 flag)
 Clears a flag for a property. More...
 
kzBool kzuPropertyManagerIsPropertyFlagSet (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyType *propertyType, kzU32 flag, kzBool *out_isSet)
 Checks if a flag is set for a property. More...
 
kzBool kzuPropertyManagerIsPropertyFlagSetDefault (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyType *propertyType, kzU32 flag)
 Checks if a flag is set for a property. More...
 
kzsError kzuPropertyManagerRegisterPropertyType (const struct KzuPropertyManager *propertyManager, const struct KzuPropertyType *propertyType)
 Register a property type in the property manager. More...
 
kzsError kzuPropertyManagerUnregisterPropertyType (const struct KzuPropertyManager *propertyManager, const struct KzuPropertyType *propertyType)
 Unregister a property type from the property manager. More...
 
struct KzuPropertyTypekzuPropertyManagerFindPropertyType (const struct KzuPropertyManager *propertyManager, kzString propertyTypeName)
 Finds a property type by name from the property manager. More...
 
kzsError kzuPropertyManagerAddPropertyGroup (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyGroup *propertyGroup)
 Associate a property group with a given object. More...
 
kzsError kzuPropertyManagerRemovePropertyGroup (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyGroup *propertyGroup)
 Unassociate a property group from a given object. More...
 
kzsError kzuPropertyManagerRemovePropertyGroups (const struct KzuPropertyManager *propertyManager, const void *object)
 Unassociate all property groups from a given object. More...
 
kzBool kzuPropertyManagerHasPropertyGroup (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyGroup *propertyGroup)
 Check if a property group is associated with an object. More...
 
kzsError kzuPropertyManagerGetPropertyGroups (const struct KzuPropertyManager *propertyManager, const struct KzcMemoryManager *memoryManager, const void *object, struct KzcDynamicArray **out_propertyGroups)
 Get all property groups associated with an object. More...
 
kzsError kzuPropertyManagerGetObjectsByPropertyGroup (const struct KzuPropertyManager *propertyManager, const struct KzcMemoryManager *memoryManager, const struct KzuPropertyGroup *propertyGroup, struct KzcDynamicArray **out_objects)
 Get all objects associated with the property group. More...
 
kzsError kzuPropertyManagerCopyPropertyGroups (const struct KzuPropertyManager *propertyManager, const void *sourceObject, const void *targetOject)
 Copy all property group associations from source object to target object. More...
 
kzsError kzuPropertyManagerCopyPropertyGroupContent (const struct KzuPropertyManager *propertyManager, const struct KzuPropertyGroup *sourceGroup, const struct KzuPropertyGroup *targetGroup)
 Copy all property associations from source group to target group. More...
 
kzsError kzuPropertyManagerRemovePropertyGroupContent (const struct KzuPropertyManager *propertyManager, const struct KzuPropertyGroup *propertyGroup)
 Remove all property associations from a property group. More...
 
kzBool kzuObjectNodeHasProperty (const struct KzuObjectNode *objectNode, const struct KzuPropertyType *propertyType)
 Check if an object node has or inherits a property. More...
 
kzsError kzuPropertyManagerRegisterObjectNode (const struct KzuPropertyManager *propertyManager, const struct KzuObjectNode *objectNode)
 Register an object node with a property manager. More...
 
kzsError kzuPropertyManagerUnregisterObjectNode (const struct KzuPropertyManager *propertyManager, const struct KzuObjectNode *objectNode)
 Unregister an object node with a property manager. More...
 
kzsError kzuPropertyManagerSuspendLayoutInvalidation (struct KzuPropertyManager *propertyManager)
 Suspend layout invalidation. More...
 
kzsError kzuPropertyManagerResumeLayoutInvalidation (struct KzuPropertyManager *propertyManager)
 Resume layout invalidation. More...
 
kzBool kzuPropertyManagerIsLayoutInvalidationSuspended (const struct KzuPropertyManager *propertyManager)
 Check if layout invalidation is suspended. More...
 
kzBool kzuPropertyManagerSupportsPropertyStack (const struct KzuPropertyType *propertyType)
 Checks if a property type is supported in the property stack. More...
 
kzsError kzuPropertyManagerAddValueSource (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyType *propertyType, void *valueSource, enum KzuPropertyValuePrecedence precedence, void *owner)
 Add a value source. More...
 
kzsError kzuPropertyManagerRemoveValueSource (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyType *propertyType, const void *valueSource, const void *owner)
 Remove a value source. More...
 
voidkzuPropertyManagerFindBaseValueSource (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyType *propertyType)
 Finds base value source, i.e. More...
 
voidkzuPropertyManagerFindLocalValueSource (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyType *propertyType)
 Finds local value source (i.e. More...
 
kzsError kzuPropertyManagerCopyValueSource (const struct KzuPropertyManager *propertyManager, enum KzuPropertyDataType type, const void *valueSource, void **out_valueSource)
 Copy a value source. More...
 
kzsError kzuPropertyManagerDeleteValueSource (enum KzuPropertyDataType type, void *valueSource)
 Delete a value source. More...
 
kzsError kzuPropertyManagerAddValueModifier (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyType *propertyType, KzuPropertyModifierCallback callback, void *userData)
 Add a modifier to the end of the modifiers list of the property. More...
 
kzsError kzuPropertyManagerRemoveValueModifier (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyType *propertyType, KzuPropertyModifierCallback callback, const void *userData)
 Remove a modifier. More...
 
kzsError kzuPropertyManagerInvalidateValueModifier (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyType *propertyType, KzuPropertyModifierCallback callback, const void *userData)
 Invalidate a modifier. More...
 
kzsError kzuPropertyManagerAddNotificationHandler (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyType *propertyType, KzuPropertyNotificationHandler handler, void *userData)
 Add a property change notification handler. More...
 
kzsError kzuPropertyManagerRemoveNotificationHandler (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyType *propertyType, KzuPropertyNotificationHandler handler, void *userData)
 Remove a property change notification handler. More...
 
kzsError kzuPropertyManagerLocalizationUpdated (struct KzuLocalizationManager *localizationManager, enum KzuLocalizationUpdateReason reason, void *userData)
 Callback function for notifying property manager when localization manager has been updated. More...
 

Detailed Description

Property manager.

Copyright 2008-2019 by Rightware. All rights reserved.

Macro Definition Documentation

#define KZU_PROPERTY_MANAGER_FLAG_NON_COPYABLE

Flag to indicate that the property will not be copied when copying properties.

#define KZU_PROPERTY_MANAGER_FLAG_REMOVED

Flag to indicate that the property has been removed from a prefab template node.

#define KZU_PROPERTY_MANAGER_FLAG_CHANGED

Flag to indicate that the property has been changed in a prefab template node.

Typedef Documentation

typedef kzsError(* KzuPropertyNotificationHandler)(const void *object, const struct KzuPropertyType *propertyType, enum KzuPropertyNotificationReason reason, void *userData)

Property notification handler function definition.

Parameters
objectThe object having the property.
propertyTypeThe property that changed.
reasonType of the change.
userDataThe user data pointer passed to kzuPropertyManagerAddNotificationHandler when the handler was added.
typedef kzsError(* KzuPropertyModifierCallback)(const void *object, const struct KzuPropertyType *propertyType, void *valueSource, enum KzuPropertyNotificationReason reason, void *userData)

Property modifier callback function.

Parameters
objectThe object having the property.
propertyTypeThe property that changed.
valueSourceValue source out-parameter that can be modified to affect the final property value.
reasonType of the change.
userDataThe user data pointer passed to kzuPropertyManagerAddValueModifier when the modifier was added.
Returns
The function should return KZS_SUCCESS during normal operation. If the return value is not KZS_SUCCESS, the rest of the modifier callbacks are not called and the modifier is not validated (i.e. if kzuPropertyManagerInvalidateValueModifier was called earlier, the invalidation is still in effect).

Enumeration Type Documentation

Property notification reason.

Enumerator
KZU_PROPERTY_NOTIFICATION_REASON_CHANGED 
KZU_PROPERTY_NOTIFICATION_REASON_REMOVED 

Property value precedence.

Enumerator
KZU_PROPERTY_VALUE_PRECEDENCE_CLASS 

Lowest precedence.

KZU_PROPERTY_VALUE_PRECEDENCE_STYLE 
KZU_PROPERTY_VALUE_PRECEDENCE_STATE_MANAGER 
KZU_PROPERTY_VALUE_PRECEDENCE_LOCAL 

Highest precedence.

Function Documentation

kzsError kzuPropertyManagerCreate ( const struct KzcMemoryManager memoryManager,
struct KzuPropertyManager **  out_propertyManager 
)

Create a property manager.

kzsError kzuPropertyManagerDelete ( struct KzuPropertyManager *  propertyManager)

Delete a property manager.

kzsError kzuPropertyManagerRemoveProperties ( const struct KzuPropertyManager *  propertyManager)

Removes properties from property manager.

kzsError kzuPropertyManagerRemoveLocalValue ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyType propertyType 
)

Remove the local value (i.e.

precendence KZU_PROPERTY_VALUE_PRECEDENCE_LOCAL) of propertyType associated with an object.

kzsError kzuPropertyManagerUnlinkProperties ( const struct KzuPropertyManager *  propertyManager,
const void object 
)

Unlink all property entries associated with an object.

Should be called from the destructor of an object that uses property manager to store properties.

kzsError kzuPropertyManagerRemoveKZBProperties ( const struct KzuPropertyManager *  propertyManager,
const void object 
)

Remove all properties associated with an object that are originated from .KZB data.

kzsError kzuPropertyManagerGetPropertyTypes ( const struct KzuPropertyManager *  propertyManager,
const struct KzcMemoryManager memoryManager,
const void object,
struct KzcDynamicArray **  out_propertyTypes 
)

Get all property types associated with an object.

Parameters
out_propertyTypesDynamic array containing property types associated with object. The caller is responsible for deleting this array after use.
kzsError kzuPropertyManagerGetAllPropertyTypes ( const struct KzuPropertyManager *  propertyManager,
const struct KzcMemoryManager memoryManager,
const void object,
struct KzcDynamicArray **  out_propertyTypes 
)

Get all property types associated with an object.

Unlike kzuPropertyManagerGetPropertyTypes, this function also returns property types for which the given object has a container but not necessarily any values.

Parameters
out_propertyTypesDynamic array containing property types associated with object. The caller is responsible for deleting this array after use.
kzBool kzuPropertyManagerHasValue ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyType propertyType 
)

Check if any value of propertyType is associated with an object.

kzBool kzuPropertyManagerHasLocalValue ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyType propertyType 
)

Check if a local value (i.e.

precendence KZU_PROPERTY_VALUE_PRECEDENCE_LOCAL) of propertyType is associated with an object.

kzBool kzuPropertyManagerIsPropertyEqual ( const struct KzuPropertyManager *  propertyManager,
const void object1,
const void object2,
const struct KzuPropertyType propertyType 
)

Compare the property value of two objects.

If properties are equal or not associated with either of the objects, KZ_TRUE is returned. Otherwise KZ_FALSE is returned.

kzsError kzuPropertyManagerCopyProperty ( const struct KzuPropertyManager *  propertyManager,
const void sourceObject,
const void targetObject,
const struct KzuPropertyType propertyType 
)

Copy a property of given type from source object to target object.

kzsError kzuPropertyManagerCopyProperties ( const struct KzuPropertyManager *  propertyManager,
const void sourceObject,
const void targetObject 
)

Copy all properties from source object to target object.

kzsError kzuPropertyManagerCopyObjectToTargetManager ( const struct KzcMemoryManager memoryManager,
const struct KzuPropertyManager *  sourcePropertyManager,
const void object,
const struct KzuPropertyManager *  targetPropertyManager 
)

Copies all properties of object from source property manager to target property manager.

kzsError kzuPropertyManagerResolveResourceURLs ( const struct KzuPropertyManager *  propertyManager,
const void object,
struct KzuResourceManager resourceManager 
)

Resolves properties with a resource URL value by acquiring the resources.

This must be called in the main thread for objects which have unresolved pointer properties due to .KZB loading.

kzsError kzuPropertyManagerCopyToTargetManager ( const struct KzuPropertyManager *  propertyManager,
const struct KzuPropertyManager *  targetPropertyManager 
)

Copies all properties to target property manager.

If there is property with the same name and with different type in target property manager, the function will return an error.

kzsError kzuPropertyManagerSetPropertyFlag ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyType propertyType,
kzU32  flag 
)

Set a flag for a property.

Throws error if the property is not found.

kzsError kzuPropertyManagerClearPropertyFlag ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyType propertyType,
kzU32  flag 
)

Clears a flag for a property.

Throws error if the property is not found.

kzBool kzuPropertyManagerIsPropertyFlagSet ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyType propertyType,
kzU32  flag,
kzBool out_isSet 
)

Checks if a flag is set for a property.

Returns KZ_TRUE if the property is found and KZ_FALSE otherwise.

kzBool kzuPropertyManagerIsPropertyFlagSetDefault ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyType propertyType,
kzU32  flag 
)

Checks if a flag is set for a property.

Returns KZ_TRUE if the property is found and the flag is set for the property, KZ_FALSE otherwise.

kzsError kzuPropertyManagerRegisterPropertyType ( const struct KzuPropertyManager *  propertyManager,
const struct KzuPropertyType propertyType 
)

Register a property type in the property manager.

After a property type is registered to the manager, it is possible to find it by its name.

kzsError kzuPropertyManagerUnregisterPropertyType ( const struct KzuPropertyManager *  propertyManager,
const struct KzuPropertyType propertyType 
)

Unregister a property type from the property manager.

It is the responsibility of the caller to ensure, that all properties with specified type have been removed prior to the call.

struct KzuPropertyType* kzuPropertyManagerFindPropertyType ( const struct KzuPropertyManager *  propertyManager,
kzString  propertyTypeName 
)

Finds a property type by name from the property manager.

Returns KZ_NULL if the type is not found.

kzsError kzuPropertyManagerAddPropertyGroup ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyGroup propertyGroup 
)

Associate a property group with a given object.

kzsError kzuPropertyManagerRemovePropertyGroup ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyGroup propertyGroup 
)

Unassociate a property group from a given object.

kzsError kzuPropertyManagerRemovePropertyGroups ( const struct KzuPropertyManager *  propertyManager,
const void object 
)

Unassociate all property groups from a given object.

kzBool kzuPropertyManagerHasPropertyGroup ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyGroup propertyGroup 
)

Check if a property group is associated with an object.

kzsError kzuPropertyManagerGetPropertyGroups ( const struct KzuPropertyManager *  propertyManager,
const struct KzcMemoryManager memoryManager,
const void object,
struct KzcDynamicArray **  out_propertyGroups 
)

Get all property groups associated with an object.

kzsError kzuPropertyManagerGetObjectsByPropertyGroup ( const struct KzuPropertyManager *  propertyManager,
const struct KzcMemoryManager memoryManager,
const struct KzuPropertyGroup propertyGroup,
struct KzcDynamicArray **  out_objects 
)

Get all objects associated with the property group.

kzsError kzuPropertyManagerCopyPropertyGroups ( const struct KzuPropertyManager *  propertyManager,
const void sourceObject,
const void targetOject 
)

Copy all property group associations from source object to target object.

kzsError kzuPropertyManagerCopyPropertyGroupContent ( const struct KzuPropertyManager *  propertyManager,
const struct KzuPropertyGroup sourceGroup,
const struct KzuPropertyGroup targetGroup 
)

Copy all property associations from source group to target group.

kzsError kzuPropertyManagerRemovePropertyGroupContent ( const struct KzuPropertyManager *  propertyManager,
const struct KzuPropertyGroup propertyGroup 
)

Remove all property associations from a property group.

kzBool kzuObjectNodeHasProperty ( const struct KzuObjectNode objectNode,
const struct KzuPropertyType propertyType 
)

Check if an object node has or inherits a property.

Parameters
objectNodeThe object node containing the property, or where the search starts in case the property is inherited.
propertyTypeThe property to search for.
Returns
KZ_TRUE if the object node has or inherits the property, KZ_FALSE otherwise.
kzsError kzuPropertyManagerRegisterObjectNode ( const struct KzuPropertyManager *  propertyManager,
const struct KzuObjectNode objectNode 
)

Register an object node with a property manager.

Only registered object nodes are known to be object nodes as opposed to e.g. void pointers.

kzsError kzuPropertyManagerUnregisterObjectNode ( const struct KzuPropertyManager *  propertyManager,
const struct KzuObjectNode objectNode 
)

Unregister an object node with a property manager.

kzsError kzuPropertyManagerSuspendLayoutInvalidation ( struct KzuPropertyManager *  propertyManager)

Suspend layout invalidation.

This function can be called several times, but each call must be matched with ResumeLayoutInvalidation.

kzsError kzuPropertyManagerResumeLayoutInvalidation ( struct KzuPropertyManager *  propertyManager)

Resume layout invalidation.

kzBool kzuPropertyManagerIsLayoutInvalidationSuspended ( const struct KzuPropertyManager *  propertyManager)

Check if layout invalidation is suspended.

While the layout invalidation is suspended, the KZU_PROPERTY_TYPE_CHANGE_FLAG_LAYOUT property type flag is not in effect.

kzBool kzuPropertyManagerSupportsPropertyStack ( const struct KzuPropertyType propertyType)

Checks if a property type is supported in the property stack.

Properties that are not supported by the property stack cannot have value sources or modifiers. The property stack cannot support properties of type KZU_PROPERTY_DATA_TYPE_ARRAY, KZU_PROPERTY_DATA_TYPE_STRUCT and KZU_PROPERTY_DATA_TYPE_POINTER.

kzsError kzuPropertyManagerAddValueSource ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyType propertyType,
void valueSource,
enum KzuPropertyValuePrecedence  precedence,
void owner 
)

Add a value source.

The highest priority value source provides the property value which is then passed to all of the modifiers (if any).

Parameters
propertyManagerThe property manager to use.
objectThe object containing the property.
propertyTypeThe property whose value the value source provides.
valueSourceThe value source to add.
precedencePriority of the value in case there are more than one value sources for the property.
ownerPointer value distinguishing this value source addition from other additions of this same value source.
Returns
KZS_SUCCESS on success.
kzsError kzuPropertyManagerRemoveValueSource ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyType propertyType,
const void valueSource,
const void owner 
)

Remove a value source.

Parameters
propertyManagerThe property manager to use.
objectThe object containing the property.
propertyTypeThe property whose value the value source provides.
valueSourceThe value source to remove.
ownerPointer value provided when adding the value source.
Returns
KZS_SUCCESS on success.
void* kzuPropertyManagerFindBaseValueSource ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyType propertyType 
)

Finds base value source, i.e.

the highest priority value source, of an object.

Parameters
propertyManagerThe property manager to use.
objectThe object containing the property.
propertyTypeThe property whose value is read.
Returns
The highest priority value source of the object or KZ_NULL if not found.
void* kzuPropertyManagerFindLocalValueSource ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyType propertyType 
)

Finds local value source (i.e.

precedence KZU_PROPERTY_VALUE_PRECEDENCE_LOCAL).

Parameters
propertyManagerThe property manager to use.
objectThe object containing the property.
propertyTypeThe property whose value is read.
Returns
The KZU_PROPERTY_VALUE_PRECEDENCE_LOCAL value or KZ_NULL if not found.
kzsError kzuPropertyManagerCopyValueSource ( const struct KzuPropertyManager *  propertyManager,
enum KzuPropertyDataType  type,
const void valueSource,
void **  out_valueSource 
)

Copy a value source.

kzsError kzuPropertyManagerDeleteValueSource ( enum KzuPropertyDataType  type,
void valueSource 
)

Delete a value source.

kzsError kzuPropertyManagerAddValueModifier ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyType propertyType,
KzuPropertyModifierCallback  callback,
void userData 
)

Add a modifier to the end of the modifiers list of the property.

A property value originates from the highest priority value source and then goes through all the modifiers. If there are more than one modifier, the modifier functions are called in the order they were added.

Parameters
propertyManagerThe property manager to use.
objectThe object containing the property.
propertyTypeThe property whose value the modifier modifies.
callbackThe modifier function.
userDataUser data pointer passed to the modifier function.
Returns
KZS_SUCCESS on success.
kzsError kzuPropertyManagerRemoveValueModifier ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyType propertyType,
KzuPropertyModifierCallback  callback,
const void userData 
)

Remove a modifier.

Modifiers can be removed in a different order than they were added.

Parameters
propertyManagerThe property manager to use.
objectThe object containing the property.
propertyTypeThe property whose value the modifier modifies.
callbackThe modifier function.
userDataUser data pointer passed to the modifier function.
Returns
KZS_SUCCESS on success.
kzsError kzuPropertyManagerInvalidateValueModifier ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyType propertyType,
KzuPropertyModifierCallback  callback,
const void userData 
)

Invalidate a modifier.

This means invalidating the modifier's value source so that the callback is called again.

Parameters
propertyManagerThe property manager to use.
objectThe object containing the property.
propertyTypeThe property whose value the modifier modifies.
callbackThe modifier function.
userDataUser data pointer passed to the modifier function.
kzsError kzuPropertyManagerAddNotificationHandler ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyType propertyType,
KzuPropertyNotificationHandler  handler,
void userData 
)

Add a property change notification handler.

The handler will receive notifications when property value changes. If object is KZ_NULL, the handler will get notified for any changed object.

Parameters
propertyManagerThe property manager to use.
objectThe object containing the property to monitor, or KZ_NULL to monitor this property in all objects.
propertyTypeNon-null property type which changes are monitored.
handlerPointer to the handler function.
userDataUser data pointer to pass to the notification handler.
Returns
KZS_SUCCESS on success.
kzsError kzuPropertyManagerRemoveNotificationHandler ( const struct KzuPropertyManager *  propertyManager,
const void object,
const struct KzuPropertyType propertyType,
KzuPropertyNotificationHandler  handler,
void userData 
)

Remove a property change notification handler.

Parameters
propertyManagerThe property manager to use.
objectThe object containing the notification handler to remove, or KZ_NULL to remove this notification handler from all objects.
propertyTypeNon-null property type the handler was accepting.
handlerPointer to the handler function.
userDataUser data provided to the notification handler when it was added.
Returns
KZS_SUCCESS on success.
kzsError kzuPropertyManagerLocalizationUpdated ( struct KzuLocalizationManager localizationManager,
enum KzuLocalizationUpdateReason  reason,
void userData 
)

Callback function for notifying property manager when localization manager has been updated.