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.Cdecl)]
27 private delegate bool StatusChangedEventCallbackDelegate(IntPtr accessibilityManager);
28 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerStatusChangedEventHandler;
29 private StatusChangedEventCallbackDelegate accessibilityManagerStatusChangedEventCallbackDelegate;
31 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
32 private delegate bool ActionNextEventCallbackDelegate(IntPtr accessibilityManager);
33 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionNextEventHandler;
34 private ActionNextEventCallbackDelegate accessibilityManagerActionNextEventCallbackDelegate;
36 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
37 private delegate bool ActionPreviousEventCallbackDelegate(IntPtr accessibilityManager);
38 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionPreviousEventHandler;
39 private ActionPreviousEventCallbackDelegate accessibilityManagerActionPreviousEventCallbackDelegate;
41 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
42 private delegate bool ActionActivateEventCallbackDelegate(IntPtr accessibilityManager);
43 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionActivateEventHandler;
44 private ActionActivateEventCallbackDelegate accessibilityManagerActionActivateEventCallbackDelegate;
46 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
47 private delegate bool ActionReadEventCallbackDelegate(IntPtr accessibilityManager);
48 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionReadEventHandler;
49 private ActionReadEventCallbackDelegate accessibilityManagerActionReadEventCallbackDelegate;
51 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
52 private delegate bool ActionOverEventCallbackDelegate(IntPtr accessibilityManager);
53 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionOverEventHandler;
54 private ActionOverEventCallbackDelegate accessibilityManagerActionOverEventCallbackDelegate;
56 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
57 private delegate bool ActionReadNextEventCallbackDelegate(IntPtr accessibilityManager);
58 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionReadNextEventHandler;
59 private ActionReadNextEventCallbackDelegate accessibilityManagerActionReadNextEventCallbackDelegate;
61 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
62 private delegate bool ActionReadPreviousEventCallbackDelegate(IntPtr accessibilityManager);
63 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionReadPreviousEventHandler;
64 private ActionReadPreviousEventCallbackDelegate accessibilityManagerActionReadPreviousEventCallbackDelegate;
66 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
67 private delegate bool ActionUpEventCallbackDelegate(IntPtr accessibilityManager);
68 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionUpEventHandler;
69 private ActionUpEventCallbackDelegate accessibilityManagerActionUpEventCallbackDelegate;
71 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
72 private delegate bool ActionDownEventCallbackDelegate(IntPtr accessibilityManager);
73 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionDownEventHandler;
74 private ActionDownEventCallbackDelegate accessibilityManagerActionDownEventCallbackDelegate;
76 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
77 private delegate bool ActionClearFocusEventCallbackDelegate(IntPtr accessibilityManager);
78 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionClearFocusEventHandler;
79 private ActionClearFocusEventCallbackDelegate accessibilityManagerActionClearFocusEventCallbackDelegate;
81 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
82 private delegate bool ActionBackEventCallbackDelegate(IntPtr accessibilityManager);
83 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionBackEventHandler;
84 private ActionBackEventCallbackDelegate accessibilityManagerActionBackEventCallbackDelegate;
86 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
87 private delegate bool ActionScrollUpEventCallbackDelegate(IntPtr accessibilityManager);
88 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionScrollUpEventHandler;
89 private ActionScrollUpEventCallbackDelegate accessibilityManagerActionScrollUpEventCallbackDelegate;
91 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
92 private delegate bool ActionScrollDownEventCallbackDelegate(IntPtr accessibilityManager);
93 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionScrollDownEventHandler;
94 private ActionScrollDownEventCallbackDelegate accessibilityManagerActionScrollDownEventCallbackDelegate;
96 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
97 private delegate bool ActionPageLeftEventCallbackDelegate(IntPtr accessibilityManager);
98 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionPageLeftEventHandler;
99 private ActionPageLeftEventCallbackDelegate accessibilityManagerActionPageLeftEventCallbackDelegate;
101 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
102 private delegate bool ActionPageRightEventCallbackDelegate(IntPtr accessibilityManager);
103 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionPageRightEventHandler;
104 private ActionPageRightEventCallbackDelegate accessibilityManagerActionPageRightEventCallbackDelegate;
106 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
107 private delegate bool ActionPageUpEventCallbackDelegate(IntPtr accessibilityManager);
108 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionPageUpEventHandler;
109 private ActionPageUpEventCallbackDelegate accessibilityManagerActionPageUpEventCallbackDelegate;
111 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
112 private delegate bool ActionPageDownEventCallbackDelegate(IntPtr accessibilityManager);
113 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionPageDownEventHandler;
114 private ActionPageDownEventCallbackDelegate accessibilityManagerActionPageDownEventCallbackDelegate;
116 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
117 private delegate bool ActionMoveToFirstEventCallbackDelegate(IntPtr accessibilityManager);
118 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionMoveToFirstEventHandler;
119 private ActionMoveToFirstEventCallbackDelegate accessibilityManagerActionMoveToFirstEventCallbackDelegate;
121 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
122 private delegate bool ActionMoveToLastEventCallbackDelegate(IntPtr accessibilityManager);
123 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionMoveToLastEventHandler;
124 private ActionMoveToLastEventCallbackDelegate accessibilityManagerActionMoveToLastEventCallbackDelegate;
126 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
127 private delegate bool ActionReadFromTopEventCallbackDelegate(IntPtr accessibilityManager);
128 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionReadFromTopEventHandler;
129 private ActionReadFromTopEventCallbackDelegate accessibilityManagerActionReadFromTopEventCallbackDelegate;
131 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
132 private delegate bool ActionReadFromNextEventCallbackDelegate(IntPtr accessibilityManager);
133 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionReadFromNextEventHandler;
134 private ActionReadFromNextEventCallbackDelegate accessibilityManagerActionReadFromNextEventCallbackDelegate;
136 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
137 private delegate bool ActionZoomEventCallbackDelegate(IntPtr accessibilityManager);
138 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionZoomEventHandler;
139 private ActionZoomEventCallbackDelegate accessibilityManagerActionZoomEventCallbackDelegate;
141 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
142 private delegate bool ActionReadPauseResumeEventCallbackDelegate(IntPtr accessibilityManager);
143 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionReadPauseResumeEventHandler;
144 private ActionReadPauseResumeEventCallbackDelegate accessibilityManagerActionReadPauseResumeEventCallbackDelegate;
146 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
147 private delegate bool ActionStartStopEventCallbackDelegate(IntPtr accessibilityManager);
148 private ReturnTypeEventHandler<object, EventArgs, bool> accessibilityManagerActionStartStopEventHandler;
149 private ActionStartStopEventCallbackDelegate accessibilityManagerActionStartStopEventCallbackDelegate;
151 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
152 private delegate void FocusChangedEventCallbackDelegate(IntPtr view1, IntPtr view2);
153 private EventHandler<FocusChangedEventArgs> accessibilityManagerFocusChangedEventHandler;
154 private FocusChangedEventCallbackDelegate accessibilityManagerFocusChangedEventCallbackDelegate;
156 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
157 private delegate void FocusedViewActivatedEventCallbackDelegate(IntPtr view);
158 private EventHandler<FocusedViewActivatedEventArgs> accessibilityManagerFocusedViewActivatedEventHandler;
159 private FocusedViewActivatedEventCallbackDelegate accessibilityManagerFocusedViewActivatedEventCallbackDelegate;
161 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
162 private delegate void FocusOvershotEventCallbackDelegate(IntPtr currentFocusedView, AccessibilityManager.FocusOvershotDirection direction);
163 private EventHandler<FocusOvershotEventArgs> accessibilityManagerFocusOvershotEventHandler;
164 private FocusOvershotEventCallbackDelegate accessibilityManagerFocusOvershotEventCallbackDelegate;
166 // Accessibility action signals
169 /// This is emitted when accessibility(screen-reader) feature turned on or off.
171 /// <returns> The signal to connect to </returns>
172 /// <since_tizen> 6 </since_tizen>
173 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
174 [EditorBrowsable(EditorBrowsableState.Never)]
175 public event ReturnTypeEventHandler<object, EventArgs, bool> StatusChanged
179 // Restricted to only one listener
180 if (accessibilityManagerStatusChangedEventHandler == null)
182 accessibilityManagerStatusChangedEventCallbackDelegate = new StatusChangedEventCallbackDelegate(OnStatusChanged);
183 this.StatusChangedSignal().Connect(accessibilityManagerStatusChangedEventCallbackDelegate);
186 accessibilityManagerStatusChangedEventHandler += value;
191 accessibilityManagerStatusChangedEventHandler -= value;
193 if (accessibilityManagerStatusChangedEventHandler == null && StatusChangedSignal().Empty() == false)
195 this.StatusChangedSignal().Disconnect(accessibilityManagerStatusChangedEventCallbackDelegate);
202 /// This is emitted when accessibility action is received to move focus to the next focusable view (by one finger flick down).
204 /// <returns> The signal to connect to </returns>
205 /// <since_tizen> 6 </since_tizen>
206 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
207 [EditorBrowsable(EditorBrowsableState.Never)]
208 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionNext
212 // Restricted to only one listener
213 if (accessibilityManagerActionNextEventHandler == null)
215 accessibilityManagerActionNextEventCallbackDelegate = new ActionNextEventCallbackDelegate(OnActionNext);
216 this.ActionNextSignal().Connect(accessibilityManagerActionNextEventCallbackDelegate);
219 accessibilityManagerActionNextEventHandler += value;
224 accessibilityManagerActionNextEventHandler -= value;
226 if (accessibilityManagerActionNextEventHandler == null && ActionNextSignal().Empty() == false)
228 this.ActionNextSignal().Disconnect(accessibilityManagerActionNextEventCallbackDelegate);
234 /// This is emitted when accessibility action is received to move focus to the previous focusable view (by one finger flick up).
236 /// <returns> The signal to connect to </returns>
237 /// <since_tizen> 6 </since_tizen>
238 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
239 [EditorBrowsable(EditorBrowsableState.Never)]
240 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionPrevious
244 // Restricted to only one listener
245 if (accessibilityManagerActionPreviousEventHandler == null)
247 accessibilityManagerActionPreviousEventCallbackDelegate = new ActionPreviousEventCallbackDelegate(OnActionPrevious);
248 this.ActionPreviousSignal().Connect(accessibilityManagerActionPreviousEventCallbackDelegate);
251 accessibilityManagerActionPreviousEventHandler += value;
256 accessibilityManagerActionPreviousEventHandler -= value;
258 if (accessibilityManagerActionPreviousEventHandler == null && ActionPreviousSignal().Empty() == false)
260 this.ActionPreviousSignal().Disconnect(accessibilityManagerActionPreviousEventCallbackDelegate);
266 /// This is emitted when accessibility action is received to activate the current focused view (by one finger double tap).
268 /// <returns> The signal to connect to </returns>
269 /// <since_tizen> 6 </since_tizen>
270 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
271 [EditorBrowsable(EditorBrowsableState.Never)]
272 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionActivate
276 // Restricted to only one listener
277 if (accessibilityManagerActionActivateEventHandler == null)
279 accessibilityManagerActionActivateEventCallbackDelegate = new ActionActivateEventCallbackDelegate(OnActionActivate);
280 this.ActionActivateSignal().Connect(accessibilityManagerActionActivateEventCallbackDelegate);
283 accessibilityManagerActionActivateEventHandler += value;
288 accessibilityManagerActionActivateEventHandler -= value;
290 if (accessibilityManagerActionActivateEventHandler == null && ActionActivateSignal().Empty() == false)
292 this.ActionActivateSignal().Disconnect(accessibilityManagerActionActivateEventCallbackDelegate);
298 /// This is emitted when accessibility action is received to focus and read the view (by one finger tap).
300 /// <returns> The signal to connect to </returns>
301 /// <since_tizen> 6 </since_tizen>
302 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
303 [EditorBrowsable(EditorBrowsableState.Never)]
304 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionRead
308 // Restricted to only one listener
309 if (accessibilityManagerActionReadEventHandler == null)
311 accessibilityManagerActionReadEventCallbackDelegate = new ActionReadEventCallbackDelegate(OnActionRead);
312 this.ActionReadSignal().Connect(accessibilityManagerActionReadEventCallbackDelegate);
315 accessibilityManagerActionReadEventHandler += value;
320 accessibilityManagerActionReadEventHandler -= value;
322 if (accessibilityManagerActionReadEventHandler == null && ActionReadSignal().Empty() == false)
324 this.ActionReadSignal().Disconnect(accessibilityManagerActionReadEventCallbackDelegate);
330 /// This is emitted when accessibility action is received to focus and read the view (by one finger move).
332 /// <returns> The signal to connect to </returns>
333 /// <since_tizen> 6 </since_tizen>
334 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
335 [EditorBrowsable(EditorBrowsableState.Never)]
336 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionOver
340 // Restricted to only one listener
341 if (accessibilityManagerActionOverEventHandler == null)
343 accessibilityManagerActionOverEventCallbackDelegate = new ActionOverEventCallbackDelegate(OnActionOver);
344 this.ActionOverSignal().Connect(accessibilityManagerActionOverEventCallbackDelegate);
347 accessibilityManagerActionOverEventHandler += value;
352 accessibilityManagerActionOverEventHandler -= value;
354 if (accessibilityManagerActionOverEventHandler == null && ActionOverSignal().Empty() == false)
356 this.ActionOverSignal().Disconnect(accessibilityManagerActionOverEventCallbackDelegate);
363 /// This is emitted when accessibility action is received to move focus to the next focusable view (by one finger flick right).
365 /// <returns> The signal to connect to </returns>
366 /// <since_tizen> 6 </since_tizen>
367 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
368 [EditorBrowsable(EditorBrowsableState.Never)]
369 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionReadNext
373 // Restricted to only one listener
374 if (accessibilityManagerActionReadNextEventHandler == null)
376 accessibilityManagerActionReadNextEventCallbackDelegate = new ActionReadNextEventCallbackDelegate(OnActionReadNext);
377 this.ActionReadNextSignal().Connect(accessibilityManagerActionReadNextEventCallbackDelegate);
380 accessibilityManagerActionReadNextEventHandler += value;
385 accessibilityManagerActionReadNextEventHandler -= value;
387 if (accessibilityManagerActionReadNextEventHandler == null && ActionReadNextSignal().Empty() == false)
389 this.ActionReadNextSignal().Disconnect(accessibilityManagerActionReadNextEventCallbackDelegate);
395 /// This is emitted when accessibility action is received to move focus to the previous focusable view (by one finger flick left).
397 /// <returns> The signal to connect to </returns>
398 /// <since_tizen> 6 </since_tizen>
399 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
400 [EditorBrowsable(EditorBrowsableState.Never)]
401 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionReadPrevious
405 // Restricted to only one listener
406 if (accessibilityManagerActionReadPreviousEventHandler == null)
408 accessibilityManagerActionReadPreviousEventCallbackDelegate = new ActionReadPreviousEventCallbackDelegate(OnActionReadPrevious);
409 this.ActionReadPreviousSignal().Connect(accessibilityManagerActionReadPreviousEventCallbackDelegate);
412 accessibilityManagerActionReadPreviousEventHandler += value;
417 accessibilityManagerActionReadPreviousEventHandler -= value;
419 if (accessibilityManagerActionReadPreviousEventHandler == null && ActionReadPreviousSignal().Empty() == false)
421 this.ActionReadPreviousSignal().Disconnect(accessibilityManagerActionReadPreviousEventCallbackDelegate);
427 /// This is emitted when accessibility action is received to change the value when the current focused view is a slider
428 /// (by double finger down and move up and right).
430 /// <returns> The signal to connect to </returns>
431 /// <since_tizen> 6 </since_tizen>
432 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
433 [EditorBrowsable(EditorBrowsableState.Never)]
434 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionUp
438 // Restricted to only one listener
439 if (accessibilityManagerActionUpEventHandler == null)
441 accessibilityManagerActionUpEventCallbackDelegate = new ActionUpEventCallbackDelegate(OnActionUp);
442 this.ActionUpSignal().Connect(accessibilityManagerActionUpEventCallbackDelegate);
445 accessibilityManagerActionUpEventHandler += value;
450 accessibilityManagerActionUpEventHandler -= value;
452 if (accessibilityManagerActionUpEventHandler == null && ActionUpSignal().Empty() == false)
454 this.ActionUpSignal().Disconnect(accessibilityManagerActionUpEventCallbackDelegate);
460 /// This is emitted when accessibility action is received to change the value when the current focused view is a slider
461 /// (by double finger down and move down and left).
463 /// <returns> The signal to connect to </returns>
464 /// <since_tizen> 6 </since_tizen>
465 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
466 [EditorBrowsable(EditorBrowsableState.Never)]
467 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionDown
471 // Restricted to only one listener
472 if (accessibilityManagerActionDownEventHandler == null)
474 accessibilityManagerActionDownEventCallbackDelegate = new ActionDownEventCallbackDelegate(OnActionDown);
475 this.ActionDownSignal().Connect(accessibilityManagerActionDownEventCallbackDelegate);
478 accessibilityManagerActionDownEventHandler += value;
483 accessibilityManagerActionDownEventHandler -= value;
485 if (accessibilityManagerActionDownEventHandler == null && ActionDownSignal().Empty() == false)
487 this.ActionDownSignal().Disconnect(accessibilityManagerActionDownEventCallbackDelegate);
493 /// This is emitted when accessibility action is received to clear the focus from the current focused view
494 /// if any, so that no view is focused in the focus chain.
496 /// <returns> The signal to connect to </returns>
497 /// <since_tizen> 6 </since_tizen>
498 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
499 [EditorBrowsable(EditorBrowsableState.Never)]
500 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionClearFocus
504 // Restricted to only one listener
505 if (accessibilityManagerActionClearFocusEventHandler == null)
507 accessibilityManagerActionClearFocusEventCallbackDelegate = new ActionClearFocusEventCallbackDelegate(OnActionClearFocus);
508 this.ActionClearFocusSignal().Connect(accessibilityManagerActionClearFocusEventCallbackDelegate);
511 accessibilityManagerActionClearFocusEventHandler += value;
516 accessibilityManagerActionClearFocusEventHandler -= value;
518 if (accessibilityManagerActionClearFocusEventHandler == null && ActionClearFocusSignal().Empty() == false)
520 this.ActionClearFocusSignal().Disconnect(accessibilityManagerActionClearFocusEventCallbackDelegate);
526 /// This is emitted when accessibility action is received to navigate back (by two fingers circle draw).
528 /// <returns> The signal to connect to </returns>
529 /// <since_tizen> 6 </since_tizen>
530 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
531 [EditorBrowsable(EditorBrowsableState.Never)]
532 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionBack
536 // Restricted to only one listener
537 if (accessibilityManagerActionBackEventHandler == null)
539 accessibilityManagerActionBackEventCallbackDelegate = new ActionBackEventCallbackDelegate(OnActionBack);
540 this.ActionBackSignal().Connect(accessibilityManagerActionBackEventCallbackDelegate);
543 accessibilityManagerActionBackEventHandler += value;
548 accessibilityManagerActionBackEventHandler -= value;
550 if (accessibilityManagerActionBackEventHandler == null && ActionBackSignal().Empty() == false)
552 this.ActionBackSignal().Disconnect(accessibilityManagerActionBackEventCallbackDelegate);
558 /// This is emitted when accessibility action is received to scroll up the list (by two finger swipe up).
560 /// <returns> The signal to connect to </returns>
561 /// <since_tizen> 6 </since_tizen>
562 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
563 [EditorBrowsable(EditorBrowsableState.Never)]
564 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionScrollUp
568 // Restricted to only one listener
569 if (accessibilityManagerActionScrollUpEventHandler == null)
571 accessibilityManagerActionScrollUpEventCallbackDelegate = new ActionScrollUpEventCallbackDelegate(OnActionScrollUp);
572 this.ActionScrollUpSignal().Connect(accessibilityManagerActionScrollUpEventCallbackDelegate);
575 accessibilityManagerActionScrollUpEventHandler += value;
580 accessibilityManagerActionScrollUpEventHandler -= value;
582 if (accessibilityManagerActionScrollUpEventHandler == null && ActionScrollUpSignal().Empty() == false)
584 this.ActionScrollUpSignal().Disconnect(accessibilityManagerActionScrollUpEventCallbackDelegate);
590 /// This is emitted when accessibility action is received to scroll down the list (by two finger swipe down).
592 /// <returns> The signal to connect to </returns>
593 /// <since_tizen> 6 </since_tizen>
594 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
595 [EditorBrowsable(EditorBrowsableState.Never)]
596 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionScrollDown
600 // Restricted to only one listener
601 if (accessibilityManagerActionScrollDownEventHandler == null)
603 accessibilityManagerActionScrollDownEventCallbackDelegate = new ActionScrollDownEventCallbackDelegate(OnActionScrollDown);
604 this.ActionScrollDownSignal().Connect(accessibilityManagerActionScrollDownEventCallbackDelegate);
607 accessibilityManagerActionScrollDownEventHandler += value;
612 accessibilityManagerActionScrollDownEventHandler -= value;
614 if (accessibilityManagerActionScrollDownEventHandler == null && ActionScrollDownSignal().Empty() == false)
616 this.ActionScrollDownSignal().Disconnect(accessibilityManagerActionScrollDownEventCallbackDelegate);
622 /// This is emitted when accessibility action is received to scroll left to the previous page (by two finger swipe left).
624 /// <returns> The signal to connect to </returns>
625 /// <since_tizen> 6 </since_tizen>
626 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
627 [EditorBrowsable(EditorBrowsableState.Never)]
628 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionPageLeft
632 // Restricted to only one listener
633 if (accessibilityManagerActionPageLeftEventHandler == null)
635 accessibilityManagerActionPageLeftEventCallbackDelegate = new ActionPageLeftEventCallbackDelegate(OnActionPageLeft);
636 this.ActionPageLeftSignal().Connect(accessibilityManagerActionPageLeftEventCallbackDelegate);
639 accessibilityManagerActionPageLeftEventHandler += value;
644 accessibilityManagerActionPageLeftEventHandler -= value;
646 if (accessibilityManagerActionPageLeftEventHandler == null && ActionPageLeftSignal().Empty() == false)
648 this.ActionPageLeftSignal().Disconnect(accessibilityManagerActionPageLeftEventCallbackDelegate);
654 /// This is emitted when accessibility action is received to scroll right to the next page (by two finger swipe right).
656 /// <returns> The signal to connect to </returns>
657 /// <since_tizen> 6 </since_tizen>
658 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
659 [EditorBrowsable(EditorBrowsableState.Never)]
660 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionPageRight
664 // Restricted to only one listener
665 if (accessibilityManagerActionPageRightEventHandler == null)
667 accessibilityManagerActionPageRightEventCallbackDelegate = new ActionPageRightEventCallbackDelegate(OnActionPageRight);
668 this.ActionPageRightSignal().Connect(accessibilityManagerActionPageRightEventCallbackDelegate);
671 accessibilityManagerActionPageRightEventHandler += value;
676 accessibilityManagerActionPageRightEventHandler -= value;
678 if (accessibilityManagerActionPageRightEventHandler == null && ActionPageRightSignal().Empty() == false)
680 this.ActionPageRightSignal().Disconnect(accessibilityManagerActionPageRightEventCallbackDelegate);
686 /// This is emitted when accessibility action is received to scroll up to the previous page (by one finger swipe left and right).
688 /// <returns> The signal to connect to </returns>
689 /// <since_tizen> 6 </since_tizen>
690 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
691 [EditorBrowsable(EditorBrowsableState.Never)]
692 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionPageUp
696 // Restricted to only one listener
697 if (accessibilityManagerActionPageUpEventHandler == null)
699 accessibilityManagerActionPageUpEventCallbackDelegate = new ActionPageUpEventCallbackDelegate(OnActionPageUp);
700 this.ActionPageUpSignal().Connect(accessibilityManagerActionPageUpEventCallbackDelegate);
703 accessibilityManagerActionPageUpEventHandler += value;
708 accessibilityManagerActionPageUpEventHandler -= value;
710 if (accessibilityManagerActionPageUpEventHandler == null && ActionPageUpSignal().Empty() == false)
712 this.ActionPageUpSignal().Disconnect(accessibilityManagerActionPageUpEventCallbackDelegate);
718 /// This is emitted when accessibility action is received to scroll down to the next page (by one finger swipe right and left).
720 /// <returns> The signal to connect to </returns>
721 /// <since_tizen> 6 </since_tizen>
722 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
723 [EditorBrowsable(EditorBrowsableState.Never)]
724 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionPageDown
728 // Restricted to only one listener
729 if (accessibilityManagerActionPageDownEventHandler == null)
731 accessibilityManagerActionPageDownEventCallbackDelegate = new ActionPageDownEventCallbackDelegate(OnActionPageDown);
732 this.ActionPageDownSignal().Connect(accessibilityManagerActionPageDownEventCallbackDelegate);
735 accessibilityManagerActionPageDownEventHandler += value;
740 accessibilityManagerActionPageDownEventHandler -= value;
742 if (accessibilityManagerActionPageDownEventHandler == null && ActionPageDownSignal().Empty() == false)
744 this.ActionPageDownSignal().Disconnect(accessibilityManagerActionPageDownEventCallbackDelegate);
750 /// This is emitted when accessibility action is received to move the focus to the first item on the screen
751 /// (by one finger swipe up and down).
753 /// <returns> The signal to connect to </returns>
754 /// <since_tizen> 6 </since_tizen>
755 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
756 [EditorBrowsable(EditorBrowsableState.Never)]
757 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionMoveToFirst
761 // Restricted to only one listener
762 if (accessibilityManagerActionMoveToFirstEventHandler == null)
764 accessibilityManagerActionMoveToFirstEventCallbackDelegate = new ActionMoveToFirstEventCallbackDelegate(OnActionMoveToFirst);
765 this.ActionMoveToFirstSignal().Connect(accessibilityManagerActionMoveToFirstEventCallbackDelegate);
768 accessibilityManagerActionMoveToFirstEventHandler += value;
773 accessibilityManagerActionMoveToFirstEventHandler -= value;
775 if (accessibilityManagerActionMoveToFirstEventHandler == null && ActionMoveToFirstSignal().Empty() == false)
777 this.ActionMoveToFirstSignal().Disconnect(accessibilityManagerActionMoveToFirstEventCallbackDelegate);
783 /// This is emitted when accessibility action is received to move the focus to the last item on the screen
784 /// (by one finger swipe down and up).
786 /// <returns> The signal to connect to </returns>
787 /// <since_tizen> 6 </since_tizen>
788 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
789 [EditorBrowsable(EditorBrowsableState.Never)]
790 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionMoveToLast
794 // Restricted to only one listener
795 if (accessibilityManagerActionMoveToLastEventHandler == null)
797 accessibilityManagerActionMoveToLastEventCallbackDelegate = new ActionMoveToLastEventCallbackDelegate(OnActionMoveToLast);
798 this.ActionMoveToLastSignal().Connect(accessibilityManagerActionMoveToLastEventCallbackDelegate);
801 accessibilityManagerActionMoveToLastEventHandler += value;
806 accessibilityManagerActionMoveToLastEventHandler -= value;
808 if (accessibilityManagerActionMoveToLastEventHandler == null && ActionMoveToLastSignal().Empty() == false)
810 this.ActionMoveToLastSignal().Disconnect(accessibilityManagerActionMoveToLastEventCallbackDelegate);
816 /// This is emitted when accessibility action is received to focus and read from the first item on the top continuously
817 /// (by three fingers single tap).
819 /// <returns> The signal to connect to </returns>
820 /// <since_tizen> 6 </since_tizen>
821 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
822 [EditorBrowsable(EditorBrowsableState.Never)]
823 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionReadFromTop
827 // Restricted to only one listener
828 if (accessibilityManagerActionReadFromTopEventHandler == null)
830 accessibilityManagerActionReadFromTopEventCallbackDelegate = new ActionReadFromTopEventCallbackDelegate(OnActionReadFromTop);
831 this.ActionReadFromTopSignal().Connect(accessibilityManagerActionReadFromTopEventCallbackDelegate);
834 accessibilityManagerActionReadFromTopEventHandler += value;
839 accessibilityManagerActionReadFromTopEventHandler -= value;
841 if (accessibilityManagerActionReadFromTopEventHandler == null && ActionReadFromTopSignal().Empty() == false)
843 this.ActionReadFromTopSignal().Disconnect(accessibilityManagerActionReadFromTopEventCallbackDelegate);
849 /// This is emitted when accessibility action is received to move the focus to and read from the next item continuously
850 /// (by three fingers double tap).
852 /// <returns> The signal to connect to </returns>
853 /// <since_tizen> 6 </since_tizen>
854 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
855 [EditorBrowsable(EditorBrowsableState.Never)]
856 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionReadFromNext
860 // Restricted to only one listener
861 if (accessibilityManagerActionReadFromNextEventHandler == null)
863 accessibilityManagerActionReadFromNextEventCallbackDelegate = new ActionReadFromNextEventCallbackDelegate(OnActionReadFromNext);
864 this.ActionReadFromNextSignal().Connect(accessibilityManagerActionReadFromNextEventCallbackDelegate);
867 accessibilityManagerActionReadFromNextEventHandler += value;
872 accessibilityManagerActionReadFromNextEventHandler -= value;
874 if (accessibilityManagerActionReadFromNextEventHandler == null && ActionReadFromNextSignal().Empty() == false)
876 this.ActionReadFromNextSignal().Disconnect(accessibilityManagerActionReadFromNextEventCallbackDelegate);
882 /// This is emitted when accessibility action is received to zoom (by one finger triple tap)
884 /// <returns> The signal to connect to </returns>
885 /// <since_tizen> 6 </since_tizen>
886 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
887 [EditorBrowsable(EditorBrowsableState.Never)]
888 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionZoom
892 // Restricted to only one listener
893 if (accessibilityManagerActionZoomEventHandler == null)
895 accessibilityManagerActionZoomEventCallbackDelegate = new ActionZoomEventCallbackDelegate(OnActionZoom);
896 this.ActionZoomSignal().Connect(accessibilityManagerActionZoomEventCallbackDelegate);
899 accessibilityManagerActionZoomEventHandler += value;
904 accessibilityManagerActionZoomEventHandler -= value;
906 if (accessibilityManagerActionZoomEventHandler == null && ActionZoomSignal().Empty() == false)
908 this.ActionZoomSignal().Disconnect(accessibilityManagerActionZoomEventCallbackDelegate);
914 /// This is emitted when accessibility action is received to pause/resume the current speech (by two fingers single tap).
916 /// <returns> The signal to connect to </returns>
917 /// <since_tizen> 6 </since_tizen>
918 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
919 [EditorBrowsable(EditorBrowsableState.Never)]
920 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionReadPauseResume
924 // Restricted to only one listener
925 if (accessibilityManagerActionReadPauseResumeEventHandler == null)
927 accessibilityManagerActionReadPauseResumeEventCallbackDelegate = new ActionReadPauseResumeEventCallbackDelegate(OnActionReadPauseResume);
928 this.ActionReadPauseResumeSignal().Connect(accessibilityManagerActionReadPauseResumeEventCallbackDelegate);
931 accessibilityManagerActionReadPauseResumeEventHandler += value;
936 accessibilityManagerActionReadPauseResumeEventHandler -= value;
938 if (accessibilityManagerActionReadPauseResumeEventHandler == null && ActionReadPauseResumeSignal().Empty() == false)
940 this.ActionReadPauseResumeSignal().Disconnect(accessibilityManagerActionReadPauseResumeEventCallbackDelegate);
946 /// This is emitted when accessibility action is received to start/stop the current action (by two fingers double tap).
948 /// <returns> The signal to connect to </returns>
949 /// <since_tizen> 6 </since_tizen>
950 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
951 [EditorBrowsable(EditorBrowsableState.Never)]
952 public event ReturnTypeEventHandler<object, EventArgs, bool> ActionStartStop
956 // Restricted to only one listener
957 if (accessibilityManagerActionStartStopEventHandler == null)
959 accessibilityManagerActionStartStopEventCallbackDelegate = new ActionStartStopEventCallbackDelegate(OnActionStartStop);
960 this.ActionStartStopSignal().Connect(accessibilityManagerActionStartStopEventCallbackDelegate);
963 accessibilityManagerActionStartStopEventHandler += value;
968 accessibilityManagerActionStartStopEventHandler -= value;
970 if (accessibilityManagerActionStartStopEventHandler == null && ActionStartStopSignal().Empty() == false)
972 this.ActionStartStopSignal().Disconnect(accessibilityManagerActionStartStopEventCallbackDelegate);
978 // To be replaced by a new event that takes Touch
979 public event DaliEventHandlerWithReturnType<object,ActionScrollEventArgs,bool> ActionScroll
985 // Restricted to only one listener
986 if (_accessibilityManagerActionScrollEventHandler == null)
988 _accessibilityManagerActionScrollEventHandler += value;
990 _accessibilityManagerActionScrollEventCallbackDelegate = new ActionScrollEventCallbackDelegate(OnActionScroll);
991 this.ActionScrollSignal().Connect(_accessibilityManagerActionScrollEventCallbackDelegate);
1000 if (_accessibilityManagerActionScrollEventHandler != null)
1002 this.ActionScrollSignal().Disconnect(_accessibilityManagerActionScrollEventCallbackDelegate);
1005 _accessibilityManagerActionScrollEventHandler -= value;
1010 // Callback for AccessibilityManager ActionScrollSignal
1011 private bool OnActionScroll(IntPtr accessibilityManager, IntPtr touchEvent)
1013 ActionScrollEventArgs e = new ActionScrollEventArgs();
1015 // Populate all members of "e" (ActionScrollEventArgs) with real data
1016 e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(accessibilityManager);
1017 e.TouchEvent = TouchEvent.GetTouchEventFromPtr(touchEvent);
1019 if (_accessibilityManagerActionScrollEventHandler != null)
1021 //here we send all data to user event handlers
1022 return _accessibilityManagerActionScrollEventHandler(this, e);
1031 /// This signal is emitted when the current focused view is changed.
1033 /// <returns> The signal to connect to </returns>
1034 /// <since_tizen> 6 </since_tizen>
1035 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1036 [EditorBrowsable(EditorBrowsableState.Never)]
1037 public event EventHandler<FocusChangedEventArgs> FocusChanged
1041 // Restricted to only one listener
1042 if (accessibilityManagerFocusChangedEventHandler == null)
1044 accessibilityManagerFocusChangedEventCallbackDelegate = new FocusChangedEventCallbackDelegate(OnFocusChanged);
1045 this.FocusChangedSignal().Connect(accessibilityManagerFocusChangedEventCallbackDelegate);
1048 accessibilityManagerFocusChangedEventHandler += value;
1053 accessibilityManagerFocusChangedEventHandler -= value;
1055 if (accessibilityManagerFocusChangedEventHandler == null && FocusChangedSignal().Empty() == false)
1057 this.FocusChangedSignal().Disconnect(accessibilityManagerFocusChangedEventCallbackDelegate);
1063 /// This signal is emitted when the current focused view is activated.
1065 /// <returns> The signal to connect to </returns>
1066 /// <since_tizen> 6 </since_tizen>
1067 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1068 [EditorBrowsable(EditorBrowsableState.Never)]
1069 public event EventHandler<FocusedViewActivatedEventArgs> FocusedViewActivated
1073 // Restricted to only one listener
1074 if (accessibilityManagerFocusedViewActivatedEventHandler == null)
1076 accessibilityManagerFocusedViewActivatedEventCallbackDelegate = new FocusedViewActivatedEventCallbackDelegate(OnFocusedViewActivated);
1077 Interop.AccessibilityManager.FocusedActorActivatedSignalConnect(SwigCPtr, accessibilityManagerFocusedViewActivatedEventCallbackDelegate.ToHandleRef(this));
1078 NDalicPINVOKE.ThrowExceptionIfExists();
1081 accessibilityManagerFocusedViewActivatedEventHandler += value;
1086 accessibilityManagerFocusedViewActivatedEventHandler -= value;
1088 if (accessibilityManagerFocusedViewActivatedEventHandler == null && accessibilityManagerFocusedViewActivatedEventCallbackDelegate != null)
1090 Interop.AccessibilityManager.FocusedActorActivatedSignalDisconnect(SwigCPtr, accessibilityManagerFocusedViewActivatedEventCallbackDelegate.ToHandleRef(this));
1091 NDalicPINVOKE.ThrowExceptionIfExists();
1092 accessibilityManagerFocusedViewActivatedEventCallbackDelegate = null;
1098 /// This signal is emitted when there is no way to move focus further.
1100 /// <returns> The signal to connect to </returns>
1101 /// <since_tizen> 6 </since_tizen>
1102 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1103 [EditorBrowsable(EditorBrowsableState.Never)]
1104 public event EventHandler<FocusOvershotEventArgs> FocusOvershot
1108 // Restricted to only one listener
1109 if (accessibilityManagerFocusOvershotEventHandler == null)
1111 accessibilityManagerFocusOvershotEventCallbackDelegate = new FocusOvershotEventCallbackDelegate(OnFocusOvershot);
1112 this.FocusOvershotSignal().Connect(accessibilityManagerFocusOvershotEventCallbackDelegate);
1115 accessibilityManagerFocusOvershotEventHandler += value;
1120 accessibilityManagerFocusOvershotEventHandler -= value;
1122 if (accessibilityManagerFocusOvershotEventHandler == null && FocusOvershotSignal().Empty() == false)
1124 this.FocusOvershotSignal().Disconnect(accessibilityManagerFocusOvershotEventCallbackDelegate);