Merge "Revert "[Tizen] Remove to call key consumed event in ATSPI bridge"" into tizen
[platform/core/uifw/dali-adaptor.git] / dali / internal / accessibility / bridge / dummy / dummy-atspi.h
1 #ifndef DALI_ADAPTOR_DUMMY_ATSPI_H
2 #define DALI_ADAPTOR_DUMMY_ATSPI_H
3
4 /*
5  * Copyright (c) 2022 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 #include <dali/devel-api/adaptor-framework/accessibility.h>
22 #include <dali/devel-api/adaptor-framework/accessibility-bridge.h>
23
24 namespace Dali::Accessibility
25 {
26 struct DummyBridge : Dali::Accessibility::Bridge
27 {
28   static std::shared_ptr<DummyBridge> GetInstance()
29   {
30     static auto instance = std::make_shared<DummyBridge>();
31
32     return instance;
33   }
34
35   const std::string& GetBusName() const override
36   {
37     static const std::string name = "";
38     return name;
39   }
40
41   void AddTopLevelWindow(Accessibility::Accessible* object) override
42   {
43   }
44
45   void RemoveTopLevelWindow(Accessibility::Accessible* object) override
46   {
47   }
48
49   void RegisterDefaultLabel(Accessibility::Accessible* object) override
50   {
51   }
52
53   void UnregisterDefaultLabel(Accessibility::Accessible* object) override
54   {
55   }
56
57   Dali::Accessibility::Accessible* GetDefaultLabel(Dali::Accessibility::Accessible* root) const override
58   {
59     return nullptr;
60   }
61
62   void SetApplicationName(std::string name) override
63   {
64   }
65
66   void SetToolkitName(std::string_view toolkitName) override
67   {
68   }
69
70   Accessibility::Accessible* GetApplication() const override
71   {
72     return nullptr;
73   }
74
75   Accessibility::Accessible* FindByPath(const std::string& path) const override
76   {
77     return nullptr;
78   }
79
80   void WindowCreated(Window window) override
81   {
82   }
83
84   void WindowShown(Window window) override
85   {
86   }
87
88   void WindowHidden(Window window) override
89   {
90   }
91
92   void WindowFocused(Window window) override
93   {
94   }
95
96   void WindowUnfocused(Window window) override
97   {
98   }
99
100   void WindowMinimized(Window window) override
101   {
102   }
103
104   void WindowRestored(Window window, WindowRestoreType detail) override
105   {
106   }
107
108   void WindowMaximized(Window window) override
109   {
110   }
111
112   void Initialize() override
113   {
114   }
115
116   void Terminate() override
117   {
118   }
119
120   ForceUpResult ForceUp() override
121   {
122     return ForceUpResult::JUST_STARTED;
123   }
124
125   void ForceDown() override
126   {
127   }
128
129   void EmitCursorMoved(Accessibility::Accessible* obj, unsigned int cursorPosition) override
130   {
131   }
132
133   void EmitActiveDescendantChanged(Accessibility::Accessible* obj, Accessibility::Accessible* child) override
134   {
135   }
136
137   void EmitTextChanged(Accessibility::Accessible* obj, Accessibility::TextChangedState state, unsigned int position, unsigned int length, const std::string& content) override
138   {
139   }
140
141   void EmitMovedOutOfScreen(Accessibility::Accessible* obj, ScreenRelativeMoveType type) override
142   {
143   }
144
145   void EmitSocketAvailable(Accessibility::Accessible* obj) override
146   {
147   }
148
149   void EmitScrollStarted(Accessibility::Accessible* obj) override
150   {
151   }
152
153   void EmitScrollFinished(Accessibility::Accessible* obj) override
154   {
155   }
156
157   void EmitStateChanged(Accessibility::Accessible* obj, Accessibility::State state, int newValue, int reserved) override
158   {
159   }
160
161   void Emit(Accessibility::Accessible* obj, Accessibility::WindowEvent event, unsigned int detail) override
162   {
163   }
164
165   void Emit(Accessibility::Accessible* obj, Accessibility::ObjectPropertyChangeEvent event) override
166   {
167   }
168
169   void EmitBoundsChanged(Accessibility::Accessible* obj, Rect<> rect) override
170   {
171   }
172
173   void EmitPostRender(Accessibility::Accessible *obj) override
174   {
175   }
176
177   Accessibility::Consumed Emit(Accessibility::KeyEventType type, unsigned int keyCode, const std::string& keyName, unsigned int timeStamp, bool isText) override
178   {
179     return Accessibility::Consumed::YES;
180   }
181
182   void Say(const std::string& text, bool discardable, std::function<void(std::string)> callback) override
183   {
184   }
185
186   void Pause() override
187   {
188   }
189
190   void Resume() override
191   {
192   }
193
194   void StopReading(bool alsoNonDiscardable) override
195   {
196   }
197
198   void SuppressScreenReader(bool suppress) override
199   {
200   }
201
202   bool GetScreenReaderEnabled() override
203   {
204     return false;
205   }
206
207   bool IsEnabled() override
208   {
209     return false;
210   }
211
212   Address EmbedSocket(const Address& plug, const Address& socket) override
213   {
214     return {};
215   }
216
217   void EmbedAtkSocket(const Address& plug, const Address& socket) override
218   {
219   }
220
221   void UnembedSocket(const Address& plug, const Address& socket) override
222   {
223   }
224
225   void SetSocketOffset(ProxyAccessible* socket, std::int32_t x, std::int32_t y) override
226   {
227   }
228
229   void SetExtentsOffset(std::int32_t x, std::int32_t y) override
230   {
231   }
232
233   void SetPreferredBusName(std::string_view preferredBusName) override
234   {
235   }
236 };
237
238 } // namespace Dali::Accessibility
239
240 #endif // DALI_ADAPTOR_DUMMY_ATSPI_H