Add move semantics to BaseHandle derived classes in Adaptor public API
[platform/core/uifw/dali-adaptor.git] / dali / public-api / capture / capture.h
old mode 100644 (file)
new mode 100755 (executable)
index 58ee9d8..7113eee
@@ -2,7 +2,7 @@
 #define DALI_CAPTURE_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.
@@ -23,7 +23,9 @@
 #include <dali/public-api/signals/dali-signal.h>
 #include <dali/public-api/actors/camera-actor.h>
 
-// INTERNAL HEADERS
+// INTERNAL INCLUDES
+#include <dali/public-api/dali-adaptor-common.h>
+#include <dali/public-api/adaptor-framework/native-image-source.h>
 
 namespace Dali
 {
@@ -44,7 +46,7 @@ class Capture;
 /**
  * @brief Capture snapshots the current scene and save as a file.
  *
- * @SINCE_1_3_4
+ * @SINCE_1_3.4
  *
  * Applications should follow the example below to create capture :
  *
@@ -74,7 +76,7 @@ class Capture;
  * }
  * @endcode
  */
-class DALI_IMPORT_API Capture : public BaseHandle
+class DALI_ADAPTOR_API Capture : public BaseHandle
 {
 
 public:
@@ -106,28 +108,22 @@ public:
   Capture();
 
   /**
-   * @PRIVLEVEL_PLATFORM
    * @brief Create an initialized Capture.
    *
    * @SINCE_1_3_4
-   * @PRIVILEGE_CAPTURE
    *
    * @return A handle to a newly allocated Dali resource.
    * @note Projection mode of default cameraActor is Dali::Camera::PERSPECTIVE_PROJECTION
-   * @note If permission denied by privilege occurs, a uninitialized handle is returned
    */
   static Capture New();
 
   /**
-   * @PRIVLEVEL_PLATFORM
    * @brief Create an initialized Capture.
    *
    * @SINCE_1_3_4
-   * @PRIVILEGE_CAPTURE
    *
    * @param[in] cameraActor An initialized CameraActor.
    * @return A handle to a newly allocated Dali resource.
-   * @note If permission denied by privilege occurs, a uninitialized handle is returned
    */
   static Capture New( Dali::CameraActor cameraActor );
 
@@ -173,6 +169,37 @@ public:
   Capture& operator=( const Capture& rhs );
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.24
+   * @param[in] rhs A reference to the moved handle
+   */
+  Capture( Capture&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.24
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  Capture& operator=( Capture&& rhs );
+
+  /**
+   * @brief Start capture and save the image as a file.
+   *
+   * @SINCE_1_9.12
+   *
+   * @param[in] source source actor to be used for capture.
+   * @param[in] size captured size.
+   * @param[in] path image file path to be saved as a file.
+   *            If path is empty string, the captured result is not be saved as a file.
+   * @param[in] clearColor background color of captured scene
+   * @param[in] quality The value to control image quality for jpeg file format in the range [1, 100]
+   */
+  void Start( Actor source, const Vector2& size, const std::string &path, const Vector4& clearColor, const uint32_t quality );
+
+  /**
    * @brief Start capture and save the image as a file.
    *
    * @SINCE_1_3_4
@@ -180,6 +207,7 @@ public:
    * @param[in] source source actor to be used for capture.
    * @param[in] size captured size.
    * @param[in] path image file path to be saved as a file.
+   *            If path is empty string, the captured result is not be saved as a file.
    * @param[in] clearColor background color of captured scene
    */
   void Start( Actor source, const Vector2& size, const std::string &path, const Vector4& clearColor );
@@ -192,11 +220,21 @@ public:
    * @param[in] source source actor to be used for capture.
    * @param[in] size captured size.
    * @param[in] path image file path to be saved as a file.
+   *            If path is empty string, the captured result is not be saved as a file.
    * @note Clear color is transparent.
    */
   void Start( Actor source, const Vector2& size, const std::string &path );
 
   /**
+   * @brief Get NativeImageSourcePtr that is saved captured image.
+   *
+   * @SINCE_1_9.10
+   *
+   * @return NativeImageSourcePtr Captured result that can be rendered with DALi
+   */
+  Dali::NativeImageSourcePtr GetNativeImageSource() const;
+
+  /**
    * @brief Get finished signal.
    *
    * @SINCE_1_3_4
@@ -206,6 +244,7 @@ public:
   CaptureFinishedSignalType& FinishedSignal();
 
 public: // Not intended for application developers
+  /// @cond internal
   /**
    * @brief This constructor is used by New() methods.
    *
@@ -214,6 +253,7 @@ public: // Not intended for application developers
    * @param[in] internal A pointer to a newly allocated Dali resource.
    */
   explicit DALI_INTERNAL Capture( Internal::Adaptor::Capture* internal );
+  /// @endcond
 };
 
 /**