[3.0] Remove/move experimental features
[platform/core/uifw/dali-core.git] / dali / public-api / images / resource-image.h
index cf8d6fa..e74e30a 100644 (file)
 
 namespace Dali
 {
+/**
+ * @addtogroup dali_core_images
+ * @{
+ */
 
 namespace Internal DALI_INTERNAL
 {
@@ -38,64 +42,29 @@ class ResourceImage;
 /**
  * @brief ResourceImage is an image loaded using a URL
  *
- * <h3>ResourceImage Loading</h3>
- *
- * When the ResourceImage is created, resource loading will be attempted unless
- * the ResourceImage is created with IMMEDIATE loading policy or a compatible resource is found in cache.
- * In case of loading images ON_DEMAND, resource loading will only be attempted if the associated ImageActor
- * is put on Stage.
- * Scaling of images to a desired smaller size can be requested by providing desired dimensions,
- * scaling mode and filter mode to to ResourceImage::New().
+ * <i>Customizing load requests</i>
  *
- * <i>LoadPolicies</i>
- * - IMMEDIATE: acquire image resource when creating ResourceImage.
- * - ON_DEMAND: only load in case the associated ImageActor is put on Stage
- *
- * <i>Resolution of conflicting policies</i>
- * If the same image is created more than once with conflicting policies, LoadPolicy "IMMEDIATE" overrides "ON_DEMAND".
- *
- * <i>Custom load requests</i>
  * Size, scaling mode, filter mode, and orientation compensation can be set when requesting an image.
  *
- * <i>Compatible resources</i>
- *
- * Before loading a new ResourceImage the internal image resource cache is checked by dali.
- * If there is an image already loaded in memory and is deemed "compatible" with the requested image,
- * that resource is reused.
- * This happens for example if a loaded image exists with the same URL, scaling and filtering modes,
- * and the difference between both of the dimensions is less than a few pixels.
- *
  * <i>Reloading images</i>
  *
  * The same request used on creating the ResourceImage is re-issued when reloading images.
  * If the file changed since the last load operation, this might result in a different resource.
- * Reload only takes effect if both of these conditions apply:
- * - The ResourceImage has already finished loading
- * - The ResourceImage is either on Stage or using IMMEDIATE load policy
+ * Reload only takes effect if the ResourceImage has already finished loading.
  *
  * Signals
- * | %Signal Name           | Method                       |
- * |------------------------|------------------------------|
- * | image-loading-finished | @ref LoadingFinishedSignal() |
+ * | %Signal Name         | Method                       |
+ * |----------------------|------------------------------|
+ * | imageLoadingFinished | @ref LoadingFinishedSignal() |
+ * @SINCE_1_0.0
  */
 class DALI_IMPORT_API ResourceImage : public Image
 {
 public:
-  /**
-   * @brief Resource management options.
-   */
-
-  /**
-   * @brief LoadPolicy controls the way images are loaded into memory.
-   */
-  enum LoadPolicy
-  {
-    IMMEDIATE, ///< load image once it is created (default)
-    ON_DEMAND  ///< delay loading until the image is being used (a related actor is added to Stage)
-  };
 
   /**
    * @brief Type of signal for LoadingFinished and Uploaded.
+   * @SINCE_1_0.0
    */
   typedef Signal< void (ResourceImage) > ResourceImageSignal;
 
@@ -108,6 +77,7 @@ public:
    * synchronous, so it should not be used repeatedly or in tight
    * loops.
    *
+   * @SINCE_1_0.0
    * @param [in] url The URL of the image file.
    * @return The width and height in pixels of the image.
    */
@@ -117,6 +87,7 @@ public:
    * @brief Constructor which creates an empty ResourceImage object.
    *
    * Use ResourceImage::New(...) to create an initialised object.
+   * @SINCE_1_0.0
    */
   ResourceImage();
 
@@ -124,12 +95,14 @@ public:
    * @brief Destructor
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
+   * @SINCE_1_0.0
    */
   ~ResourceImage();
 
   /**
    * @brief This copy constructor is required for (smart) pointer semantics.
    *
+   * @SINCE_1_0.0
    * @param [in] handle A reference to the copied handle
    */
   ResourceImage( const ResourceImage& handle );
@@ -137,6 +110,7 @@ public:
   /**
    * @brief This assignment operator is required for (smart) pointer semantics.
    *
+   * @SINCE_1_0.0
    * @param [in] rhs  A reference to the copied handle
    * @return A reference to this
    */
@@ -154,6 +128,8 @@ public:
    * Uses defaults for all options.
    *
    * @sa Dali::FittingMode::Type Dali::SamplingMode::Type
+   * @SINCE_1_0.0
+   * @REMARK_INTERNET
    * @param [in] url The URL of the image file to use.
    * @param [in] orientationCorrection Reorient the image to respect any orientation metadata in its header.
    * @return A handle to a newly allocated object
@@ -163,36 +139,9 @@ public:
   /**
    * @brief Create an initialised ResourceImage object.
    *
+   * @SINCE_1_0.0
+   * @REMARK_INTERNET
    * @param [in] url The URL of the image file to use.
-   * @param [in] loadPol    The LoadPolicy to apply when loading the image resource.
-   * @param [in] releasePol The ReleasePolicy to apply to Image.
-   * @param [in] orientationCorrection Reorient the image to respect any orientation metadata in its header.
-   * @return A handle to a newly allocated object
-   */
-  static ResourceImage New( const std::string& url, LoadPolicy loadPol, ReleasePolicy releasePol, bool orientationCorrection = true );
-
-  /**
-   * @brief Create an initialised ResourceImage object.
-   *
-   * @param [in] url The URL of the image file to use.
-   * @param [in] size The width and height to fit the loaded image to.
-   * @param [in] fittingMode The method used to fit the shape of the image before loading to the shape defined by the size parameter.
-   * @param [in] samplingMode The filtering method used when sampling pixels from the input image while fitting it to desired size.
-   * @param [in] orientationCorrection Reorient the image to respect any orientation metadata in its header.
-   * @return A handle to a newly allocated object
-   */
-  static ResourceImage New( const std::string& url,
-                            ImageDimensions size,
-                            FittingMode::Type fittingMode = FittingMode::DEFAULT,
-                            SamplingMode::Type samplingMode = SamplingMode::DEFAULT,
-                            bool orientationCorrection = true );
-
-  /**
-   * @brief Create an initialised ResourceImage object.
-   *
-   * @param [in] url The URL of the image file to use.
-   * @param [in] loadPol    The LoadPolicy to apply when loading the image resource.
-   * @param [in] releasePol The ReleasePolicy to apply to Image.
    * @param [in] size The width and height to fit the loaded image to.
    * @param [in] fittingMode The method used to fit the shape of the image before loading to the shape defined by the size parameter.
    * @param [in] samplingMode The filtering method used when sampling pixels from the input image while fitting it to desired size.
@@ -200,8 +149,6 @@ public:
    * @return A handle to a newly allocated object
    */
   static ResourceImage New( const std::string& url,
-                            LoadPolicy loadPol,
-                            ReleasePolicy releasePol,
                             ImageDimensions size,
                             FittingMode::Type fittingMode = FittingMode::DEFAULT,
                             SamplingMode::Type samplingMode = SamplingMode::DEFAULT,
@@ -210,27 +157,22 @@ public:
   ///@}
 
   /**
-   * @brief Downcast an Object handle to ResourceImage handle.
+   * @brief Downcast a handle to ResourceImage handle.
    *
    * If handle points to a ResourceImage object the
    * downcast produces valid handle. If not the returned handle is left uninitialized.
-   * @param[in] handle to An object
-   * @return handle to a Image object or an uninitialized handle
+   * @SINCE_1_0.0
+   * @param[in] handle Handle to an object
+   * @return Handle to a Image object or an uninitialized handle
    */
   static ResourceImage DownCast( BaseHandle handle );
 
   /**
-   * @brief Return load policy.
-   *
-   * @return resource load policy
-   */
-  LoadPolicy GetLoadPolicy() const;
-
-  /**
    * @brief Query whether the image data has loaded.
    *
    * The asynchronous loading begins when the Image object is created.
    * After the Image object is discarded, the image data will be released from memory.
+   * @SINCE_1_0.0
    * @return The loading state, either Loading, Success or Failed.
    */
   LoadingState GetLoadingState() const;
@@ -238,6 +180,7 @@ public:
   /**
    * @brief Returns the URL of the image.
    *
+   * @SINCE_1_0.0
    * @return The URL of the image file.
    */
   std::string GetUrl() const;
@@ -247,6 +190,7 @@ public:
    *
    * The original set of image loading attributes (requested dimensions, scaling
    * mode and filter mode) are used when requesting the image again.
+   * @SINCE_1_0.0
    * @note If image is offstage and OnDemand policy is set, the reload request is
    * ignored.
    */
@@ -257,6 +201,7 @@ public: // Signals
   /**
    * @brief Emitted when the image data loads successfully, or when the loading fails.
    *
+   * @SINCE_1_0.0
    * @return A signal object to Connect() with.
    */
   ResourceImageSignal& LoadingFinishedSignal();
@@ -266,6 +211,9 @@ public: // Not intended for application developers
   explicit DALI_INTERNAL ResourceImage( Internal::ResourceImage* );
 };
 
+/**
+ * @}
+ */
 } // namespace Dali
 
 #endif // __DALI_RESOURCE_IMAGE_H__