[3.0] Update doxygen tag
[platform/core/uifw/dali-adaptor.git] / adaptors / public-api / adaptor-framework / native-image-source.h
old mode 100644 (file)
new mode 100755 (executable)
index dea2a14..effacce
@@ -44,16 +44,20 @@ class NativeImageSource;
 class NativeImageSource;
 /**
  * @brief Pointer to Dali::NativeImageSource.
+ * @SINCE_1_0.0
  */
-typedef IntrusivePtr<NativeImageSource> NativeImageSourcePtr;
+typedef Dali::IntrusivePtr<Dali::NativeImageSource> NativeImageSourcePtr;
 
 /**
  * @brief Used for displaying native images.
  *
- * The native image source can be created internally or
- * externally by X11 or ECORE-X11.
+ * NativeImageSource can be created internally or
+ * externally by native image source.
+ * NativeImage is a platform specific way of providing pixel data to the GPU for rendering,
+ * for example via an EGL image.
  *
- * @since DALi 1.1.4
+ * @SINCE_1_1.4
+ * @see NativeImage
  */
 class DALI_IMPORT_API NativeImageSource : public NativeImageInterface
 {
@@ -61,20 +65,22 @@ public:
 
    /**
     * @brief When creating a native image the color depth has to be specified.
+    * @SINCE_1_0.0
     */
    enum ColorDepth
    {
-     COLOR_DEPTH_DEFAULT,     ///< Uses the current X screen default depth (recommended)
-     COLOR_DEPTH_8,           ///< 8 bits per pixel
-     COLOR_DEPTH_16,          ///< 16 bits per pixel
-     COLOR_DEPTH_24,          ///< 24 bits per pixel
-     COLOR_DEPTH_32           ///< 32 bits per pixel
+     COLOR_DEPTH_DEFAULT,     ///< Uses the current screen default depth (recommended) @SINCE_1_0.0
+     COLOR_DEPTH_8,           ///< 8 bits per pixel @SINCE_1_0.0
+     COLOR_DEPTH_16,          ///< 16 bits per pixel @SINCE_1_0.0
+     COLOR_DEPTH_24,          ///< 24 bits per pixel @SINCE_1_0.0
+     COLOR_DEPTH_32           ///< 32 bits per pixel @SINCE_1_0.0
    };
 
   /**
    * @brief Create a new NativeImageSource.
    *
    * Depending on hardware the width and height may have to be a power of two.
+   * @SINCE_1_0.0
    * @param[in] width The width of the image.
    * @param[in] height The height of the image.
    * @param[in] depth color depth of the image.
@@ -83,17 +89,20 @@ public:
   static NativeImageSourcePtr New( unsigned int width, unsigned int height, ColorDepth depth );
 
   /**
-   * @brief Create a new NativeImageSource from an existing native image.
+   * @brief Create a new NativeImageSource from an existing native image source.
    *
-   * @param[in] nativeImageSource must be a X11 pixmap or a Ecore_X_Pixmap
+   * @SINCE_1_0.0
+   * @param[in] nativeImageSource must be a any handle with native image source
    * @return A smart-pointer to a newly allocated image.
+   * @see NativeImageInterface
    */
   static NativeImageSourcePtr New( Any nativeImageSource );
 
   /**
    * @brief Retrieve the internal native image.
    *
-   * @return Any object containing the internal native image.
+   * @SINCE_1_0.0
+   * @return Any object containing the internal native image source.
    */
   Any GetNativeImageSource();
 
@@ -102,9 +111,10 @@ public:
    *
    * This is only supported for 24 bit RGB and 32 bit RGBA internal formats
    * (COLOR_DEPTH_24 and COLOR_DEPTH_32).
+   * @SINCE_1_0.0
    * @param[out] pixbuf a vector to store the pixels in
-   * @param[out] width  width of image
-   * @param[out] height height of image
+   * @param[out] width  The width of image
+   * @param[out] height The height of image
    * @param[out] pixelFormat pixel format used by image
    * @return     True if the pixels were gotten, and false otherwise.
    */
@@ -114,6 +124,7 @@ public:
    * @brief Convert the current pixel contents to either a JPEG or PNG format
    * and write that to the filesytem.
    *
+   * @SINCE_1_0.0
    * @param[in] filename Identify the filesytem location at which to write the
    *                     encoded image. The extension determines the encoding used.
    *                     The two valid encoding are (".jpeg"|".jpg") and ".png".
@@ -121,6 +132,23 @@ public:
    */
   bool EncodeToFile(const std::string& filename) const;
 
+  /**
+   * @brief Set an existing source
+   *
+   * @SINCE_1_1.19
+   * @param[in] source Any handle with the source
+   */
+  void SetSource( Any source );
+
+  /**
+   * @brief Check if the specified color depth is supported.
+   *
+   * @SINCE_1_1.34
+   * @param[in] colorDepth The color depth to check.
+   * @return true if colorDepth is supported, false otherwise.
+   */
+  bool IsColorDepthSupported( ColorDepth colorDepth );
+
 private:   // native image
 
   /**
@@ -158,36 +186,49 @@ private:   // native image
    */
   virtual bool RequiresBlending() const;
 
+  /**
+   * @copydoc Dali::NativeImageInterface::GetExtension()
+   */
+  NativeImageInterface::Extension* GetExtension();
+
 private:
 
   /**
+   * @internal
    * @brief Private constructor
+   * @SINCE_1_0.0
    * @param[in] width The width of the image.
    * @param[in] height The height of the image.
    * @param[in] depth color depth of the image.
-   * @param[in] nativeImageSource contains either: pixmap of type X11 Pixmap , a Ecore_X_Pixmap or is empty
+   * @param[in] nativeImageSource contains either: native image source or is empty
    */
   DALI_INTERNAL NativeImageSource( unsigned int width, unsigned int height, ColorDepth depth, Any nativeImageSource );
 
   /**
+   * @internal
    * @brief A reference counted object may only be deleted by calling Unreference().
    *
    * The implementation should destroy the NativeImage resources.
+   * @SINCE_1_0.0
    */
   DALI_INTERNAL virtual ~NativeImageSource();
 
   /**
+   * @internal
    * @brief Undefined copy constructor
    *
    * This avoids accidental calls to a default copy constructor.
+   * @SINCE_1_0.0
    * @param[in] nativeImageSource A reference to the object to copy.
    */
   DALI_INTERNAL NativeImageSource( const NativeImageSource& nativeImageSource );
 
   /**
+   * @internal
    * @brief Undefined assignment operator.
    *
    * This avoids accidental calls to a default assignment operator.
+   * @SINCE_1_0.0
    * @param[in] rhs A reference to the object to copy.
    */
   DALI_INTERNAL NativeImageSource& operator=(const NativeImageSource& rhs);