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