[dali_1.9.1] Merge branch 'devel/master'
[platform/core/uifw/dali-adaptor.git] / dali / internal / adaptor / common / application-impl.h
old mode 100644 (file)
new mode 100755 (executable)
index d8d1fce..82826cd
 
 // INTERNAL INCLUDES
 #include <dali/public-api/adaptor-framework/application.h>
-#include <dali/devel-api/adaptor-framework/singleton-service.h>
+#include <dali/devel-api/common/singleton-service.h>
 
 #include <dali/internal/adaptor/common/framework.h>
-#include <dali/internal/window-system/common/window-impl.h>
 #include <dali/internal/system/common/environment-options.h>
 #include <dali/internal/adaptor/common/adaptor-builder-impl.h>
 
@@ -148,43 +147,38 @@ public:
   static std::string GetResourcePath();
 
   /**
+   * @copydoc Dali::DevelApplication::GetDataPath()
+   */
+  static std::string GetDataPath();
+
+  /**
    * Retrieves the pre-initialized application.
    *
    * @return A pointer to the pre-initialized application
    */
   static ApplicationPtr GetPreInitializedApplication();
 
-public: // Lifecycle functionality
-
-  /**
-   * Called when OnInit is called or the framework is initialised.
-   */
-  void DoInit();
-
-  /**
-   * Called after OnInit is called or the framework is started.
-   */
-  void DoStart();
+public: // Stereoscopy
 
   /**
-   * Called when OnTerminate is called or the framework is terminated.
+   * @copydoc Dali::Application::SetViewMode()
    */
-  void DoTerminate();
+  void SetViewMode( ViewMode viewMode );
 
   /**
-   * Called when OnPause is called or the framework is paused.
+   * @copydoc Dali::Application::GetViewMode()
    */
-  void DoPause();
+  ViewMode GetViewMode() const;
 
   /**
-   * Called when OnResume is called or the framework resumes from a paused state.
+   * @copydoc Dali::Application::SetStereoBase()
    */
-  void DoResume();
+  void SetStereoBase( float stereoBase );
 
   /**
-   * Called when OnLanguageChanged is called or the framework informs the application that the language of the device has changed.
+   * @copydoc Dali::Application::GetStereoBase()
    */
-  void DoLanguageChange();
+  float GetStereoBase() const;
 
 public: // From Framework::Observer
 
@@ -239,6 +233,16 @@ public: // From Framework::Observer
   */
   virtual void OnMemoryLow( Dali::DeviceStatus::Memory::Status status );
 
+  /**
+   * Called when the framework informs the application that the platform surface is created.
+   */
+  virtual void OnSurfaceCreated( Any newSurface );
+
+  /**
+   * Called when the framework informs the application that the platform surface is destroyed.
+   */
+  virtual void OnSurfaceDestroyed( Any newSurface );
+
 public:
 
   /**
@@ -254,6 +258,14 @@ public:
    */
   void SetStyleSheet( const std::string& stylesheet );
 
+  /**
+   * Sets a command line options.
+   * This is used in case of the preinitialized application.
+   * @param[in] argc A pointer to the number of arguments
+   * @param[in] argv A pointer to the argument list
+   */
+  void SetCommandLineOptions( int* argc, char **argv[] );
+
 public:  // Signals
 
   /**
@@ -386,7 +398,6 @@ private:
   Dali::Configuration::ContextLoss      mContextLossConfiguration;
   CommandLineOptions*                   mCommandLineOptions;
 
-  Dali::SingletonService                   mSingletonService;
   Dali::Internal::Adaptor::AdaptorBuilder* mAdaptorBuilder;   ///< The adaptor builder
   Dali::Adaptor*                           mAdaptor;
 
@@ -396,15 +407,20 @@ private:
   Dali::Application::WINDOW_MODE           mMainWindowMode;   ///< Window mode of the main window
   std::string                              mMainWindowName;   ///< Name of the main window as obtained from environment options
 
+  bool                                     mMainWindowReplaced;   ///< Whether the main window has been replaced
+
   std::string                              mStylesheet;
   EnvironmentOptions                       mEnvironmentOptions;
   PositionSize                             mWindowPositionSize;
   Launchpad::State                         mLaunchpadState;
   bool                                     mUseRemoteSurface;
 
-  SlotDelegate< Application >           mSlotDelegate;
+  SlotDelegate< Application >              mSlotDelegate;
+
+  ViewMode                                 mViewMode;
+  float                                    mStereoBase;
 
-  static ApplicationPtr                 gPreInitializedApplication;
+  static ApplicationPtr                    gPreInitializedApplication;
 };
 
 inline Application& GetImplementation(Dali::Application& application)