Merge "Remove CXX03 Build & old Tizen Version Builds" into devel/master
[platform/core/uifw/dali-adaptor.git] / dali / integration-api / adaptor.h
index 04f9429..279ccb8 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_INTEGRATION_ADAPTOR_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -24,6 +24,7 @@
 #include <dali/public-api/math/rect.h>
 #include <dali/public-api/events/touch-event.h>
 #include <dali/public-api/common/view-mode.h>
+#include <dali/public-api/object/any.h>
 #include <dali/integration-api/processor-interface.h>
 
 // INTERNAL INCLUDES
@@ -43,6 +44,12 @@ namespace Dali
 
 class RenderSurfaceInterface;
 
+namespace Integration
+{
+class SceneHolder;
+}
+
+
 namespace Internal
 {
 namespace Adaptor
@@ -137,21 +144,57 @@ public:
   /**
    * @brief Create a new adaptor using render surface.
    *
-   * @param[in] nativeWindow native window handle
+   * @param[in] window The window to draw onto
+   * @param[in] surface The surface to draw onto
+   * @return a reference to the adaptor handle
+   */
+  static Adaptor& New( Window window, const Dali::RenderSurfaceInterface& surface );
+
+  /**
+   * @brief Create a new adaptor using render surface.
+   *
+   * @param[in] window The window to draw onto
+   * @param[in] surface The surface to draw onto
+   * @param[in] configuration The context loss configuration.
+   * @return a reference to the adaptor handle
+   */
+  static Adaptor& New( Window window, const Dali::RenderSurfaceInterface& surface, Configuration::ContextLoss configuration = Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS);
+
+  /**
+   * @brief Create a new adaptor using the SceneHolder.
+   *
+   * @param[in] sceneHolder The SceneHolder to draw onto
+   * @return a reference to the adaptor handle
+   */
+  static Adaptor& New( Dali::Integration::SceneHolder sceneHolder );
+
+  /**
+   * @brief Create a new adaptor using the SceneHolder.
+   *
+   * @param[in] sceneHolder The SceneHolder to draw onto
+   * @param[in] configuration The context loss configuration.
+   * @return a reference to the adaptor handle
+   */
+  static Adaptor& New( Dali::Integration::SceneHolder sceneHolder, Configuration::ContextLoss configuration );
+
+  /**
+   * @brief Create a new adaptor using render surface.
+   *
+   * @param[in] sceneHolder The SceneHolder to draw onto
    * @param[in] surface The surface to draw onto
    * @return a reference to the adaptor handle
    */
-  static Adaptor& New( Any nativeWindow, const Dali::RenderSurfaceInterface& surface );
+  static Adaptor& New( Dali::Integration::SceneHolder sceneHolder, const Dali::RenderSurfaceInterface& surface );
 
   /**
    * @brief Create a new adaptor using render surface.
    *
-   * @param[in] nativeWindow native window handle
+   * @param[in] sceneHolder The SceneHolder to draw onto
    * @param[in] surface The surface to draw onto
    * @param[in] configuration The context loss configuration.
    * @return a reference to the adaptor handle
    */
-  static Adaptor& New( Any nativeWindow, const Dali::RenderSurfaceInterface& surface, Configuration::ContextLoss configuration = Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS);
+  static Adaptor& New( Dali::Integration::SceneHolder sceneHolder, const Dali::RenderSurfaceInterface& surface, Configuration::ContextLoss configuration = Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS);
 
   /**
    * @brief Virtual Destructor.
@@ -218,10 +261,18 @@ public:
   /**
    * @brief Replaces the rendering surface
    *
-   * @param[in] nativeWindow native window handle
+   * @param[in] window The window to replace the surface for
+   * @param[in] surface to use
+   */
+  void ReplaceSurface( Window window, Dali::RenderSurfaceInterface& surface );
+
+  /**
+   * @brief Replaces the rendering surface
+   *
+   * @param[in] sceneHolder The SceneHolder to replace the surface for
    * @param[in] surface to use
    */
-  void ReplaceSurface( Any nativeWindow, Dali::RenderSurfaceInterface& surface );
+  void ReplaceSurface( Dali::Integration::SceneHolder sceneHolder, Dali::RenderSurfaceInterface& surface );
 
   /**
    * @brief Get the render surface the adaptor is using to render to.