2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.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
9 // http://www.tizenopensource.org/license
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.
17 #ifndef _UIGESTUREDETECTOR_H_
18 #define _UIGESTUREDETECTOR_H_
26 * [UiGestureDetector] UiApp must inherit from UiApp class
27 * which provides basic features necessary to define an UiApp.
29 class UiGestureDetector
30 : public Osp::App::UiApp
31 , public Osp::System::IScreenEventListener
35 * [Test] UiApp must have a factory method that creates an instance of itself.
37 static Osp::App::UiApp* CreateInstance(void);
41 virtual~UiGestureDetector();
45 // Called when the UiApp is initializing.
46 bool OnAppInitializing(Osp::App::AppRegistry& appRegistry);
48 // Called when the UiApp initializing is finished.
49 bool OnAppInitialized(void);
51 // Called when the UiApp is requested to terminate.
52 bool OnAppWillTerminate(void);
54 // Called when the UiApp is terminating.
55 bool OnAppTerminating(Osp::App::AppRegistry& appRegistry, bool forcedTermination = false);
57 // Called when the UiApp's frame moves to the top of the screen.
58 void OnForeground(void);
60 // Called when this UiApp's frame is moved from top of the screen to the background.
61 void OnBackground(void);
63 // Called when the system memory is not sufficient to run the UiApp any further.
64 void OnLowMemory(void);
66 // Called when the battery level changes.
67 void OnBatteryLevelChanged(Osp::System::BatteryLevel batteryLevel);
69 // Called when the screen turns on.
70 void OnScreenOn (void);
72 // Called when the screen turns off.
73 void OnScreenOff (void);