ImageVisual Action::Reload added
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / visual-base-impl.h
index c450d91..6fc777d 100644 (file)
@@ -93,6 +93,14 @@ public:
   void SetTransformAndSize( const Property::Map& transform, Size controlSize );
 
   /**
+   * @brief Performs an action on the visual with the given action name and attributes.
+   *
+   * @param[in] actionName The name of the action to perform this API only takes an Index
+   * @param[in] attributes The list of attributes for the action. ( optional for this data structure to have content )
+   */
+  void DoAction( const Dali::Property::Index actionName, const Dali::Property::Value attributes );
+
+  /**
    * @copydoc Toolkit::Visual::Base::GetHeightForWidth
    */
   virtual float GetHeightForWidth( float width );
@@ -226,13 +234,19 @@ public:
   /**
    * @brief Called when the visuals resources are loaded / ready
    */
-  void ResourceReady();
+  void ResourceReady( Toolkit::Visual::ResourceStatus resourceStatus );
 
   /**
    * @brief Called when the visuals resources are loaded / ready
    * @return true if ready, false otherwise
    */
-  bool IsResourceReady() const;
+  virtual bool IsResourceReady() const;
+
+  /**
+   * @brief Get the loading state of the visual resource
+   * @return Return the loading status (PREPARING, READY and FAILED) of visual resource
+   */
+  Toolkit::Visual::ResourceStatus GetResourceStatus() const;
 
 protected:
 
@@ -286,7 +300,7 @@ protected:
    *
    * @param[in] actor The actor applying this visual.
    */
-  virtual void DoSetOnStage( Actor& actor )=0;
+  virtual void DoSetOnStage( Actor& actor ) = 0;
 
   /**
    * @brief Called by SetOffStage() allowing sub classes to respond to the SetOffStage event
@@ -295,6 +309,14 @@ protected:
    */
   virtual void DoSetOffStage( Actor& actor );
 
+  /**
+   * @brief Called by DoAction() allowing sub classes to do the given action.
+   *
+   * @param[in] actionId The action to perform
+   * @param[in] attributes The list of attributes for the action. ( optional for this data structure to have content )
+   */
+  virtual void OnDoAction( const Property::Index actionId, const Property::Value& attributes );
+
 protected:
 
   /**