Moved Core Rendering API from devel-api to public-api
[platform/core/uifw/dali-core.git] / dali / internal / event / common / object-impl.h
index 9f34aed..b7e6836 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_OBJECT_H__
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
@@ -28,7 +28,7 @@
 #include <dali/public-api/object/property-index-ranges.h>
 #include <dali/public-api/object/property-input.h>
 #include <dali/public-api/object/property-notification.h>
-#include <dali/internal/common/owner-container.h>
+#include <dali/devel-api/common/owner-container.h>
 #include <dali/internal/event/common/event-thread-services.h>
 #include <dali/internal/event/common/property-input-impl.h>
 #include <dali/internal/event/common/property-metadata.h>
@@ -59,6 +59,7 @@ typedef std::vector< Dali::Constraint >     ConstraintContainer;
 typedef ConstraintContainer::iterator       ConstraintIter;
 typedef ConstraintContainer::const_iterator ConstraintConstIter;
 
+
 /**
  * A base class for objects which optionally provide properties.
  * The concrete derived class is responsible for implementing the property system methods.
@@ -211,7 +212,19 @@ public:
    */
   virtual void RemovePropertyNotifications();
 
-  // Constraints
+  /******************************** Uniform Mappings ********************************/
+
+  /**
+   * @copydoc Dali::Handle::AddUniformMapping()
+   */
+  void AddUniformMapping( Property::Index propertyIndex, const std::string& uniformName ) const;
+
+  /**
+   * @copydoc Dali::Handle::RemoveUniformMapping( )
+   */
+  void RemoveUniformMapping( const std::string& uniformName );
+
+  /******************************** Constraints ********************************/
 
   /**
    * Apply a constraint to an Object.
@@ -249,7 +262,7 @@ public:
     return PROPERTY_CUSTOM_START_INDEX;
   }
 
-  // To be overridden by deriving classes
+  /********************  To be overridden by deriving classes ********************/
 
   /**
    * Retrieve the scene-graph object added by this object.
@@ -266,7 +279,7 @@ public:
   virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const = 0;
 
   /**
-   * Retrieve an constraint input-property owned by the scene-graph object.
+   * Retrieve a constraint input-property owned by the scene-graph object.
    * @pre -1 < index < GetPropertyCount().
    * @param[in] index The index of the property.
    * @return A dereferenceable pointer to an input property, or NULL if a scene-object does not exist with this property.
@@ -299,6 +312,15 @@ protected:
   void OnSceneObjectRemove();
 
   /**
+   * For overriding by derived classes to return the parent of this object.
+   */
+  virtual Object* GetParentObject() const
+  {
+    // By default the Object does not have a parent
+    return NULL;
+  };
+
+  /**
    * For use in derived classes.
    * This is called after a property is set.
    * @param [in] index The index of the property.
@@ -336,6 +358,18 @@ protected:
    */
   Property::Index RegisterSceneGraphProperty(const std::string& name, Property::Index index, const Property::Value& propertyValue) const;
 
+  /**
+   * Check whether the animatable property is registered already, if not then register one.
+   * @param [in] index The index of the property
+   * @return pointer to the property.
+   */
+  AnimatablePropertyMetadata* RegisterAnimatableProperty(Property::Index index) const;
+
+  /**
+   * Resolve the index and name of child properties if any.
+   */
+  void ResolveChildProperties();
+
 private: // Default property extensions for derived classes
 
   /**
@@ -509,7 +543,6 @@ private:
   typedef PropertyNotificationContainer::const_iterator PropertyNotificationContainerConstIter;
   PropertyNotificationContainer* mPropertyNotifications; ///< Container of owned property notifications.
 };
-
 } // namespace Internal
 
 // Helpers for public-api forwarding methods