• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**
17  * @addtogroup ArkUI_Accessibility
18  * @{
19  *
20  * @brief Describes the native capabilities supported by ArkUI Accessibility, such as querying accessibility nodes and
21  * reporting accessibility events.
22  *
23  * @since 13
24  */
25 
26 /**
27  * @file native_interface_accessibility.h
28  *
29  * @brief Declares the APIs used to access the native Accessibility.
30  *
31  * @library libace_ndk.z.so
32  * @syscap SystemCapability.ArkUI.ArkUI.Full
33  * @kit ArkUI
34  * @since 13
35  */
36 #ifndef _NATIVE_INTERFACE_ACCESSIBILITY_H
37 #define _NATIVE_INTERFACE_ACCESSIBILITY_H
38 
39 #ifdef __cplusplus
40 #include <cstdint>
41 #else
42 #include <stdint.h>
43 #endif
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 /**
50  * @brief Defines a struct for accessibility element information.
51  *
52  * @since 13
53  */
54 typedef struct ArkUI_AccessibilityElementInfo ArkUI_AccessibilityElementInfo;
55 
56 /**
57  * @brief Defines a struct for accessibility event information.
58  *
59  * @since 13
60  */
61 typedef struct ArkUI_AccessibilityEventInfo ArkUI_AccessibilityEventInfo;
62 
63 /**
64  * @brief Defines a struct for the local provider of accessibility.
65  *
66  * @since 13
67  */
68 typedef struct ArkUI_AccessibilityProvider ArkUI_AccessibilityProvider;
69 
70 /**
71  * @brief Defines a struct for accessibility action arguments.
72  *
73  * @since 13
74  */
75 typedef struct ArkUI_AccessibilityActionArguments ArkUI_AccessibilityActionArguments;
76 
77 /**
78  * @brief Defines an enum for accessibility action types.
79  *
80  * @since 13
81  */
82 typedef enum {
83     /** Invalid action. */
84     ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_INVALID = 0,
85     /** Response to a click. */
86     ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_CLICK = 0x00000010,
87     /** Response to a long click. */
88     ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_LONG_CLICK = 0x00000020,
89     /** Accessibility focus acquisition. */
90     ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_GAIN_ACCESSIBILITY_FOCUS = 0x00000040,
91     /** Accessibility focus clearance. */
92     ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_CLEAR_ACCESSIBILITY_FOCUS = 0x00000080,
93     /** Forward scroll action. */
94     ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_SCROLL_FORWARD = 0x00000100,
95     /** Backward scroll action. */
96     ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_SCROLL_BACKWARD = 0x00000200,
97     /** Copy action for text content. */
98     ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_COPY = 0x00000400,
99     /** Paste action for text content. */
100     ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_PASTE = 0x00000800,
101     /** Cut action for text content. */
102     ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_CUT = 0x00001000,
103     /** Text selection action, requiring the setting of <b>selectTextBegin</b>, <b>TextEnd</b>, and <b>TextInForward</b>
104      *  parameters to select a text segment in the text box. */
105     ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_SELECT_TEXT = 0x00002000,
106     /** Text content setting action. */
107     ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_SET_TEXT = 0x00004000,
108     /** Cursor position setting action. */
109     ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_SET_CURSOR_POSITION = 0x00100000,
110     /** Support action for find next item in focus move operation
111      *  @since 15
112      */
113     ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_NEXT_HTML_ITEM = 0x02000000,
114     /** Support action for find previous item in focus move operation
115      *  @since 15
116      */
117     ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_PREVIOUS_HTML_ITEM = 0x04000000,
118 } ArkUI_Accessibility_ActionType;
119 
120 /**
121  * @brief Defines an enum for accessibility event types.
122  *
123  * @since 13
124  */
125 typedef enum {
126     /** Invalid event. */
127     ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_INVALID = 0,
128     /** Click event, sent after the UI component responds. */
129     ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_CLICKED = 0x00000001,
130     /** Long click event, sent after the UI component responds. */
131     ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_LONG_CLICKED = 0x00000002,
132     /** Selection event, sent after the UI component responds. */
133     ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_SELECTED = 0x00000004,
134     /** Text update event, sent when text is updated. */
135     ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_TEXT_UPDATE = 0x00000010,
136     /** Page state update event, sent when the page transitions, switches, resizes, or moves. */
137     ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_PAGE_STATE_UPDATE = 0x00000020,
138     /** Page content update event, sent when the page content changes. */
139     ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_PAGE_CONTENT_UPDATE = 0x00000800,
140     /** Scrolled event, sent when a scrollable component experiences a scroll event. */
141     ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_SCROLLED = 0x000001000,
142     /** Accessibility focus event, sent after the UI component responds. */
143     ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_ACCESSIBILITY_FOCUSED = 0x00008000,
144     /** Accessibility focus cleared event, sent after the UI component responds. */
145     ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_ACCESSIBILITY_FOCUS_CLEARED = 0x00010000,
146     /** FOcus request for a specific node. */
147     ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_REQUEST_ACCESSIBILITY_FOCUS = 0x02000000,
148     /** Page open event reported by the UI component. */
149     ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_PAGE_OPEN = 0x20000000,
150     /** Page close event reported by the UI component. */
151     ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_PAGE_CLOSE = 0x08000000,
152     /** Announcement event, indicating a request to proactively announce specified content. */
153     ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_ANNOUNCE_FOR_ACCESSIBILITY = 0x10000000,
154     /** Focus update event, used for focus update scenarios. */
155     ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_FOCUS_NODE_UPDATE = 0x10000001,
156 } ArkUI_AccessibilityEventType;
157 
158 /**
159  * @brief Defines a struct for the accessible action.
160  *
161  * @since 13
162  */
163 typedef struct {
164     /** Action type. */
165     ArkUI_Accessibility_ActionType actionType;
166     /** Action description. */
167     const char* description;
168 } ArkUI_AccessibleAction;
169 
170 /**
171  * @brief Defines a struct for the accessible rectangle.
172  *
173  * @since 13
174  */
175 typedef struct {
176     /** X coordinate of the upper left corner. */
177     int32_t leftTopX;
178     /** Y coordinate of the upper left corner. */
179     int32_t leftTopY;
180     /** X coordinate of the lower right corner. */
181     int32_t rightBottomX;
182     /** Y coordinate of the lower right corner. */
183     int32_t rightBottomY;
184 } ArkUI_AccessibleRect;
185 
186 /**
187  * @brief Define a struct for the accessible range information.
188  *
189  * @since 13
190  */
191 typedef struct {
192     /** Minimum value. */
193     double min;
194     /** Maximum value. */
195     double max;
196     /** Current value. */
197     double current;
198 } ArkUI_AccessibleRangeInfo;
199 
200 /**
201  * @brief Defines a struct for the accessible grid information.
202  *
203  * @since 13
204  */
205 typedef struct {
206     /** Number of rows. */
207     int32_t rowCount;
208     /** Number of columns. */
209     int32_t columnCount;
210     /** Selection mode. The value <b>0</b> indicates that only one row can be selected. */
211     int32_t selectionMode;
212 } ArkUI_AccessibleGridInfo;
213 
214 /**
215  * @brief Defines a struct for the accessible grid item information.
216  *
217  * @since 13
218  */
219 typedef struct {
220     /** Whether it is a header. */
221     bool heading;
222     /** Whether it is selected. */
223     bool selected;
224     /** Column index. */
225     int32_t columnIndex;
226     /** Row index. */
227     int32_t rowIndex;
228     /** Column span. */
229     int32_t columnSpan;
230     /** Row span. */
231     int32_t rowSpan;
232 } ArkUI_AccessibleGridItemInfo;
233 
234 /**
235  * @brief Enumerates the accessibility error codes.
236  *
237  * @since 13
238  */
239 typedef enum {
240     /**
241      * @error Success.
242      */
243     ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL = 0,
244     /**
245      * @error Failure.
246      */
247     ARKUI_ACCESSIBILITY_NATIVE_RESULT_FAILED = -1,
248     /**
249      * @error Invalid parameter.
250      */
251     ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER = -2,
252     /**
253      * @error Out of memory.
254      */
255     ARKUI_ACCESSIBILITY_NATIVE_RESULT_OUT_OF_MEMORY = -3,
256 } ArkUI_AcessbilityErrorCode;
257 
258 /**
259  * @brief Defines an enum for the accessibility search modes.
260  *
261  * @since 13
262  */
263 typedef enum {
264     /** Search for current nodes. */
265     ARKUI_ACCESSIBILITY_NATIVE_SEARCH_MODE_PREFETCH_CURRENT = 0,
266     /** Search for parent nodes. */
267     ARKUI_ACCESSIBILITY_NATIVE_SEARCH_MODE_PREFETCH_PREDECESSORS = 1 << 0,
268     /** Search for sibling nodes. */
269     ARKUI_ACCESSIBILITY_NATIVE_SEARCH_MODE_PREFETCH_SIBLINGS = 1 << 1,
270     /** Search for child nodes at the next level. */
271     ARKUI_ACCESSIBILITY_NATIVE_SEARCH_MODE_PREFETCH_CHILDREN = 1 << 2,
272     /** Search for all child nodes. */
273     ARKUI_ACCESSIBILITY_NATIVE_SEARCH_MODE_PREFETCH_RECURSIVE_CHILDREN = 1 << 3,
274 } ArkUI_AccessibilitySearchMode;
275 
276 /**
277  * @brief Defines an enum for the accessibility focus types.
278  *
279  * @since 13
280  */
281 typedef enum {
282     /** Invalid type. */
283     ARKUI_ACCESSIBILITY_NATIVE_FOCUS_TYPE_INVALID = -1,
284     /** Input focus type. */
285     ARKUI_ACCESSIBILITY_NATIVE_FOCUS_TYPE_INPUT = 1 << 0,
286     /** Accessibility focus type. */
287     ARKUI_ACCESSIBILITY_NATIVE_FOCUS_TYPE_ACCESSIBILITY = 1 << 1,
288 } ArkUI_AccessibilityFocusType;
289 
290 /**
291  * @brief Enumerates the directions for moving the accessibility focus.
292  *
293  * @since 13
294  */
295 typedef enum {
296     /** Invalid direction. */
297     ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_INVALID = 0,
298     /** Up. */
299     ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_UP = 0x00000001,
300     /** Down. */
301     ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_DOWN = 0x00000002,
302     /** Left. */
303     ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_LEFT = 0x00000004,
304     /** Right. */
305     ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_RIGHT = 0x00000008,
306     /** Forward. */
307     ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_FORWARD = 0x00000010,
308     /** Backward. */
309     ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_BACKWARD = 0x00000020,
310 } ArkUI_AccessibilityFocusMoveDirection;
311 
312 /**
313  * @brief Defines a struct for the accessibility element information list.
314  *
315  * @since 13
316  */
317 typedef struct ArkUI_AccessibilityElementInfoList ArkUI_AccessibilityElementInfoList;
318 
319 /**
320  * @brief Registers callbacks for the accessibility provider.
321  *
322  * @since 13
323  */
324 typedef struct ArkUI_AccessibilityProviderCallbacks {
325     /**
326     * @brief Called to obtain element information based on a specified node.
327     *
328     * @param elementId Indicates the element ID.
329     * @param mode Indicates accessibility search mode.
330     * @param requestId Indicates the request ID.
331     * @param elementList Indicates accessibility elementInfo list.
332     * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
333     *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
334     */
335     int32_t (*findAccessibilityNodeInfosById)(int64_t elementId, ArkUI_AccessibilitySearchMode mode,
336         int32_t requestId, ArkUI_AccessibilityElementInfoList* elementList);
337     /**
338     * @brief Called to obtain element information based on a specified node and text content.
339     *
340     * @param elementId Indicates the element ID.
341     * @param text Indicates accessibility text.
342     * @param requestId Indicates the request ID.
343     * @param elementList Indicates accessibility elementInfo list.
344     * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
345     *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
346     */
347     int32_t (*findAccessibilityNodeInfosByText)(int64_t elementId, const char* text, int32_t requestId,
348         ArkUI_AccessibilityElementInfoList* elementList);
349     /**
350     * @brief Called to obtain focused element information based on a specified node.
351     *
352     * @param elementId Indicates the element ID.
353     * @param focusType Indicates focus type.
354     * @param requestId Indicates the request ID.
355     * @param elementInfo Indicates accessibility elementInfo.
356     * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
357     *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
358     */
359     int32_t (*findFocusedAccessibilityNode)(int64_t elementId, ArkUI_AccessibilityFocusType focusType,
360         int32_t requestId, ArkUI_AccessibilityElementInfo* elementInfo);
361     /**
362     * @brief Called to find the next focusable node based on the reference node.
363     *
364     * @param elementId Indicates the element ID.
365     * @param direction Indicates direction.
366     * @param requestId Indicates the request ID.
367     * @param elementInfo Indicates accessibility elementInfo.
368     * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
369     *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
370     */
371     int32_t (*findNextFocusAccessibilityNode)(
372         int64_t elementId, ArkUI_AccessibilityFocusMoveDirection direction,
373         int32_t requestId, ArkUI_AccessibilityElementInfo* elementInfo);
374     /**
375     * @brief Called to execute a specified action on a specified node.
376     *
377     * @param elementId Indicates the element ID.
378     * @param action Indicates action.
379     * @param actionArguments Indicates action arguments.
380     * @param requestId Indicates the request ID.
381     * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
382     *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
383     */
384     int32_t (*executeAccessibilityAction)(int64_t elementId, ArkUI_Accessibility_ActionType action,
385         ArkUI_AccessibilityActionArguments *actionArguments, int32_t requestId);
386     /**
387     * @brief Called to clear the focus state of the current focused node.
388     *
389     * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
390     *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_FAILED} if the operation is failed.
391     */
392     int32_t (*clearFocusedFocusAccessibilityNode)();
393     /**
394     * @brief Called to query the current cursor position of the specified node.
395     *
396     * @param elementId Indicates the element ID.
397     * @param requestId Indicates the request ID.
398     * @param index Indicates index.
399     * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
400     *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
401     */
402     int32_t (*getAccessibilityNodeCursorPosition)(int64_t elementId, int32_t requestId, int32_t* index);
403 } ArkUI_AccessibilityProviderCallbacks;
404 
405 /**
406  * @brief Registers a callback for this <b>ArkUI_AccessibilityProvider</b> instance.
407  *
408  * @param provider Indicates the pointer to the <b>ArkUI_AccessibilityProvider</b> instance.
409  * @param callbacks Indicates the pointer to the <b>GetAccessibilityNodeCursorPosition</b> callback.
410  * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
411  *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
412  * @since 13
413  */
414 int32_t OH_ArkUI_AccessibilityProviderRegisterCallback(
415     ArkUI_AccessibilityProvider* provider, ArkUI_AccessibilityProviderCallbacks* callbacks);
416 
417 /**
418  * @brief Registers callbacks with instance for the accessibility provider.
419  * @since 15
420  */
421 typedef struct ArkUI_AccessibilityProviderCallbacksWithInstance {
422     /**
423     * @brief Called to obtain element information based on a specified node.
424     * @param instanceId Indicates ID of third-party framework instance.
425     * @param elementId The unique id of the component ID.
426     * @param mode Indicates accessibility search mode.
427     * @param requestId Matched the request and response. transfer it by callback only.
428     * @param elementList The all obtained accessibility elements list information.
429     * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
430     *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
431     */
432     int32_t (*findAccessibilityNodeInfosById)(const char* instanceId, int64_t elementId,
433         ArkUI_AccessibilitySearchMode mode, int32_t requestId, ArkUI_AccessibilityElementInfoList* elementList);
434     /**
435     * @brief Called to obtain element information based on a specified node and text content.
436     * @param instanceId Indicates ID of third-party framework instance.
437     * @param elementId The unique id of the component ID.
438     * @param text Filter for the child components to matched with the text.
439     * @param requestId Matched the request and response. transfer it by callback only.
440     * @param elementList The all obtained accessibility elements list information.
441     * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
442     *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
443     */
444     int32_t (*findAccessibilityNodeInfosByText)(const char* instanceId, int64_t elementId, const char* text,
445         int32_t requestId, ArkUI_AccessibilityElementInfoList* elementList);
446     /**
447     * @brief Called to obtain focused element information based on a specified node.
448     * @param instanceId Indicates ID of third-party framework instance.
449     * @param elementId The unique id of the component ID.
450     * @param focusType Indicates focus type.
451     * @param requestId Matched the request and response. transfer it by callback only.
452     * @param elementInfo The all obtained accessibility elements list information.
453     * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
454     *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
455     */
456     int32_t (*findFocusedAccessibilityNode)(const char* instanceId, int64_t elementId,
457         ArkUI_AccessibilityFocusType focusType, int32_t requestId, ArkUI_AccessibilityElementInfo* elementInfo);
458     /**
459     * @brief Called to find the next focusable node based on the reference node.
460     * @param instanceId Indicates ID of third-party framework instance.
461     * @param elementId The unique id of the component ID.
462     * @param direction Indicates direction.
463     * @param requestId Matched the request and response. transfer it by callback only.
464     * @param elementInfo The all obtained accessibility elements list information.
465     * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
466     *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
467     */
468     int32_t (*findNextFocusAccessibilityNode)(
469         const char* instanceId, int64_t elementId, ArkUI_AccessibilityFocusMoveDirection direction,
470         int32_t requestId, ArkUI_AccessibilityElementInfo* elementInfo);
471     /**
472     * @brief Called to execute a specified action on a specified node.
473     * @param instanceId Indicates ID of third-party framework instance.
474     * @param elementId The unique id of the component ID.
475     * @param action Indicates action.
476     * @param actionArguments Indicates action arguments.
477     * @param requestId Matched the request and response. transfer it by callback only.
478     * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
479     *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
480     */
481     int32_t (*executeAccessibilityAction)(const char* instanceId, int64_t elementId,
482         ArkUI_Accessibility_ActionType action, ArkUI_AccessibilityActionArguments *actionArguments, int32_t requestId);
483     /**
484     * @brief Called to clear the focus state of the current focused node.
485     * @param instanceId Indicates ID of third-party framework instance.
486     * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
487     *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_FAILED} if the operation is failed.
488     */
489     int32_t (*clearFocusedFocusAccessibilityNode)(const char* instanceId);
490     /**
491     * @brief Called to query the current cursor position of the specified node.
492     * @param instanceId Indicates ID of third-party framework instance.
493     * @param elementId The unique id of the component ID.
494     * @param requestId Matched the request and response. transfer it by callback only.
495     * @param index Indicates index.
496     * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
497     *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
498     */
499     int32_t (*getAccessibilityNodeCursorPosition)(const char* instanceId, int64_t elementId,
500         int32_t requestId, int32_t* index);
501 } ArkUI_AccessibilityProviderCallbacksWithInstance;
502 
503 /**
504  * @brief Registers a callback with instance for this <b>ArkUI_AccessibilityProvider</b> instance.
505  * @param instanceId Indicates ID of third-party framework instance.
506  * @param provider Indicates the pointer to the <b>ArkUI_AccessibilityProvider</b> instance.
507  * @param callbacks Indicates the pointer to the <b>ArkUI_AccessibilityProviderCallbacksWithInstance</b> callback.
508  * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
509  *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
510  * @since 15
511  */
512 int32_t OH_ArkUI_AccessibilityProviderRegisterCallbackWithInstance(const char* instanceId,
513     ArkUI_AccessibilityProvider* provider, ArkUI_AccessibilityProviderCallbacksWithInstance* callbacks);
514 
515 /**
516  * @brief Sends accessibility event information.
517  *
518  * @param provider Indicates the pointer to the <b>ArkUI_AccessibilityProvider</b> instance.
519  * @param eventInfo Indicates the pointer to the accessibility event information.
520  * @param callback Indicates the pointer to the callback that is called after the event is sent.
521  * @since 13
522  */
523 void OH_ArkUI_SendAccessibilityAsyncEvent(
524     ArkUI_AccessibilityProvider* provider, ArkUI_AccessibilityEventInfo* eventInfo,
525     void (*callback)(int32_t errorCode));
526 
527 /**
528  * @brief Adds and obtains the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
529  *
530  * @param list Indicates the pointer to an <b>ArkUI_AccessibilityElementInfoList</b> object.
531  * @return Returns the pointer to the <b>ArkUI_AccessibilityElementInfo</b> object.
532  * @since 13
533  */
534 ArkUI_AccessibilityElementInfo* OH_ArkUI_AddAndGetAccessibilityElementInfo(
535     ArkUI_AccessibilityElementInfoList* list);
536 
537 /**
538 * @brief Sets the element ID for an <b>ArkUI_AccessibilityElementInfo</b> object.
539 *
540 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
541 * @param elementId Indicates the element ID.
542 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
543 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
544 * @since 13
545 */
546 int32_t OH_ArkUI_AccessibilityElementInfoSetElementId(
547     ArkUI_AccessibilityElementInfo* elementInfo, int32_t elementId);
548 
549 /**
550 * @brief Sets the parent ID for an <b>ArkUI_AccessibilityElementInfo</b> object.
551 *
552 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
553 * @param parentId Indicates the parent ID.
554 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
555 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
556 * @since 13
557 */
558 int32_t OH_ArkUI_AccessibilityElementInfoSetParentId(
559     ArkUI_AccessibilityElementInfo* elementInfo, int32_t parentId);
560 
561 /**
562 * @brief Sets the component type for an <b>ArkUI_AccessibilityElementInfo</b> object.
563 *
564 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
565 * @param componentType Indicates the component type.
566 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
567 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
568 * @since 13
569 */
570 int32_t OH_ArkUI_AccessibilityElementInfoSetComponentType(
571     ArkUI_AccessibilityElementInfo* elementInfo, const char* componentType);
572 
573 /**
574 * @brief Sets the component content for an <b>ArkUI_AccessibilityElementInfo</b> object.
575 *
576 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
577 * @param contents Indicates the component content.
578 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
579 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
580 * @since 13
581 */
582 int32_t OH_ArkUI_AccessibilityElementInfoSetContents(
583     ArkUI_AccessibilityElementInfo* elementInfo, const char* contents);
584 
585 /**
586 * @brief Sets the hint text for an <b>ArkUI_AccessibilityElementInfo</b> object.
587 *
588 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
589 * @param hintText Indicates the hint text.
590 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
591 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
592 * @since 13
593 */
594 int32_t OH_ArkUI_AccessibilityElementInfoSetHintText(
595     ArkUI_AccessibilityElementInfo* elementInfo, const char* hintText);
596 
597 /**
598 * @brief Sets the accessibility text for an <b>ArkUI_AccessibilityElementInfo</b> object.
599 *
600 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
601 * @param accessibilityText Indicates the accessibility text.
602 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
603 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
604 * @since 13
605 */
606 int32_t OH_ArkUI_AccessibilityElementInfoSetAccessibilityText(
607     ArkUI_AccessibilityElementInfo* elementInfo, const char* accessibilityText);
608 
609 /**
610 * @brief Sets the accessibility description for an <b>ArkUI_AccessibilityElementInfo</b> object.
611 *
612 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
613 * @param accessibilityDescription Indicates the accessibility description.
614 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
615 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
616 * @since 13
617 */
618 int32_t OH_ArkUI_AccessibilityElementInfoSetAccessibilityDescription(
619     ArkUI_AccessibilityElementInfo* elementInfo, const char* accessibilityDescription);
620 
621 /**
622 * @brief Set the number of child nodes and child node IDs for an <b>ArkUI_AccessibilityElementInfo</b> object.
623 *
624 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
625 * @param childCount Indicates the number of child nodes.
626 * @param childNodeIds Indicates an array of child node IDs.
627 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
628 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
629 * @since 13
630 */
631 int32_t OH_ArkUI_AccessibilityElementInfoSetChildNodeIds(
632     ArkUI_AccessibilityElementInfo* elementInfo, int32_t childCount, int64_t* childNodeIds);
633 
634 /**
635 * @brief Sets the operation actions for an <b>ArkUI_AccessibilityElementInfo</b> object.
636 *
637 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
638 * @param operationCount Indicates the operation count.
639 * @param operationActions Indicates the operation actions.
640 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
641 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
642 * @since 13
643 */
644 int32_t OH_ArkUI_AccessibilityElementInfoSetOperationActions(ArkUI_AccessibilityElementInfo* elementInfo,
645     int32_t operationCount, ArkUI_AccessibleAction* operationActions);
646 
647 /**
648 * @brief Sets the screen area for an <b>ArkUI_AccessibilityElementInfo</b> object.
649 *
650 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
651 * @param screenRect Indicates the screen area.
652 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
653 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
654 * @since 13
655 */
656 int32_t OH_ArkUI_AccessibilityElementInfoSetScreenRect(
657     ArkUI_AccessibilityElementInfo* elementInfo, ArkUI_AccessibleRect* screenRect);
658 
659 /**
660 * @brief Sets whether the element is checkable for an <b>ArkUI_AccessibilityElementInfo</b> object.
661 *
662 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
663 * @param checkable Indicates whether the element is checkable.
664 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
665 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
666 * @since 13
667 */
668 int32_t OH_ArkUI_AccessibilityElementInfoSetCheckable(
669     ArkUI_AccessibilityElementInfo* elementInfo, bool checkable);
670 
671 /**
672 * @brief Sets whether the element is checked for an <b>ArkUI_AccessibilityElementInfo</b> object.
673 *
674 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
675 * @param checked Indicates whether the element is checked.
676 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
677 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
678 * @since 13
679 */
680 int32_t OH_ArkUI_AccessibilityElementInfoSetChecked(
681     ArkUI_AccessibilityElementInfo* elementInfo, bool checked);
682 
683 /**
684 * @brief Sets whether the element is focusable for an <b>ArkUI_AccessibilityElementInfo</b> object.
685 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
686 * @param focusable Indicates whether the element is focusable.
687 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
688 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
689 * @since 13
690 */
691 int32_t OH_ArkUI_AccessibilityElementInfoSetFocusable(
692     ArkUI_AccessibilityElementInfo* elementInfo, bool focusable);
693 
694 /**
695 * @brief Sets whether the element is focused for an <b>ArkUI_AccessibilityElementInfo</b> object.
696 *
697 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
698 * @param isFocused Indicates whether the element is focused.
699 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
700 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
701 * @since 13
702 */
703 int32_t OH_ArkUI_AccessibilityElementInfoSetFocused(
704     ArkUI_AccessibilityElementInfo* elementInfo, bool isFocused);
705 
706 /**
707 * @brief Sets whether the element is visible for an <b>ArkUI_AccessibilityElementInfo</b> object.
708 *
709 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
710 * @param isVisible Indicates whether the element is visible.
711 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
712 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
713 * @since 13
714 */
715 int32_t OH_ArkUI_AccessibilityElementInfoSetVisible(
716     ArkUI_AccessibilityElementInfo* elementInfo, bool isVisible);
717 
718 /**
719 * @brief Sets the accessibility focus state for an <b>ArkUI_AccessibilityElementInfo</b> object.
720 *
721 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
722 * @param accessibilityFocused Indicates whether the element has accessibility focus.
723 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
724 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
725 * @since 13
726 */
727 int32_t OH_ArkUI_AccessibilityElementInfoSetAccessibilityFocused(
728     ArkUI_AccessibilityElementInfo* elementInfo, bool accessibilityFocused);
729 
730 /**
731 * @brief Sets whether the element is selected for an <b>ArkUI_AccessibilityElementInfo</b> object.
732 *
733 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
734 * @param selected Indicates whether the element is selected.
735 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
736 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
737 * @since 13
738 */
739 int32_t OH_ArkUI_AccessibilityElementInfoSetSelected(
740     ArkUI_AccessibilityElementInfo* elementInfo, bool selected);
741 
742 /**
743 * @brief Sets whether the element is clickable for an <b>ArkUI_AccessibilityElementInfo</b> object.
744 *
745 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
746 * @param clickable Indicates whether the element is clickable.
747 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
748 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
749 * @since 13
750 */
751 int32_t OH_ArkUI_AccessibilityElementInfoSetClickable(
752     ArkUI_AccessibilityElementInfo* elementInfo, bool clickable);
753 
754 /**
755 * @brief Sets whether the element is long clickable for an <b>ArkUI_AccessibilityElementInfo</b> object.
756 *
757 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
758 * @param longClickable Indicates whether the element is long clickable.
759 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
760 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
761 * @since 13
762 */
763 int32_t OH_ArkUI_AccessibilityElementInfoSetLongClickable(
764     ArkUI_AccessibilityElementInfo* elementInfo, bool longClickable);
765 
766 /**
767 * @brief Sets whether the element is enabled for an <b>ArkUI_AccessibilityElementInfo</b> object.
768 *
769 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
770 * @param isEnabled Indicates whether the element is enabled.
771 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
772 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
773 * @since 13
774 */
775 int32_t OH_ArkUI_AccessibilityElementInfoSetEnabled(
776     ArkUI_AccessibilityElementInfo* elementInfo, bool isEnabled);
777 
778 /**
779 * @brief Sets whether the element is a password for an <b>ArkUI_AccessibilityElementInfo</b> object.
780 *
781 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
782 * @param isPassword Indicates whether the element is a password.
783 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
784 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
785 * @since 13
786 */
787 int32_t OH_ArkUI_AccessibilityElementInfoSetIsPassword(
788     ArkUI_AccessibilityElementInfo* elementInfo, bool isPassword);
789 
790 /**
791 * @brief Sets whether the element is scrollable for an <b>ArkUI_AccessibilityElementInfo</b> object.
792 *
793 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
794 * @param scrollable Indicates whether the element is scrollable.
795 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
796 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
797 * @since 13
798 */
799 int32_t OH_ArkUI_AccessibilityElementInfoSetScrollable(
800     ArkUI_AccessibilityElementInfo* elementInfo, bool scrollable);
801 
802 /**
803 * @brief Sets whether the element is editable for an <b>ArkUI_AccessibilityElementInfo</b> object.
804 *
805 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
806 * @param editable Indicates whether the element is editable.
807 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
808 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
809 * @since 13
810 */
811 int32_t OH_ArkUI_AccessibilityElementInfoSetEditable(
812     ArkUI_AccessibilityElementInfo* elementInfo, bool editable);
813 
814 /**
815 * @brief Sets whether the element is a hint for an <b>ArkUI_AccessibilityElementInfo</b> object.
816 *
817 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
818 * @param isHint Indicates whether the element is a hint.
819 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
820 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
821 * @since 13
822 */
823 int32_t OH_ArkUI_AccessibilityElementInfoSetIsHint(
824     ArkUI_AccessibilityElementInfo* elementInfo, bool isHint);
825 
826 /**
827 * @brief Sets the range information for an <b>ArkUI_AccessibilityElementInfo</b> object.
828 *
829 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
830 * @param rangeInfo Indicates the range information.
831 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
832 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
833 * @since 13
834 */
835 int32_t OH_ArkUI_AccessibilityElementInfoSetRangeInfo(
836     ArkUI_AccessibilityElementInfo* elementInfo, ArkUI_AccessibleRangeInfo* rangeInfo);
837 
838 /**
839 * @brief Sets the grid information for an <b>ArkUI_AccessibilityElementInfo</b> object.
840 *
841 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
842 * @param gridInfo Indicates the grid information.
843 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
844 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
845 * @since 13
846 */
847 int32_t OH_ArkUI_AccessibilityElementInfoSetGridInfo(
848     ArkUI_AccessibilityElementInfo* elementInfo, ArkUI_AccessibleGridInfo* gridInfo);
849 
850 /**
851 * @brief Sets the grid item for an <b>ArkUI_AccessibilityElementInfo</b> object.
852 *
853 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
854 * @param gridItem Indicates the grid item.
855 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
856 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
857 * @since 13
858 */
859 int32_t OH_ArkUI_AccessibilityElementInfoSetGridItemInfo(
860     ArkUI_AccessibilityElementInfo* elementInfo, ArkUI_AccessibleGridItemInfo* gridItem);
861 
862 /**
863 * @brief Sets the starting index of the selected text for an <b>ArkUI_AccessibilityElementInfo</b> object.
864 *
865 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
866 * @param selectedTextStart Indicates the starting index of the selected text
867 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
868 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
869 * @since 13
870 */
871 int32_t OH_ArkUI_AccessibilityElementInfoSetSelectedTextStart(
872     ArkUI_AccessibilityElementInfo* elementInfo, int32_t selectedTextStart);
873 
874 /**
875 * @brief Sets the end index of the selected text for an <b>ArkUI_AccessibilityElementInfo</b> object.
876 *
877 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
878 * @param selectedTextEnd Indicates the end index of the selected text
879 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
880 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
881 * @since 13
882 */
883 int32_t OH_ArkUI_AccessibilityElementInfoSetSelectedTextEnd(
884     ArkUI_AccessibilityElementInfo* elementInfo, int32_t selectedTextEnd);
885 
886 /**
887 * @brief Sets the index of the currently selected item for an <b>ArkUI_AccessibilityElementInfo</b> object.
888 *
889 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
890 * @param currentItemIndex Indicates the index of the currently selected item.
891 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
892 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
893 * @since 13
894 */
895 int32_t OH_ArkUI_AccessibilityElementInfoSetCurrentItemIndex(
896     ArkUI_AccessibilityElementInfo* elementInfo, int32_t currentItemIndex);
897 
898 /**
899 * @brief Sets the index of the first item for an <b>ArkUI_AccessibilityElementInfo</b> object.
900 *
901 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
902 * @param startItemIndex Indicates the index of the first item.
903 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
904 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
905 * @since 13
906 */
907 int32_t OH_ArkUI_AccessibilityElementInfoSetStartItemIndex(
908     ArkUI_AccessibilityElementInfo* elementInfo, int32_t startItemIndex);
909 
910 /**
911 * @brief Sets the index of the last item for an <b>ArkUI_AccessibilityElementInfo</b> object.
912 *
913 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
914 * @param endItemIndex Indicates the index of the last item.
915 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
916 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
917 * @since 13
918 */
919 int32_t OH_ArkUI_AccessibilityElementInfoSetEndItemIndex(
920     ArkUI_AccessibilityElementInfo* elementInfo, int32_t endItemIndex);
921 
922 /**
923 * @brief Sets the number of items for an <b>ArkUI_AccessibilityElementInfo</b> object.
924 *
925 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
926 * @param itemCount Indicates the number of items.
927 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
928 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
929 * @since 13
930 */
931 int32_t OH_ArkUI_AccessibilityElementInfoSetItemCount(
932     ArkUI_AccessibilityElementInfo* elementInfo, int32_t itemCount);
933 
934 /**
935 * @brief Sets the offset for an <b>ArkUI_AccessibilityElementInfo</b> object.
936 *
937 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
938 * @param offset Indicates the scroll pixel offset relative to the top of the element.
939 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
940 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
941 * @since 13
942 */
943 int32_t OH_ArkUI_AccessibilityElementInfoSetAccessibilityOffset(
944     ArkUI_AccessibilityElementInfo* elementInfo, int32_t offset);
945 
946 /**
947 * @brief Sets the accessibility group for an <b>ArkUI_AccessibilityElementInfo</b> object.
948 *
949 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
950 * @param accessibilityGroup Indicates the accessibility group.
951 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
952 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
953 * @since 13
954 */
955 int32_t OH_ArkUI_AccessibilityElementInfoSetAccessibilityGroup(
956     ArkUI_AccessibilityElementInfo* elementInfo, bool accessibilityGroup);
957 
958 /**
959 * @brief Sets the accessibility level for an <b>ArkUI_AccessibilityElementInfo</b> object.
960 *
961 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
962 * @param accessibilityLevel Indicates the accessibility level.
963 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
964 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
965 * @since 13
966 */
967 int32_t OH_ArkUI_AccessibilityElementInfoSetAccessibilityLevel(
968     ArkUI_AccessibilityElementInfo* elementInfo, const char* accessibilityLevel);
969 
970 /**
971 * @brief Sets the z-index for an <b>ArkUI_AccessibilityElementInfo</b> object.
972 *
973 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
974 * @param zIndex Indicates the z-index value.
975 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
976 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
977 * @since 13
978 */
979 int32_t OH_ArkUI_AccessibilityElementInfoSetZIndex(
980     ArkUI_AccessibilityElementInfo* elementInfo, int32_t zIndex);
981 
982 /**
983 * @brief Sets the opacity for an <b>ArkUI_AccessibilityElementInfo</b> object.
984 *
985 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
986 * @param opacity Indicates the opacity.
987 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
988 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
989 * @since 13
990 */
991 int32_t OH_ArkUI_AccessibilityElementInfoSetAccessibilityOpacity(
992     ArkUI_AccessibilityElementInfo* elementInfo, float opacity);
993 
994 /**
995 * @brief Sets the background color for an <b>ArkUI_AccessibilityElementInfo</b> object.
996 *
997 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
998 * @param backgroundColor Indicates the background color.
999 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
1000 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
1001 * @since 13
1002 */
1003 int32_t OH_ArkUI_AccessibilityElementInfoSetBackgroundColor(
1004     ArkUI_AccessibilityElementInfo* elementInfo, const char* backgroundColor);
1005 
1006 /**
1007 * @brief Sets the background image for an <b>ArkUI_AccessibilityElementInfo</b> object.
1008 *
1009 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
1010 * @param backgroundImage Indicates the backgroundImage.
1011 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
1012 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
1013 * @since 13
1014 */
1015 int32_t OH_ArkUI_AccessibilityElementInfoSetBackgroundImage(
1016     ArkUI_AccessibilityElementInfo* elementInfo, const char* backgroundImage);
1017 
1018 /**
1019 * @brief Sets the blur effect for an <b>ArkUI_AccessibilityElementInfo</b> object.
1020 *
1021 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
1022 * @param blur Indicates the blur effect.
1023 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
1024 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
1025 * @since 13
1026 */
1027 int32_t OH_ArkUI_AccessibilityElementInfoSetBlur(
1028     ArkUI_AccessibilityElementInfo* elementInfo, const char* blur);
1029 
1030 /**
1031 * @brief Sets the hit test behavior for an <b>ArkUI_AccessibilityElementInfo</b> object.
1032 *
1033 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
1034 * @param hitTestBehavior Indicates the hit test behavior.
1035 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
1036 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
1037 * @since 13
1038 */
1039 int32_t OH_ArkUI_AccessibilityElementInfoSetHitTestBehavior(
1040     ArkUI_AccessibilityElementInfo* elementInfo, const char* hitTestBehavior);
1041 
1042 /**
1043  * @brief Creates an <b>ArkUI_AccessibilityElementInfo</b> object.
1044  *
1045  * @return Returns the <b>ArkUI_AccessibilityElementInfo</b> object, or NULL if it fails to create.
1046  *         The possible reason for failure is that the memory error occurred during object creation.
1047  * @since 13
1048  * @version 1.0
1049  */
1050 ArkUI_AccessibilityElementInfo* OH_ArkUI_CreateAccessibilityElementInfo(void);
1051 
1052 /**
1053  * @brief Destroys an <b>ArkUI_AccessibilityElementInfo</b> object.
1054  *
1055  * @param elementInfo Indicates the pointer to the <b>ArkUI_AccessibilityElementInfo</b> object to destroy.
1056  * @since 13
1057  * @version 1.0
1058  */
1059 void OH_ArkUI_DestoryAccessibilityElementInfo(ArkUI_AccessibilityElementInfo* elementInfo);
1060 
1061 /**
1062  * @brief Creates an <b>ArkUI_AccessibilityEventInfo</b> object.
1063  *
1064  * @return Returns the <b>ArkUI_AccessibilityEventInfo</b> object, or NULL if it fails to create.
1065  *         The possible reason for failure is that the memory error occurred during object creation.
1066  * @since 13
1067  */
1068 ArkUI_AccessibilityEventInfo* OH_ArkUI_CreateAccessibilityEventInfo(void);
1069 
1070 /**
1071  * @brief Destroys an <b>ArkUI_AccessibilityEventInfo</b> object.
1072  *
1073  * @param eventInfo Indicates the pointer to the <b>ArkUI_AccessibilityEventInfo</b> object to destroy.
1074  * @since 13
1075  */
1076 void OH_ArkUI_DestoryAccessibilityEventInfo(ArkUI_AccessibilityEventInfo* eventInfo);
1077 
1078 /**
1079 * @brief Sets the event type for an <b>ArkUI_AccessibilityEventInfo</b> object.
1080 *
1081 * @param eventInfo Indicates the pointer to an <b>ArkUI_AccessibilityEventInfo</b> object.
1082 * @param eventType Indicates the event type.
1083 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
1084 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
1085 * @since 13
1086 */
1087 int32_t OH_ArkUI_AccessibilityEventSetEventType(
1088     ArkUI_AccessibilityEventInfo* eventInfo,  ArkUI_AccessibilityEventType eventType);
1089 
1090 /**
1091 * @brief Sets the text announced for accessibility for an <b>ArkUI_AccessibilityEventInfo</b> object.
1092 *
1093 * @param eventInfo Indicates the pointer to an <b>ArkUI_AccessibilityEventInfo</b> object.
1094 * @param textAnnouncedForAccessibility Indicates the text announced for accessibility.
1095 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
1096 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
1097 * @since 13
1098 */
1099 int32_t OH_ArkUI_AccessibilityEventSetTextAnnouncedForAccessibility(
1100     ArkUI_AccessibilityEventInfo* eventInfo,  const char* textAnnouncedForAccessibility);
1101 
1102 /**
1103 * @brief Sets the request focus ID for an <b>ArkUI_AccessibilityEventInfo</b> object.
1104 *
1105 * @param eventInfo Indicates the pointer to an <b>ArkUI_AccessibilityEventInfo</b> object.
1106 * @param requestFocusId Indicates the request focus ID.
1107 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
1108 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
1109 * @since 13
1110 */
1111 int32_t OH_ArkUI_AccessibilityEventSetRequestFocusId(
1112     ArkUI_AccessibilityEventInfo* eventInfo,  int32_t requestFocusId);
1113 
1114 /**
1115 * @brief Sets the element information for an <b>ArkUI_AccessibilityEventInfo</b> object.
1116 *
1117 * @param eventInfo Indicates the pointer to an <b>ArkUI_AccessibilityEventInfo</b> object.
1118 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object.
1119 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
1120 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
1121 * @since 13
1122 */
1123 int32_t OH_ArkUI_AccessibilityEventSetElementInfo(
1124     ArkUI_AccessibilityEventInfo* eventInfo,  ArkUI_AccessibilityElementInfo* elementInfo);
1125 
1126 /**
1127 * @brief Obtains the value of a key from an <b>ArkUI_AccessibilityActionArguments</b> object.
1128 *
1129 * @param arguments Indicates the pointer to an <b>ArkUI_AccessibilityActionArguments</b> object.
1130 * @param key Indicates the key.
1131 * @param value Indicates the value.
1132 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful.
1133 *         Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect.
1134 * @since 13
1135 */
1136 int32_t OH_ArkUI_FindAccessibilityActionArgumentByKey(
1137     ArkUI_AccessibilityActionArguments* arguments, const char* key, char** value);
1138 #ifdef __cplusplus
1139 };
1140 #endif
1141 #endif // _NATIVE_INTERFACE_ACCESSIBILITY_H
1142 /** @} */