Fork for IVI: mesa fixing
[profile/ivi/uifw.git] / src / ui / FUi_AccessibilitySystemSettingLoader.cpp
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 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://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 #include "FUi_AccessibilitySystemSettingLoader.h"
19 #include "FUi_AccessibilityManager.h"
20 #include "FUi_EcoreEvasMgr.h"
21 #include "FUi_EcoreEvas.h"
22
23 using namespace Tizen::Base;
24
25 namespace Tizen { namespace Ui {
26
27 bool _activated = false;
28 bool _screenReaderActivated = false;
29
30 _AccessibilitySystemSettingLoader::_AccessibilitySystemSettingLoader(_AccessibilityManager& manager)
31         : __pManager(&manager)
32 {
33         _screenReaderActivated = IsScreenReaderActivated();
34         _activated = _screenReaderActivated;
35 }
36 _AccessibilitySystemSettingLoader::~_AccessibilitySystemSettingLoader(void)
37 {
38 }
39 void
40 _AccessibilitySystemSettingLoader::OnSettingChanged(String& key)
41 {
42 }
43
44 bool
45 _AccessibilitySystemSettingLoader::IsAccessibilityActivated(void)
46 {
47         return _activated;
48 }
49 bool
50 _AccessibilitySystemSettingLoader::IsScreenReaderActivated(void)
51 {
52         return GetEcoreEvasMgr()->GetEcoreEvas()->IsAccessibilityScreenReaderActivated();
53 }
54 int
55 _AccessibilitySystemSettingLoader::GetLargeFontSize(void)
56 {
57         return -1;
58 }
59 void
60 _AccessibilitySystemSettingLoader::SetSystemSetting(const Tizen::Base::String key, bool value)
61 {
62         if (key == L"AccessibilityActivationStatus")
63         {
64                 _activated = value;
65         }
66         else if (key == L"ScreenReaderActivationStatus")
67         {
68                 _screenReaderActivated = value;
69                 _AccessibilityManager::GetInstance()->OnAccessibilityScreenReaderIsActivated(value);
70         }
71 }
72
73 }}
74