Merge "Support animation of Visual transform properties" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / visuals / visual-properties.h
index 94b504b..6f19efc 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_VISUAL_PROPERTIES_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 /**
  * @addtogroup dali_toolkit_visuals
  * @{
@@ -38,24 +36,23 @@ namespace Toolkit
  */
 namespace Visual
 {
-
 /**
  * @brief All the visual types.
  * @SINCE_1_1.45
  */
 enum Type
 {
-  BORDER,           ///< Renders a solid color as an internal border to the control's quad. @SINCE_1_1.45
-  COLOR,            ///< Renders a solid color to the control's quad. @SINCE_1_1.45
-  GRADIENT,         ///< Renders a smooth transition of colors to the control's quad. @SINCE_1_1.45
-  IMAGE,            ///< Renders an image into the control's quad. @SINCE_1_1.45
-  MESH,             ///< Renders a mesh using an "obj" file, optionally with textures provided by an "mtl" file. @SINCE_1_1.45
-  PRIMITIVE,        ///< Renders a simple 3D shape, such as a cube or sphere. @SINCE_1_1.45
-  WIREFRAME,        ///< Renders a simple wire-frame outlining a quad. @SINCE_1_2_2
-  TEXT,             ///< Renders text @SINCE_1_2.60
-  N_PATCH,          ///< Renders an n-patch image. @SINCE_1_2.60
-  SVG,              ///< Renders an SVG image. @SINCE_1_2.60
-  ANIMATED_IMAGE,   ///< Renders a animated image. @SINCE_1_2.60
+  BORDER,         ///< Renders a solid color as an internal border to the control's quad. @SINCE_1_1.45
+  COLOR,          ///< Renders a solid color to the control's quad. @SINCE_1_1.45
+  GRADIENT,       ///< Renders a smooth transition of colors to the control's quad. @SINCE_1_1.45
+  IMAGE,          ///< Renders an image into the control's quad. @SINCE_1_1.45
+  MESH,           ///< Renders a mesh using an "obj" file, optionally with textures provided by an "mtl" file. @SINCE_1_1.45
+  PRIMITIVE,      ///< Renders a simple 3D shape, such as a cube or sphere. @SINCE_1_1.45
+  WIREFRAME,      ///< Renders a simple wire-frame outlining a quad. @SINCE_1_2_2
+  TEXT,           ///< Renders text @SINCE_1_2.60
+  N_PATCH,        ///< Renders an n-patch image. @SINCE_1_2.60
+  SVG,            ///< Renders an SVG image. @SINCE_1_2.60
+  ANIMATED_IMAGE, ///< Renders a animated image. @SINCE_1_2.60
 };
 
 /**
@@ -64,7 +61,6 @@ enum Type
  */
 namespace Property
 {
-
 /**
  * @brief Enumeration for the instance of properties belonging to the Visual Property.
  * @SINCE_1_1.45
@@ -73,7 +69,7 @@ enum
 {
   /**
    * @brief The index for the visual type.
-   * @details Name "visualType", type [Type](@ref Dali::Toolkit::Visual::Type) (Property::INTEGER) or Property::STRING.
+   * @details Name "visualType", type [Type](Dali::Toolkit::Visual::Type) (Property::INTEGER) or Property::STRING.
    * @SINCE_1_1.45
    * @note Mandatory.
    * @see Type
@@ -111,15 +107,16 @@ enum
 
   /**
    * @brief Mix color is a blend color for any visual.
-   * @details Name "mixColor", type Property::VECTOR3 or Property::VECTOR4.
+   * @details Name "mixColor", type Property::VECTOR3 or Property::VECTOR4, animatable
    * @SINCE_1_2.60
    * @note Optional
+   * @note To animate an opacity, OPACITY property should be used.
    */
   MIX_COLOR,
 
   /**
    * @brief Opacity is the alpha component of the mixColor, above.
-   * @details Name "opacity", type Property::FLOAT.
+   * @details Name "opacity", type Property::FLOAT, animatable
    * @SINCE_1_2.60
    * @note Optional
    */
@@ -129,27 +126,25 @@ enum
 } // namespace Property
 
 /**
- * @brief Visual Transfrom for the offset or size.
+ * @brief Visual Transform for the offset or size.
  * @SINCE_1_2.60
  */
 namespace Transform
 {
-
 /**
  * @brief Policies used by the transform for the offset or size.
  * @SINCE_1_2.60
  */
 namespace Policy
 {
-
 /**
  * @brief Enumeration for the type of Transform Policy.
  * @SINCE_1_2.60
  */
 enum Type
 {
-  RELATIVE = 0,   ///< Relative to the control (percentage [0.0f to 1.0f] of the control). @SINCE_1_2.60
-  ABSOLUTE = 1    ///< Absolute value in world units. @SINCE_1_2.60
+  RELATIVE = 0, ///< Relative to the control (percentage [0.0f to 1.0f] of the control). @SINCE_1_2.60
+  ABSOLUTE = 1  ///< Absolute value in world units. @SINCE_1_2.60
 };
 
 } // namespace Policy
@@ -160,16 +155,15 @@ enum Type
  */
 namespace Property
 {
-
 /**
- * @brief Enumeration for the type of Transfrom Property.
+ * @brief Enumeration for the type of Transform Property.
  * @SINCE_1_2.60
  */
 enum Type
 {
   /**
    * @brief Offset of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units).
-   * @details Name "offset", type Property::VECTOR2.
+   * @details Name "offset", type Property::VECTOR2, animatable.
    * @SINCE_1_2.60
    *
    * @see OFFSET_POLICY
@@ -178,7 +172,7 @@ enum Type
 
   /**
    * @brief Size of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units).
-   * @details Name "size", type Property::VECTOR2.
+   * @details Name "size", type Property::VECTOR2, animatable.
    * @see SIZE_POLICY
    */
   SIZE,
@@ -257,14 +251,12 @@ enum Type
  */
 namespace Shader
 {
-
 /**
  * @brief Shader Property.
  * @SINCE_1_1.45
  */
 namespace Property
 {
-
 /**
  * @brief The type of Shader.
  * @SINCE_1_1.45
@@ -325,6 +317,17 @@ enum
 
 } // namespace Shader
 
+/**
+ * @brief Status of resource which is used for visual.
+ * @SINCE_1_3_5
+ */
+enum class ResourceStatus
+{
+  PREPARING, /// Resource is prepared.    @SINCE_1_3_5
+  READY,     /// Resource is ready.       @SINCE_1_3_5
+  FAILED     /// Resource is fail to load @SINCE_1_3_5
+};
+
 } // namespace Visual
 
 /**