ArkUI_AccessibilityProviderCallbacksWithInstance
typedef struct {...} ArkUI_AccessibilityProviderCallbacksWithInstance
Overview
Defines a callback function struct of a third-party operation provider in the multi-instance scenario. The functions that need to be implemented by the third-party platform are registered with the system through OH_ArkUI_AccessibilityProviderRegisterCallbackWithInstance.
Since: 15
Related module: ArkUI_Accessibility
Header file: native_interface_accessibility.h
Summary
Member Functions
| Name | Description |
|---|---|
| int32_t (*findAccessibilityNodeInfosById)(const char* instanceId, int64_t elementId,ArkUI_AccessibilitySearchMode mode, int32_t requestId, ArkUI_AccessibilityElementInfoList* elementList) | Finds the information about an accessibility node based on the specified node ID. Multi-instance scenarios are supported. Callback function implemented by the third-party platform and registered with the system. |
| int32_t (*findAccessibilityNodeInfosByText)(const char* instanceId, int64_t elementId, const char* text,int32_t requestId, ArkUI_AccessibilityElementInfoList* elementList) | Finds the node information matching the specified text content. Multi-instance scenarios are supported. Callback function implemented by the third-party platform and registered with the system. |
| int32_t (*findFocusedAccessibilityNode)(const char* instanceId, int64_t elementId,ArkUI_AccessibilityFocusType focusType, int32_t requestId, ArkUI_AccessibilityElementInfo* elementInfo) | Finds the node that currently has focus within a given node. Callback function implemented by the third-party platform and registered with the system. Multi-instance scenarios are supported. |
| int32_t (*findNextFocusAccessibilityNode)(const char* instanceId, int64_t elementId, ArkUI_AccessibilityFocusMoveDirection direction,int32_t requestId, ArkUI_AccessibilityElementInfo* elementInfo) | Finds the next node in a specified direction from a given node. Callback function implemented by the third-party platform and registered with the system. Multi-instance scenarios are supported. |
| int32_t (*executeAccessibilityAction)(const char* instanceId, int64_t elementId,ArkUI_Accessibility_ActionType action, ArkUI_AccessibilityActionArguments *actionArguments, int32_t requestId) | Performs a specified action on a specified node. Callback function implemented by the third-party platform and registered with the system. Multi-instance scenarios are supported. |
| int32_t (*clearFocusedFocusAccessibilityNode)(const char* instanceId) | Removes focus from the current node. Callback function implemented by the third-party platform and registered with the system. Multi-instance scenarios are supported. |
| int32_t (*getAccessibilityNodeCursorPosition)(const char* instanceId, int64_t elementId,int32_t requestId, int32_t* index) | Obtains the cursor position within a text component of the current accessibility node. Callback function implemented by the third-party platform and registered with the system. Multi-instance scenarios are supported. |
Member Function Description
findAccessibilityNodeInfosById()
int32_t (*findAccessibilityNodeInfosById)(const char* instanceId, int64_t elementId,ArkUI_AccessibilitySearchMode mode, int32_t requestId, ArkUI_AccessibilityElementInfoList* elementList)
Description
Finds the information about an accessibility node based on the specified node ID. Callback function implemented by the third-party platform and registered with the system. Multi-instance scenarios are supported.
Since: 15
Parameters
| Name | Description |
|---|---|
| const char* instanceId | Instance ID of the third-party framework. |
| int64_t elementId | Unique ID of the accessibility element. |
| ArkUI_AccessibilitySearchMode mode | Search mode for accessibility services. |
| int32_t requestId | Request ID, which is used to associate the request process. It is recommended that this ID be logged to facilitate fault locating. |
| ArkUI_AccessibilityElementInfoList* elementList | List of all accessibility elements found. |
Returns
| Type | Description |
|---|---|
| int32_t | Returns ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL if the operation is successful. Returns ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER if a parameter error occurs. |
findAccessibilityNodeInfosByText()
int32_t (*findAccessibilityNodeInfosByText)(const char* instanceId, int64_t elementId, const char* text,int32_t requestId, ArkUI_AccessibilityElementInfoList* elementList)
Description
Finds the node information matching the specified text content. Callback function implemented by the third-party platform and registered with the system. Multi-instance scenarios are supported.
Since: 15
Parameters
| Name | Description |
|---|---|
| const char* instanceId | Instance ID of the third-party framework. |
| int64_t elementId | Unique ID of the accessibility element. |
| const char* text | Text content to match in the component. |
| int32_t requestId | Request ID for identifying the request process. It is recommended for logging to aid troubleshooting. |
| ArkUI_AccessibilityElementInfoList* elementList | List of all accessibility elements found. |
Returns
| Type | Description |
|---|---|
| int32_t | Returns ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL if the operation is successful. Returns ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER if a parameter error occurs. |
findFocusedAccessibilityNode()
int32_t (*findFocusedAccessibilityNode)(const char* instanceId, int64_t elementId,ArkUI_AccessibilityFocusType focusType, int32_t requestId, ArkUI_AccessibilityElementInfo* elementInfo)
Description
Finds the node that currently has focus within a given node. Callback function implemented by the third-party platform and registered with the system. Multi-instance scenarios are supported.
Since: 15
Parameters
| Name | Description |
|---|---|
| const char* instanceId | Instance ID of the third-party framework. |
| int64_t elementId | Unique ID of the accessibility element. |
| ArkUI_AccessibilityFocusType focusType | Focus type. |
| int32_t requestId | Request ID, which is used to associate the request process. It is recommended that this ID be logged to facilitate fault locating. |
| ArkUI_AccessibilityElementInfo* elementInfo | List of all accessibility elements found. |
Returns
| Type | Description |
|---|---|
| int32_t | Returns ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL if the operation is successful. Returns ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER if a parameter error occurs. |
findNextFocusAccessibilityNode()
int32_t (*findNextFocusAccessibilityNode)(const char* instanceId, int64_t elementId, ArkUI_AccessibilityFocusMoveDirection direction,int32_t requestId, ArkUI_AccessibilityElementInfo* elementInfo)
Description
Finds the next node in a specified direction from a given node. Callback function implemented by the third-party platform and registered with the system. Multi-instance scenarios are supported.
Since: 15
Parameters
| Name | Description |
|---|---|
| const char* instanceId | Instance ID of the third-party framework. |
| int64_t elementId | Unique ID of the accessibility element. |
| ArkUI_AccessibilityFocusMoveDirection direction | Search direction. |
| int32_t requestId | Request ID for identifying the request process. It is recommended for logging to aid troubleshooting. |
| ArkUI_AccessibilityElementInfo* elementInfo | List of all accessibility elements found. |
Returns
| Type | Description |
|---|---|
| int32_t | Returns ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL if the operation is successful. Returns ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER if a parameter error occurs. |
executeAccessibilityAction()
int32_t (*executeAccessibilityAction)(const char* instanceId, int64_t elementId,ArkUI_Accessibility_ActionType action, ArkUI_AccessibilityActionArguments *actionArguments, int32_t requestId)
Description
Performs a specified action on a specified node. Callback function implemented by the third-party platform and registered with the system. Multi-instance scenarios are supported.
Since: 15
Parameters
| Name | Description |
|---|---|
| const char* instanceId | Instance ID of the third-party framework. |
| int64_t elementId | Unique ID of the accessibility element. |
| ArkUI_Accessibility_ActionType action | Action to perform, such as focus, click, or long press. |
| ArkUI_AccessibilityActionArguments *actionArguments | Parameters controlling the action. |
| int32_t requestId | Request ID for identifying the request process. It is recommended for logging to aid troubleshooting. |
Returns
| Type | Description |
|---|---|
| int32_t | Returns ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL if the operation is successful. Returns ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER if a parameter error occurs. |
clearFocusedFocusAccessibilityNode()
int32_t (*clearFocusedFocusAccessibilityNode)(const char* instanceId)
Description
Removes focus from the current node. Callback function implemented by the third-party platform and registered with the system. Multi-instance scenarios are supported.
Since: 15
Parameters
| Name | Description |
|---|---|
| const char* instanceId | Instance ID of the third-party framework. |
Returns
| Type | Description |
|---|---|
| int32_t | Returns ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL if the operation is successful. Returns ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER if a parameter error occurs. |
getAccessibilityNodeCursorPosition()
int32_t (*getAccessibilityNodeCursorPosition)(const char* instanceId, int64_t elementId,int32_t requestId, int32_t* index)
Description
Obtains the cursor position within a text component of the current accessibility node. Callback function implemented by the third-party platform and registered with the system. Multi-instance scenarios are supported.
Since: 15
Parameters
| Name | Description |
|---|---|
| const char* instanceId | Instance ID of the third-party framework. |
| int64_t elementId | Unique ID of the accessibility element. |
| int32_t requestId | Request ID for identifying the request process. It is recommended for logging to aid troubleshooting. |
| int32_t* index | Cursor position result. |
Returns
| Type | Description |
|---|---|
| int32_t | Returns ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL if the operation is successful. Returns ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER if a parameter error occurs. |
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 arkts-apis-uicontext-contextmenucontroller
openharmony 鸿蒙 errorcode-canvas
openharmony 鸿蒙 capi-oh-nativexcomponent-native-xcomponent-oh-nativexcomponent
openharmony 鸿蒙 errorcode-bindSheet
openharmony 鸿蒙 js-apis-arkui-uiExtension-sys
openharmony 鸿蒙 capi-arkui-accessibility-arkui-accessibilityeventinfo
openharmony 鸿蒙 capi-arkui-rendernodeutils
openharmony 鸿蒙 js-apis-arkui-node
openharmony 鸿蒙 capi-native-node-h
openharmony 鸿蒙 capi-arkui-nativemodule-arkui-listitemswipeactionitem