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/accessibility.h>
21 namespace Dali::Accessibility
23 struct DummyBridge : Dali::Accessibility::Bridge
25 static DummyBridge* GetInstance()
27 static DummyBridge instance;
32 const std::string& GetBusName() const override
34 static const std::string name = "";
38 void AddTopLevelWindow(Accessibility::Accessible*) override
42 void RemoveTopLevelWindow(Accessibility::Accessible*) override
46 void AddPopup(Accessibility::Accessible*) override
50 void RemovePopup(Accessibility::Accessible*) override
54 void SetApplicationName(std::string) override
58 Accessibility::Accessible* GetApplication() const override
63 Accessibility::Accessible* FindByPath(const std::string& s) const override
68 void ApplicationShown() override
72 void ApplicationHidden() override
76 void Initialize() override
80 void Terminate() override
84 ForceUpResult ForceUp() override
86 return ForceUpResult::JUST_STARTED;
89 void ForceDown() override
93 void EmitCaretMoved(Accessibility::Accessible* obj, unsigned int cursorPosition) override
97 void EmitActiveDescendantChanged(Accessibility::Accessible* obj, Accessibility::Accessible* child) override
101 void EmitTextChanged(Accessibility::Accessible* obj, Accessibility::TextChangedState state, unsigned int position, unsigned int length, const std::string& content) override
105 void EmitStateChanged(Accessibility::Accessible* obj, Accessibility::State state, int val1, int val2) override
109 void Emit(Accessibility::Accessible* obj, Accessibility::WindowEvent we, unsigned int detail1) override
113 void Emit(Accessibility::Accessible* obj, Accessibility::ObjectPropertyChangeEvent event) override
117 void EmitBoundsChanged(Accessibility::Accessible* obj, Rect<> rect) override
121 Accessibility::Consumed Emit(Accessibility::KeyEventType type, unsigned int keyCode, const std::string& keyName, unsigned int timeStamp, bool isText) override
123 return Accessibility::Consumed::YES;
126 void Say(const std::string& text, bool discardable, std::function<void(std::string)> callback) override
130 void Pause() override
134 void Resume() override
138 void StopReading(bool alsoNonDiscardable) override
142 void SuppressScreenReader(bool suppress) override
146 bool GetScreenReaderEnabled() override
151 bool GetIsEnabled() override
157 } // namespace Dali::Accessibility