2 * Copyright(c) 2020 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 EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerStatusChangedEventHandler;
29 private StatusChangedEventCallbackDelegate _accessibilityManagerStatusChangedEventCallbackDelegate;
31 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
32 private delegate bool ActionNextEventCallbackDelegate(IntPtr accessibilityManager);
33 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionNextEventHandler;
34 private ActionNextEventCallbackDelegate _accessibilityManagerActionNextEventCallbackDelegate;
36 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
37 private delegate bool ActionPreviousEventCallbackDelegate(IntPtr accessibilityManager);
38 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionPreviousEventHandler;
39 private ActionPreviousEventCallbackDelegate _accessibilityManagerActionPreviousEventCallbackDelegate;
41 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
42 private delegate bool ActionActivateEventCallbackDelegate(IntPtr accessibilityManager);
43 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionActivateEventHandler;
44 private ActionActivateEventCallbackDelegate _accessibilityManagerActionActivateEventCallbackDelegate;
46 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
47 private delegate bool ActionReadEventCallbackDelegate(IntPtr accessibilityManager);
48 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionReadEventHandler;
49 private ActionReadEventCallbackDelegate _accessibilityManagerActionReadEventCallbackDelegate;
51 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
52 private delegate bool ActionOverEventCallbackDelegate(IntPtr accessibilityManager);
53 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionOverEventHandler;
54 private ActionOverEventCallbackDelegate _accessibilityManagerActionOverEventCallbackDelegate;
56 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
57 private delegate bool ActionReadNextEventCallbackDelegate(IntPtr accessibilityManager);
58 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionReadNextEventHandler;
59 private ActionReadNextEventCallbackDelegate _accessibilityManagerActionReadNextEventCallbackDelegate;
61 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
62 private delegate bool ActionReadPreviousEventCallbackDelegate(IntPtr accessibilityManager);
63 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionReadPreviousEventHandler;
64 private ActionReadPreviousEventCallbackDelegate _accessibilityManagerActionReadPreviousEventCallbackDelegate;
66 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
67 private delegate bool ActionUpEventCallbackDelegate(IntPtr accessibilityManager);
68 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionUpEventHandler;
69 private ActionUpEventCallbackDelegate _accessibilityManagerActionUpEventCallbackDelegate;
71 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
72 private delegate bool ActionDownEventCallbackDelegate(IntPtr accessibilityManager);
73 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionDownEventHandler;
74 private ActionDownEventCallbackDelegate _accessibilityManagerActionDownEventCallbackDelegate;
76 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
77 private delegate bool ActionClearFocusEventCallbackDelegate(IntPtr accessibilityManager);
78 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionClearFocusEventHandler;
79 private ActionClearFocusEventCallbackDelegate _accessibilityManagerActionClearFocusEventCallbackDelegate;
81 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
82 private delegate bool ActionBackEventCallbackDelegate(IntPtr accessibilityManager);
83 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionBackEventHandler;
84 private ActionBackEventCallbackDelegate _accessibilityManagerActionBackEventCallbackDelegate;
86 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
87 private delegate bool ActionScrollUpEventCallbackDelegate(IntPtr accessibilityManager);
88 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionScrollUpEventHandler;
89 private ActionScrollUpEventCallbackDelegate _accessibilityManagerActionScrollUpEventCallbackDelegate;
91 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
92 private delegate bool ActionScrollDownEventCallbackDelegate(IntPtr accessibilityManager);
93 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionScrollDownEventHandler;
94 private ActionScrollDownEventCallbackDelegate _accessibilityManagerActionScrollDownEventCallbackDelegate;
96 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
97 private delegate bool ActionPageLeftEventCallbackDelegate(IntPtr accessibilityManager);
98 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionPageLeftEventHandler;
99 private ActionPageLeftEventCallbackDelegate _accessibilityManagerActionPageLeftEventCallbackDelegate;
101 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
102 private delegate bool ActionPageRightEventCallbackDelegate(IntPtr accessibilityManager);
103 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionPageRightEventHandler;
104 private ActionPageRightEventCallbackDelegate _accessibilityManagerActionPageRightEventCallbackDelegate;
106 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
107 private delegate bool ActionPageUpEventCallbackDelegate(IntPtr accessibilityManager);
108 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionPageUpEventHandler;
109 private ActionPageUpEventCallbackDelegate _accessibilityManagerActionPageUpEventCallbackDelegate;
111 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
112 private delegate bool ActionPageDownEventCallbackDelegate(IntPtr accessibilityManager);
113 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionPageDownEventHandler;
114 private ActionPageDownEventCallbackDelegate _accessibilityManagerActionPageDownEventCallbackDelegate;
116 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
117 private delegate bool ActionMoveToFirstEventCallbackDelegate(IntPtr accessibilityManager);
118 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionMoveToFirstEventHandler;
119 private ActionMoveToFirstEventCallbackDelegate _accessibilityManagerActionMoveToFirstEventCallbackDelegate;
121 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
122 private delegate bool ActionMoveToLastEventCallbackDelegate(IntPtr accessibilityManager);
123 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionMoveToLastEventHandler;
124 private ActionMoveToLastEventCallbackDelegate _accessibilityManagerActionMoveToLastEventCallbackDelegate;
126 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
127 private delegate bool ActionReadFromTopEventCallbackDelegate(IntPtr accessibilityManager);
128 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionReadFromTopEventHandler;
129 private ActionReadFromTopEventCallbackDelegate _accessibilityManagerActionReadFromTopEventCallbackDelegate;
131 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
132 private delegate bool ActionReadFromNextEventCallbackDelegate(IntPtr accessibilityManager);
133 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionReadFromNextEventHandler;
134 private ActionReadFromNextEventCallbackDelegate _accessibilityManagerActionReadFromNextEventCallbackDelegate;
136 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
137 private delegate bool ActionZoomEventCallbackDelegate(IntPtr accessibilityManager);
138 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionZoomEventHandler;
139 private ActionZoomEventCallbackDelegate _accessibilityManagerActionZoomEventCallbackDelegate;
141 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
142 private delegate bool ActionReadPauseResumeEventCallbackDelegate(IntPtr accessibilityManager);
143 private EventHandlerWithReturnType<object, EventArgs, bool> _accessibilityManagerActionReadPauseResumeEventHandler;
144 private ActionReadPauseResumeEventCallbackDelegate _accessibilityManagerActionReadPauseResumeEventCallbackDelegate;
146 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
147 private delegate bool ActionStartStopEventCallbackDelegate(IntPtr accessibilityManager);
148 private EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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 EventHandlerWithReturnType<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);