Fixed Nabi Issues N_SE-56966,56735
[apps/osp/Internet.git] / src / IntMainFrame.cpp
1 //
2
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.1 (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://floralicense.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 //!Internet InternetFrame class
19 /*@file:        IntInternetFrame.cpp
20  *@brief:       Internet Frame
21  */
22
23
24 #include <FApp.h>
25 #include <FSystem.h>
26 #include "IntMainFrame.h"
27 #include "IntSceneRegister.h"
28
29 using namespace Tizen::App;
30 using namespace Tizen::Base;
31 using namespace Tizen::System;
32 using namespace Tizen::Ui;
33 using namespace Tizen::Ui::Controls;
34
35 MainFrame::MainFrame(void)
36 {
37 //      SetBackgroundColor(Tizen::Graphics::Color(255,255,255));
38 }
39
40 MainFrame::~MainFrame(void)
41 {
42 }
43
44 result
45 MainFrame::OnInitializing(void)
46 {
47         result r = E_SUCCESS;
48
49         // SceneManagement initializing
50         SceneRegister::RegisterAllScenes();
51         AddFrameEventListener(*this);
52
53
54         return r;
55 }
56
57 result
58 MainFrame::OnTerminating(void)
59 {
60         result r = E_SUCCESS;
61
62         return r;
63 }
64
65 void
66 MainFrame::OnFrameActivated (const Tizen::Ui::Controls::Frame &source)
67 {
68         AppRegistry* pAppRegistry = App::GetInstance()->GetAppRegistry();
69         String sliderKey("SliderValue");
70
71         int sliderValue = 10;
72
73         result r = pAppRegistry->Get(sliderKey, sliderValue);
74         r = PowerManager::SetScreenBrightness(sliderValue);
75 //      r = PowerManager::RestoreScreenBrightness();
76
77         AppLog("Settingscreenbrightness to %d result %s",sliderValue , GetErrorMessage(r));
78 }