Tizen 2.1 base
[sdk/ide/native-sample.git] / samples / native / cpp / Sample / Tizen C++ / UiControlAnimator / UiControlAnimator / project / src / UiControlAnimator.cpp
1 //
2 // Tizen C++ SDK
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.tizenopensource.org/license
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 #include "UiControlAnimator.h"
19 #include "FormManager.h"
20
21 using namespace Osp::App;
22 using namespace Osp::Base;
23 using namespace Osp::System;
24 using namespace Osp::Ui;
25 using namespace Osp::Ui::Controls;
26
27 UiControlAnimator::UiControlAnimator(void)
28 {
29 }
30
31 UiControlAnimator::~UiControlAnimator(void)
32 {
33 }
34
35 Application*
36 UiControlAnimator::CreateInstance(void)
37 {
38         return new (std::nothrow) UiControlAnimator();
39 }
40
41 bool
42 UiControlAnimator::OnAppInitializing(AppRegistry& appRegistry)
43 {
44         Frame* pAppMainFrame = new (std::nothrow) Frame();
45         pAppMainFrame->Construct();
46         AddFrame(*pAppMainFrame);
47
48         FormManager* pFormManager = new (std::nothrow) FormManager();
49         pFormManager->Initialize();
50
51         pAppMainFrame->AddControl(*pFormManager);
52
53         pFormManager->SendUserEvent(FormManager::REQUEST_ID_MAIN_FORM, null);
54
55         return true;
56 }
57
58 bool
59 UiControlAnimator::OnAppInitialized(void)
60 {
61         return true;
62 }
63
64 bool
65 UiControlAnimator::OnAppWillTerminate(void)
66 {
67         return true;
68 }
69
70 bool
71 UiControlAnimator::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination)
72 {
73         return true;
74 }
75
76 void
77 UiControlAnimator::OnForeground(void)
78 {
79 }
80
81 void
82 UiControlAnimator::OnBackground(void)
83 {
84 }
85
86 void
87 UiControlAnimator::OnLowMemory(void)
88 {
89 }
90
91 void
92 UiControlAnimator::OnBatteryLevelChanged(BatteryLevel batteryLevel)
93 {
94 }
95
96 void
97 UiControlAnimator::OnScreenOn (void)
98 {
99 }
100
101 void
102 UiControlAnimator::OnScreenOff (void)
103 {
104 }