1 #ifndef DALI_ADAPTOR_DUMMY_ATSPI_H
2 #define DALI_ADAPTOR_DUMMY_ATSPI_H
5 * Copyright (c) 2024 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
21 #include <dali/devel-api/adaptor-framework/accessibility.h>
22 #include <dali/devel-api/adaptor-framework/accessibility-bridge.h>
24 namespace Dali::Accessibility
26 struct DummyBridge : Dali::Accessibility::Bridge
28 static std::shared_ptr<DummyBridge> GetInstance()
30 static auto instance = std::make_shared<DummyBridge>();
35 const std::string& GetBusName() const override
37 static const std::string name = "";
41 void AddTopLevelWindow(Accessibility::Accessible* object) override
45 void RemoveTopLevelWindow(Accessibility::Accessible* object) override
49 void RegisterDefaultLabel(Accessibility::Accessible* object) override
53 void UnregisterDefaultLabel(Accessibility::Accessible* object) override
57 Dali::Accessibility::Accessible* GetDefaultLabel(Dali::Accessibility::Accessible* root) const override
62 void SetApplicationName(std::string name) override
66 void SetToolkitName(std::string_view toolkitName) override
70 Accessibility::Accessible* GetApplication() const override
75 Accessibility::Accessible* FindByPath(const std::string& path) const override
80 void WindowCreated(Window window) override
84 void WindowShown(Window window) override
88 void WindowHidden(Window window) override
92 void WindowFocused(Window window) override
96 void WindowUnfocused(Window window) override
100 void WindowMinimized(Window window) override
104 void WindowRestored(Window window, WindowRestoreType detail) override
108 void WindowMaximized(Window window) override
112 void Initialize() override
116 void Terminate() override
120 ForceUpResult ForceUp() override
122 return ForceUpResult::JUST_STARTED;
125 void ForceDown() override
129 void EmitCursorMoved(Accessibility::Accessible* obj, unsigned int cursorPosition) override
133 void EmitActiveDescendantChanged(Accessibility::Accessible* obj, Accessibility::Accessible* child) override
137 void EmitTextChanged(Accessibility::Accessible* obj, Accessibility::TextChangedState state, unsigned int position, unsigned int length, const std::string& content) override
141 void EmitMovedOutOfScreen(Accessibility::Accessible* obj, ScreenRelativeMoveType type) override
145 void EmitSocketAvailable(Accessibility::Accessible* obj) override
149 void EmitScrollStarted(Accessibility::Accessible* obj) override
153 void EmitScrollFinished(Accessibility::Accessible* obj) override
157 void EmitStateChanged(Accessibility::Accessible* obj, Accessibility::State state, int newValue, int reserved) override
161 void Emit(Accessibility::Accessible* obj, Accessibility::WindowEvent event, unsigned int detail) override
165 void Emit(Accessibility::Accessible* obj, Accessibility::ObjectPropertyChangeEvent event) override
169 void EmitBoundsChanged(Accessibility::Accessible* obj, Rect<> rect) override
173 void EmitPostRender(Accessibility::Accessible *obj) override
177 bool EmitKeyEvent(Dali::KeyEvent keyEvent, std::function<void(Dali::KeyEvent, bool)> callback) override
182 void Say(const std::string& text, bool discardable, std::function<void(std::string)> callback) override
186 void Pause() override
190 void Resume() override
194 void StopReading(bool alsoNonDiscardable) override
198 void SuppressScreenReader(bool suppress) override
202 bool GetScreenReaderEnabled() override
207 bool IsEnabled() override
212 Address EmbedSocket(const Address& plug, const Address& socket) override
217 void EmbedAtkSocket(const Address& plug, const Address& socket) override
221 void UnembedSocket(const Address& plug, const Address& socket) override
225 void SetSocketOffset(ProxyAccessible* socket, std::int32_t x, std::int32_t y) override
229 void SetExtentsOffset(std::int32_t x, std::int32_t y) override
233 void SetPreferredBusName(std::string_view preferredBusName) override
238 } // namespace Dali::Accessibility
240 #endif // DALI_ADAPTOR_DUMMY_ATSPI_H