[Tizen] Remove graphics-api relative codes in public-api/application.h
[platform/core/uifw/dali-adaptor.git] / dali / public-api / adaptor-framework / application.h
index c264e46..90ed7b5 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_APPLICATION_H
 
 /*
- * Copyright (c) 2020 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.
 #include <dali/public-api/signals/callback.h>
 
 // INTERNAL INCLUDES
-#include <dali/public-api/adaptor-framework/application-configuration.h>
 #include <dali/public-api/adaptor-framework/device-status.h>
 #include <dali/public-api/adaptor-framework/window.h>
 
 namespace Dali
 {
-
 class ObjectRegistry;
 
 /**
@@ -43,7 +41,7 @@ namespace Adaptor
 {
 class Application;
 }
-}
+} // namespace DALI_INTERNAL
 /**
  * @brief An Application class object should be created by every application
  * that wishes to use Dali.
@@ -107,11 +105,10 @@ class Application;
 class DALI_ADAPTOR_API Application : public BaseHandle
 {
 public:
-
-  typedef Signal< void (DeviceStatus::Battery::Status) > LowBatterySignalType; ///< Application device signal type @SINCE_1_2.62
-  typedef Signal< void (DeviceStatus::Memory::Status) > LowMemorySignalType;   ///< Application device signal type @SINCE_1_2.62
-  typedef Signal< void (Application&) > AppSignalType;  ///< Application lifecycle signal and system signal callback type @SINCE_1_0.0
-  typedef Signal< void (Application&, void *) > AppControlSignalType; ///< Application control signal callback type @SINCE_1_0.0
+  typedef Signal<void(DeviceStatus::Battery::Status)> LowBatterySignalType; ///< Application device signal type @SINCE_1_2.62
+  typedef Signal<void(DeviceStatus::Memory::Status)>  LowMemorySignalType;  ///< Application device signal type @SINCE_1_2.62
+  typedef Signal<void(Application&)>                  AppSignalType;        ///< Application lifecycle signal and system signal callback type @SINCE_1_0.0
+  typedef Signal<void(Application&, void*)>           AppControlSignalType; ///< Application control signal callback type @SINCE_1_0.0
 
   /**
    * @brief Enumeration for deciding whether a Dali application window is opaque or transparent.
@@ -119,12 +116,11 @@ public:
    */
   enum WINDOW_MODE
   {
-    OPAQUE = 0,       ///< The window will be opaque @SINCE_1_0.0
-    TRANSPARENT = 1   ///< The window transparency will match the alpha value set in Dali::Stage::SetBackgroundcolor() @SINCE_1_0.0
+    OPAQUE      = 0, ///< The window will be opaque @SINCE_1_0.0
+    TRANSPARENT = 1  ///< The window transparency will match the alpha value set in Dali::Stage::SetBackgroundcolor() @SINCE_1_0.0
   };
 
 public:
-
   /**
    * @brief This is the constructor for applications without an argument list.
    * @SINCE_1_0.0
@@ -144,7 +140,7 @@ public:
    * @param[in,out]  argv        A pointer to the argument list
    * @return A handle to the Application
    */
-  static Application New( int* argc, char **argv[] );
+  static Application New(int* argc, char** argv[]);
 
   /**
    * @brief This is the constructor for applications with a name.
@@ -158,7 +154,7 @@ public:
    * @return A handle to the Application
    * @note If the stylesheet is not specified, then the library's default stylesheet will not be overridden.
    */
-  static Application New( int* argc, char **argv[], const std::string& stylesheet );
+  static Application New(int* argc, char** argv[], const std::string& stylesheet);
 
   /**
    * @brief This is the constructor for applications with a name.
@@ -173,7 +169,7 @@ public:
    * @return A handle to the Application
    * @note If the stylesheet is not specified, then the library's default stylesheet will not be overridden.
    */
-  static Application New( int* argc, char **argv[], const std::string& stylesheet, WINDOW_MODE windowMode );
+  static Application New(int* argc, char** argv[], const std::string& stylesheet, WINDOW_MODE windowMode);
 
   /**
    * @brief This is the constructor for applications.
@@ -189,7 +185,7 @@ public:
    * @return A handle to the Application
    * @note If the stylesheet is not specified, then the library's default stylesheet will not be overridden.
    */
-  static Application New( int* argc, char **argv[], const std::string& stylesheet, Application::WINDOW_MODE windowMode, PositionSize positionSize );
+  static Application New(int* argc, char** argv[], const std::string& stylesheet, Application::WINDOW_MODE windowMode, PositionSize positionSize);
 
   /**
    * @brief Constructs an empty handle.
@@ -202,7 +198,7 @@ public:
    * @SINCE_1_0.0
    * @param[in] application Handle to an object
    */
-  Application( const Application& application );
+  Application(const Application& application);
 
   /**
    * @brief Assignment operator.
@@ -210,7 +206,24 @@ public:
    * @param[in] application Handle to an object
    * @return A reference to this
    */
-  Application& operator=( const Application& application );
+  Application& operator=(const Application& application);
+
+  /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.24
+   * @param[in] rhs A reference to the moved handle
+   */
+  Application(Application&& rhs);
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.24
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  Application& operator=(Application&& rhs);
 
   /**
    * @brief Destructor.
@@ -224,22 +237,13 @@ public:
   /**
    * @brief This starts the application.
    *
-   * Choosing this form of main loop indicates that the default
-   * application configuration of APPLICATION_HANDLES_CONTEXT_LOSS is used. On platforms where
-   * context loss can occur, the application is responsible for tearing down and re-loading UI.
-   * The application should listen to Stage::ContextLostSignal and Stage::ContextRegainedSignal.
-   * @SINCE_1_0.0
-   */
-  void MainLoop();
-
-  /**
-   * @brief This starts the application, and allows the app to choose a different configuration.
+   * On platforms where context loss can occur, the application is responsible for tearing down and
+   * re-loading UI.  The application should listen to Stage::ContextLostSignal and
+   * Stage::ContextRegainedSignal.
    *
-   * The application should listen to Stage::ContextLostSignal and Stage::ContextRegainedSignal.
    * @SINCE_1_0.0
-   * @param[in] configuration The context loss configuration
    */
-  void MainLoop(Configuration::ContextLoss configuration);
+  void MainLoop();
 
   /**
    * @brief This lowers the application to bottom without actually quitting it.
@@ -269,7 +273,7 @@ public:
    *
    * @note Ownership of the callback is passed onto this class.
    */
-  bool AddIdle( CallbackBase* callback );
+  bool AddIdle(CallbackBase* callback);
 
   /**
    * @brief Retrieves the main window used by the Application class.
@@ -314,8 +318,7 @@ public:
    */
   ObjectRegistry GetObjectRegistry() const;
 
-public:  // Signals
-
+public: // Signals
   /**
    * @brief The user should connect to this signal to determine when they should initialize
    * their application.