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.
18 using System.ComponentModel;
19 using Tizen.NUI.BaseComponents;
21 namespace Tizen.NUI.Accessibility
24 /// AccessibilityManager manages registration of views in an accessibility focus chain and changing the focused view within that chain.
25 /// This class provides the functionality of registering the focus order and description of views and maintaining the focus chain.
26 /// It provides functionality of setting the focus and moving the focus forward and backward.
27 /// It also draws a highlight for the focused view and emits a signal when the focus is changed.
29 /// <since_tizen> 6 </since_tizen>
30 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
31 [EditorBrowsable(EditorBrowsableState.Never)]
32 public partial class AccessibilityManager : BaseHandle
34 private static readonly AccessibilityManager instance = AccessibilityManager.Get();
35 private bool isForced = false;
37 internal AccessibilityManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.AccessibilityManager.AccessibilityManager_SWIGUpcast(cPtr), cMemoryOwn)
41 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AccessibilityManager obj)
43 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
46 /// This will not be public opened.
47 [EditorBrowsable(EditorBrowsableState.Never)]
48 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
50 Interop.AccessibilityManager.delete_AccessibilityManager(swigCPtr);
53 // Callback for AccessibilityManager StatusChangedSignal
54 private bool OnStatusChanged(IntPtr data)
56 if (_accessibilityManagerStatusChangedEventHandler != null)
58 //here we send all data to user event handlers
59 return _accessibilityManagerStatusChangedEventHandler(instance, null);
64 // Callback for AccessibilityManager ActionNextSignal
65 private bool OnActionNext(IntPtr data)
67 if (_accessibilityManagerActionNextEventHandler != null)
69 //here we send all data to user event handlers
70 return _accessibilityManagerActionNextEventHandler(instance, null);
75 // Callback for AccessibilityManager ActionPreviousSignal
76 private bool OnActionPrevious(IntPtr data)
78 if (_accessibilityManagerActionPreviousEventHandler != null)
80 //here we send all data to user event handlers
81 return _accessibilityManagerActionPreviousEventHandler(instance, null);
86 // Callback for AccessibilityManager ActionActivateSignal
87 private bool OnActionActivate(IntPtr data)
89 if (_accessibilityManagerActionActivateEventHandler != null)
91 //here we send all data to user event handlers
92 return _accessibilityManagerActionActivateEventHandler(instance, null);
97 // Callback for AccessibilityManager ActionReadSignal
98 private bool OnActionRead(IntPtr data)
101 if (_accessibilityManagerActionReadEventHandler != null)
103 //here we send all data to user event handlers
104 return _accessibilityManagerActionReadEventHandler(instance, null);
109 // Callback for AccessibilityManager ActionOverSignal
110 private bool OnActionOver(IntPtr data)
112 if (_accessibilityManagerActionOverEventHandler != null)
114 //here we send all data to user event handlers
115 return _accessibilityManagerActionOverEventHandler(instance, null);
120 // Callback for AccessibilityManager ActionReadNextSignal
121 private bool OnActionReadNext(IntPtr data)
123 if (_accessibilityManagerActionReadNextEventHandler != null)
125 //here we send all data to user event handlers
126 return _accessibilityManagerActionReadNextEventHandler(instance, null);
131 // Callback for AccessibilityManager ActionReadPreviousSignal
132 private bool OnActionReadPrevious(IntPtr data)
134 if (_accessibilityManagerActionReadPreviousEventHandler != null)
136 //here we send all data to user event handlers
137 return _accessibilityManagerActionReadPreviousEventHandler(instance, null);
142 // Callback for AccessibilityManager ActionUpSignal
143 private bool OnActionUp(IntPtr data)
145 if (_accessibilityManagerActionUpEventHandler != null)
147 //here we send all data to user event handlers
148 return _accessibilityManagerActionUpEventHandler(instance, null);
153 // Callback for AccessibilityManager ActionDownSignal
154 private bool OnActionDown(IntPtr data)
156 if (_accessibilityManagerActionDownEventHandler != null)
158 //here we send all data to user event handlers
159 return _accessibilityManagerActionDownEventHandler(instance, null);
164 // Callback for AccessibilityManager ActionClearFocusSignal
165 private bool OnActionClearFocus(IntPtr data)
167 if (_accessibilityManagerActionClearFocusEventHandler != null)
169 //here we send all data to user event handlers
170 return _accessibilityManagerActionClearFocusEventHandler(instance, null);
175 // Callback for AccessibilityManager ActionBackSignal
176 private bool OnActionBack(IntPtr data)
178 if (_accessibilityManagerActionBackEventHandler != null)
180 //here we send all data to user event handlers
181 return _accessibilityManagerActionBackEventHandler(instance, null);
186 // Callback for AccessibilityManager ActionScrollUpSignal
187 private bool OnActionScrollUp(IntPtr data)
189 if (_accessibilityManagerActionScrollUpEventHandler != null)
191 //here we send all data to user event handlers
192 return _accessibilityManagerActionScrollUpEventHandler(instance, null);
197 // Callback for AccessibilityManager ActionScrollDownSignal
198 private bool OnActionScrollDown(IntPtr data)
200 if (_accessibilityManagerActionScrollDownEventHandler != null)
202 //here we send all data to user event handlers
203 return _accessibilityManagerActionScrollDownEventHandler(instance, null);
208 // Callback for AccessibilityManager ActionPageLeftSignal
209 private bool OnActionPageLeft(IntPtr data)
211 if (_accessibilityManagerActionPageLeftEventHandler != null)
213 //here we send all data to user event handlers
214 return _accessibilityManagerActionPageLeftEventHandler(instance, null);
219 // Callback for AccessibilityManager ActionPageRightSignal
220 private bool OnActionPageRight(IntPtr data)
222 if (_accessibilityManagerActionPageRightEventHandler != null)
224 //here we send all data to user event handlers
225 return _accessibilityManagerActionPageRightEventHandler(instance, null);
230 // Callback for AccessibilityManager ActionPageUpSignal
231 private bool OnActionPageUp(IntPtr data)
233 if (_accessibilityManagerActionPageUpEventHandler != null)
235 //here we send all data to user event handlers
236 return _accessibilityManagerActionPageUpEventHandler(instance, null);
242 // Callback for AccessibilityManager ActionPageDownSignal
243 private bool OnActionPageDown(IntPtr data)
245 if (_accessibilityManagerActionPageDownEventHandler != null)
247 //here we send all data to user event handlers
248 return _accessibilityManagerActionPageDownEventHandler(instance, null);
254 // Callback for AccessibilityManager ActionMoveToFirstSignal
255 private bool OnActionMoveToFirst(IntPtr data)
257 if (_accessibilityManagerActionMoveToFirstEventHandler != null)
259 //here we send all data to user event handlers
260 return _accessibilityManagerActionMoveToFirstEventHandler(instance, null);
265 // Callback for AccessibilityManager ActionMoveToLastSignal
266 private bool OnActionMoveToLast(IntPtr data)
268 if (_accessibilityManagerActionMoveToLastEventHandler != null)
270 //here we send all data to user event handlers
271 return _accessibilityManagerActionMoveToLastEventHandler(instance, null);
276 // Callback for AccessibilityManager ActionReadFromTopSignal
277 private bool OnActionReadFromTop(IntPtr data)
279 if (_accessibilityManagerActionReadFromTopEventHandler != null)
281 //here we send all data to user event handlers
282 return _accessibilityManagerActionReadFromTopEventHandler(instance, null);
287 // Callback for AccessibilityManager ActionReadFromNextSignal
288 private bool OnActionReadFromNext(IntPtr data)
290 if (_accessibilityManagerActionReadFromNextEventHandler != null)
292 //here we send all data to user event handlers
293 return _accessibilityManagerActionReadFromNextEventHandler(instance, null);
298 // Callback for AccessibilityManager ActionZoomSignal
299 private bool OnActionZoom(IntPtr data)
301 if (_accessibilityManagerActionZoomEventHandler != null)
303 //here we send all data to user event handlers
304 return _accessibilityManagerActionZoomEventHandler(instance, null);
309 // Callback for AccessibilityManager ActionReadPauseResumeSignal
310 private bool OnActionReadPauseResume(IntPtr data)
312 if (_accessibilityManagerActionReadPauseResumeEventHandler != null)
314 //here we send all data to user event handlers
315 return _accessibilityManagerActionReadPauseResumeEventHandler(instance, null);
320 // Callback for AccessibilityManager ActionStartStopSignal
321 private bool OnActionStartStop(IntPtr data)
323 if (_accessibilityManagerActionStartStopEventHandler != null)
325 //here we send all data to user event handlers
326 return _accessibilityManagerActionStartStopEventHandler(instance, null);
331 // Callback for AccessibilityManager ActionForwardSignal
332 private bool OnActionForward(IntPtr data)
334 if (_accessibilityManagerActionForwardEventHandler != null)
336 //here we send all data to user event handlers
337 return _accessibilityManagerActionForwardEventHandler(instance, null);
342 // Callback for AccessibilityManager FocusChangedSignal
343 private void OnFocusChanged(IntPtr view1, IntPtr view2)
345 FocusChangedEventArgs e = new FocusChangedEventArgs();
347 // Populate all members of "e" (FocusChangedEventArgs) with real data
348 e.ViewCurrent = Registry.GetManagedBaseHandleFromNativePtr(view1) as View;
349 e.ViewNext = Registry.GetManagedBaseHandleFromNativePtr(view2) as View;
351 if (_accessibilityManagerFocusChangedEventHandler != null)
353 //here we send all data to user event handlers
354 _accessibilityManagerFocusChangedEventHandler(this, e);
358 // Callback for AccessibilityManager FocusedViewActivatedSignal
359 private void OnFocusedViewActivated(IntPtr view)
361 FocusedViewActivatedEventArgs e = new FocusedViewActivatedEventArgs();
363 // Populate all members of "e" (FocusedViewActivatedEventArgs) with real data
364 e.View = Registry.GetManagedBaseHandleFromNativePtr(view) as View;
366 if (_accessibilityManagerFocusedViewActivatedEventHandler != null)
368 //here we send all data to user event handlers
369 _accessibilityManagerFocusedViewActivatedEventHandler(this, e);
373 // Callback for AccessibilityManager FocusOvershotSignal
374 private void OnFocusOvershot(IntPtr currentFocusedView, AccessibilityManager.FocusOvershotDirection direction)
376 FocusOvershotEventArgs e = new FocusOvershotEventArgs();
378 // Populate all members of "e" (FocusOvershotEventArgs) with real data
379 e.CurrentFocusedView = Registry.GetManagedBaseHandleFromNativePtr(currentFocusedView) as View;
380 e.FocusOvershotDirection = direction;
382 if (_accessibilityManagerFocusOvershotEventHandler != null)
384 //here we send all data to user event handlers
385 _accessibilityManagerFocusOvershotEventHandler(this, e);
390 /// Enumeration for accessibility that needs four information which will be read by screen-reader.
392 /// Reading order : Label -> Trait -> Optional (Value and Hint)
394 /// <since_tizen> 6 </since_tizen>
395 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
396 [EditorBrowsable(EditorBrowsableState.Never)]
397 public enum AccessibilityAttribute
400 /// Simple text which contained in components, such as Ok or Cancel in case of a button
402 /// <since_tizen> 6 </since_tizen>
403 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
404 [EditorBrowsable(EditorBrowsableState.Never)]
407 /// Description of components trait, such as Button in case of a button
409 /// <since_tizen> 6 </since_tizen>
410 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
411 [EditorBrowsable(EditorBrowsableState.Never)]
414 /// Current value of components (Optional)
416 /// <since_tizen> 6 </since_tizen>
417 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
418 [EditorBrowsable(EditorBrowsableState.Never)]
421 /// Hint for action (Optional)
423 /// <since_tizen> 6 </since_tizen>
424 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
425 [EditorBrowsable(EditorBrowsableState.Never)]
428 /// The number of attributes
430 /// <since_tizen> 6 </since_tizen>
431 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
432 [EditorBrowsable(EditorBrowsableState.Never)]
437 /// Enumeration for overshoot direction.
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 enum FocusOvershotDirection
445 /// Try to move previous of the first view
447 /// <since_tizen> 6 </since_tizen>
448 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
449 [EditorBrowsable(EditorBrowsableState.Never)]
452 /// Try to move next of the last view
454 /// <since_tizen> 6 </since_tizen>
455 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
456 [EditorBrowsable(EditorBrowsableState.Never)]
462 /// Creates an AccessibilityManager handle.
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 AccessibilityManager() : this(Interop.AccessibilityManager.new_AccessibilityManager(), true)
469 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
473 /// Gets the singleton of AccessibilityManager object.
475 /// <returns> A handle to the AccessibilityManager </returns>
476 /// <since_tizen> 6 </since_tizen>
477 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
478 [EditorBrowsable(EditorBrowsableState.Never)]
479 public static AccessibilityManager Instance
488 /// Sets the information of the specified view's accessibility attribute.
490 /// <param name="view"> The view to be set with</param>
491 /// <param name="type"> The attribute type the text to be set with</param>
492 /// <param name="text"> The text for the view's accessibility information</param>
493 /// <since_tizen> 6 </since_tizen>
494 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
495 [EditorBrowsable(EditorBrowsableState.Never)]
496 public void SetAccessibilityAttribute(View view, AccessibilityManager.AccessibilityAttribute type, string text)
498 Interop.AccessibilityManager.AccessibilityManager_SetAccessibilityAttribute(swigCPtr, View.getCPtr(view), (int)type, text);
499 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
503 /// Delete the information of the specified view's accessibility attribute.
505 /// <param name="view"> The view to delete</param>
506 /// This will be public opened after ACR done. Before ACR, need to be hidden as inhouse API.
507 [EditorBrowsable(EditorBrowsableState.Never)]
508 public void DeleteAccessibilityAttribute(View view)
510 Interop.AccessibilityManager.AccessibilityManager_DeleteAccessibilityAttribute(SwigCPtr, View.getCPtr(view));
511 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
515 /// Gets the text of the specified view's accessibility attribute.
517 /// <param name="view"> The view to be queried</param>
518 /// <param name="type"> The attribute type to be queried</param>
519 /// <returns> The text of the view's accessibility information </returns>
520 /// <since_tizen> 6 </since_tizen>
521 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
522 [EditorBrowsable(EditorBrowsableState.Never)]
523 public string GetAccessibilityAttribute(View view, AccessibilityManager.AccessibilityAttribute type)
525 string ret = Interop.AccessibilityManager.AccessibilityManager_GetAccessibilityAttribute(swigCPtr, View.getCPtr(view), (int)type);
526 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
531 /// Sets the focus order of the view.
532 /// The focus order of each view in the focus chain is unique.
533 /// If there is another view assigned with the same focus order already, the new view will be inserted to the focus chain with that focus order,
534 /// and the focus order of the original view and all the views followed in the focus chain will be increased accordingly.
535 /// If the focus order assigned to the view is 0, it means that view's focus order is undefined
536 /// (e.g. the view has a description but with no focus order being set yet) and therefore that view is not focusable.
538 /// <param name="view"> the view to be set with</param>
539 /// <param name="order"> the focus order to be set with</param>
540 /// <since_tizen> 6 </since_tizen>
541 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
542 [EditorBrowsable(EditorBrowsableState.Never)]
543 public void SetFocusOrder(View view, uint order)
545 Interop.AccessibilityManager.AccessibilityManager_SetFocusOrder(swigCPtr, View.getCPtr(view), order);
546 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
550 /// Gets the focus order of the view.
551 /// When the focus order is 0, it means the focus order of the view is undefined.
553 /// <param name="view"> the view to be set with</param>
554 /// <returns> The focus order of the view </returns>
555 /// <since_tizen> 6 </since_tizen>
556 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
557 [EditorBrowsable(EditorBrowsableState.Never)]
558 public uint GetFocusOrder(View view)
560 uint ret = Interop.AccessibilityManager.AccessibilityManager_GetFocusOrder(swigCPtr, View.getCPtr(view));
561 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
566 /// Generates a new focus order number which can be used to assign to views
567 /// which need to be appended to the end of the current focus order chain.
568 /// The new number will be an increment over the very last focus order number in the focus chain.
569 /// If the focus chain is empty then the function returns 1,
570 /// else the number returned will be FOLast + 1 where FOLast is the focus order of the very last control in the focus chain.
572 /// <returns> The focus order of the view </returns>
573 /// <since_tizen> 6 </since_tizen>
574 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
575 [EditorBrowsable(EditorBrowsableState.Never)]
576 public uint GenerateNewFocusOrder()
578 uint ret = Interop.AccessibilityManager.AccessibilityManager_GenerateNewFocusOrder(swigCPtr);
579 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
584 /// Gets the view that has the specified focus order.
585 /// It will return an empty handle if no view in the window has the specified focus order.
587 /// <param name="order"> The focus order of the view</param>
588 /// <returns> The view that has the specified focus order or an empty handle if no view in the stage has the specified focus order </returns>
589 /// <since_tizen> 6 </since_tizen>
590 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
591 [EditorBrowsable(EditorBrowsableState.Never)]
592 public View GetViewByFocusOrder(uint order)
594 View ret = new View(Interop.AccessibilityManager.AccessibilityManager_GetActorByFocusOrder(swigCPtr, order), true);
595 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
600 /// Moves the focus to the specified view.
601 /// Only one view can be focused at the same time. The view must have a defined focus order
602 /// and must be focusable, visible and in the window.
604 /// <param name="view"> the view to be set with</param>
605 /// <returns> Whether the focus is successful or not </returns>
606 /// <since_tizen> 6 </since_tizen>
607 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
608 [EditorBrowsable(EditorBrowsableState.Never)]
609 public bool SetCurrentFocusView(View view)
611 bool ret = Interop.AccessibilityManager.AccessibilityManager_SetCurrentFocusActor(swigCPtr, View.getCPtr(view));
612 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
617 /// Gets the current focused view.
619 /// <returns> A handle to the current focused view or an empty handle if no view is focused </returns>
620 /// <since_tizen> 6 </since_tizen>
621 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
622 [EditorBrowsable(EditorBrowsableState.Never)]
623 public View GetCurrentFocusView()
625 View ret = new View(Interop.AccessibilityManager.AccessibilityManager_GetCurrentFocusActor(swigCPtr), true);
626 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
631 /// Gets the focus group of current focused view.
633 /// <returns> A handle to the immediate parent of the current focused view which is also a focus group, or an empty handle if no view is focused </returns>
634 /// <since_tizen> 6 </since_tizen>
635 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
636 [EditorBrowsable(EditorBrowsableState.Never)]
637 public View GetCurrentFocusGroup()
639 View ret = new View(Interop.AccessibilityManager.AccessibilityManager_GetCurrentFocusGroup(swigCPtr), true);
640 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
645 /// Gets the focus order of currently focused view.
647 /// <returns> The focus order of the currently focused view or 0 if no view is in focus </returns>
648 /// <since_tizen> 6 </since_tizen>
649 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
650 [EditorBrowsable(EditorBrowsableState.Never)]
651 public uint GetCurrentFocusOrder()
653 uint ret = Interop.AccessibilityManager.AccessibilityManager_GetCurrentFocusOrder(swigCPtr);
654 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
659 /// Moves the focus to the next focusable view in the focus chain (according to the focus traversal order).
660 /// When the focus movement is wrapped around, the focus will be moved to the first focusable view when it reaches the end of the focus chain.
662 /// <returns> True if the moving was successful </returns>
663 /// <since_tizen> 6 </since_tizen>
664 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
665 [EditorBrowsable(EditorBrowsableState.Never)]
666 public bool MoveFocusForward()
668 bool ret = Interop.AccessibilityManager.AccessibilityManager_MoveFocusForward(swigCPtr);
669 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
674 /// Moves the focus to the previous focusable view in the focus chain (according to the focus traversal order).
675 /// When the focus movement is wrapped around, the focus will be moved to the last focusable view
676 /// when it reaches the beginning of the focus chain.
678 /// <returns> True if the moving was successful </returns>
679 /// <since_tizen> 6 </since_tizen>
680 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
681 [EditorBrowsable(EditorBrowsableState.Never)]
682 public bool MoveFocusBackward()
684 bool ret = Interop.AccessibilityManager.AccessibilityManager_MoveFocusBackward(swigCPtr);
685 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
690 /// Clears the focus from the current focused view if any, so that no view is focused in the focus chain.
691 /// It will emit focus changed signal without current focused view.
693 /// <since_tizen> 6 </since_tizen>
694 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
695 [EditorBrowsable(EditorBrowsableState.Never)]
696 public void ClearFocus()
698 Interop.AccessibilityManager.AccessibilityManager_ClearFocus(swigCPtr);
699 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
703 /// Clears every registered focusable view from focus-manager.
705 /// <since_tizen> 6 </since_tizen>
706 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
707 [EditorBrowsable(EditorBrowsableState.Never)]
708 public new void Reset()
710 Interop.AccessibilityManager.AccessibilityManager_Reset(swigCPtr);
711 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
715 /// Sets whether an view is a focus group that can limit the scope of focus movement to its child views in the focus chain.
717 /// <param name="view"> the view to be set as a focus group</param>
718 /// <param name="isFocusGroup"> Whether to set the view to be a focus group or not</param>
719 /// <since_tizen> 6 </since_tizen>
720 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
721 [EditorBrowsable(EditorBrowsableState.Never)]
722 public void SetFocusGroup(View view, bool isFocusGroup)
724 Interop.AccessibilityManager.AccessibilityManager_SetFocusGroup(swigCPtr, View.getCPtr(view), isFocusGroup);
725 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
729 /// Checks whether the view is set as a focus group or not.
731 /// <param name="view"> the view to be checked</param>
732 /// <returns> Whether the view is set as a focus group </returns>
733 /// <since_tizen> 6 </since_tizen>
734 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
735 [EditorBrowsable(EditorBrowsableState.Never)]
736 public bool IsFocusGroup(View view)
738 bool ret = Interop.AccessibilityManager.AccessibilityManager_IsFocusGroup(swigCPtr, View.getCPtr(view));
739 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
744 /// Sets whether the group mode is enabled or not.
745 /// When the group mode is enabled, the focus movement will be limited to the child views of the current focus group including the current focus group itself.
746 /// The current focus group is the closest ancestor of the current focused view that is set as a focus group.
748 /// <param name="enabled"> Whether the group mode is enabled or not</param>
749 /// <since_tizen> 6 </since_tizen>
750 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
751 [EditorBrowsable(EditorBrowsableState.Never)]
752 public void SetGroupMode(bool enabled)
754 Interop.AccessibilityManager.AccessibilityManager_SetGroupMode(swigCPtr, enabled);
755 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
759 /// Gets whether the group mode is enabled or not.
761 /// <since_tizen> 6 </since_tizen>
762 /// <returns> Whether the group mode is enabled or not. </returns>
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 bool GetGroupMode()
767 bool ret = Interop.AccessibilityManager.AccessibilityManager_GetGroupMode(swigCPtr);
768 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
773 /// Sets whether focus will be moved to the beginning of the focus chain when it reaches the end or vice versa.
774 /// When both the wrap mode and the group mode are enabled, focus will be wrapped within the current focus group.
775 /// Focus will not be wrapped in default.
777 /// <param name="wrapped"> Whether the focus movement is wrapped around or not</param>
778 /// <since_tizen> 6 </since_tizen>
779 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
780 [EditorBrowsable(EditorBrowsableState.Never)]
781 public void SetWrapMode(bool wrapped)
783 Interop.AccessibilityManager.AccessibilityManager_SetWrapMode(swigCPtr, wrapped);
784 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
788 /// Gets whether the wrap mode is enabled or not.
790 /// <returns> Whether the wrap mode is enabled or not. </returns>
791 /// <since_tizen> 6 </since_tizen>
792 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
793 [EditorBrowsable(EditorBrowsableState.Never)]
794 public bool GetWrapMode()
796 bool ret = Interop.AccessibilityManager.AccessibilityManager_GetWrapMode(swigCPtr);
797 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
802 /// Sets the focus indicator view.
803 /// This will replace the default focus indicator view in AccessibilityManager and
804 /// will be added to the focused view as a highlight.
806 /// <param name="indicator"> The indicator view to be added</param>
807 /// <since_tizen> 6 </since_tizen>
808 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
809 [EditorBrowsable(EditorBrowsableState.Never)]
810 public void SetFocusIndicatorView(View indicator)
812 Interop.AccessibilityManager.AccessibilityManager_SetFocusIndicatorActor(swigCPtr, View.getCPtr(indicator));
813 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
817 /// Gets the focus indicator view.
819 /// <returns> A handle to the focus indicator view </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 View GetFocusIndicatorView()
825 View ret = new View(Interop.AccessibilityManager.AccessibilityManager_GetFocusIndicatorActor(swigCPtr), true);
826 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
831 /// Returns the closest ancestor of the given view that is a focus group.
833 /// <param name="view"> The view to be checked for its focus group</param>
834 /// <returns> The focus group the given view belongs to or an empty handle if the given view doesn't belong to any focus group </returns>
835 /// <since_tizen> 6 </since_tizen>
836 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
837 [EditorBrowsable(EditorBrowsableState.Never)]
838 public View GetFocusGroup(View view)
840 View ret = new View(Interop.AccessibilityManager.AccessibilityManager_GetFocusGroup(swigCPtr, View.getCPtr(view)), true);
841 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
846 /// Returns the current position of the read action.
848 /// <returns> The current event position </returns>
849 /// <since_tizen> 6 </since_tizen>
850 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
851 [EditorBrowsable(EditorBrowsableState.Never)]
852 public Vector2 GetReadPosition()
854 Vector2 ret = new Vector2(Interop.AccessibilityManager.AccessibilityManager_GetReadPosition(swigCPtr), true);
855 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
860 /// Enables Accessibility or not.
862 /// <param name="enabled"> True if Accessibility should be enabled.</param>
863 /// This will be public opened later. Before ACR, need to be hidden as inhouse API.
864 [EditorBrowsable(EditorBrowsableState.Never)]
865 public void EnableAccessibility(bool enabled)
868 Interop.AccessibilityManager.EnableAccessibility(swigCPtr, enabled);
869 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
873 /// Queries whether the accessibility(screen-reader) is enabled.
874 /// Basically, the accessibility will be enabled by system setting.
876 /// <returns> True if the accessibility(screen-reader) is enabled. </returns>
877 /// This will be public opened later. Before ACR, need to be hidden as inhouse API.
878 [EditorBrowsable(EditorBrowsableState.Never)]
879 public bool IsEnabled()
881 bool ret = Interop.AccessibilityManager.IsEnabled(swigCPtr);
882 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
887 /// Checks whether Inside Fridge is shown or not.
889 /// <param name="isShown"> True if Inside Fridge is shown.</param>
890 [EditorBrowsable(EditorBrowsableState.Never)]
891 public void ShowInsideFridge(bool isShown)
893 Interop.AccessibilityManager.ShowInsideFridge(swigCPtr, isShown);
894 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
897 /// Queries whether EnableAccessibility() is called and Accessibility is enabled forcibly or not.
898 /// This API is only used for internal checks.
899 internal bool IsForcedEnable()
904 internal static AccessibilityManager Get()
906 AccessibilityManager ret = new AccessibilityManager(Interop.AccessibilityManager.AccessibilityManager_Get(), true);
907 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
911 // Signals - AccessibilityManagerEvent.cs
912 internal FocusChangedSignal FocusChangedSignal()
914 FocusChangedSignal ret = new FocusChangedSignal(Interop.AccessibilityManager.AccessibilityManager_FocusChangedSignal(swigCPtr), false);
915 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
919 internal AccessibilityFocusOvershotSignal FocusOvershotSignal()
921 AccessibilityFocusOvershotSignal ret = new AccessibilityFocusOvershotSignal(Interop.AccessibilityManager.AccessibilityManager_FocusOvershotSignal(swigCPtr), false);
922 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
926 internal ViewSignal FocusedViewActivatedSignal()
928 ViewSignal ret = new ViewSignal(Interop.AccessibilityManager.AccessibilityManager_FocusedActorActivatedSignal(swigCPtr), false);
929 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
933 internal AccessibilityActionSignal StatusChangedSignal()
935 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_StatusChangedSignal(swigCPtr), false);
936 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
940 internal AccessibilityActionSignal ActionNextSignal()
942 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionNextSignal(swigCPtr), false);
943 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
947 internal AccessibilityActionSignal ActionPreviousSignal()
949 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionPreviousSignal(swigCPtr), false);
950 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
954 internal AccessibilityActionSignal ActionActivateSignal()
956 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionActivateSignal(swigCPtr), false);
957 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
961 internal AccessibilityActionSignal ActionReadSignal()
963 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionReadSignal(swigCPtr), false);
964 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
968 internal AccessibilityActionSignal ActionOverSignal()
970 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionOverSignal(swigCPtr), false);
971 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
975 internal AccessibilityActionSignal ActionReadNextSignal()
977 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionReadNextSignal(swigCPtr), false);
978 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
982 internal AccessibilityActionSignal ActionReadPreviousSignal()
984 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionReadPreviousSignal(swigCPtr), false);
985 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
989 internal AccessibilityActionSignal ActionUpSignal()
991 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionUpSignal(swigCPtr), false);
992 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
996 internal AccessibilityActionSignal ActionDownSignal()
998 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionDownSignal(swigCPtr), false);
999 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1003 internal AccessibilityActionSignal ActionClearFocusSignal()
1005 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionClearFocusSignal(swigCPtr), false);
1006 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1010 internal AccessibilityActionSignal ActionBackSignal()
1012 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionBackSignal(swigCPtr), false);
1013 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1017 internal AccessibilityActionSignal ActionScrollUpSignal()
1019 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionScrollUpSignal(swigCPtr), false);
1020 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1024 internal AccessibilityActionSignal ActionScrollDownSignal()
1026 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionScrollDownSignal(swigCPtr), false);
1027 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1031 internal AccessibilityActionSignal ActionPageLeftSignal()
1033 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionPageLeftSignal(swigCPtr), false);
1034 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1038 internal AccessibilityActionSignal ActionPageRightSignal()
1040 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionPageRightSignal(swigCPtr), false);
1041 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1045 internal AccessibilityActionSignal ActionPageUpSignal()
1047 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionPageUpSignal(swigCPtr), false);
1048 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1052 internal AccessibilityActionSignal ActionPageDownSignal()
1054 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionPageDownSignal(swigCPtr), false);
1055 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1059 internal AccessibilityActionSignal ActionMoveToFirstSignal()
1061 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionMoveToFirstSignal(swigCPtr), false);
1062 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1066 internal AccessibilityActionSignal ActionMoveToLastSignal()
1068 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionMoveToLastSignal(swigCPtr), false);
1069 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1073 internal AccessibilityActionSignal ActionReadFromTopSignal()
1075 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionReadFromTopSignal(swigCPtr), false);
1076 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1080 internal AccessibilityActionSignal ActionReadFromNextSignal()
1082 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionReadFromNextSignal(swigCPtr), false);
1083 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1087 internal AccessibilityActionSignal ActionZoomSignal()
1089 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionZoomSignal(swigCPtr), false);
1090 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1094 internal AccessibilityActionSignal ActionReadPauseResumeSignal()
1096 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionReadPauseResumeSignal(swigCPtr), false);
1097 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1101 internal AccessibilityActionSignal ActionStartStopSignal()
1103 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionStartStopSignal(swigCPtr), false);
1104 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1108 internal SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t ActionScrollSignal()
1110 SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t ret = new SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t(Interop.AccessibilityManager.AccessibilityManager_ActionScrollSignal(swigCPtr), false);
1111 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1115 internal AccessibilityActionSignal ActionForwardSignal()
1117 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionForwardSignal(swigCPtr), false);
1118 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();