|
Kanzi Graphics Engine
|
Property manager. More...
#include <user/resource/kzu_localization_manager_base.h>#include <user/properties/kzu_property_common.h>#include <system/kzs_types.h>#include <system/debug/kzs_error.h>#include <system/kzs_header.h>#include "kzu_property_manager_array.h"#include "kzu_property_manager_bool.h"#include "kzu_property_manager_color.h"#include "kzu_property_manager_float.h"#include "kzu_property_manager_int.h"#include "kzu_property_manager_matrix2x2.h"#include "kzu_property_manager_matrix3x3.h"#include "kzu_property_manager_matrix4x4.h"#include "kzu_property_manager_pointer.h"#include "kzu_property_manager_string.h"#include "kzu_property_manager_struct.h"#include "kzu_property_manager_vector2.h"#include "kzu_property_manager_vector3.h"#include "kzu_property_manager_vector4.h"#include "kzu_property_manager_resource_id.h"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 KzuPropertyType * | kzuPropertyManagerFindPropertyType (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... | |
| void * | kzuPropertyManagerFindBaseValueSource (const struct KzuPropertyManager *propertyManager, const void *object, const struct KzuPropertyType *propertyType) |
| Finds base value source, i.e. More... | |
| void * | kzuPropertyManagerFindLocalValueSource (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... | |
Property manager.
Copyright 2008-2019 by Rightware. All rights reserved.
| #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 kzsError(* KzuPropertyNotificationHandler)(const void *object, const struct KzuPropertyType *propertyType, enum KzuPropertyNotificationReason reason, void *userData) |
Property notification handler function definition.
| object | The object having the property. |
| propertyType | The property that changed. |
| reason | Type of the change. |
| userData | The 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.
| object | The object having the property. |
| propertyType | The property that changed. |
| valueSource | Value source out-parameter that can be modified to affect the final property value. |
| reason | Type of the change. |
| userData | The user data pointer passed to kzuPropertyManagerAddValueModifier when the modifier was added. |
| 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.
| out_propertyTypes | Dynamic 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.
| out_propertyTypes | Dynamic 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.
| objectNode | The object node containing the property, or where the search starts in case the property is inherited. |
| propertyType | The property to search for. |
| 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).
| propertyManager | The property manager to use. |
| object | The object containing the property. |
| propertyType | The property whose value the value source provides. |
| valueSource | The value source to add. |
| precedence | Priority of the value in case there are more than one value sources for the property. |
| owner | Pointer value distinguishing this value source addition from other additions of this same value source. |
| kzsError kzuPropertyManagerRemoveValueSource | ( | const struct KzuPropertyManager * | propertyManager, |
| const void * | object, | ||
| const struct KzuPropertyType * | propertyType, | ||
| const void * | valueSource, | ||
| const void * | owner | ||
| ) |
Remove a value source.
| propertyManager | The property manager to use. |
| object | The object containing the property. |
| propertyType | The property whose value the value source provides. |
| valueSource | The value source to remove. |
| owner | Pointer value provided when adding the value source. |
| 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.
| propertyManager | The property manager to use. |
| object | The object containing the property. |
| propertyType | The property whose value is read. |
| 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).
| propertyManager | The property manager to use. |
| object | The object containing the property. |
| propertyType | The property whose value is read. |
| 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.
| propertyManager | The property manager to use. |
| object | The object containing the property. |
| propertyType | The property whose value the modifier modifies. |
| callback | The modifier function. |
| userData | User data pointer passed to the modifier function. |
| 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.
| propertyManager | The property manager to use. |
| object | The object containing the property. |
| propertyType | The property whose value the modifier modifies. |
| callback | The modifier function. |
| userData | User data pointer passed to the modifier function. |
| 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.
| propertyManager | The property manager to use. |
| object | The object containing the property. |
| propertyType | The property whose value the modifier modifies. |
| callback | The modifier function. |
| userData | User 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.
| propertyManager | The property manager to use. |
| object | The object containing the property to monitor, or KZ_NULL to monitor this property in all objects. |
| propertyType | Non-null property type which changes are monitored. |
| handler | Pointer to the handler function. |
| userData | User data pointer to pass to the notification handler. |
| kzsError kzuPropertyManagerRemoveNotificationHandler | ( | const struct KzuPropertyManager * | propertyManager, |
| const void * | object, | ||
| const struct KzuPropertyType * | propertyType, | ||
| KzuPropertyNotificationHandler | handler, | ||
| void * | userData | ||
| ) |
Remove a property change notification handler.
| propertyManager | The property manager to use. |
| object | The object containing the notification handler to remove, or KZ_NULL to remove this notification handler from all objects. |
| propertyType | Non-null property type the handler was accepting. |
| handler | Pointer to the handler function. |
| userData | User data provided to the notification handler when it was added. |
| kzsError kzuPropertyManagerLocalizationUpdated | ( | struct KzuLocalizationManager * | localizationManager, |
| enum KzuLocalizationUpdateReason | reason, | ||
| void * | userData | ||
| ) |
Callback function for notifying property manager when localization manager has been updated.