Deprecate all Image classes
[platform/core/uifw/dali-core.git] / dali / public-api / images / image.h
index 7a2cec4..608a5bb 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_IMAGE_H__
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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
 {
+/**
+ * @addtogroup dali_core_images
+ * @{
+ */
 
 namespace Internal DALI_INTERNAL
 {
@@ -34,132 +38,143 @@ class Image;
 }
 
 /**
- * @brief An Image object represents an image resource that can be added to ImageActors.
+ * @DEPRECATED_1_2.41
  *
- * Image objects can be shared between ImageActors. This is practical if you have a visual element on screen
- * which is repeatedly used. An example would be a button background image.
- * The image resource is discarded when all ImageActors using the Image object are discarded or in case they
- * were created with ReleasePolicy::Unused, taken off stage.
- * Note: if a resource was shared between Image objects it exists until its last reference is gone.
+ * @brief An Image object represents an image resource that can be used for rendering.
  *
- * Image objects are responsible for the underlying resource's lifetime.
+ * Image objects can be shared between Actors. This is practical if you have a visual element on screen
+ * which is repeatedly used.
  *
- * <i>ReleasePolicies</i>
- * - Unused: release resource once ImageActor using it is taken off stage.
- * - Never: keep resource alive until Image object is thrown away.
+ * The image resource is released as soon as the last Image handle is released.
+ * @SINCE_1_0.0
+ * @note If a resource was shared between Image objects it exists until its last reference is gone.
  *
- * <i>Resolution of conflicting policies</i>
- * If the same image is created more than once with conflicting policies, ReleasePolicy "Never" overrides "Unused".
+ * Image objects are responsible for the underlying resource's lifetime.
  *
  * Signals
  * | %Signal Name           | Method                       |
  * |------------------------|------------------------------|
  * | uploaded               | @ref UploadedSignal()        |
+ * @SINCE_1_0.0
  */
 class DALI_IMPORT_API Image : public BaseHandle
 {
 public:
-  /**
-   * @brief Resource management options.
-   */
-
-  /**
-   * @brief ReleasePolicy controls the way images are deleted from memory.
-   */
-  enum ReleasePolicy
-  {
-    UNUSED, ///< release resource once image is not in use anymore (eg. all actors using it become offstage). Reload when resource is required again.
-    NEVER   ///< keep image data for the lifetime of the object. (default)
-  };
 
   /**
+   * @DEPRECATED_1_2.41
+   *
    * @brief Type of signal for Image Uploaded.
+   * @SINCE_1_0.0
    */
   typedef Signal< void (Image) > ImageSignalType;
 
 public:
 
   /**
+   * @DEPRECATED_1_2.41
+   *
    * @brief Constructor which creates an empty Image handle.
    *
-   * Use Image::New(...) to create an initialised handle.
+   * This class has no New method.
+   * Use the appropriate New method of its subclasses to create an initialized handle.
+   * (Dali::BufferImage::New(), Dali::EncodedBufferImage::New(), Dali::FrameBufferImage::New(),
+   * Dali::NativeImage::New(), Dali::ResourceImage::New()).
+   * @SINCE_1_0.0
    */
-  Image();
+  Image() DALI_DEPRECATED_API;
 
   /**
-   * @brief Destructor
+   * @DEPRECATED_1_2.41
+   *
+   * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
+   * @SINCE_1_0.0
    */
-  ~Image();
+  ~Image() DALI_DEPRECATED_API;
 
   /**
+   * @DEPRECATED_1_2.41
+   *
    * @brief This copy constructor is required for (smart) pointer semantics.
    *
-   * @param [in] handle A reference to the copied handle
+   * @SINCE_1_0.0
+   * @param[in] handle A reference to the copied handle
    */
-  Image(const Image& handle);
+  Image(const Image& handle) DALI_DEPRECATED_API;
 
   /**
+   * @DEPRECATED_1_2.41
+   *
    * @brief This assignment operator is required for (smart) pointer semantics.
    *
-   * @param [in] rhs  A reference to the copied handle
+   * @SINCE_1_0.0
+   * @param[in] rhs A reference to the copied handle
    * @return A reference to this
    */
-  Image& operator=(const Image& rhs);
+  Image& operator=(const Image& rhs) DALI_DEPRECATED_API;
 
   /**
-   * @brief Downcast an Object handle to Image handle.
+   * @DEPRECATED_1_2.41
    *
-   * If handle points to a Image 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
-   */
-  static Image DownCast( BaseHandle handle );
-
-  /**
-   * @brief Return resource release policy.
+   * @brief Downcasts a handle to Image handle.
    *
-   * @return resource release policy
+   * If handle points to a Image object, the
+   * downcast produces valid handle. If not, the returned handle is left uninitialized.
+   * @SINCE_1_0.0
+   * @param[in] handle Handle to an object
+   * @return Handle to a Image object or an uninitialized handle
    */
-  ReleasePolicy GetReleasePolicy() const;
+  static Image DownCast( BaseHandle handle ) DALI_DEPRECATED_API;
 
   /**
+   * @DEPRECATED_1_2.41
+   *
    * @brief Returns the width of the image.
    *
    * Returns either the requested width or the actual loaded width if no specific size was requested.
    *
-   * @return width of the image in pixels.
+   * @SINCE_1_0.0
+   * @return Width of the image in pixels
    */
-  unsigned int GetWidth() const;
+  unsigned int GetWidth() const DALI_DEPRECATED_API;
 
   /**
+   * @DEPRECATED_1_2.41
+   *
    * @brief Returns the height of the image.
    *
    * Returns either the requested height or the actual loaded height if no specific size was requested.
    *
-   * @return height of the image in pixels.
+   * @SINCE_1_0.0
+   * @return Height of the image in pixels
    */
-  unsigned int GetHeight() const;
+  unsigned int GetHeight() const DALI_DEPRECATED_API;
 
 public: // Signals
 
   /**
+   * @DEPRECATED_1_2.41
+   *
    * @brief This signal is emitted when the image data gets uploaded to GL.
    *
    * It Will be sent after an actor using the image is added to
    * the stage, when such a staged image is reloaded, or when a staged
    * BufferImage calls Update().
-   * @return A signal object to Connect() with.
+   * @SINCE_1_0.0
+   * @return A signal object to Connect() with
    */
-  ImageSignalType& UploadedSignal();
+  ImageSignalType& UploadedSignal() DALI_DEPRECATED_API;
 
 public: // Not intended for application developers
 
   explicit DALI_INTERNAL Image(Internal::Image*);
 };
 
+/**
+ * @}
+ */
 } // namespace Dali
 
 #endif // __DALI_IMAGE_H__