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 FocusChangedSignal
332 private void OnFocusChanged(IntPtr view1, IntPtr view2)
334 FocusChangedEventArgs e = new FocusChangedEventArgs();
336 // Populate all members of "e" (FocusChangedEventArgs) with real data
337 e.ViewCurrent = Registry.GetManagedBaseHandleFromNativePtr(view1) as View;
338 e.ViewNext = Registry.GetManagedBaseHandleFromNativePtr(view2) as View;
340 if (_accessibilityManagerFocusChangedEventHandler != null)
342 //here we send all data to user event handlers
343 _accessibilityManagerFocusChangedEventHandler(this, e);
347 // Callback for AccessibilityManager FocusedViewActivatedSignal
348 private void OnFocusedViewActivated(IntPtr view)
350 FocusedViewActivatedEventArgs e = new FocusedViewActivatedEventArgs();
352 // Populate all members of "e" (FocusedViewActivatedEventArgs) with real data
353 e.View = Registry.GetManagedBaseHandleFromNativePtr(view) as View;
355 if (_accessibilityManagerFocusedViewActivatedEventHandler != null)
357 //here we send all data to user event handlers
358 _accessibilityManagerFocusedViewActivatedEventHandler(this, e);
362 // Callback for AccessibilityManager FocusOvershotSignal
363 private void OnFocusOvershot(IntPtr currentFocusedView, AccessibilityManager.FocusOvershotDirection direction)
365 FocusOvershotEventArgs e = new FocusOvershotEventArgs();
367 // Populate all members of "e" (FocusOvershotEventArgs) with real data
368 e.CurrentFocusedView = Registry.GetManagedBaseHandleFromNativePtr(currentFocusedView) as View;
369 e.FocusOvershotDirection = direction;
371 if (_accessibilityManagerFocusOvershotEventHandler != null)
373 //here we send all data to user event handlers
374 _accessibilityManagerFocusOvershotEventHandler(this, e);
379 /// Enumeration for accessibility that needs four information which will be read by screen-reader.
381 /// Reading order : Label -> Trait -> Optional (Value and Hint)
383 /// <since_tizen> 6 </since_tizen>
384 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
385 [EditorBrowsable(EditorBrowsableState.Never)]
386 public enum AccessibilityAttribute
389 /// Simple text which contained in components, such as Ok or Cancel in case of a button
391 /// <since_tizen> 6 </since_tizen>
392 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
393 [EditorBrowsable(EditorBrowsableState.Never)]
396 /// Description of components trait, such as Button in case of a button
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)]
403 /// Current value of components (Optional)
405 /// <since_tizen> 6 </since_tizen>
406 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
407 [EditorBrowsable(EditorBrowsableState.Never)]
410 /// Hint for action (Optional)
412 /// <since_tizen> 6 </since_tizen>
413 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
414 [EditorBrowsable(EditorBrowsableState.Never)]
417 /// The number of attributes
419 /// <since_tizen> 6 </since_tizen>
420 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
421 [EditorBrowsable(EditorBrowsableState.Never)]
426 /// Enumeration for overshoot direction.
428 /// <since_tizen> 6 </since_tizen>
429 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
430 [EditorBrowsable(EditorBrowsableState.Never)]
431 public enum FocusOvershotDirection
434 /// Try to move previous of the first view
436 /// <since_tizen> 6 </since_tizen>
437 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
438 [EditorBrowsable(EditorBrowsableState.Never)]
441 /// Try to move next of the last view
443 /// <since_tizen> 6 </since_tizen>
444 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
445 [EditorBrowsable(EditorBrowsableState.Never)]
451 /// Creates an AccessibilityManager handle.
453 /// <since_tizen> 6 </since_tizen>
454 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
455 [EditorBrowsable(EditorBrowsableState.Never)]
456 public AccessibilityManager() : this(Interop.AccessibilityManager.new_AccessibilityManager(), true)
458 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
462 /// Gets the singleton of AccessibilityManager object.
464 /// <returns> A handle to the AccessibilityManager </returns>
465 /// <since_tizen> 6 </since_tizen>
466 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
467 [EditorBrowsable(EditorBrowsableState.Never)]
468 public static AccessibilityManager Instance
477 /// Sets the information of the specified view's accessibility attribute.
479 /// <param name="view"> The view to be set with</param>
480 /// <param name="type"> The attribute type the text to be set with</param>
481 /// <param name="text"> The text for the view's accessibility information</param>
482 /// <since_tizen> 6 </since_tizen>
483 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
484 [EditorBrowsable(EditorBrowsableState.Never)]
485 public void SetAccessibilityAttribute(View view, AccessibilityManager.AccessibilityAttribute type, string text)
487 Interop.AccessibilityManager.AccessibilityManager_SetAccessibilityAttribute(swigCPtr, View.getCPtr(view), (int)type, text);
488 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
492 /// Delete the information of the specified view's accessibility attribute.
494 /// <param name="view"> The view to delete</param>
495 /// This will be public opened after ACR done. Before ACR, need to be hidden as inhouse API.
496 [EditorBrowsable(EditorBrowsableState.Never)]
497 public void DeleteAccessibilityAttribute(View view)
499 Interop.AccessibilityManager.AccessibilityManager_DeleteAccessibilityAttribute(SwigCPtr, View.getCPtr(view));
500 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
504 /// Gets the text of the specified view's accessibility attribute.
506 /// <param name="view"> The view to be queried</param>
507 /// <param name="type"> The attribute type to be queried</param>
508 /// <returns> The text of the view's accessibility information </returns>
509 /// <since_tizen> 6 </since_tizen>
510 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
511 [EditorBrowsable(EditorBrowsableState.Never)]
512 public string GetAccessibilityAttribute(View view, AccessibilityManager.AccessibilityAttribute type)
514 string ret = Interop.AccessibilityManager.AccessibilityManager_GetAccessibilityAttribute(swigCPtr, View.getCPtr(view), (int)type);
515 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
520 /// Sets the focus order of the view.
521 /// The focus order of each view in the focus chain is unique.
522 /// 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,
523 /// and the focus order of the original view and all the views followed in the focus chain will be increased accordingly.
524 /// If the focus order assigned to the view is 0, it means that view's focus order is undefined
525 /// (e.g. the view has a description but with no focus order being set yet) and therefore that view is not focusable.
527 /// <param name="view"> the view to be set with</param>
528 /// <param name="order"> the focus order to be set with</param>
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 void SetFocusOrder(View view, uint order)
534 Interop.AccessibilityManager.AccessibilityManager_SetFocusOrder(swigCPtr, View.getCPtr(view), order);
535 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
539 /// Gets the focus order of the view.
540 /// When the focus order is 0, it means the focus order of the view is undefined.
542 /// <param name="view"> the view to be set with</param>
543 /// <returns> The focus order of the view </returns>
544 /// <since_tizen> 6 </since_tizen>
545 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
546 [EditorBrowsable(EditorBrowsableState.Never)]
547 public uint GetFocusOrder(View view)
549 uint ret = Interop.AccessibilityManager.AccessibilityManager_GetFocusOrder(swigCPtr, View.getCPtr(view));
550 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
555 /// Generates a new focus order number which can be used to assign to views
556 /// which need to be appended to the end of the current focus order chain.
557 /// The new number will be an increment over the very last focus order number in the focus chain.
558 /// If the focus chain is empty then the function returns 1,
559 /// else the number returned will be FOLast + 1 where FOLast is the focus order of the very last control in the focus chain.
561 /// <returns> The focus order of the view </returns>
562 /// <since_tizen> 6 </since_tizen>
563 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
564 [EditorBrowsable(EditorBrowsableState.Never)]
565 public uint GenerateNewFocusOrder()
567 uint ret = Interop.AccessibilityManager.AccessibilityManager_GenerateNewFocusOrder(swigCPtr);
568 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
573 /// Gets the view that has the specified focus order.
574 /// It will return an empty handle if no view in the window has the specified focus order.
576 /// <param name="order"> The focus order of the view</param>
577 /// <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>
578 /// <since_tizen> 6 </since_tizen>
579 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
580 [EditorBrowsable(EditorBrowsableState.Never)]
581 public View GetViewByFocusOrder(uint order)
583 View ret = new View(Interop.AccessibilityManager.AccessibilityManager_GetActorByFocusOrder(swigCPtr, order), true);
584 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
589 /// Moves the focus to the specified view.
590 /// Only one view can be focused at the same time. The view must have a defined focus order
591 /// and must be focusable, visible and in the window.
593 /// <param name="view"> the view to be set with</param>
594 /// <returns> Whether the focus is successful or not </returns>
595 /// <since_tizen> 6 </since_tizen>
596 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
597 [EditorBrowsable(EditorBrowsableState.Never)]
598 public bool SetCurrentFocusView(View view)
600 bool ret = Interop.AccessibilityManager.AccessibilityManager_SetCurrentFocusActor(swigCPtr, View.getCPtr(view));
601 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
606 /// Gets the current focused view.
608 /// <returns> A handle to the current focused view or an empty handle if no view is focused </returns>
609 /// <since_tizen> 6 </since_tizen>
610 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
611 [EditorBrowsable(EditorBrowsableState.Never)]
612 public View GetCurrentFocusView()
614 View ret = new View(Interop.AccessibilityManager.AccessibilityManager_GetCurrentFocusActor(swigCPtr), true);
615 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
620 /// Gets the focus group of current focused view.
622 /// <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>
623 /// <since_tizen> 6 </since_tizen>
624 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
625 [EditorBrowsable(EditorBrowsableState.Never)]
626 public View GetCurrentFocusGroup()
628 View ret = new View(Interop.AccessibilityManager.AccessibilityManager_GetCurrentFocusGroup(swigCPtr), true);
629 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
634 /// Gets the focus order of currently focused view.
636 /// <returns> The focus order of the currently focused view or 0 if no view is in focus </returns>
637 /// <since_tizen> 6 </since_tizen>
638 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
639 [EditorBrowsable(EditorBrowsableState.Never)]
640 public uint GetCurrentFocusOrder()
642 uint ret = Interop.AccessibilityManager.AccessibilityManager_GetCurrentFocusOrder(swigCPtr);
643 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
648 /// Moves the focus to the next focusable view in the focus chain (according to the focus traversal order).
649 /// 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.
651 /// <returns> True if the moving was successful </returns>
652 /// <since_tizen> 6 </since_tizen>
653 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
654 [EditorBrowsable(EditorBrowsableState.Never)]
655 public bool MoveFocusForward()
657 bool ret = Interop.AccessibilityManager.AccessibilityManager_MoveFocusForward(swigCPtr);
658 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
663 /// Moves the focus to the previous focusable view in the focus chain (according to the focus traversal order).
664 /// When the focus movement is wrapped around, the focus will be moved to the last focusable view
665 /// when it reaches the beginning of the focus chain.
667 /// <returns> True if the moving was successful </returns>
668 /// <since_tizen> 6 </since_tizen>
669 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
670 [EditorBrowsable(EditorBrowsableState.Never)]
671 public bool MoveFocusBackward()
673 bool ret = Interop.AccessibilityManager.AccessibilityManager_MoveFocusBackward(swigCPtr);
674 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
679 /// Clears the focus from the current focused view if any, so that no view is focused in the focus chain.
680 /// It will emit focus changed signal without current focused view.
682 /// <since_tizen> 6 </since_tizen>
683 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
684 [EditorBrowsable(EditorBrowsableState.Never)]
685 public void ClearFocus()
687 Interop.AccessibilityManager.AccessibilityManager_ClearFocus(swigCPtr);
688 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
692 /// Clears every registered focusable view from focus-manager.
694 /// <since_tizen> 6 </since_tizen>
695 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
696 [EditorBrowsable(EditorBrowsableState.Never)]
697 public new void Reset()
699 Interop.AccessibilityManager.AccessibilityManager_Reset(swigCPtr);
700 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
704 /// Sets whether an view is a focus group that can limit the scope of focus movement to its child views in the focus chain.
706 /// <param name="view"> the view to be set as a focus group</param>
707 /// <param name="isFocusGroup"> Whether to set the view to be a focus group or not</param>
708 /// <since_tizen> 6 </since_tizen>
709 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
710 [EditorBrowsable(EditorBrowsableState.Never)]
711 public void SetFocusGroup(View view, bool isFocusGroup)
713 Interop.AccessibilityManager.AccessibilityManager_SetFocusGroup(swigCPtr, View.getCPtr(view), isFocusGroup);
714 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
718 /// Checks whether the view is set as a focus group or not.
720 /// <param name="view"> the view to be checked</param>
721 /// <returns> Whether the view is set as a focus group </returns>
722 /// <since_tizen> 6 </since_tizen>
723 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
724 [EditorBrowsable(EditorBrowsableState.Never)]
725 public bool IsFocusGroup(View view)
727 bool ret = Interop.AccessibilityManager.AccessibilityManager_IsFocusGroup(swigCPtr, View.getCPtr(view));
728 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
733 /// Sets whether the group mode is enabled or not.
734 /// 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.
735 /// The current focus group is the closest ancestor of the current focused view that is set as a focus group.
737 /// <param name="enabled"> Whether the group mode is enabled or not</param>
738 /// <since_tizen> 6 </since_tizen>
739 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
740 [EditorBrowsable(EditorBrowsableState.Never)]
741 public void SetGroupMode(bool enabled)
743 Interop.AccessibilityManager.AccessibilityManager_SetGroupMode(swigCPtr, enabled);
744 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
748 /// Gets whether the group mode is enabled or not.
750 /// <since_tizen> 6 </since_tizen>
751 /// <returns> Whether the group mode is enabled or not. </returns>
752 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
753 [EditorBrowsable(EditorBrowsableState.Never)]
754 public bool GetGroupMode()
756 bool ret = Interop.AccessibilityManager.AccessibilityManager_GetGroupMode(swigCPtr);
757 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
762 /// Sets whether focus will be moved to the beginning of the focus chain when it reaches the end or vice versa.
763 /// When both the wrap mode and the group mode are enabled, focus will be wrapped within the current focus group.
764 /// Focus will not be wrapped in default.
766 /// <param name="wrapped"> Whether the focus movement is wrapped around or not</param>
767 /// <since_tizen> 6 </since_tizen>
768 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
769 [EditorBrowsable(EditorBrowsableState.Never)]
770 public void SetWrapMode(bool wrapped)
772 Interop.AccessibilityManager.AccessibilityManager_SetWrapMode(swigCPtr, wrapped);
773 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
777 /// Gets whether the wrap mode is enabled or not.
779 /// <returns> Whether the wrap mode is enabled or not. </returns>
780 /// <since_tizen> 6 </since_tizen>
781 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
782 [EditorBrowsable(EditorBrowsableState.Never)]
783 public bool GetWrapMode()
785 bool ret = Interop.AccessibilityManager.AccessibilityManager_GetWrapMode(swigCPtr);
786 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
791 /// Sets the focus indicator view.
792 /// This will replace the default focus indicator view in AccessibilityManager and
793 /// will be added to the focused view as a highlight.
795 /// <param name="indicator"> The indicator view to be added</param>
796 /// <since_tizen> 6 </since_tizen>
797 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
798 [EditorBrowsable(EditorBrowsableState.Never)]
799 public void SetFocusIndicatorView(View indicator)
801 Interop.AccessibilityManager.AccessibilityManager_SetFocusIndicatorActor(swigCPtr, View.getCPtr(indicator));
802 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
806 /// Gets the focus indicator view.
808 /// <returns> A handle to the focus indicator view </returns>
809 /// <since_tizen> 6 </since_tizen>
810 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
811 [EditorBrowsable(EditorBrowsableState.Never)]
812 public View GetFocusIndicatorView()
814 View ret = new View(Interop.AccessibilityManager.AccessibilityManager_GetFocusIndicatorActor(swigCPtr), true);
815 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
820 /// Returns the closest ancestor of the given view that is a focus group.
822 /// <param name="view"> The view to be checked for its focus group</param>
823 /// <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>
824 /// <since_tizen> 6 </since_tizen>
825 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
826 [EditorBrowsable(EditorBrowsableState.Never)]
827 public View GetFocusGroup(View view)
829 View ret = new View(Interop.AccessibilityManager.AccessibilityManager_GetFocusGroup(swigCPtr, View.getCPtr(view)), true);
830 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
835 /// Returns the current position of the read action.
837 /// <returns> The current event position </returns>
838 /// <since_tizen> 6 </since_tizen>
839 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
840 [EditorBrowsable(EditorBrowsableState.Never)]
841 public Vector2 GetReadPosition()
843 Vector2 ret = new Vector2(Interop.AccessibilityManager.AccessibilityManager_GetReadPosition(swigCPtr), true);
844 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
849 /// Enables Accessibility or not.
851 /// <param name="enabled"> True if Accessibility should be enabled.</param>
852 /// This will be public opened later. Before ACR, need to be hidden as inhouse API.
853 [EditorBrowsable(EditorBrowsableState.Never)]
854 public void EnableAccessibility(bool enabled)
857 Interop.AccessibilityManager.EnableAccessibility(swigCPtr, enabled);
858 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
862 /// Queries whether the accessibility(screen-reader) is enabled.
863 /// Basically, the accessibility will be enabled by system setting.
865 /// <returns> True if the accessibility(screen-reader) is enabled. </returns>
866 /// This will be public opened later. Before ACR, need to be hidden as inhouse API.
867 [EditorBrowsable(EditorBrowsableState.Never)]
868 public bool IsEnabled()
870 bool ret = Interop.AccessibilityManager.IsEnabled(swigCPtr);
871 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
875 /// Queries whether EnableAccessibility() is called and Accessibility is enabled forcibly or not.
876 /// This API is only used for internal checks.
877 internal bool IsForcedEnable()
882 internal static AccessibilityManager Get()
884 AccessibilityManager ret = new AccessibilityManager(Interop.AccessibilityManager.AccessibilityManager_Get(), true);
885 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
889 // Signals - AccessibilityManagerEvent.cs
890 internal FocusChangedSignal FocusChangedSignal()
892 FocusChangedSignal ret = new FocusChangedSignal(Interop.AccessibilityManager.AccessibilityManager_FocusChangedSignal(swigCPtr), false);
893 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
897 internal AccessibilityFocusOvershotSignal FocusOvershotSignal()
899 AccessibilityFocusOvershotSignal ret = new AccessibilityFocusOvershotSignal(Interop.AccessibilityManager.AccessibilityManager_FocusOvershotSignal(swigCPtr), false);
900 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
904 internal ViewSignal FocusedViewActivatedSignal()
906 ViewSignal ret = new ViewSignal(Interop.AccessibilityManager.AccessibilityManager_FocusedActorActivatedSignal(swigCPtr), false);
907 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
911 internal AccessibilityActionSignal StatusChangedSignal()
913 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_StatusChangedSignal(swigCPtr), false);
914 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
918 internal AccessibilityActionSignal ActionNextSignal()
920 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionNextSignal(swigCPtr), false);
921 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
925 internal AccessibilityActionSignal ActionPreviousSignal()
927 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionPreviousSignal(swigCPtr), false);
928 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
932 internal AccessibilityActionSignal ActionActivateSignal()
934 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionActivateSignal(swigCPtr), false);
935 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
939 internal AccessibilityActionSignal ActionReadSignal()
941 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionReadSignal(swigCPtr), false);
942 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
946 internal AccessibilityActionSignal ActionOverSignal()
948 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionOverSignal(swigCPtr), false);
949 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
953 internal AccessibilityActionSignal ActionReadNextSignal()
955 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionReadNextSignal(swigCPtr), false);
956 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
960 internal AccessibilityActionSignal ActionReadPreviousSignal()
962 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionReadPreviousSignal(swigCPtr), false);
963 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
967 internal AccessibilityActionSignal ActionUpSignal()
969 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionUpSignal(swigCPtr), false);
970 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
974 internal AccessibilityActionSignal ActionDownSignal()
976 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionDownSignal(swigCPtr), false);
977 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
981 internal AccessibilityActionSignal ActionClearFocusSignal()
983 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionClearFocusSignal(swigCPtr), false);
984 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
988 internal AccessibilityActionSignal ActionBackSignal()
990 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionBackSignal(swigCPtr), false);
991 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
995 internal AccessibilityActionSignal ActionScrollUpSignal()
997 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionScrollUpSignal(swigCPtr), false);
998 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1002 internal AccessibilityActionSignal ActionScrollDownSignal()
1004 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionScrollDownSignal(swigCPtr), false);
1005 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1009 internal AccessibilityActionSignal ActionPageLeftSignal()
1011 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionPageLeftSignal(swigCPtr), false);
1012 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1016 internal AccessibilityActionSignal ActionPageRightSignal()
1018 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionPageRightSignal(swigCPtr), false);
1019 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1023 internal AccessibilityActionSignal ActionPageUpSignal()
1025 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionPageUpSignal(swigCPtr), false);
1026 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1030 internal AccessibilityActionSignal ActionPageDownSignal()
1032 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionPageDownSignal(swigCPtr), false);
1033 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1037 internal AccessibilityActionSignal ActionMoveToFirstSignal()
1039 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionMoveToFirstSignal(swigCPtr), false);
1040 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1044 internal AccessibilityActionSignal ActionMoveToLastSignal()
1046 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionMoveToLastSignal(swigCPtr), false);
1047 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1051 internal AccessibilityActionSignal ActionReadFromTopSignal()
1053 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionReadFromTopSignal(swigCPtr), false);
1054 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1058 internal AccessibilityActionSignal ActionReadFromNextSignal()
1060 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionReadFromNextSignal(swigCPtr), false);
1061 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1065 internal AccessibilityActionSignal ActionZoomSignal()
1067 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionZoomSignal(swigCPtr), false);
1068 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1072 internal AccessibilityActionSignal ActionReadPauseResumeSignal()
1074 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionReadPauseResumeSignal(swigCPtr), false);
1075 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1079 internal AccessibilityActionSignal ActionStartStopSignal()
1081 AccessibilityActionSignal ret = new AccessibilityActionSignal(Interop.AccessibilityManager.AccessibilityManager_ActionStartStopSignal(swigCPtr), false);
1082 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1086 internal SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t ActionScrollSignal()
1088 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);
1089 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();