X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Fobject%2Ftype-registry.h;h=21a9a302f87a51ee277e7b7912f8aca71bffd718;hb=db9a4df3f86a7cc95b73329c780ccb38ca2f1b49;hp=a34b89d7b6bf1d06bb90f17b9d6be9ab964b34d8;hpb=da2e24f853c2f463df2f4b743c3b2241a537cefd;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/object/type-registry.h b/dali/public-api/object/type-registry.h index a34b89d..21a9a30 100644 --- a/dali/public-api/object/type-registry.h +++ b/dali/public-api/object/type-registry.h @@ -2,7 +2,7 @@ #define __DALI_TYPE_REGISTRY_H__ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,9 +18,9 @@ * */ - // EXTERNAL INCLUDES #include +#include // uint32_t // INTERNAL INCLUDES #include @@ -37,6 +37,7 @@ namespace Internal DALI_INTERNAL { class TypeRegistry; } +class DefaultPropertyMetadata; /** * @brief The TypeRegistry allows registration of type instance creation functions. @@ -93,7 +94,7 @@ class TypeRegistry; * * @SINCE_1_0.0 */ -class DALI_IMPORT_API TypeRegistry : public BaseHandle +class DALI_CORE_API TypeRegistry : public BaseHandle { public: /** @@ -185,7 +186,7 @@ public: // Not intended for application developers * @brief Registers a type from type info. * @SINCE_1_0.0 */ -class DALI_IMPORT_API TypeRegistration +class DALI_CORE_API TypeRegistration { public: /** @@ -212,6 +213,18 @@ public: TypeInfo::CreateFunction f, bool callCreateOnInit ); /** + * @brief Constructor registers the type creation function. + * + * @SINCE_1_4.0 + * @param[in] registerType the type info for the type to be registered + * @param[in] baseType the base type info of registerType + * @param[in] f registerType instance creation function + * @param[in] defaultProperties the default property meta-data + */ + TypeRegistration( const std::type_info& registerType, const std::type_info& baseType, + TypeInfo::CreateFunction f, const DefaultPropertyMetadata& defaultProperties ); + + /** * @brief Constructor registers the type creation function for a named class or type. * * This allows types to be created dynamically from script. The name must be @@ -241,7 +254,7 @@ private: * @brief Registers a signal connector function to a registered type. * @SINCE_1_0.0 */ -class DALI_IMPORT_API SignalConnectorType +class DALI_CORE_API SignalConnectorType { public: /** @@ -259,7 +272,7 @@ public: * @brief Registers an action function. * @SINCE_1_0.0 */ -class DALI_IMPORT_API TypeAction +class DALI_CORE_API TypeAction { public: /** @@ -277,7 +290,7 @@ public: * @brief Registers a property for the given type. * @SINCE_1_0.0 */ -class DALI_IMPORT_API PropertyRegistration +class DALI_CORE_API PropertyRegistration { public: @@ -316,7 +329,7 @@ public: * @brief Registers an animatable property for the given type. * @SINCE_1_0.0 */ -class DALI_IMPORT_API AnimatablePropertyRegistration +class DALI_CORE_API AnimatablePropertyRegistration { public: @@ -357,7 +370,7 @@ public: * @brief Registers a component of animatable property for the given component index. * @SINCE_1_0.0 */ -class DALI_IMPORT_API AnimatablePropertyComponentRegistration +class DALI_CORE_API AnimatablePropertyComponentRegistration { public: @@ -378,14 +391,14 @@ public: * @param[in] componentIndex The index of the component (e.g. 0 for the x component of a Vector2 property and 1 for the y component of a Vector2 property) * @pre "registered" must be registered with the TypeRegistry. */ - AnimatablePropertyComponentRegistration( TypeRegistration& registered, const std::string& name, Property::Index index, Property::Index baseIndex, unsigned int componentIndex ); + AnimatablePropertyComponentRegistration( TypeRegistration& registered, const std::string& name, Property::Index index, Property::Index baseIndex, uint32_t componentIndex ); }; /** * @brief Registers a child property for the given type. * @SINCE_1_1.35 */ -class DALI_IMPORT_API ChildPropertyRegistration +class DALI_CORE_API ChildPropertyRegistration { public: @@ -401,6 +414,19 @@ public: * @pre "registered" must be registered with the TypeRegistry. */ ChildPropertyRegistration( TypeRegistration& registered, const std::string& name, Property::Index index, Property::Type type ); + + /** + * @brief This constructor registers an event-thread only child property (i.e. a property + * that the parent supports in its children) with the registered type. + * + * @SINCE_1_3.20 + * @param[in] registered The name of the registered type + * @param[in] name The name of the property + * @param[in] index The property index. Must be a value between CHILD_PROPERTY_REGISTRATION_START_INDEX and CHILD_PROPERTY_REGISTRATION_MAX_INDEX inclusive + * @param[in] type The property value type + * @pre "registered" must be registered with the TypeRegistry. + */ + ChildPropertyRegistration( const std::string& registered, const std::string& name, Property::Index index, Property::Type type ); };