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.
19 using System.ComponentModel;
20 using System.Runtime.InteropServices;
22 namespace Tizen.NUI.Accessibility
24 public partial class AccessibilityManager
26 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
27 private delegate bool StatusChangedEventCallbackDelegate(IntPtr accessibilityManager);
28 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerStatusChangedEventHandler;
29 private StatusChangedEventCallbackDelegate accessibilityManagerStatusChangedEventCallbackDelegate;
31 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
32 private delegate bool ActionNextEventCallbackDelegate(IntPtr accessibilityManager);
33 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionNextEventHandler;
34 private ActionNextEventCallbackDelegate accessibilityManagerActionNextEventCallbackDelegate;
36 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
37 private delegate bool ActionPreviousEventCallbackDelegate(IntPtr accessibilityManager);
38 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionPreviousEventHandler;
39 private ActionPreviousEventCallbackDelegate accessibilityManagerActionPreviousEventCallbackDelegate;
41 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
42 private delegate bool ActionActivateEventCallbackDelegate(IntPtr accessibilityManager);
43 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionActivateEventHandler;
44 private ActionActivateEventCallbackDelegate accessibilityManagerActionActivateEventCallbackDelegate;
46 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
47 private delegate bool ActionReadEventCallbackDelegate(IntPtr accessibilityManager);
48 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionReadEventHandler;
49 private ActionReadEventCallbackDelegate accessibilityManagerActionReadEventCallbackDelegate;
51 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
52 private delegate bool ActionOverEventCallbackDelegate(IntPtr accessibilityManager);
53 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionOverEventHandler;
54 private ActionOverEventCallbackDelegate accessibilityManagerActionOverEventCallbackDelegate;
56 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
57 private delegate bool ActionReadNextEventCallbackDelegate(IntPtr accessibilityManager);
58 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionReadNextEventHandler;
59 private ActionReadNextEventCallbackDelegate accessibilityManagerActionReadNextEventCallbackDelegate;
61 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
62 private delegate bool ActionReadPreviousEventCallbackDelegate(IntPtr accessibilityManager);
63 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionReadPreviousEventHandler;
64 private ActionReadPreviousEventCallbackDelegate accessibilityManagerActionReadPreviousEventCallbackDelegate;
66 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
67 private delegate bool ActionUpEventCallbackDelegate(IntPtr accessibilityManager);
68 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionUpEventHandler;
69 private ActionUpEventCallbackDelegate accessibilityManagerActionUpEventCallbackDelegate;
71 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
72 private delegate bool ActionDownEventCallbackDelegate(IntPtr accessibilityManager);
73 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionDownEventHandler;
74 private ActionDownEventCallbackDelegate accessibilityManagerActionDownEventCallbackDelegate;
76 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
77 private delegate bool ActionClearFocusEventCallbackDelegate(IntPtr accessibilityManager);
78 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionClearFocusEventHandler;
79 private ActionClearFocusEventCallbackDelegate accessibilityManagerActionClearFocusEventCallbackDelegate;
81 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
82 private delegate bool ActionBackEventCallbackDelegate(IntPtr accessibilityManager);
83 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionBackEventHandler;
84 private ActionBackEventCallbackDelegate accessibilityManagerActionBackEventCallbackDelegate;
86 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
87 private delegate bool ActionScrollUpEventCallbackDelegate(IntPtr accessibilityManager);
88 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionScrollUpEventHandler;
89 private ActionScrollUpEventCallbackDelegate accessibilityManagerActionScrollUpEventCallbackDelegate;
91 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
92 private delegate bool ActionScrollDownEventCallbackDelegate(IntPtr accessibilityManager);
93 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionScrollDownEventHandler;
94 private ActionScrollDownEventCallbackDelegate accessibilityManagerActionScrollDownEventCallbackDelegate;
96 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
97 private delegate bool ActionPageLeftEventCallbackDelegate(IntPtr accessibilityManager);
98 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionPageLeftEventHandler;
99 private ActionPageLeftEventCallbackDelegate accessibilityManagerActionPageLeftEventCallbackDelegate;
101 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
102 private delegate bool ActionPageRightEventCallbackDelegate(IntPtr accessibilityManager);
103 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionPageRightEventHandler;
104 private ActionPageRightEventCallbackDelegate accessibilityManagerActionPageRightEventCallbackDelegate;
106 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
107 private delegate bool ActionPageUpEventCallbackDelegate(IntPtr accessibilityManager);
108 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionPageUpEventHandler;
109 private ActionPageUpEventCallbackDelegate accessibilityManagerActionPageUpEventCallbackDelegate;
111 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
112 private delegate bool ActionPageDownEventCallbackDelegate(IntPtr accessibilityManager);
113 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionPageDownEventHandler;
114 private ActionPageDownEventCallbackDelegate accessibilityManagerActionPageDownEventCallbackDelegate;
116 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
117 private delegate bool ActionMoveToFirstEventCallbackDelegate(IntPtr accessibilityManager);
118 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionMoveToFirstEventHandler;
119 private ActionMoveToFirstEventCallbackDelegate accessibilityManagerActionMoveToFirstEventCallbackDelegate;
121 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
122 private delegate bool ActionMoveToLastEventCallbackDelegate(IntPtr accessibilityManager);
123 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionMoveToLastEventHandler;
124 private ActionMoveToLastEventCallbackDelegate accessibilityManagerActionMoveToLastEventCallbackDelegate;
126 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
127 private delegate bool ActionReadFromTopEventCallbackDelegate(IntPtr accessibilityManager);
128 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionReadFromTopEventHandler;
129 private ActionReadFromTopEventCallbackDelegate accessibilityManagerActionReadFromTopEventCallbackDelegate;
131 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
132 private delegate bool ActionReadFromNextEventCallbackDelegate(IntPtr accessibilityManager);
133 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionReadFromNextEventHandler;
134 private ActionReadFromNextEventCallbackDelegate accessibilityManagerActionReadFromNextEventCallbackDelegate;
136 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
137 private delegate bool ActionZoomEventCallbackDelegate(IntPtr accessibilityManager);
138 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionZoomEventHandler;
139 private ActionZoomEventCallbackDelegate accessibilityManagerActionZoomEventCallbackDelegate;
141 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
142 private delegate bool ActionReadPauseResumeEventCallbackDelegate(IntPtr accessibilityManager);
143 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionReadPauseResumeEventHandler;
144 private ActionReadPauseResumeEventCallbackDelegate accessibilityManagerActionReadPauseResumeEventCallbackDelegate;
146 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
147 private delegate bool ActionStartStopEventCallbackDelegate(IntPtr accessibilityManager);
148 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionStartStopEventHandler;
149 private ActionStartStopEventCallbackDelegate accessibilityManagerActionStartStopEventCallbackDelegate;
152 // To be replaced by a new event that takes Touch
153 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
154 private delegate bool ActionScrollEventCallbackDelegate(IntPtr accessibilityManager, IntPtr touchEvent);
155 private EventHandlerWithReturnType<object,ActionScrollEventArgs,bool> _accessibilityManagerActionScrollEventHandler;
156 private ActionScrollEventCallbackDelegate _accessibilityManagerActionScrollEventCallbackDelegate;
159 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
160 private delegate void FocusChangedEventCallbackDelegate(IntPtr view1, IntPtr view2);
161 private EventHandler<FocusChangedEventArgs> accessibilityManagerFocusChangedEventHandler;
162 private FocusChangedEventCallbackDelegate accessibilityManagerFocusChangedEventCallbackDelegate;
164 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
165 private delegate void FocusedViewActivatedEventCallbackDelegate(IntPtr view);
166 private EventHandler<FocusedViewActivatedEventArgs> accessibilityManagerFocusedViewActivatedEventHandler;
167 private FocusedViewActivatedEventCallbackDelegate accessibilityManagerFocusedViewActivatedEventCallbackDelegate;
169 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
170 private delegate void FocusOvershotEventCallbackDelegate(IntPtr currentFocusedView, AccessibilityManager.FocusOvershotDirection direction);
171 private EventHandler<FocusOvershotEventArgs> accessibilityManagerFocusOvershotEventHandler;
172 private FocusOvershotEventCallbackDelegate accessibilityManagerFocusOvershotEventCallbackDelegate;
174 // Accessibility action signals
177 /// This is emitted when accessibility(screen-reader) feature turned on or off.
179 /// <returns> The signal to connect to </returns>
180 /// <since_tizen> 6 </since_tizen>
181 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
182 [EditorBrowsable(EditorBrowsableState.Never)]
183 public event ReturnTypeEventHandler<object, EventArgs, bool> StatusChanged
187 // Restricted to only one listener
188 if (accessibilityManagerStatusChangedEventHandler == null)
190 accessibilityManagerStatusChangedEventCallbackDelegate = new StatusChangedEventCallbackDelegate(OnStatusChanged);
191 this.StatusChangedSignal().Connect(accessibilityManagerStatusChangedEventCallbackDelegate);
194 accessibilityManagerStatusChangedEventHandler += value;
199 accessibilityManagerStatusChangedEventHandler -= value;
201 if (accessibilityManagerStatusChangedEventHandler == null && StatusChangedSignal().Empty() == false)
203 this.StatusChangedSignal().Disconnect(accessibilityManagerStatusChangedEventCallbackDelegate);
210 /// This is emitted when accessibility action is received to move focus to the next focusable view (by one finger flick down).
212 /// <returns> The signal to connect to </returns>
213 /// <since_tizen> 6 </since_tizen>
214 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
215 [EditorBrowsable(EditorBrowsableState.Never)]
216 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionNext
220 // Restricted to only one listener
221 if (accessibilityManagerActionNextEventHandler == null)
223 accessibilityManagerActionNextEventCallbackDelegate = new ActionNextEventCallbackDelegate(OnActionNext);
224 this.ActionNextSignal().Connect(accessibilityManagerActionNextEventCallbackDelegate);
227 accessibilityManagerActionNextEventHandler += value;
232 accessibilityManagerActionNextEventHandler -= value;
234 if (accessibilityManagerActionNextEventHandler == null && ActionNextSignal().Empty() == false)
236 this.ActionNextSignal().Disconnect(accessibilityManagerActionNextEventCallbackDelegate);
242 /// This is emitted when accessibility action is received to move focus to the previous focusable view (by one finger flick up).
244 /// <returns> The signal to connect to </returns>
245 /// <since_tizen> 6 </since_tizen>
246 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
247 [EditorBrowsable(EditorBrowsableState.Never)]
248 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionPrevious
252 // Restricted to only one listener
253 if (accessibilityManagerActionPreviousEventHandler == null)
255 accessibilityManagerActionPreviousEventCallbackDelegate = new ActionPreviousEventCallbackDelegate(OnActionPrevious);
256 this.ActionPreviousSignal().Connect(accessibilityManagerActionPreviousEventCallbackDelegate);
259 accessibilityManagerActionPreviousEventHandler += value;
264 accessibilityManagerActionPreviousEventHandler -= value;
266 if (accessibilityManagerActionPreviousEventHandler == null && ActionPreviousSignal().Empty() == false)
268 this.ActionPreviousSignal().Disconnect(accessibilityManagerActionPreviousEventCallbackDelegate);
274 /// This is emitted when accessibility action is received to activate the current focused view (by one finger double tap).
276 /// <returns> The signal to connect to </returns>
277 /// <since_tizen> 6 </since_tizen>
278 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
279 [EditorBrowsable(EditorBrowsableState.Never)]
280 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionActivate
284 // Restricted to only one listener
285 if (accessibilityManagerActionActivateEventHandler == null)
287 accessibilityManagerActionActivateEventCallbackDelegate = new ActionActivateEventCallbackDelegate(OnActionActivate);
288 this.ActionActivateSignal().Connect(accessibilityManagerActionActivateEventCallbackDelegate);
291 accessibilityManagerActionActivateEventHandler += value;
296 accessibilityManagerActionActivateEventHandler -= value;
298 if (accessibilityManagerActionActivateEventHandler == null && ActionActivateSignal().Empty() == false)
300 this.ActionActivateSignal().Disconnect(accessibilityManagerActionActivateEventCallbackDelegate);
306 /// This is emitted when accessibility action is received to focus and read the view (by one finger tap).
308 /// <returns> The signal to connect to </returns>
309 /// <since_tizen> 6 </since_tizen>
310 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
311 [EditorBrowsable(EditorBrowsableState.Never)]
312 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionRead
316 // Restricted to only one listener
317 if (accessibilityManagerActionReadEventHandler == null)
319 accessibilityManagerActionReadEventCallbackDelegate = new ActionReadEventCallbackDelegate(OnActionRead);
320 this.ActionReadSignal().Connect(accessibilityManagerActionReadEventCallbackDelegate);
323 accessibilityManagerActionReadEventHandler += value;
328 accessibilityManagerActionReadEventHandler -= value;
330 if (accessibilityManagerActionReadEventHandler == null && ActionReadSignal().Empty() == false)
332 this.ActionReadSignal().Disconnect(accessibilityManagerActionReadEventCallbackDelegate);
338 /// This is emitted when accessibility action is received to focus and read the view (by one finger move).
340 /// <returns> The signal to connect to </returns>
341 /// <since_tizen> 6 </since_tizen>
342 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
343 [EditorBrowsable(EditorBrowsableState.Never)]
344 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionOver
348 // Restricted to only one listener
349 if (accessibilityManagerActionOverEventHandler == null)
351 accessibilityManagerActionOverEventCallbackDelegate = new ActionOverEventCallbackDelegate(OnActionOver);
352 this.ActionOverSignal().Connect(accessibilityManagerActionOverEventCallbackDelegate);
355 accessibilityManagerActionOverEventHandler += value;
360 accessibilityManagerActionOverEventHandler -= value;
362 if (accessibilityManagerActionOverEventHandler == null && ActionOverSignal().Empty() == false)
364 this.ActionOverSignal().Disconnect(accessibilityManagerActionOverEventCallbackDelegate);
371 /// This is emitted when accessibility action is received to move focus to the next focusable view (by one finger flick right).
373 /// <returns> The signal to connect to </returns>
374 /// <since_tizen> 6 </since_tizen>
375 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
376 [EditorBrowsable(EditorBrowsableState.Never)]
377 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionReadNext
381 // Restricted to only one listener
382 if (accessibilityManagerActionReadNextEventHandler == null)
384 accessibilityManagerActionReadNextEventCallbackDelegate = new ActionReadNextEventCallbackDelegate(OnActionReadNext);
385 this.ActionReadNextSignal().Connect(accessibilityManagerActionReadNextEventCallbackDelegate);
388 accessibilityManagerActionReadNextEventHandler += value;
393 accessibilityManagerActionReadNextEventHandler -= value;
395 if (accessibilityManagerActionReadNextEventHandler == null && ActionReadNextSignal().Empty() == false)
397 this.ActionReadNextSignal().Disconnect(accessibilityManagerActionReadNextEventCallbackDelegate);
403 /// This is emitted when accessibility action is received to move focus to the previous focusable view (by one finger flick left).
405 /// <returns> The signal to connect to </returns>
406 /// <since_tizen> 6 </since_tizen>
407 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
408 [EditorBrowsable(EditorBrowsableState.Never)]
409 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionReadPrevious
413 // Restricted to only one listener
414 if (accessibilityManagerActionReadPreviousEventHandler == null)
416 accessibilityManagerActionReadPreviousEventCallbackDelegate = new ActionReadPreviousEventCallbackDelegate(OnActionReadPrevious);
417 this.ActionReadPreviousSignal().Connect(accessibilityManagerActionReadPreviousEventCallbackDelegate);
420 accessibilityManagerActionReadPreviousEventHandler += value;
425 accessibilityManagerActionReadPreviousEventHandler -= value;
427 if (accessibilityManagerActionReadPreviousEventHandler == null && ActionReadPreviousSignal().Empty() == false)
429 this.ActionReadPreviousSignal().Disconnect(accessibilityManagerActionReadPreviousEventCallbackDelegate);
435 /// This is emitted when accessibility action is received to change the value when the current focused view is a slider
436 /// (by double finger down and move up and right).
438 /// <returns> The signal to connect to </returns>
439 /// <since_tizen> 6 </since_tizen>
440 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
441 [EditorBrowsable(EditorBrowsableState.Never)]
442 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionUp
446 // Restricted to only one listener
447 if (accessibilityManagerActionUpEventHandler == null)
449 accessibilityManagerActionUpEventCallbackDelegate = new ActionUpEventCallbackDelegate(OnActionUp);
450 this.ActionUpSignal().Connect(accessibilityManagerActionUpEventCallbackDelegate);
453 accessibilityManagerActionUpEventHandler += value;
458 accessibilityManagerActionUpEventHandler -= value;
460 if (accessibilityManagerActionUpEventHandler == null && ActionUpSignal().Empty() == false)
462 this.ActionUpSignal().Disconnect(accessibilityManagerActionUpEventCallbackDelegate);
468 /// This is emitted when accessibility action is received to change the value when the current focused view is a slider
469 /// (by double finger down and move down and left).
471 /// <returns> The signal to connect to </returns>
472 /// <since_tizen> 6 </since_tizen>
473 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
474 [EditorBrowsable(EditorBrowsableState.Never)]
475 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionDown
479 // Restricted to only one listener
480 if (accessibilityManagerActionDownEventHandler == null)
482 accessibilityManagerActionDownEventCallbackDelegate = new ActionDownEventCallbackDelegate(OnActionDown);
483 this.ActionDownSignal().Connect(accessibilityManagerActionDownEventCallbackDelegate);
486 accessibilityManagerActionDownEventHandler += value;
491 accessibilityManagerActionDownEventHandler -= value;
493 if (accessibilityManagerActionDownEventHandler == null && ActionDownSignal().Empty() == false)
495 this.ActionDownSignal().Disconnect(accessibilityManagerActionDownEventCallbackDelegate);
501 /// This is emitted when accessibility action is received to clear the focus from the current focused view
502 /// if any, so that no view is focused in the focus chain.
504 /// <returns> The signal to connect to </returns>
505 /// <since_tizen> 6 </since_tizen>
506 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
507 [EditorBrowsable(EditorBrowsableState.Never)]
508 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionClearFocus
512 // Restricted to only one listener
513 if (accessibilityManagerActionClearFocusEventHandler == null)
515 accessibilityManagerActionClearFocusEventCallbackDelegate = new ActionClearFocusEventCallbackDelegate(OnActionClearFocus);
516 this.ActionClearFocusSignal().Connect(accessibilityManagerActionClearFocusEventCallbackDelegate);
519 accessibilityManagerActionClearFocusEventHandler += value;
524 accessibilityManagerActionClearFocusEventHandler -= value;
526 if (accessibilityManagerActionClearFocusEventHandler == null && ActionClearFocusSignal().Empty() == false)
528 this.ActionClearFocusSignal().Disconnect(accessibilityManagerActionClearFocusEventCallbackDelegate);
534 /// This is emitted when accessibility action is received to navigate back (by two fingers circle draw).
536 /// <returns> The signal to connect to </returns>
537 /// <since_tizen> 6 </since_tizen>
538 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
539 [EditorBrowsable(EditorBrowsableState.Never)]
540 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionBack
544 // Restricted to only one listener
545 if (accessibilityManagerActionBackEventHandler == null)
547 accessibilityManagerActionBackEventCallbackDelegate = new ActionBackEventCallbackDelegate(OnActionBack);
548 this.ActionBackSignal().Connect(accessibilityManagerActionBackEventCallbackDelegate);
551 accessibilityManagerActionBackEventHandler += value;
556 accessibilityManagerActionBackEventHandler -= value;
558 if (accessibilityManagerActionBackEventHandler == null && ActionBackSignal().Empty() == false)
560 this.ActionBackSignal().Disconnect(accessibilityManagerActionBackEventCallbackDelegate);
566 /// This is emitted when accessibility action is received to scroll up the list (by two finger swipe up).
568 /// <returns> The signal to connect to </returns>
569 /// <since_tizen> 6 </since_tizen>
570 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
571 [EditorBrowsable(EditorBrowsableState.Never)]
572 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionScrollUp
576 // Restricted to only one listener
577 if (accessibilityManagerActionScrollUpEventHandler == null)
579 accessibilityManagerActionScrollUpEventCallbackDelegate = new ActionScrollUpEventCallbackDelegate(OnActionScrollUp);
580 this.ActionScrollUpSignal().Connect(accessibilityManagerActionScrollUpEventCallbackDelegate);
583 accessibilityManagerActionScrollUpEventHandler += value;
588 accessibilityManagerActionScrollUpEventHandler -= value;
590 if (accessibilityManagerActionScrollUpEventHandler == null && ActionScrollUpSignal().Empty() == false)
592 this.ActionScrollUpSignal().Disconnect(accessibilityManagerActionScrollUpEventCallbackDelegate);
598 /// This is emitted when accessibility action is received to scroll down the list (by two finger swipe down).
600 /// <returns> The signal to connect to </returns>
601 /// <since_tizen> 6 </since_tizen>
602 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
603 [EditorBrowsable(EditorBrowsableState.Never)]
604 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionScrollDown
608 // Restricted to only one listener
609 if (accessibilityManagerActionScrollDownEventHandler == null)
611 accessibilityManagerActionScrollDownEventCallbackDelegate = new ActionScrollDownEventCallbackDelegate(OnActionScrollDown);
612 this.ActionScrollDownSignal().Connect(accessibilityManagerActionScrollDownEventCallbackDelegate);
615 accessibilityManagerActionScrollDownEventHandler += value;
620 accessibilityManagerActionScrollDownEventHandler -= value;
622 if (accessibilityManagerActionScrollDownEventHandler == null && ActionScrollDownSignal().Empty() == false)
624 this.ActionScrollDownSignal().Disconnect(accessibilityManagerActionScrollDownEventCallbackDelegate);
630 /// This is emitted when accessibility action is received to scroll left to the previous page (by two finger swipe left).
632 /// <returns> The signal to connect to </returns>
633 /// <since_tizen> 6 </since_tizen>
634 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
635 [EditorBrowsable(EditorBrowsableState.Never)]
636 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionPageLeft
640 // Restricted to only one listener
641 if (accessibilityManagerActionPageLeftEventHandler == null)
643 accessibilityManagerActionPageLeftEventCallbackDelegate = new ActionPageLeftEventCallbackDelegate(OnActionPageLeft);
644 this.ActionPageLeftSignal().Connect(accessibilityManagerActionPageLeftEventCallbackDelegate);
647 accessibilityManagerActionPageLeftEventHandler += value;
652 accessibilityManagerActionPageLeftEventHandler -= value;
654 if (accessibilityManagerActionPageLeftEventHandler == null && ActionPageLeftSignal().Empty() == false)
656 this.ActionPageLeftSignal().Disconnect(accessibilityManagerActionPageLeftEventCallbackDelegate);
662 /// This is emitted when accessibility action is received to scroll right to the next page (by two finger swipe right).
664 /// <returns> The signal to connect to </returns>
665 /// <since_tizen> 6 </since_tizen>
666 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
667 [EditorBrowsable(EditorBrowsableState.Never)]
668 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionPageRight
672 // Restricted to only one listener
673 if (accessibilityManagerActionPageRightEventHandler == null)
675 accessibilityManagerActionPageRightEventCallbackDelegate = new ActionPageRightEventCallbackDelegate(OnActionPageRight);
676 this.ActionPageRightSignal().Connect(accessibilityManagerActionPageRightEventCallbackDelegate);
679 accessibilityManagerActionPageRightEventHandler += value;
684 accessibilityManagerActionPageRightEventHandler -= value;
686 if (accessibilityManagerActionPageRightEventHandler == null && ActionPageRightSignal().Empty() == false)
688 this.ActionPageRightSignal().Disconnect(accessibilityManagerActionPageRightEventCallbackDelegate);
694 /// This is emitted when accessibility action is received to scroll up to the previous page (by one finger swipe left and right).
696 /// <returns> The signal to connect to </returns>
697 /// <since_tizen> 6 </since_tizen>
698 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
699 [EditorBrowsable(EditorBrowsableState.Never)]
700 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionPageUp
704 // Restricted to only one listener
705 if (accessibilityManagerActionPageUpEventHandler == null)
707 accessibilityManagerActionPageUpEventCallbackDelegate = new ActionPageUpEventCallbackDelegate(OnActionPageUp);
708 this.ActionPageUpSignal().Connect(accessibilityManagerActionPageUpEventCallbackDelegate);
711 accessibilityManagerActionPageUpEventHandler += value;
716 accessibilityManagerActionPageUpEventHandler -= value;
718 if (accessibilityManagerActionPageUpEventHandler == null && ActionPageUpSignal().Empty() == false)
720 this.ActionPageUpSignal().Disconnect(accessibilityManagerActionPageUpEventCallbackDelegate);
726 /// This is emitted when accessibility action is received to scroll down to the next page (by one finger swipe right and left).
728 /// <returns> The signal to connect to </returns>
729 /// <since_tizen> 6 </since_tizen>
730 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
731 [EditorBrowsable(EditorBrowsableState.Never)]
732 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionPageDown
736 // Restricted to only one listener
737 if (accessibilityManagerActionPageDownEventHandler == null)
739 accessibilityManagerActionPageDownEventCallbackDelegate = new ActionPageDownEventCallbackDelegate(OnActionPageDown);
740 this.ActionPageDownSignal().Connect(accessibilityManagerActionPageDownEventCallbackDelegate);
743 accessibilityManagerActionPageDownEventHandler += value;
748 accessibilityManagerActionPageDownEventHandler -= value;
750 if (accessibilityManagerActionPageDownEventHandler == null && ActionPageDownSignal().Empty() == false)
752 this.ActionPageDownSignal().Disconnect(accessibilityManagerActionPageDownEventCallbackDelegate);
758 /// This is emitted when accessibility action is received to move the focus to the first item on the screen
759 /// (by one finger swipe up and down).
761 /// <returns> The signal to connect to </returns>
762 /// <since_tizen> 6 </since_tizen>
763 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
764 [EditorBrowsable(EditorBrowsableState.Never)]
765 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionMoveToFirst
769 // Restricted to only one listener
770 if (accessibilityManagerActionMoveToFirstEventHandler == null)
772 accessibilityManagerActionMoveToFirstEventCallbackDelegate = new ActionMoveToFirstEventCallbackDelegate(OnActionMoveToFirst);
773 this.ActionMoveToFirstSignal().Connect(accessibilityManagerActionMoveToFirstEventCallbackDelegate);
776 accessibilityManagerActionMoveToFirstEventHandler += value;
781 accessibilityManagerActionMoveToFirstEventHandler -= value;
783 if (accessibilityManagerActionMoveToFirstEventHandler == null && ActionMoveToFirstSignal().Empty() == false)
785 this.ActionMoveToFirstSignal().Disconnect(accessibilityManagerActionMoveToFirstEventCallbackDelegate);
791 /// This is emitted when accessibility action is received to move the focus to the last item on the screen
792 /// (by one finger swipe down and up).
794 /// <returns> The signal to connect to </returns>
795 /// <since_tizen> 6 </since_tizen>
796 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
797 [EditorBrowsable(EditorBrowsableState.Never)]
798 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionMoveToLast
802 // Restricted to only one listener
803 if (accessibilityManagerActionMoveToLastEventHandler == null)
805 accessibilityManagerActionMoveToLastEventCallbackDelegate = new ActionMoveToLastEventCallbackDelegate(OnActionMoveToLast);
806 this.ActionMoveToLastSignal().Connect(accessibilityManagerActionMoveToLastEventCallbackDelegate);
809 accessibilityManagerActionMoveToLastEventHandler += value;
814 accessibilityManagerActionMoveToLastEventHandler -= value;
816 if (accessibilityManagerActionMoveToLastEventHandler == null && ActionMoveToLastSignal().Empty() == false)
818 this.ActionMoveToLastSignal().Disconnect(accessibilityManagerActionMoveToLastEventCallbackDelegate);
824 /// This is emitted when accessibility action is received to focus and read from the first item on the top continuously
825 /// (by three fingers single tap).
827 /// <returns> The signal to connect to </returns>
828 /// <since_tizen> 6 </since_tizen>
829 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
830 [EditorBrowsable(EditorBrowsableState.Never)]
831 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionReadFromTop
835 // Restricted to only one listener
836 if (accessibilityManagerActionReadFromTopEventHandler == null)
838 accessibilityManagerActionReadFromTopEventCallbackDelegate = new ActionReadFromTopEventCallbackDelegate(OnActionReadFromTop);
839 this.ActionReadFromTopSignal().Connect(accessibilityManagerActionReadFromTopEventCallbackDelegate);
842 accessibilityManagerActionReadFromTopEventHandler += value;
847 accessibilityManagerActionReadFromTopEventHandler -= value;
849 if (accessibilityManagerActionReadFromTopEventHandler == null && ActionReadFromTopSignal().Empty() == false)
851 this.ActionReadFromTopSignal().Disconnect(accessibilityManagerActionReadFromTopEventCallbackDelegate);
857 /// This is emitted when accessibility action is received to move the focus to and read from the next item continuously
858 /// (by three fingers double tap).
860 /// <returns> The signal to connect to </returns>
861 /// <since_tizen> 6 </since_tizen>
862 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
863 [EditorBrowsable(EditorBrowsableState.Never)]
864 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionReadFromNext
868 // Restricted to only one listener
869 if (accessibilityManagerActionReadFromNextEventHandler == null)
871 accessibilityManagerActionReadFromNextEventCallbackDelegate = new ActionReadFromNextEventCallbackDelegate(OnActionReadFromNext);
872 this.ActionReadFromNextSignal().Connect(accessibilityManagerActionReadFromNextEventCallbackDelegate);
875 accessibilityManagerActionReadFromNextEventHandler += value;
880 accessibilityManagerActionReadFromNextEventHandler -= value;
882 if (accessibilityManagerActionReadFromNextEventHandler == null && ActionReadFromNextSignal().Empty() == false)
884 this.ActionReadFromNextSignal().Disconnect(accessibilityManagerActionReadFromNextEventCallbackDelegate);
890 /// This is emitted when accessibility action is received to zoom (by one finger triple tap)
892 /// <returns> The signal to connect to </returns>
893 /// <since_tizen> 6 </since_tizen>
894 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
895 [EditorBrowsable(EditorBrowsableState.Never)]
896 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionZoom
900 // Restricted to only one listener
901 if (accessibilityManagerActionZoomEventHandler == null)
903 accessibilityManagerActionZoomEventCallbackDelegate = new ActionZoomEventCallbackDelegate(OnActionZoom);
904 this.ActionZoomSignal().Connect(accessibilityManagerActionZoomEventCallbackDelegate);
907 accessibilityManagerActionZoomEventHandler += value;
912 accessibilityManagerActionZoomEventHandler -= value;
914 if (accessibilityManagerActionZoomEventHandler == null && ActionZoomSignal().Empty() == false)
916 this.ActionZoomSignal().Disconnect(accessibilityManagerActionZoomEventCallbackDelegate);
922 /// This is emitted when accessibility action is received to pause/resume the current speech (by two fingers single tap).
924 /// <returns> The signal to connect to </returns>
925 /// <since_tizen> 6 </since_tizen>
926 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
927 [EditorBrowsable(EditorBrowsableState.Never)]
928 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionReadPauseResume
932 // Restricted to only one listener
933 if (accessibilityManagerActionReadPauseResumeEventHandler == null)
935 accessibilityManagerActionReadPauseResumeEventCallbackDelegate = new ActionReadPauseResumeEventCallbackDelegate(OnActionReadPauseResume);
936 this.ActionReadPauseResumeSignal().Connect(accessibilityManagerActionReadPauseResumeEventCallbackDelegate);
939 accessibilityManagerActionReadPauseResumeEventHandler += value;
944 accessibilityManagerActionReadPauseResumeEventHandler -= value;
946 if (accessibilityManagerActionReadPauseResumeEventHandler == null && ActionReadPauseResumeSignal().Empty() == false)
948 this.ActionReadPauseResumeSignal().Disconnect(accessibilityManagerActionReadPauseResumeEventCallbackDelegate);
954 /// This is emitted when accessibility action is received to start/stop the current action (by two fingers double tap).
956 /// <returns> The signal to connect to </returns>
957 /// <since_tizen> 6 </since_tizen>
958 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
959 [EditorBrowsable(EditorBrowsableState.Never)]
960 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionStartStop
964 // Restricted to only one listener
965 if (accessibilityManagerActionStartStopEventHandler == null)
967 accessibilityManagerActionStartStopEventCallbackDelegate = new ActionStartStopEventCallbackDelegate(OnActionStartStop);
968 this.ActionStartStopSignal().Connect(accessibilityManagerActionStartStopEventCallbackDelegate);
971 accessibilityManagerActionStartStopEventHandler += value;
976 accessibilityManagerActionStartStopEventHandler -= value;
978 if (accessibilityManagerActionStartStopEventHandler == null && ActionStartStopSignal().Empty() == false)
980 this.ActionStartStopSignal().Disconnect(accessibilityManagerActionStartStopEventCallbackDelegate);
986 // To be replaced by a new event that takes Touch
987 public event DaliEventHandlerWithReturnType<object,ActionScrollEventArgs,bool> ActionScroll
993 // Restricted to only one listener
994 if (_accessibilityManagerActionScrollEventHandler == null)
996 _accessibilityManagerActionScrollEventHandler += value;
998 _accessibilityManagerActionScrollEventCallbackDelegate = new ActionScrollEventCallbackDelegate(OnActionScroll);
999 this.ActionScrollSignal().Connect(_accessibilityManagerActionScrollEventCallbackDelegate);
1008 if (_accessibilityManagerActionScrollEventHandler != null)
1010 this.ActionScrollSignal().Disconnect(_accessibilityManagerActionScrollEventCallbackDelegate);
1013 _accessibilityManagerActionScrollEventHandler -= value;
1018 // Callback for AccessibilityManager ActionScrollSignal
1019 private bool OnActionScroll(IntPtr accessibilityManager, IntPtr touchEvent)
1021 ActionScrollEventArgs e = new ActionScrollEventArgs();
1023 // Populate all members of "e" (ActionScrollEventArgs) with real data
1024 e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(accessibilityManager);
1025 e.TouchEvent = TouchEvent.GetTouchEventFromPtr(touchEvent);
1027 if (_accessibilityManagerActionScrollEventHandler != null)
1029 //here we send all data to user event handlers
1030 return _accessibilityManagerActionScrollEventHandler(this, e);
1039 /// This signal is emitted when the current focused view is changed.
1041 /// <returns> The signal to connect to </returns>
1042 /// <since_tizen> 6 </since_tizen>
1043 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1044 [EditorBrowsable(EditorBrowsableState.Never)]
1045 public event EventHandler<FocusChangedEventArgs> FocusChanged
1049 // Restricted to only one listener
1050 if (accessibilityManagerFocusChangedEventHandler == null)
1052 accessibilityManagerFocusChangedEventCallbackDelegate = new FocusChangedEventCallbackDelegate(OnFocusChanged);
1053 this.FocusChangedSignal().Connect(accessibilityManagerFocusChangedEventCallbackDelegate);
1056 accessibilityManagerFocusChangedEventHandler += value;
1061 accessibilityManagerFocusChangedEventHandler -= value;
1063 if (accessibilityManagerFocusChangedEventHandler == null && FocusChangedSignal().Empty() == false)
1065 this.FocusChangedSignal().Disconnect(accessibilityManagerFocusChangedEventCallbackDelegate);
1071 /// This signal is emitted when the current focused view is activated.
1073 /// <returns> The signal to connect to </returns>
1074 /// <since_tizen> 6 </since_tizen>
1075 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1076 [EditorBrowsable(EditorBrowsableState.Never)]
1077 public event EventHandler<FocusedViewActivatedEventArgs> FocusedViewActivated
1081 // Restricted to only one listener
1082 if (accessibilityManagerFocusedViewActivatedEventHandler == null)
1084 accessibilityManagerFocusedViewActivatedEventCallbackDelegate = new FocusedViewActivatedEventCallbackDelegate(OnFocusedViewActivated);
1085 this.FocusedViewActivatedSignal().Connect(accessibilityManagerFocusedViewActivatedEventCallbackDelegate);
1088 accessibilityManagerFocusedViewActivatedEventHandler += value;
1093 accessibilityManagerFocusedViewActivatedEventHandler -= value;
1095 if (accessibilityManagerFocusedViewActivatedEventHandler == null && FocusedViewActivatedSignal().Empty() == false)
1097 this.FocusedViewActivatedSignal().Disconnect(accessibilityManagerFocusedViewActivatedEventCallbackDelegate);
1103 /// This signal is emitted when there is no way to move focus further.
1105 /// <returns> The signal to connect to </returns>
1106 /// <since_tizen> 6 </since_tizen>
1107 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1108 [EditorBrowsable(EditorBrowsableState.Never)]
1109 public event EventHandler<FocusOvershotEventArgs> FocusOvershot
1113 // Restricted to only one listener
1114 if (accessibilityManagerFocusOvershotEventHandler == null)
1116 accessibilityManagerFocusOvershotEventCallbackDelegate = new FocusOvershotEventCallbackDelegate(OnFocusOvershot);
1117 this.FocusOvershotSignal().Connect(accessibilityManagerFocusOvershotEventCallbackDelegate);
1120 accessibilityManagerFocusOvershotEventHandler += value;
1125 accessibilityManagerFocusOvershotEventHandler -= value;
1127 if (accessibilityManagerFocusOvershotEventHandler == null && FocusOvershotSignal().Empty() == false)
1129 this.FocusOvershotSignal().Disconnect(accessibilityManagerFocusOvershotEventCallbackDelegate);