Revert "[Tizen] Add DALi Autofill implementation"
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / component-application.h
1 #ifndef DALI_COMPONENT_APPLICATION_H\r
2 #define DALI_COMPONENT_APPLICATION_H\r
3 \r
4 /*\r
5  * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
6  *\r
7  * Licensed under the Apache License, Version 2.0 (the "License");\r
8  * you may not use this file except in compliance with the License.\r
9  * You may obtain a copy of the License at\r
10  *\r
11  * http://www.apache.org/licenses/LICENSE-2.0\r
12  *\r
13  * Unless required by applicable law or agreed to in writing, software\r
14  * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * See the License for the specific language governing permissions and\r
17  * limitations under the License.\r
18  *\r
19  */\r
20 \r
21 // INTERNAL INCLUDES\r
22 #include <dali/public-api/adaptor-framework/application.h>\r
23 \r
24 namespace Dali\r
25 {\r
26 namespace Internal DALI_INTERNAL\r
27 {\r
28 \r
29 namespace Adaptor\r
30 {\r
31 class ComponentApplication;\r
32 }\r
33 \r
34 }\r
35 \r
36 /**\r
37  * @brief An ComponentApplication class object should be created by every component-based application\r
38  * that wishes to use Dali.\r
39  *\r
40  * Component application draw multiple UI applications based on frame components.\r
41  * component application can draw multiple UIs in one process.\r
42  *\r
43  * It provides a means for initializing the\r
44  * resources required by the Dali::Core.\r
45  *\r
46  * The ComponentApplication class emits several signals which the user can\r
47  * connect to.  The user should not create any Dali objects in the main\r
48  * function and instead should connect to the Init signal of the\r
49  * ComponentApplication and create the Dali Widget object in the connected callback.\r
50  *\r
51  */\r
52 class DALI_ADAPTOR_API ComponentApplication : public Application\r
53 {\r
54 public:\r
55   typedef Signal< Any () > CreateSignalType;\r
56 \r
57 public:\r
58   /**
59    * @brief This is the constructor for component applications without an argument list.\r
60    * @return A handle to the ComponentApplication\r
61    */\r
62   static ComponentApplication New( );\r
63
64   /**
65    * @brief This is the constructor for component applications.\r
66    *\r
67    * @param[in,out]  argc        A pointer to the number of arguments
68    * @param[in,out]  argv        A pointer to the argument list\r
69    * @return A handle to the ComponentApplication\r
70    */\r
71   static ComponentApplication New( int* argc, char **argv[] );\r
72
73   /**
74    * @brief This is the constructor for component applications with a stylesheet\r
75    *\r
76    * @param[in,out]  argc        A pointer to the number of arguments
77    * @param[in,out]  argv        A pointer to the argument list\r
78    * @param[in]      stylesheet  The path to user defined theme file
79    * @return A handle to the ComponentApplication\r
80    */\r
81   static ComponentApplication New( int* argc, char **argv[], const std::string& stylesheet );\r
82 \r
83   /**\r
84    * @brief The default constructor.\r
85    */\r
86   ComponentApplication() = default;\r
87 \r
88   /**\r
89    * @brief Copy Constructor.\r
90    *\r
91    * @param[in] componentApplication Handle to an object\r
92    */\r
93   ComponentApplication( const ComponentApplication& componentApplication ) = default;\r
94 \r
95   /**\r
96    * @brief Assignment operator.\r
97    *\r
98    * @param[in] componentApplication Handle to an object\r
99    * @return A reference to this\r
100    */\r
101   ComponentApplication& operator=( const ComponentApplication& componentApplication ) = default;\r
102 \r
103  /**\r
104    * @brief Destructor\r
105    */\r
106   ~ComponentApplication() = default;\r
107 \r
108  /**\r
109   * @brief The user should connect to this signal to determine when they should initialize\r
110   * their application.\r
111   * The callback function is called before the main loop of the application starts.\r
112   * @return The signal to connect to\r
113   */\r
114   CreateSignalType& CreateSignal();\r
115 \r
116 public:\r
117   /// @cond internal\r
118   /**\r
119    * @brief Internal constructor.\r
120    */\r
121   explicit DALI_INTERNAL ComponentApplication(Internal::Adaptor::ComponentApplication* componentApplication);\r
122   /// @endcond\r
123 };\r
124 } // namespace Dali\r
125 \r
126 #endif // DALI_COMPONENT_APPLICATION_H\r
127 \r