2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
20 #include "BasicAppFrame.h"
22 using namespace Tizen::App;
23 using namespace Tizen::Base;
24 using namespace Tizen::System;
25 using namespace Tizen::Ui::Controls;
27 BasicApp::BasicApp(void)
31 BasicApp::~BasicApp(void)
36 BasicApp::CreateInstance(void)
38 // Create the instance through the constructor.
39 return new (std::nothrow) BasicApp();
43 BasicApp::OnAppInitializing(AppRegistry& appRegistry)
46 String lastPanelName(L"");
47 String panelIDkey(L"AppLastPanelId");
48 String panelNamekey(L"AppLastPanelName");
50 result r = appRegistry.Get(panelIDkey, lastPanelId);
51 if (r == E_KEY_NOT_FOUND)
54 appRegistry.Add(panelIDkey, lastPanelId);
57 r = appRegistry.Get(panelNamekey, lastPanelName);
58 if (r == E_KEY_NOT_FOUND)
60 appRegistry.Add(panelNamekey, L"Panel1");
64 BasicAppFrame* pBasicAppFrame = new (std::nothrow) BasicAppFrame();
65 pBasicAppFrame->Initialize(lastPanelId);
66 pBasicAppFrame->SetName(L"BasicApp");
67 AddFrame(*pBasicAppFrame);
73 BasicApp::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination)
79 BasicApp::OnForeground(void)
84 BasicApp::OnBackground(void)
89 BasicApp::OnLowMemory(void)
94 BasicApp::OnBatteryLevelChanged(BatteryLevel batteryLevel)
99 BasicApp::OnScreenOn (void)
104 BasicApp::OnScreenOff (void)