Revert "[Tizen] Sync for libds"
[platform/core/uifw/dali-adaptor.git] / dali / internal / offscreen / common / offscreen-window-impl.h
index 43b623d..95a7c55 100644 (file)
 
 // EXTERNAL INCLUDES
 #include <memory>
-#include <dali/integration-api/adaptor-framework/scene-holder-impl.h>
 #include <dali/public-api/common/intrusive-ptr.h>
 #include <dali/public-api/signals/connection-tracker.h>
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/offscreen-window.h>
+#include <dali/integration-api/adaptor-framework/scene-holder-impl.h>
 
 namespace Dali
 {
 class Adaptor;
 class Layer;
 class NativeRenderSurface;
+class TriggerEventInterface;
 
 namespace Internal
 {
@@ -40,10 +41,10 @@ namespace Internal
  * Implementation of the OffscreenWindow class.
  */
 class OffscreenWindow : public Dali::Internal::Adaptor::SceneHolder,
-                       public ConnectionTracker
+                        public ConnectionTracker
 {
 public:
-  using WindowSize =  Dali::OffscreenWindow::WindowSize;
+  using WindowSize = Dali::OffscreenWindow::WindowSize;
   using PostRenderSignalType = Dali::OffscreenWindow::PostRenderSignalType;
 
   /**
@@ -63,68 +64,78 @@ public:
   /**
    * Destructor
    */
-  ~OffscreenWindow() = default;
+  ~OffscreenWindow();
 
   /**
    * @copydoc Dali::OffscreenWindow::GetLayerCount
    */
-  virtual uint32_t GetLayerCount() const = 0;
+  uint32_t GetLayerCount() const;
 
   /**
    * @copydoc Dali::OffscreenWindow::GetLayer
    */
-  virtual Dali::Layer GetLayer( uint32_t depth ) const= 0;
+  Dali::Layer GetLayer( uint32_t depth ) const;
 
   /**
    * @copydoc Dali::OffscreenWindow::GetSize
    */
-  virtual WindowSize GetSize() const= 0;
+  WindowSize GetSize() const;
 
   /**
    * @copydoc Dali::OffscreenWindow::GetNativeHandle
    */
-  virtual Any GetNativeHandle() const override = 0;
+  Any GetNativeHandle() const override;
 
   /*
    * @brief Initialize the OffscreenWindow
    * @param[in] isDefaultWindow Whether the OffscreenWindow is a default one or not
    */
-  virtual void Initialize( bool isDefaultWindow ) = 0;
+  void Initialize( bool isDefaultWindow );
 
 public:  // Signals
 
   /**
    * @copydoc Dali::OffscreenWindow::PostRenderSignal
    */
-  virtual PostRenderSignalType& PostRenderSignal() = 0;
+  PostRenderSignalType& PostRenderSignal();
 
 private:
   /**
    * This function is called after drawing by dali.
    */
-  virtual void OnPostRender() = 0;
+  void OnPostRender();
 
   /**
    * @brief Get the native render surface
    * @return The render surface
    */
-  virtual NativeRenderSurface* GetNativeRenderSurface() const = 0;
+  NativeRenderSurface* GetNativeRenderSurface() const;
 
 private:
 
+ /**
+   * Private constructor
+   *
+   * @param[in] width The initial width of the OffscreenWindow
+   * @param[in] height The initial height of the OffscreenWindow
+   * @param[in] surface The native surface handle
+   * @param[in] isTranslucent Whether the OffscreenWindow is translucent or not
+   */
+  OffscreenWindow( uint16_t width, uint16_t height, Dali::Any surface, bool isTranslucent );
+
   // Undefined
   OffscreenWindow( const OffscreenWindow& );
   OffscreenWindow& operator=( OffscreenWindow& );
 
-  /**
-   * This is for initialization of this OffscreenWindow in case it is created before adaptor is running.
-   */
-  void OnPreInitOffscreenApplication();
-
   /*
    * @brief Initialize the OffscreenWindow (for internal use)
    */
   void Initialize();
+
+private:
+
+  std::unique_ptr< TriggerEventInterface >  mRenderNotification;
+  PostRenderSignalType                      mPostRenderSignal;
 };
 
 inline OffscreenWindow& GetImplementation( Dali::OffscreenWindow& offscreenWindow )