Seperate the API macros
[platform/core/uifw/dali-core.git] / dali / devel-api / object / handle-devel.h
index 03e5c37..e8d3803 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_HANDLE_DEVEL_H
 
 /*
- * Copyright (c) 2017 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.
@@ -44,7 +44,7 @@ namespace DevelHandle
  *
  * @note The key is not the same as the returned index, though it has the same type.
  */
-DALI_IMPORT_API Property::Index GetPropertyIndex( const Handle& handle, Property::Index key );
+DALI_CORE_API Property::Index GetPropertyIndex( const Handle& handle, Property::Index key );
 
 /**
  * @brief Query the index of a property using the given key from a Property::Map
@@ -58,7 +58,7 @@ DALI_IMPORT_API Property::Index GetPropertyIndex( const Handle& handle, Property
  *
  * @note See also, GetPropertyIndex(Property::Index) and GetPropertyIndex(const std::string&)
  */
-DALI_IMPORT_API Property::Index GetPropertyIndex( const Handle& handle, Property::Key key );
+DALI_CORE_API Property::Index GetPropertyIndex( const Handle& handle, Property::Key key );
 
 /**
  * @brief Register a new animatable property with an integer key.
@@ -96,7 +96,7 @@ DALI_IMPORT_API Property::Index GetPropertyIndex( const Handle& handle, Property
  *       - Property::ROTATION
  * @note If a property with the desired name already exists, then the value given is just set.
  */
-DALI_IMPORT_API Property::Index RegisterProperty( Handle handle, Property::Index key, const std::string& name, const Property::Value& propertyValue );
+DALI_CORE_API Property::Index RegisterProperty( Handle handle, Property::Index key, const std::string& name, const Property::Value& propertyValue );
 
 /**
  * @brief Set the type-info that the object is created by.
@@ -106,32 +106,31 @@ DALI_IMPORT_API Property::Index RegisterProperty( Handle handle, Property::Index
  * @param[in] handle The handle created by this TypeInfo.
  * @param[in] typeInfo The TypeInfo that creates the handle.
  */
-DALI_IMPORT_API void SetTypeInfo( Handle& handle, const TypeInfo& typeInfo );
+DALI_CORE_API void SetTypeInfo( Handle& handle, const TypeInfo& typeInfo );
+
 
 /**
- * @brief Retrieves the latest value of the property from the scene-graph.
+ * @brief Determine if the custom property index exists on this object without throwing a Dali::Exception.
  *
- * @param[in] handle The handle whose current property value is required
- * @param[in] index The index of the property
- * @return The property value
+ * @note This does not check default properties.
+ * @param[in] handle The handle to check
+ * @param[in] index The index of the property to test for
  */
-DALI_IMPORT_API Property::Value GetCurrentProperty( Handle handle, Property::Index index );
+DALI_CORE_API bool DoesCustomPropertyExist( Handle& handle, Property::Index index );
 
 /**
- * @brief Convenience function for obtaining the current value of a property of a known type.
+ * @brief PropertySetSignal function prototype for signal handler. Called when a property is set on this object.
+ */
+using PropertySetSignalType = Signal< void( Handle& handle, Property::Index index, Property::Value value ) >;
+
+/**
+ * @brief Get a signal when a property is set on this object through the API (i.e. not when animating)
  *
- * @param[in] handle The handle whose current property value is required
- * @param[in] index The index of the property
- * @return The property value
- * @pre The property types match i.e. PropertyTypes::Get<T>() is equal to GetPropertyType(index).
+ * @param[in] handle The handle of the object to listen to.
+ * @return The signal to attach a connection to.
  */
-template <typename T>
-T GetCurrentProperty( Handle handle, Property::Index index )
-{
-  Property::Value value = GetCurrentProperty( handle, index );
+DALI_CORE_API PropertySetSignalType& PropertySetSignal( Handle handle );
 
-  return T( value.Get<T>() );
-}
 
 } // namespace DevelHandle