1 #ifndef __DALI_WIDGET_APPLICATION_H__
2 #define __DALI_WIDGET_APPLICATION_H__
5 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/object/base-handle.h>
23 #include <dali/public-api/signals/dali-signal.h>
24 #include <dali/public-api/signals/callback.h>
29 namespace Internal DALI_INTERNAL
33 class WidgetApplication;
39 class DALI_IMPORT_API WidgetApplication : public BaseHandle
43 typedef Signal< void (WidgetApplication&) > AppSignalType; ///< Application lifecycle signal and system signal callback type
48 * @brief This is the constructor for WidgetApplications with a name.
50 * @param[in,out] argc A pointer to the number of arguments
51 * @param[in,out] argv A pointer to the argument list
52 * @param[in] stylesheet The path to user defined theme file
53 * @return A handle to the WidgetApplication
54 * @note If the stylesheet is not specified, then the library's default stylesheet will not be overridden.
56 static WidgetApplication New( int* argc, char **argv[], const std::string& stylesheet );
59 * @brief The default constructor.
65 * @brief Copy Constructor.
66 * @param[in] WidgetApplication Handle to an object
68 WidgetApplication( const WidgetApplication& widgetApplication );
71 * @brief Assignment operator.
72 * @param[in] WidgetApplication Handle to an object
73 * @return A reference to this
75 WidgetApplication& operator=( const WidgetApplication& widgetApplication );
84 * @brief This starts the application.
89 * @brief This quits the application. Tizen applications should use Lower to improve re-start performance unless they need to Quit completely.
95 * @return the window for widget instance.
100 * @brief Get path application resources are stored at
101 * @return the full path of the resources
104 static std::string GetResourcePath();
109 * @brief The user should connect to this signal to determine when they should initialize
111 * @return The signal to connect to
113 AppSignalType& InitSignal();
116 * @brief The user should connect to this signal to determine when they should terminate
118 * @return The signal to connect to
120 AppSignalType& TerminateSignal();
123 * @brief This signal is emitted when the language is changed on the device.
124 * @return The signal to connect to
126 AppSignalType& LanguageChangedSignal();
129 * @brief This signal is emitted when the region of the device is changed.
130 * @return The signal to connect to
132 AppSignalType& RegionChangedSignal();
135 * @brief This signal is emitted when the battery level of the device is low.
136 * @return The signal to connect to
138 AppSignalType& BatteryLowSignal();
141 * @brief This signal is emitted when the memory level of the device is low.
142 * @return The signal to connect to
144 AppSignalType& MemoryLowSignal();
146 public: // Not intended for application developers
149 * @brief Internal constructor.
151 explicit DALI_INTERNAL WidgetApplication(Internal::Adaptor::WidgetApplication* widgetApplication);
157 #endif // ___DALI_WIDGET_APPLICATION_H__