2 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (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://www.apache.org/licenses/LICENSE-2.0
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.
18 #include <dali/devel-api/adaptor-framework/accessibility-impl.h>
19 #include <dali/devel-api/adaptor-framework/atspi-accessibility.h>
21 void Dali::AtspiAccessibility::Pause()
23 if(auto bridge = Dali::Accessibility::Bridge::GetCurrentBridge())
29 void Dali::AtspiAccessibility::Resume()
31 if(auto bridge = Dali::Accessibility::Bridge::GetCurrentBridge())
37 void Dali::AtspiAccessibility::StopReading(bool alsoNonDiscardable)
39 if(auto bridge = Dali::Accessibility::Bridge::GetCurrentBridge())
41 bridge->StopReading(alsoNonDiscardable);
45 bool Dali::AtspiAccessibility::SuppressScreenReader(bool suppress)
47 if(auto bridge = Dali::Accessibility::Bridge::GetCurrentBridge())
49 bridge->SuppressScreenReader(suppress);
56 void Dali::AtspiAccessibility::Say(const std::string& text, bool discardable, std::function<void(std::string)> callback)
58 if(auto bridge = Dali::Accessibility::Bridge::GetCurrentBridge())
60 bridge->Say(text, discardable, callback);
64 int Dali::AtspiAccessibility::SetForcefully(bool turnOn)
68 if(auto bridge = Dali::Accessibility::Bridge::GetCurrentBridge())
71 auto ret = bridge->ForceUp();
77 if(auto bridge = Dali::Accessibility::Bridge::GetCurrentBridge())
86 int Dali::AtspiAccessibility::GetStatus()
88 //0(ATSPI OFF, ScreenReader OFF), 1(ATSPI ON, ScreenReader OFF), 2 (ATSPI OFF, ScreenReader ON), 3(ATSPI ON, ScreenReader ON)
89 if(auto bridge = Dali::Accessibility::Bridge::GetCurrentBridge())
91 if(bridge->GetScreenReaderEnabled())
93 if(bridge->IsEnabled())
104 if(bridge->IsEnabled())