Class AccessibilityManager
Definition
- Namespace:
- Tizen.NUI.Accessibility
- Assembly:
- Tizen.NUI.dll
AccessibilityManager manages registration of views in an accessibility focus chain and changing the focused view within that chain. This class provides the functionality of registering the focus order and description of views and maintaining the focus chain. It provides functionality of setting the focus and moving the focus forward and backward. It also draws a highlight for the focused view and emits a signal when the focus is changed.
public class AccessibilityManager : BaseHandle, IDynamicResourceHandler, INameScope, System.IDisposable
- Inheritance
- Implements
-
System.IDisposable
Constructors
View SourceAccessibilityManager()
Creates an AccessibilityManager handle.
Declaration
public AccessibilityManager()
Properties
View SourceInstance
Gets the singleton of AccessibilityManager object.
Declaration
public static AccessibilityManager Instance { get; }
Property Value
Type | Description |
---|---|
AccessibilityManager | A handle to the AccessibilityManager |
Methods
View SourceClearFocus()
Clears the focus from the current focused view if any, so that no view is focused in the focus chain. It will emit focus changed signal without current focused view.
Declaration
public void ClearFocus()
GenerateNewFocusOrder()
Generates a new focus order number which can be used to assign to views which need to be appended to the end of the current focus order chain. The new number will be an increment over the very last focus order number in the focus chain. If the focus chain is empty then the function returns 1, else the number returned will be FOLast + 1 where FOLast is the focus order of the very last control in the focus chain.
Declaration
public uint GenerateNewFocusOrder()
Returns
Type | Description |
---|---|
uint | The focus order of the view |
GetAccessibilityAttribute(View, AccessibilityAttribute)
Gets the text of the specified view's accessibility attribute.
Declaration
public string GetAccessibilityAttribute(View view, AccessibilityManager.AccessibilityAttribute type)
Parameters
Type | Name | Description |
---|---|---|
View | view | The view to be queried |
AccessibilityManager.AccessibilityAttribute | type | The attribute type to be queried |
Returns
Type | Description |
---|---|
string | The text of the view's accessibility information |
GetCurrentFocusGroup()
Gets the focus group of current focused view.
Declaration
public View GetCurrentFocusGroup()
Returns
Type | Description |
---|---|
View | 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 |
GetCurrentFocusOrder()
Gets the focus order of currently focused view.
Declaration
public uint GetCurrentFocusOrder()
Returns
Type | Description |
---|---|
uint | The focus order of the currently focused view or 0 if no view is in focus |
GetCurrentFocusView()
Gets the current focused view.
Declaration
public View GetCurrentFocusView()
Returns
Type | Description |
---|---|
View | A handle to the current focused view or an empty handle if no view is focused |
GetFocusGroup(View)
Returns the closest ancestor of the given view that is a focus group.
Declaration
public View GetFocusGroup(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The view to be checked for its focus group |
Returns
Type | Description |
---|---|
View | The focus group the given view belongs to or an empty handle if the given view doesn't belong to any focus group |
GetFocusIndicatorView()
Gets the focus indicator view.
Declaration
public View GetFocusIndicatorView()
Returns
Type | Description |
---|---|
View | A handle to the focus indicator view |
GetFocusOrder(View)
Gets the focus order of the view. When the focus order is 0, it means the focus order of the view is undefined.
Declaration
public uint GetFocusOrder(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | the view to be set with |
Returns
Type | Description |
---|---|
uint | The focus order of the view |
GetGroupMode()
Gets whether the group mode is enabled or not.
Declaration
public bool GetGroupMode()
Returns
Type | Description |
---|---|
bool | Whether the group mode is enabled or not. |
GetReadPosition()
Returns the current position of the read action.
Declaration
public Vector2 GetReadPosition()
Returns
Type | Description |
---|---|
Vector2 | The current event position |
GetViewByFocusOrder(uint)
Gets the view that has the specified focus order. It will return an empty handle if no view in the window has the specified focus order.
Declaration
public View GetViewByFocusOrder(uint order)
Parameters
Type | Name | Description |
---|---|---|
uint | order | The focus order of the view |
Returns
Type | Description |
---|---|
View | The view that has the specified focus order or an empty handle if no view in the stage has the specified focus order |
GetWrapMode()
Gets whether the wrap mode is enabled or not.
Declaration
public bool GetWrapMode()
Returns
Type | Description |
---|---|
bool | Whether the wrap mode is enabled or not. |
IsFocusGroup(View)
Checks whether the view is set as a focus group or not.
Declaration
public bool IsFocusGroup(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | the view to be checked |
Returns
Type | Description |
---|---|
bool | Whether the view is set as a focus group |
MoveFocusBackward()
Moves the focus to the previous focusable view in the focus chain (according to the focus traversal order). When the focus movement is wrapped around, the focus will be moved to the last focusable view when it reaches the beginning of the focus chain.
Declaration
public bool MoveFocusBackward()
Returns
Type | Description |
---|---|
bool | True if the moving was successful |
MoveFocusForward()
Moves the focus to the next focusable view in the focus chain (according to the focus traversal order). 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.
Declaration
public bool MoveFocusForward()
Returns
Type | Description |
---|---|
bool | True if the moving was successful |
ReleaseSwigCPtr(HandleRef)
Declaration
protected override void ReleaseSwigCPtr(Runtime.InteropServices.HandleRef swigCPtr)
Parameters
Type | Name | Description |
---|---|---|
Tizen.System.Runtime.InteropServices.HandleRef | swigCPtr |
Overrides
View SourceReset()
Clears every registered focusable view from focus-manager.
Declaration
public void Reset()
SetAccessibilityAttribute(View, AccessibilityAttribute, string)
Sets the information of the specified view's accessibility attribute.
Declaration
public void SetAccessibilityAttribute(View view, AccessibilityManager.AccessibilityAttribute type, string text)
Parameters
Type | Name | Description |
---|---|---|
View | view | The view to be set with |
AccessibilityManager.AccessibilityAttribute | type | The attribute type the text to be set with |
string | text | The text for the view's accessibility information |
SetCurrentFocusView(View)
Moves the focus to the specified view. Only one view can be focused at the same time. The view must have a defined focus order and must be focusable, visible and in the window.
Declaration
public bool SetCurrentFocusView(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | the view to be set with |
Returns
Type | Description |
---|---|
bool | Whether the focus is successful or not |
SetFocusGroup(View, bool)
Sets whether an view is a focus group that can limit the scope of focus movement to its child views in the focus chain.
Declaration
public void SetFocusGroup(View view, bool isFocusGroup)
Parameters
Type | Name | Description |
---|---|---|
View | view | the view to be set as a focus group |
bool | isFocusGroup | Whether to set the view to be a focus group or not |
SetFocusIndicatorView(View)
Sets the focus indicator view. This will replace the default focus indicator view in AccessibilityManager and will be added to the focused view as a highlight.
Declaration
public void SetFocusIndicatorView(View indicator)
Parameters
Type | Name | Description |
---|---|---|
View | indicator | The indicator view to be added |
SetFocusOrder(View, uint)
Sets the focus order of the view. The focus order of each view in the focus chain is unique. 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, and the focus order of the original view and all the views followed in the focus chain will be increased accordingly. If the focus order assigned to the view is 0, it means that view's focus order is undefined (e.g. the view has a description but with no focus order being set yet) and therefore that view is not focusable.
Declaration
public void SetFocusOrder(View view, uint order)
Parameters
Type | Name | Description |
---|---|---|
View | view | the view to be set with |
uint | order | the focus order to be set with |
SetGroupMode(bool)
Sets whether the group mode is enabled or not. 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. The current focus group is the closest ancestor of the current focused view that is set as a focus group.
Declaration
public void SetGroupMode(bool enabled)
Parameters
Type | Name | Description |
---|---|---|
bool | enabled | Whether the group mode is enabled or not |
SetWrapMode(bool)
Sets whether focus will be moved to the beginning of the focus chain when it reaches the end or vice versa. When both the wrap mode and the group mode are enabled, focus will be wrapped within the current focus group. Focus will not be wrapped in default.
Declaration
public void SetWrapMode(bool wrapped)
Parameters
Type | Name | Description |
---|---|---|
bool | wrapped | Whether the focus movement is wrapped around or not |
Events
View SourceActionActivate
This is emitted when accessibility action is received to activate the current focused view (by one finger double tap).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionActivate
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionBack
This is emitted when accessibility action is received to navigate back (by two fingers circle draw).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionBack
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionClearFocus
This is emitted when accessibility action is received to clear the focus from the current focused view if any, so that no view is focused in the focus chain.
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionClearFocus
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionDown
This is emitted when accessibility action is received to change the value when the current focused view is a slider (by double finger down and move down and left).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionDown
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionMoveToFirst
This is emitted when accessibility action is received to move the focus to the first item on the screen (by one finger swipe up and down).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionMoveToFirst
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionMoveToLast
This is emitted when accessibility action is received to move the focus to the last item on the screen (by one finger swipe down and up).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionMoveToLast
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionNext
This is emitted when accessibility action is received to move focus to the next focusable view (by one finger flick down).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionNext
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionOver
This is emitted when accessibility action is received to focus and read the view (by one finger move).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionOver
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionPageDown
This is emitted when accessibility action is received to scroll down to the next page (by one finger swipe right and left).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionPageDown
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionPageLeft
This is emitted when accessibility action is received to scroll left to the previous page (by two finger swipe left).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionPageLeft
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionPageRight
This is emitted when accessibility action is received to scroll right to the next page (by two finger swipe right).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionPageRight
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionPageUp
This is emitted when accessibility action is received to scroll up to the previous page (by one finger swipe left and right).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionPageUp
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionPrevious
This is emitted when accessibility action is received to move focus to the previous focusable view (by one finger flick up).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionPrevious
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionRead
This is emitted when accessibility action is received to focus and read the view (by one finger tap).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionRead
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionReadFromNext
This is emitted when accessibility action is received to move the focus to and read from the next item continuously (by three fingers double tap).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionReadFromNext
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionReadFromTop
This is emitted when accessibility action is received to focus and read from the first item on the top continuously (by three fingers single tap).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionReadFromTop
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionReadNext
This is emitted when accessibility action is received to move focus to the next focusable view (by one finger flick right).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionReadNext
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionReadPauseResume
This is emitted when accessibility action is received to pause/resume the current speech (by two fingers single tap).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionReadPauseResume
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionReadPrevious
This is emitted when accessibility action is received to move focus to the previous focusable view (by one finger flick left).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionReadPrevious
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionScrollDown
This is emitted when accessibility action is received to scroll down the list (by two finger swipe down).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionScrollDown
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionScrollUp
This is emitted when accessibility action is received to scroll up the list (by two finger swipe up).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionScrollUp
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionStartStop
This is emitted when accessibility action is received to start/stop the current action (by two fingers double tap).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionStartStop
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionUp
This is emitted when accessibility action is received to change the value when the current focused view is a slider (by double finger down and move up and right).
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionUp
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
ActionZoom
This is emitted when accessibility action is received to zoom (by one finger triple tap)
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> ActionZoom
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |
FocusChanged
This signal is emitted when the current focused view is changed.
Declaration
public event EventHandler<AccessibilityManager.FocusChangedEventArgs> FocusChanged
Event Type
Type | Description |
---|---|
EventHandler<><FocusChangedEventArgs> | The signal to connect to |
FocusedViewActivated
This signal is emitted when the current focused view is activated.
Declaration
public event EventHandler<AccessibilityManager.FocusedViewActivatedEventArgs> FocusedViewActivated
Event Type
Type | Description |
---|---|
EventHandler<><FocusedViewActivatedEventArgs> | The signal to connect to |
FocusOvershot
This signal is emitted when there is no way to move focus further.
Declaration
public event EventHandler<AccessibilityManager.FocusOvershotEventArgs> FocusOvershot
Event Type
Type | Description |
---|---|
EventHandler<><FocusOvershotEventArgs> | The signal to connect to |
StatusChanged
This is emitted when accessibility(screen-reader) feature turned on or off.
Declaration
public event ReturnTypeEventHandler<object, EventArgs, bool> StatusChanged
Event Type
Type | Description |
---|---|
ReturnTypeEventHandler<object, EventArgs, bool> | The signal to connect to |