Revert "[Tizen] Add Finalize api for imf-manager"
[platform/core/uifw/dali-adaptor.git] / adaptors / devel-api / adaptor-framework / application-devel.h
1 #ifndef DALI_APPLICATION_DEVEL_H
2 #define DALI_APPLICATION_DEVEL_H
3
4 /*
5  * Copyright (c) 2017 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #ifdef DALI_ADAPTOR_COMPILATION  // full path doesn't exist until adaptor is installed so we have to use relative
23 #include <application.h>
24 #else
25 #include <dali/public-api/adaptor-framework/application.h>
26 #endif
27
28 namespace Dali
29 {
30
31 namespace DevelApplication
32 {
33
34 /*
35  * @brief An enum of memory status.
36  */
37 struct MemoryStatus
38 {
39   enum Type
40   {
41     /*
42      * Normal status.
43      */
44     NORMAL,
45
46     /*
47      * Soft warning status.
48      */
49     SOFT_WARNING,
50
51     /*
52      * Hard warning status.
53      */
54     HARD_WARNING
55   };
56 };
57
58 /*
59  * @brief An enum of battery status.
60  */
61 struct BatteryStatus
62 {
63   enum Type
64   {
65     /*
66      * Normal status.
67      * Battery status is over 5%.
68      */
69     NORMAL,
70
71     /*
72      * Battery status is under 5%.
73      */
74     CRITICAL_LOW,
75
76     /*
77      * Device can be turned off anytime.
78      * Battery status is under 1%.
79      */
80     POWER_OFF
81   };
82 };
83
84 typedef Signal< void (BatteryStatus::Type) > LowBatterySignalType;
85 typedef Signal< void (MemoryStatus::Type) > LowMemorySignalType;
86
87 /**
88  * @brief This is the constructor for applications.
89  *
90  * @PRIVLEVEL_PUBLIC
91  * @PRIVILEGE_DISPLAY
92  * @param[in,out]  argc         A pointer to the number of arguments
93  * @param[in,out]  argv         A pointer to the argument list
94  * @param[in]      stylesheet   The path to user defined theme file
95  * @param[in]      windowMode   A member of WINDOW_MODE
96  * @param[in]      positionSize A position and a size of the window
97  * @return A handle to the Application
98  * @note If the stylesheet is not specified, then the library's default stylesheet will not be overridden.
99  */
100 DALI_IMPORT_API Application New( int* argc, char **argv[], const std::string& stylesheet, Application::WINDOW_MODE windowMode, PositionSize positionSize );
101
102 /**
103  * @brief This is used to improve application launch performance.
104  * It preloads so files, initializes some functions in advance and makes a window in advance.
105  *
106  * @param[in,out]  argc         A pointer to the number of arguments
107  * @param[in,out]  argv         A pointer to the argument list
108  */
109 DALI_IMPORT_API void PreInitialize( int* argc, char** argv[] );
110
111 /**
112  * @brief This is used to get region information from device.
113  *
114  * @return Region information
115  */
116 DALI_IMPORT_API std::string GetRegion( Application application );
117
118 /**
119  * @brief This is used to get language information from device.
120  *
121  * @return Language information
122  */
123 DALI_IMPORT_API std::string GetLanguage( Application application );
124
125 /**
126  * @brief This signal is emitted when the battery level of the device is low.
127  * @SINCE_1_0.0
128  * @return The signal to connect to
129  */
130 DALI_IMPORT_API LowBatterySignalType& LowBatterySignal( Application application );
131
132 /**
133  * @brief This signal is emitted when the memory level of the device is low.
134  * @SINCE_1_0.0
135  * @return The signal to connect to
136  */
137 DALI_IMPORT_API LowMemorySignalType& LowMemorySignal( Application application );
138
139
140 } // namespace DevelApplication
141
142 } // namespace Dali
143
144 #endif // DALI_APPLICATION_DEVEL_H