[Tizen] Remove graphics-api relative codes in public-api/application.h
[platform/core/uifw/dali-adaptor.git] / dali / internal / adaptor / common / application-impl.h
index 2598df7..ed03bfa 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_APPLICATION_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -75,14 +75,15 @@ public:
 
   /**
    * Create a new application
-   * @param[in]  argc         A pointer to the number of arguments
-   * @param[in]  argv         A pointer to the argument list
-   * @param[in]  stylesheet   The path to user defined theme file
-   * @param[in]  windowMode   A member of Dali::Application::WINDOW_MODE
-   * @param[in]  positionSize A position and a size of the window
-   * @param[in]  applicationType  A member of Dali::Framework::Type
+   * @param[in]  argc              A pointer to the number of arguments
+   * @param[in]  argv              A pointer to the argument list
+   * @param[in]  stylesheet        The path to user defined theme file
+   * @param[in]  windowMode        A member of Dali::Application::WINDOW_MODE
+   * @param[in]  positionSize      A position and a size of the window
+   * @param[in]  applicationType   A member of Dali::Framework::Type
+   * @param[in]  type              It is window type for default window.
    */
-  static ApplicationPtr New(int* argc, char** argv[], const std::string& stylesheet, WINDOW_MODE windowMode, const PositionSize& positionSize, Framework::Type applicationType);
+  static ApplicationPtr New(int* argc, char** argv[], const std::string& stylesheet, WINDOW_MODE windowMode, const PositionSize& positionSize, Framework::Type applicationType, WindowType type);
 
   /**
    * @copydoc Dali::DevelApplication::PreInitialize()
@@ -152,6 +153,11 @@ public:
    */
   static ApplicationPtr GetPreInitializedApplication();
 
+  /**
+   * Stores PositionSize of window
+   */
+  void StoreWindowPositionSize(PositionSize positionSize);
+
 public: // From Framework::Observer
   /**
    * Called when the framework is initialised.
@@ -230,6 +236,13 @@ public:
    */
   void SetCommandLineOptions(int* argc, char** argv[]);
 
+  /**
+   * Sets default window type.
+   * This is used in case of the preinitialized application.
+   * @param[in] type the window type for default window
+   */
+  void SetDefaultWindowType(WindowType type);
+
 public: // Signals
   /**
    * @copydoc Dali::Application::InitSignal()
@@ -311,20 +324,18 @@ public: // Signals
     return mLowMemorySignal;
   }
 
-  // Temporary to test GFXApi
-  Graphics::Controller& GetController();
-
 protected:
   /**
    * Private Constructor
-   * @param[in]  argc         A pointer to the number of arguments
-   * @param[in]  argv         A pointer to the argument list
-   * @param[in]  stylesheet   The path to user defined theme file
-   * @param[in]  windowMode   A member of Dali::Application::WINDOW_MODE
-   * @param[in]  positionSize A position and a size of the window
-   * @param[in]  applicationType  A member of Dali::Framework::Type
+   * @param[in]  argc               A pointer to the number of arguments
+   * @param[in]  argv               A pointer to the argument list
+   * @param[in]  stylesheet         The path to user defined theme file
+   * @param[in]  windowMode         A member of Dali::Application::WINDOW_MODE
+   * @param[in]  positionSize       A position and a size of the window
+   * @param[in]  applicationType    A member of Dali::Framework::Type
+   * @param[in]  type               The default window's type.
    */
-  Application(int* argc, char** argv[], const std::string& stylesheet, WINDOW_MODE windowMode, const PositionSize& positionSize, Framework::Type applicationType);
+  Application(int* argc, char** argv[], const std::string& stylesheet, WINDOW_MODE windowMode, const PositionSize& positionSize, Framework::Type applicationType, WindowType type);
 
   /**
    * Destructor
@@ -336,7 +347,7 @@ protected:
   Application& operator=(Application&);
 
   /**
-   * Creates the window
+   * Creates the default window
    */
   void CreateWindow();
 
@@ -355,6 +366,11 @@ protected:
    */
   void QuitFromMainLoop();
 
+  /**
+   * Changes size of preInitialized window
+   */
+  void ChangePreInitializedWindowSize();
+
 private:
   AppSignalType        mInitSignal;
   AppSignalType        mTerminateSignal;
@@ -386,6 +402,7 @@ private:
   PositionSize       mWindowPositionSize;
   Launchpad::State   mLaunchpadState;
   bool               mUseRemoteSurface;
+  WindowType         mDefaultWindowType; ///< Default window's type. It is used when Application is created.
 
   SlotDelegate<Application> mSlotDelegate;