[dali_2.3.42] Merge branch 'devel/master'
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / offscreen-window.h
index 5e2b502..3952ff0 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_OFFSCREEN_WINDOW_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -22,7 +22,6 @@
 #include <dali/public-api/actors/actor.h>
 #include <dali/public-api/math/uint-16-pair.h>
 #include <dali/public-api/object/any.h>
-#include <dali/public-api/signals/dali-signal.h>
 
 // INTERNAL INCLUDES
 #include <dali/public-api/dali-adaptor-common.h>
@@ -44,8 +43,7 @@ class OffscreenWindow;
 class DALI_ADAPTOR_API OffscreenWindow : public Dali::BaseHandle
 {
 public:
-  using WindowSize           = Uint16Pair;
-  using PostRenderSignalType = Signal<void(OffscreenWindow, Any)>;
+  using WindowSize = Uint16Pair;
 
 public:
   /**
@@ -87,6 +85,21 @@ public:
   OffscreenWindow& operator=(const OffscreenWindow& window);
 
   /**
+   * @brief Move constructor
+   *
+   * @param [in] window A reference to the moved handle
+   */
+  OffscreenWindow(OffscreenWindow&& window);
+
+  /**
+   * @brief Move assignment operator
+   *
+   * @param [in] window A reference to the moved handle
+   * @return A reference to this
+   */
+  OffscreenWindow& operator=(OffscreenWindow&& window);
+
+  /**
    * @brief Destructor
    */
   ~OffscreenWindow();
@@ -176,13 +189,32 @@ public:
    */
   Uint16Pair GetDpi() const;
 
-public: // Signals
   /**
-   * @brief This signal is emitted when the OffscreenWindow is rendered.
+   * @brief Sets the PostRenderCallback of the OffscreenWindow.
+   *
+   * @param[in] callback The PostRenderCallback function
+   * @code
+   *   void MyFunction( OffscreenWindow window, Any nativeSurface );
+   * @endcode
+   *
+   * @note Ownership of the callback is passed onto this class.
+   *
+   */
+  void SetPostRenderCallback(CallbackBase* callback);
+
+  /**
+   * @brief Sets a callback that is called when the frame rendering is done by the graphics driver.
+   *
+   * @param[in] callback The function to call
+   *
+   * @note A callback of the following type may be used:
+   * @code
+   *   void MyFunction();
+   * @endcode
    *
-   * @return The signal
+   * @note Ownership of the callback is passed onto this class.
    */
-  PostRenderSignalType& PostRenderSignal();
+  void SetFrameRenderedCallback(CallbackBase* callback);
 
 public: // Not intended for application developers
   /**