New window is set to the layout direction of tyhe default window.
[platform/core/uifw/dali-adaptor.git] / dali / internal / adaptor / common / adaptor-impl.h
index 31fd83a..5d0e63a 100755 (executable)
@@ -20,7 +20,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/vector-wrapper.h>
-#include <dali/public-api/common/view-mode.h>
 #include <dali/public-api/math/rect.h>
 #include <dali/public-api/signals/callback.h>
 #include <dali/public-api/math/uint-16-pair.h>
@@ -54,6 +53,7 @@ namespace Integration
 class Core;
 class GlAbstraction;
 class Processor;
+class AddOnManager;
 }
 
 namespace Internal
@@ -102,6 +102,22 @@ public:
    *                                  - Window, adaptor will use existing Window to draw on to
    * @param[in]  configuration       The context loss configuration ( to choose resource discard policy )
    * @param[in]  environmentOptions  A pointer to the environment options. If NULL then one is created.
+   * @param[in]  threadMode          The mode of the Adaptor
+   */
+  static Dali::Adaptor* New( Dali::Integration::SceneHolder window,
+                             Dali::RenderSurfaceInterface* surface,
+                             Dali::Configuration::ContextLoss configuration,
+                             EnvironmentOptions* environmentOptions,
+                             ThreadMode threadMode );
+
+  /**
+   * Creates a New Adaptor
+   * @param[in]  window              The window handle
+   * @param[in]  surface             A render surface can be one of the following
+   *                                  - Pixmap, adaptor will use existing Pixmap to draw on to
+   *                                  - Window, adaptor will use existing Window to draw on to
+   * @param[in]  configuration       The context loss configuration ( to choose resource discard policy )
+   * @param[in]  environmentOptions  A pointer to the environment options. If NULL then one is created.
    */
   static Dali::Adaptor* New( Dali::Integration::SceneHolder window,
                              Dali::RenderSurfaceInterface* surface,
@@ -127,6 +143,24 @@ public:
    *                                  - Window, adaptor will use existing Window to draw on to
    * @param[in]  configuration       The context loss configuration ( to choose resource discard policy )
    * @param[in]  environmentOptions  A pointer to the environment options. If NULL then one is created.
+   * @param[in]  threadMode          The ThreadMode of the Adaptor
+   */
+  static Dali::Adaptor* New( GraphicsFactory& graphicsFactory,
+                             Dali::Integration::SceneHolder window,
+                             Dali::RenderSurfaceInterface* surface,
+                             Dali::Configuration::ContextLoss configuration,
+                             EnvironmentOptions* environmentOptions,
+                             ThreadMode threadMode );
+
+  /**
+   * Creates a New Adaptor
+   * @param[in]  graphicsFactory     A factory that creates the graphics interface
+   * @param[in]  window              The window handle
+   * @param[in]  surface             A render surface can be one of the following
+   *                                  - Pixmap, adaptor will use existing Pixmap to draw on to
+   *                                  - Window, adaptor will use existing Window to draw on to
+   * @param[in]  configuration       The context loss configuration ( to choose resource discard policy )
+   * @param[in]  environmentOptions  A pointer to the environment options. If NULL then one is created.
    */
   static Dali::Adaptor* New( GraphicsFactory& graphicsFactory,
                              Dali::Integration::SceneHolder window,
@@ -212,7 +246,7 @@ public: // AdaptorInternalServices implementation
   /**
    * @copydoc Dali::EventFeeder::FeedWheelEvent()
    */
-  virtual void FeedWheelEvent( WheelEvent& wheelEvent );
+  virtual void FeedWheelEvent( Dali::WheelEvent& wheelEvent );
 
   /**
    * @copydoc Dali::EventFeeder::FeedKeyEvent()
@@ -249,14 +283,8 @@ public: // AdaptorInternalServices implementation
   /**
    * Adds a new Window instance to the Adaptor
    * @param[in]  childWindow The child window instance
-   * @param[in]  childWindowName The child window title/name
-   * @param[in]  childWindowClassName The class name that the child window belongs to
-   * @param[in]  childWindowMode The mode of the child window
    */
-  virtual bool AddWindow( Dali::Integration::SceneHolder childWindow,
-                          const std::string& childWindowName,
-                          const std::string& childWindowClassName,
-                          bool childWindowMode );
+  virtual bool AddWindow( Dali::Integration::SceneHolder childWindow );
 
   /**
    * Removes an existing Window instance from the Adaptor
@@ -316,6 +344,11 @@ public: // AdaptorInternalServices implementation
    */
   Dali::SceneHolderList GetSceneHolders() const;
 
+  /**
+   * @copydoc Dali::Adaptor::GetObjectRegistry()
+   */
+  Dali::ObjectRegistry GetObjectRegistry() const;
+
 public:
 
   /**
@@ -634,8 +667,9 @@ private:
    *                          - Pixmap, adaptor will use existing Pixmap to draw on to
    *                          - Window, adaptor will use existing Window to draw on to
    * @param[in]  environmentOptions  A pointer to the environment options. If NULL then one is created.
+   * @param[in]  threadMode   The ThreadMode of the Adaptor
    */
-  Adaptor( Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions );
+  Adaptor( Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions, ThreadMode threadMode );
 
 private: // Types
 
@@ -689,6 +723,9 @@ private: // Data
   ThreadMode                            mThreadMode;                  ///< The thread mode
   const bool                            mEnvironmentOptionsOwned:1;   ///< Whether we own the EnvironmentOptions (and thus, need to delete it)
   bool                                  mUseRemoteSurface:1;          ///< whether the remoteSurface is used or not
+  Dali::LayoutDirection::Type           mRootLayoutDirection;         ///< LayoutDirection of window
+
+  std::unique_ptr<Integration::AddOnManager> mAddOnManager;           ///< Pointer to the addon manager
 
 public:
   inline static Adaptor& GetImplementation(Dali::Adaptor& adaptor) { return *adaptor.mImpl; }