Wayland DPI and Multi-threading Wayland support
[platform/core/uifw/dali-adaptor.git] / adaptors / integration-api / adaptor.h
index 410c59b..cc79c35 100644 (file)
 #include <dali/public-api/signals/dali-signal.h>
 #include <dali/public-api/math/rect.h>
 #include <dali/public-api/events/touch-event.h>
+#include <dali/public-api/common/view-mode.h>
 
 // INTERNAL INCLUDES
-#include "window.h"
-#include "application-configuration.h"
+
+
+#ifdef DALI_ADAPTOR_COMPILATION  // full path doesn't exist until adaptor is installed so we have to use relative
+// @todo Make dali-adaptor code folder structure mirror the folder structure installed to dali-env
+#include <window.h>
+#include <application-configuration.h>
+#else
+#include <dali/public-api/adaptor-framework/window.h>
+#include <dali/public-api/adaptor-framework/application-configuration.h>
+#endif
+
 
 namespace Dali
 {
 
-struct DeviceLayout;
 class RenderSurface;
 
 namespace Internal
@@ -111,7 +120,6 @@ public:
    * @brief Create a new adaptor using the window.
    *
    * @param[in] window The window to draw onto
-   * @note The default base layout DeviceLayout::DEFAULT_BASE_LAYOUT will be used.
    * @return a reference to the adaptor handle
    */
   static Adaptor& New( Window window );
@@ -120,18 +128,16 @@ public:
    * @brief Create a new adaptor using the window.
    *
    * @param[in] window The window to draw onto
-   * @param[in] baseLayout  The base layout that the application has been written for
    * @param[in] configuration The context loss configuration.
    * @return a reference to the adaptor handle
    */
-  static Adaptor& New( Window window, const DeviceLayout& baseLayout, Configuration::ContextLoss configuration );
+  static Adaptor& New( Window window, Configuration::ContextLoss configuration );
 
   /**
    * @brief Create a new adaptor using render surface.
    *
    * @param[in] nativeWindow native window handle
    * @param[in] surface The surface to draw onto
-   * @note The default base layout DeviceLayout::DEFAULT_BASE_LAYOUT will be used.
    * @return a reference to the adaptor handle
    */
   static Adaptor& New( Any nativeWindow, const Dali::RenderSurface& surface );
@@ -141,11 +147,10 @@ public:
    *
    * @param[in] nativeWindow native window handle
    * @param[in] surface The surface to draw onto
-   * @param[in] baseLayout  The base layout that the application has been written for
    * @param[in] configuration The context loss configuration.
    * @return a reference to the adaptor handle
    */
-  static Adaptor& New( Any nativeWindow, const Dali::RenderSurface& surface, const DeviceLayout& baseLayout, Configuration::ContextLoss configuration = Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS);
+  static Adaptor& New( Any nativeWindow, const Dali::RenderSurface& surface, Configuration::ContextLoss configuration = Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS);
 
   /**
    * @brief Virtual Destructor.
@@ -178,6 +183,7 @@ public:
 
   /**
    * @brief Ensures that the function passed in is called from the main loop when it is idle.
+   * @note Function must be called from the main event thread only.
    *
    * A callback of the following type may be used:
    * @code
@@ -252,6 +258,13 @@ public:
   static bool IsAvailable();
 
   /**
+   * @brief Call this method to notify Dali when scene is created and initialized.
+   *
+   * Notify Adaptor that the scene has been created.
+   */
+  void NotifySceneCreated();
+
+  /**
    * @brief Call this method to notify Dali when the system language changes.
    *
    * Use this only when NOT using Dali::Application, As Application created using
@@ -279,11 +292,11 @@ public:
   void FeedTouchPoint( TouchPoint& point, int timeStamp );
 
   /**
-   * @brief Feed a mouse wheel event to the adaptor.
+   * @brief Feed a wheel event to the adaptor.
    *
-   * @param[in]  wheelEvent mouse wheel event
+   * @param[in]  wheelEvent wheel event
    */
-  void FeedWheelEvent( MouseWheelEvent& wheelEvent );
+  void FeedWheelEvent( WheelEvent& wheelEvent );
 
   /**
    * @brief Feed a key event to the adaptor.
@@ -292,6 +305,21 @@ public:
    */
   void FeedKeyEvent( KeyEvent& keyEvent );
 
+  /**
+   * @copydoc Dali::Core::SceneCreated();
+   */
+  void SceneCreated();
+
+  /**
+   * @copydoc Dali::Application::SetViewMode();
+   */
+  void SetViewMode( ViewMode viewMode );
+
+  /**
+   * @copydoc Dali::Application::SetStereoBase();
+   */
+  void SetStereoBase( float stereoBase );
+
 public:  // Signals
 
   /**