Update privilege string, PackageAppInfo for wgt
[platform/framework/native/appfw.git] / src / app / FApp_ImeAppImpl.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file        FApp_ImeAppImpl.h
20  * @brief       This is the header file for the %_ImeAppImpl class.
21  */
22
23 #ifndef _FAPP_INTERNAL_IME_APP_IMPL_H_
24 #define _FAPP_INTERNAL_IME_APP_IMPL_H_
25
26 #include <app.h>
27
28 #include <FAppUiApp.h>
29 #include <FBaseRtIEventListener.h>
30
31 #include "FApp_UiAppImpl.h"
32
33 namespace Tizen { namespace Base { namespace Collection { class IList; } } }
34 namespace Tizen { namespace Ui {namespace Controls { class Frame; } } }
35
36 namespace Tizen { namespace App
37 {
38
39 class IAppFrame;
40 class _AppFrame;
41
42 /**
43  * @class       _ImeAppImpl
44  * @brief       This class is the Impl class of a IME application.
45  * @since 2.1
46  *
47  * This class is the Impl class of a IME application.
48  */
49 class _ImeAppImpl
50         : public Tizen::App::_UiAppImpl
51 {
52 public:
53         /**
54         * Returns the _ImeAppImpl's instance pointer.
55         *
56         * @since 2.1
57         * @return       A pointer to the %_ImeAppImpl instance, @n
58         *                       else @c null if it fails
59         */
60         static _ImeAppImpl* GetInstance(void);
61
62         /**
63         * Returns the UiApp's instance pointer.
64         *
65         * @since 2.1
66         * @return       A pointer to the %UiApp instance, @n
67         *                       else @c null if it fails
68         */
69         UiApp* GetUiAppInstance(void);
70
71         /**
72          * Called when the application is started
73          *
74          * @since 2.1
75          * @return      @c true if the method is successful, @n
76          *              else @c false
77          * @param[in]   user_data       The user data passed from the callback registration function
78          * @remarks     This is a system dependent callback function
79          */
80         virtual bool OnCreate(void);
81
82         /**
83          * Called when other application send the launch request to the application
84          *
85          * @since 2.1
86          * @param[in]   service The handle to the service
87          * @param[in]   user_data       The user data passed from the callback registration function
88          * @remarks     This is a system dependent callback function
89          */
90         virtual void OnService(service_s* service);
91
92         /**
93          * Called when the application is completely obscured by another application and becomes invisible
94          *
95          * @since 2.1
96          * @param[in]   user_data       The user data passed from the callback registration function
97          * @remarks     This is a system dependent callback function
98          */
99         virtual void OnPause(void);
100
101         /**
102          * Called when the application becomes visible
103          *
104          * @since 2.1
105          * @param[in]   user_data       The user data passed from the callback registration function
106          * @remarks     This is a system dependent callback function
107          */
108         virtual void OnResume(void);
109
110         /**
111          * Called once after the main loop of application exits
112          *
113          * @since 2.1
114          * @param[in]   user_data       The user data passed from the callback registration function
115          * @remarks     This is a system dependent callback function
116          */
117         virtual void OnTerminate(void);
118
119         /**
120          * Called when an orintation event occurs.
121          *
122          * @since 2.1
123          * @param[in]   orientation     The information about the orientation event
124          */
125         virtual void OnDeviceOrientationChanged(app_device_orientation_e orientation);
126
127         /**
128          * Called when the application's state changes to Tizen::App::AppState::INITIALIZING. @n
129          *
130          * @since 2.1
131          * @return      @c true if the method is successful, @n
132          *              else @c false
133          */
134         virtual bool OnAppInitializing(void);
135
136         /**
137          * Called when the application's INITIALIZING state is finished
138          *
139          * @since 2.1
140          * @return      @c true if the method is successful, @n
141          *                      else @c false
142          */
143         virtual bool OnAppInitialized(void);
144
145
146         /**
147          * Called when the internal window handle is required.
148          *
149          * @since 2.1
150          */
151         virtual long OnWindowHandleRequest(void);
152
153         /**
154          * Called when the application's state change to Tizen::App::AppState::TERMINATING. @n
155          *
156          * @since 2.1
157          * @param[in]   forcedTermination       @c true if the application terminate by system or other application, else @c false.
158          * @return      @c true if the method is successful, @n
159          *              else @c false
160          */
161         bool OnImeAppImplTerminating(void);
162
163 private:
164         /**
165          * This is the default constructor for this class.
166          *
167          * @since 2.1
168          */
169         _ImeAppImpl(void);
170
171         /**
172          * This is the constructor for this class.
173          *
174          * @since 2.1
175          */
176         _ImeAppImpl(UiApp* pUiApp);
177
178         /**
179          * This is the copy constructor for the this class.
180          */
181         _ImeAppImpl(const _ImeAppImpl& source);
182
183         /**
184          * This is the assignment operator for this class.
185          */
186         _ImeAppImpl& operator =(const _ImeAppImpl& source);
187
188         /**
189          * This is the destructor for this class.
190          *
191          * @since 2.1
192          */
193         virtual ~_ImeAppImpl(void);
194
195         /**
196          * Gets the UI state of the IME application.
197          *
198          * @since 2.1
199          * @return      The UI state of the IME application
200          */
201         AppUiState GetAppUiState(void) const;
202
203         void OnForeground(void);
204
205         void OnBackground(void);
206
207 private:
208         static _ImeAppImpl* __pImeAppImpl;
209
210         _AppImpl* __pAppImpl;
211
212         AppUiState __appUiState;
213
214         UiApp* __pUiApp;
215
216         friend class UiApp;
217 }; //_ImeAppImpl
218
219 } } //Tizen::App
220
221 #endif // _FAPP_INTERNAL_IME_APP_IMPL_H_