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 } ArkUI_Accessibility_ActionType; 109 110 /** 111 * @brief Defines an enum for accessibility event types. 112 * 113 * @since 13 114 */ 115 typedef enum { 116 /** Invalid event. */ 117 ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_INVALID = 0, 118 /** Click event, sent after the UI component responds. */ 119 ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_CLICKED = 0x00000001, 120 /** Long click event, sent after the UI component responds. */ 121 ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_LONG_CLICKED = 0x00000002, 122 /** Selection event, sent after the UI component responds. */ 123 ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_SELECTED = 0x00000004, 124 /** Text update event, sent when text is updated. */ 125 ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_TEXT_UPDATE = 0x00000010, 126 /** Page state update event, sent when the page transitions, switches, resizes, or moves. */ 127 ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_PAGE_STATE_UPDATE = 0x00000020, 128 /** Page content update event, sent when the page content changes. */ 129 ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_PAGE_CONTENT_UPDATE = 0x00000800, 130 /** Scrolled event, sent when a scrollable component experiences a scroll event. */ 131 ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_SCROLLED = 0x000001000, 132 /** Accessibility focus event, sent after the UI component responds. */ 133 ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_ACCESSIBILITY_FOCUSED = 0x00008000, 134 /** Accessibility focus cleared event, sent after the UI component responds. */ 135 ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_ACCESSIBILITY_FOCUS_CLEARED = 0x00010000, 136 /** FOcus request for a specific node. */ 137 ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_REQUEST_ACCESSIBILITY_FOCUS = 0x02000000, 138 /** Page open event reported by the UI component. */ 139 ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_PAGE_OPEN = 0x20000000, 140 /** Page close event reported by the UI component. */ 141 ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_PAGE_CLOSE = 0x08000000, 142 /** Announcement event, indicating a request to proactively announce specified content. */ 143 ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_ANNOUNCE_FOR_ACCESSIBILITY = 0x10000000, 144 /** Focus update event, used for focus update scenarios. */ 145 ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_FOCUS_NODE_UPDATE = 0x10000001, 146 } ArkUI_AccessibilityEventType; 147 148 /** 149 * @brief Defines a struct for the accessible action. 150 * 151 * @since 13 152 */ 153 typedef struct { 154 /** Action type. */ 155 ArkUI_Accessibility_ActionType actionType; 156 /** Action description. */ 157 const char* description; 158 } ArkUI_AccessibleAction; 159 160 /** 161 * @brief Defines a struct for the accessible rectangle. 162 * 163 * @since 13 164 */ 165 typedef struct { 166 /** X coordinate of the upper left corner. */ 167 int32_t leftTopX; 168 /** Y coordinate of the upper left corner. */ 169 int32_t leftTopY; 170 /** X coordinate of the lower right corner. */ 171 int32_t rightBottomX; 172 /** Y coordinate of the lower right corner. */ 173 int32_t rightBottomY; 174 } ArkUI_AccessibleRect; 175 176 /** 177 * @brief Define a struct for the accessible range information. 178 * 179 * @since 13 180 */ 181 typedef struct { 182 /** Minimum value. */ 183 double min; 184 /** Maximum value. */ 185 double max; 186 /** Current value. */ 187 double current; 188 } ArkUI_AccessibleRangeInfo; 189 190 /** 191 * @brief Defines a struct for the accessible grid information. 192 * 193 * @since 13 194 */ 195 typedef struct { 196 /** Number of rows. */ 197 int32_t rowCount; 198 /** Number of columns. */ 199 int32_t columnCount; 200 /** Selection mode. The value <b>0</b> indicates that only one row can be selected. */ 201 int32_t selectionMode; 202 } ArkUI_AccessibleGridInfo; 203 204 /** 205 * @brief Defines a struct for the accessible grid item information. 206 * 207 * @since 13 208 */ 209 typedef struct { 210 /** Whether it is a header. */ 211 bool heading; 212 /** Whether it is selected. */ 213 bool selected; 214 /** Column index. */ 215 int32_t columnIndex; 216 /** Row index. */ 217 int32_t rowIndex; 218 /** Column span. */ 219 int32_t columnSpan; 220 /** Row span. */ 221 int32_t rowSpan; 222 } ArkUI_AccessibleGridItemInfo; 223 224 /** 225 * @brief Enumerates the accessibility error codes. 226 * 227 * @since 13 228 */ 229 typedef enum { 230 /** 231 * @error Success. 232 */ 233 ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL = 0, 234 /** 235 * @error Failure. 236 */ 237 ARKUI_ACCESSIBILITY_NATIVE_RESULT_FAILED = -1, 238 /** 239 * @error Invalid parameter. 240 */ 241 ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER = -2, 242 /** 243 * @error Out of memory. 244 */ 245 ARKUI_ACCESSIBILITY_NATIVE_RESULT_OUT_OF_MEMORY = -3, 246 } ArkUI_AcessbilityErrorCode; 247 248 /** 249 * @brief Defines an enum for the accessibility search modes. 250 * 251 * @since 13 252 */ 253 typedef enum { 254 /** Search for current nodes. */ 255 ARKUI_ACCESSIBILITY_NATIVE_SEARCH_MODE_PREFETCH_CURRENT = 0, 256 /** Search for parent nodes. */ 257 ARKUI_ACCESSIBILITY_NATIVE_SEARCH_MODE_PREFETCH_PREDECESSORS = 1 << 0, 258 /** Search for sibling nodes. */ 259 ARKUI_ACCESSIBILITY_NATIVE_SEARCH_MODE_PREFETCH_SIBLINGS = 1 << 1, 260 /** Search for child nodes at the next level. */ 261 ARKUI_ACCESSIBILITY_NATIVE_SEARCH_MODE_PREFETCH_CHILDREN = 1 << 2, 262 /** Search for all child nodes. */ 263 ARKUI_ACCESSIBILITY_NATIVE_SEARCH_MODE_PREFETCH_RECURSIVE_CHILDREN = 1 << 3, 264 } ArkUI_AccessibilitySearchMode; 265 266 /** 267 * @brief Defines an enum for the accessibility focus types. 268 * 269 * @since 13 270 */ 271 typedef enum { 272 /** Invalid type. */ 273 ARKUI_ACCESSIBILITY_NATIVE_FOCUS_TYPE_INVALID = -1, 274 /** Input focus type. */ 275 ARKUI_ACCESSIBILITY_NATIVE_FOCUS_TYPE_INPUT = 1 << 0, 276 /** Accessibility focus type. */ 277 ARKUI_ACCESSIBILITY_NATIVE_FOCUS_TYPE_ACCESSIBILITY = 1 << 1, 278 } ArkUI_AccessibilityFocusType; 279 280 /** 281 * @brief Enumerates the directions for moving the accessibility focus. 282 * 283 * @since 13 284 */ 285 typedef enum { 286 /** Invalid direction. */ 287 ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_INVALID = 0, 288 /** Up. */ 289 ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_UP = 0x00000001, 290 /** Down. */ 291 ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_DOWN = 0x00000002, 292 /** Left. */ 293 ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_LEFT = 0x00000004, 294 /** Right. */ 295 ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_RIGHT = 0x00000008, 296 /** Forward. */ 297 ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_FORWARD = 0x00000010, 298 /** Backward. */ 299 ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_BACKWARD = 0x00000020, 300 } ArkUI_AccessibilityFocusMoveDirection; 301 302 /** 303 * @brief Defines a struct for the accessibility element information list. 304 * 305 * @since 13 306 */ 307 typedef struct ArkUI_AccessibilityElementInfoList ArkUI_AccessibilityElementInfoList; 308 309 /** 310 * @brief Registers callbacks for the accessibility provider. 311 * 312 * @since 13 313 */ 314 typedef struct ArkUI_AccessibilityProviderCallbacks { 315 /** 316 * @brief Called to obtain element information based on a specified node. 317 * 318 * @param elementId Indicates the element ID. 319 * @param mode Indicates accessibility search mode. 320 * @param requestId Indicates the request ID. 321 * @param elementList Indicates accessibility elementInfo list. 322 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 323 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 324 */ 325 int32_t (*findAccessibilityNodeInfosById)(int64_t elementId, ArkUI_AccessibilitySearchMode mode, 326 int32_t requestId, ArkUI_AccessibilityElementInfoList* elementList); 327 /** 328 * @brief Called to obtain element information based on a specified node and text content. 329 * 330 * @param elementId Indicates the element ID. 331 * @param text Indicates accessibility text. 332 * @param requestId Indicates the request ID. 333 * @param elementList Indicates accessibility elementInfo list. 334 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 335 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 336 */ 337 int32_t (*findAccessibilityNodeInfosByText)(int64_t elementId, const char* text, int32_t requestId, 338 ArkUI_AccessibilityElementInfoList* elementList); 339 /** 340 * @brief Called to obtain focused element information based on a specified node. 341 * 342 * @param elementId Indicates the element ID. 343 * @param focusType Indicates focus type. 344 * @param requestId Indicates the request ID. 345 * @param elementInfo Indicates accessibility elementInfo. 346 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 347 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 348 */ 349 int32_t (*findFocusedAccessibilityNode)(int64_t elementId, ArkUI_AccessibilityFocusType focusType, 350 int32_t requestId, ArkUI_AccessibilityElementInfo* elementInfo); 351 /** 352 * @brief Called to find the next focusable node based on the reference node. 353 * 354 * @param elementId Indicates the element ID. 355 * @param direction Indicates direction. 356 * @param requestId Indicates the request ID. 357 * @param elementInfo Indicates accessibility elementInfo. 358 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 359 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 360 */ 361 int32_t (*findNextFocusAccessibilityNode)( 362 int64_t elementId, ArkUI_AccessibilityFocusMoveDirection direction, 363 int32_t requestId, ArkUI_AccessibilityElementInfo* elementInfo); 364 /** 365 * @brief Called to execute a specified action on a specified node. 366 * 367 * @param elementId Indicates the element ID. 368 * @param action Indicates action. 369 * @param actionArguments Indicates action arguments. 370 * @param requestId Indicates the request ID. 371 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 372 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 373 */ 374 int32_t (*executeAccessibilityAction)(int64_t elementId, ArkUI_Accessibility_ActionType action, 375 ArkUI_AccessibilityActionArguments *actionArguments, int32_t requestId); 376 /** 377 * @brief Called to clear the focus state of the current focused node. 378 * 379 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 380 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_FAILED} if the operation is failed. 381 */ 382 int32_t (*clearFocusedFocusAccessibilityNode)(); 383 /** 384 * @brief Called to query the current cursor position of the specified node. 385 * 386 * @param elementId Indicates the element ID. 387 * @param requestId Indicates the request ID. 388 * @param index Indicates index. 389 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 390 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 391 */ 392 int32_t (*getAccessibilityNodeCursorPosition)(int64_t elementId, int32_t requestId, int32_t* index); 393 } ArkUI_AccessibilityProviderCallbacks; 394 395 /** 396 * @brief Registers a callback for this <b>ArkUI_AccessibilityProvider</b> instance. 397 * 398 * @param provider Indicates the pointer to the <b>ArkUI_AccessibilityProvider</b> instance. 399 * @param callbacks Indicates the pointer to the <b>GetAccessibilityNodeCursorPosition</b> callback. 400 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 401 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 402 * @since 13 403 */ 404 int32_t OH_ArkUI_AccessibilityProviderRegisterCallback( 405 ArkUI_AccessibilityProvider* provider, ArkUI_AccessibilityProviderCallbacks* callbacks); 406 407 /** 408 * @brief Sends accessibility event information. 409 * 410 * @param provider Indicates the pointer to the <b>ArkUI_AccessibilityProvider</b> instance. 411 * @param eventInfo Indicates the pointer to the accessibility event information. 412 * @param callback Indicates the pointer to the callback that is called after the event is sent. 413 * @since 13 414 */ 415 void OH_ArkUI_SendAccessibilityAsyncEvent( 416 ArkUI_AccessibilityProvider* provider, ArkUI_AccessibilityEventInfo* eventInfo, 417 void (*callback)(int32_t errorCode)); 418 419 /** 420 * @brief Adds and obtains the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 421 * 422 * @param list Indicates the pointer to an <b>ArkUI_AccessibilityElementInfoList</b> object. 423 * @return Returns the pointer to the <b>ArkUI_AccessibilityElementInfo</b> object. 424 * @since 13 425 */ 426 ArkUI_AccessibilityElementInfo* OH_ArkUI_AddAndGetAccessibilityElementInfo( 427 ArkUI_AccessibilityElementInfoList* list); 428 429 /** 430 * @brief Sets the element ID for an <b>ArkUI_AccessibilityElementInfo</b> object. 431 * 432 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 433 * @param elementId Indicates the element ID. 434 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 435 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 436 * @since 13 437 */ 438 int32_t OH_ArkUI_AccessibilityElementInfoSetElementId( 439 ArkUI_AccessibilityElementInfo* elementInfo, int32_t elementId); 440 441 /** 442 * @brief Sets the parent ID for an <b>ArkUI_AccessibilityElementInfo</b> object. 443 * 444 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 445 * @param parentId Indicates the parent ID. 446 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 447 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 448 * @since 13 449 */ 450 int32_t OH_ArkUI_AccessibilityElementInfoSetParentId( 451 ArkUI_AccessibilityElementInfo* elementInfo, int32_t parentId); 452 453 /** 454 * @brief Sets the component type for an <b>ArkUI_AccessibilityElementInfo</b> object. 455 * 456 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 457 * @param componentType Indicates the component type. 458 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 459 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 460 * @since 13 461 */ 462 int32_t OH_ArkUI_AccessibilityElementInfoSetComponentType( 463 ArkUI_AccessibilityElementInfo* elementInfo, const char* componentType); 464 465 /** 466 * @brief Sets the component content for an <b>ArkUI_AccessibilityElementInfo</b> object. 467 * 468 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 469 * @param contents Indicates the component content. 470 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 471 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 472 * @since 13 473 */ 474 int32_t OH_ArkUI_AccessibilityElementInfoSetContents( 475 ArkUI_AccessibilityElementInfo* elementInfo, const char* contents); 476 477 /** 478 * @brief Sets the hint text for an <b>ArkUI_AccessibilityElementInfo</b> object. 479 * 480 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 481 * @param hintText Indicates the hint text. 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 * @since 13 485 */ 486 int32_t OH_ArkUI_AccessibilityElementInfoSetHintText( 487 ArkUI_AccessibilityElementInfo* elementInfo, const char* hintText); 488 489 /** 490 * @brief Sets the accessibility text for an <b>ArkUI_AccessibilityElementInfo</b> object. 491 * 492 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 493 * @param accessibilityText Indicates the accessibility text. 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_AccessibilityElementInfoSetAccessibilityText( 499 ArkUI_AccessibilityElementInfo* elementInfo, const char* accessibilityText); 500 501 /** 502 * @brief Sets the accessibility description for an <b>ArkUI_AccessibilityElementInfo</b> object. 503 * 504 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 505 * @param accessibilityDescription Indicates the accessibility description. 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 13 509 */ 510 int32_t OH_ArkUI_AccessibilityElementInfoSetAccessibilityDescription( 511 ArkUI_AccessibilityElementInfo* elementInfo, const char* accessibilityDescription); 512 513 /** 514 * @brief Set the number of child nodes and child node IDs for an <b>ArkUI_AccessibilityElementInfo</b> object. 515 * 516 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 517 * @param childCount Indicates the number of child nodes. 518 * @param childNodeIds Indicates an array of child node IDs. 519 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 520 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 521 * @since 13 522 */ 523 int32_t OH_ArkUI_AccessibilityElementInfoSetChildNodeIds( 524 ArkUI_AccessibilityElementInfo* elementInfo, int32_t childCount, int64_t* childNodeIds); 525 526 /** 527 * @brief Sets the operation actions for an <b>ArkUI_AccessibilityElementInfo</b> object. 528 * 529 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 530 * @param operationCount Indicates the operation count. 531 * @param operationActions Indicates the operation actions. 532 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 533 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 534 * @since 13 535 */ 536 int32_t OH_ArkUI_AccessibilityElementInfoSetOperationActions(ArkUI_AccessibilityElementInfo* elementInfo, 537 int32_t operationCount, ArkUI_AccessibleAction* operationActions); 538 539 /** 540 * @brief Sets the screen area for an <b>ArkUI_AccessibilityElementInfo</b> object. 541 * 542 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 543 * @param screenRect Indicates the screen area. 544 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 545 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 546 * @since 13 547 */ 548 int32_t OH_ArkUI_AccessibilityElementInfoSetScreenRect( 549 ArkUI_AccessibilityElementInfo* elementInfo, ArkUI_AccessibleRect* screenRect); 550 551 /** 552 * @brief Sets whether the element is checkable for an <b>ArkUI_AccessibilityElementInfo</b> object. 553 * 554 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 555 * @param checkable Indicates whether the element is checkable. 556 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 557 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 558 * @since 13 559 */ 560 int32_t OH_ArkUI_AccessibilityElementInfoSetCheckable( 561 ArkUI_AccessibilityElementInfo* elementInfo, bool checkable); 562 563 /** 564 * @brief Sets whether the element is checked for an <b>ArkUI_AccessibilityElementInfo</b> object. 565 * 566 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 567 * @param checked Indicates whether the element is checked. 568 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 569 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 570 * @since 13 571 */ 572 int32_t OH_ArkUI_AccessibilityElementInfoSetChecked( 573 ArkUI_AccessibilityElementInfo* elementInfo, bool checked); 574 575 /** 576 * @brief Sets whether the element is focusable for an <b>ArkUI_AccessibilityElementInfo</b> object. 577 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 578 * @param focusable Indicates whether the element is focusable. 579 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 580 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 581 * @since 13 582 */ 583 int32_t OH_ArkUI_AccessibilityElementInfoSetFocusable( 584 ArkUI_AccessibilityElementInfo* elementInfo, bool focusable); 585 586 /** 587 * @brief Sets whether the element is focused for an <b>ArkUI_AccessibilityElementInfo</b> object. 588 * 589 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 590 * @param isFocused Indicates whether the element is focused. 591 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 592 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 593 * @since 13 594 */ 595 int32_t OH_ArkUI_AccessibilityElementInfoSetFocused( 596 ArkUI_AccessibilityElementInfo* elementInfo, bool isFocused); 597 598 /** 599 * @brief Sets whether the element is visible for an <b>ArkUI_AccessibilityElementInfo</b> object. 600 * 601 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 602 * @param isVisible Indicates whether the element is visible. 603 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 604 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 605 * @since 13 606 */ 607 int32_t OH_ArkUI_AccessibilityElementInfoSetVisible( 608 ArkUI_AccessibilityElementInfo* elementInfo, bool isVisible); 609 610 /** 611 * @brief Sets the accessibility focus state for an <b>ArkUI_AccessibilityElementInfo</b> object. 612 * 613 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 614 * @param accessibilityFocused Indicates whether the element has accessibility focus. 615 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 616 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 617 * @since 13 618 */ 619 int32_t OH_ArkUI_AccessibilityElementInfoSetAccessibilityFocused( 620 ArkUI_AccessibilityElementInfo* elementInfo, bool accessibilityFocused); 621 622 /** 623 * @brief Sets whether the element is selected for an <b>ArkUI_AccessibilityElementInfo</b> object. 624 * 625 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 626 * @param selected Indicates whether the element is selected. 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_AccessibilityElementInfoSetSelected( 632 ArkUI_AccessibilityElementInfo* elementInfo, bool selected); 633 634 /** 635 * @brief Sets whether the element is clickable for an <b>ArkUI_AccessibilityElementInfo</b> object. 636 * 637 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 638 * @param clickable Indicates whether the element is clickable. 639 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 640 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 641 * @since 13 642 */ 643 int32_t OH_ArkUI_AccessibilityElementInfoSetClickable( 644 ArkUI_AccessibilityElementInfo* elementInfo, bool clickable); 645 646 /** 647 * @brief Sets whether the element is long clickable for an <b>ArkUI_AccessibilityElementInfo</b> object. 648 * 649 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 650 * @param longClickable Indicates whether the element is long clickable. 651 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 652 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 653 * @since 13 654 */ 655 int32_t OH_ArkUI_AccessibilityElementInfoSetLongClickable( 656 ArkUI_AccessibilityElementInfo* elementInfo, bool longClickable); 657 658 /** 659 * @brief Sets whether the element is enabled for an <b>ArkUI_AccessibilityElementInfo</b> object. 660 * 661 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 662 * @param isEnabled Indicates whether the element is enabled. 663 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 664 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 665 * @since 13 666 */ 667 int32_t OH_ArkUI_AccessibilityElementInfoSetEnabled( 668 ArkUI_AccessibilityElementInfo* elementInfo, bool isEnabled); 669 670 /** 671 * @brief Sets whether the element is a password for an <b>ArkUI_AccessibilityElementInfo</b> object. 672 * 673 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 674 * @param isPassword Indicates whether the element is a password. 675 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 676 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 677 * @since 13 678 */ 679 int32_t OH_ArkUI_AccessibilityElementInfoSetIsPassword( 680 ArkUI_AccessibilityElementInfo* elementInfo, bool isPassword); 681 682 /** 683 * @brief Sets whether the element is scrollable for an <b>ArkUI_AccessibilityElementInfo</b> object. 684 * 685 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 686 * @param scrollable Indicates whether the element is scrollable. 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_AccessibilityElementInfoSetScrollable( 692 ArkUI_AccessibilityElementInfo* elementInfo, bool scrollable); 693 694 /** 695 * @brief Sets whether the element is editable for an <b>ArkUI_AccessibilityElementInfo</b> object. 696 * 697 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 698 * @param editable Indicates whether the element is editable. 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_AccessibilityElementInfoSetEditable( 704 ArkUI_AccessibilityElementInfo* elementInfo, bool editable); 705 706 /** 707 * @brief Sets whether the element is a hint for an <b>ArkUI_AccessibilityElementInfo</b> object. 708 * 709 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 710 * @param isHint Indicates whether the element is a hint. 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_AccessibilityElementInfoSetIsHint( 716 ArkUI_AccessibilityElementInfo* elementInfo, bool isHint); 717 718 /** 719 * @brief Sets the range information for an <b>ArkUI_AccessibilityElementInfo</b> object. 720 * 721 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 722 * @param rangeInfo Indicates the range information. 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_AccessibilityElementInfoSetRangeInfo( 728 ArkUI_AccessibilityElementInfo* elementInfo, ArkUI_AccessibleRangeInfo* rangeInfo); 729 730 /** 731 * @brief Sets the grid information for an <b>ArkUI_AccessibilityElementInfo</b> object. 732 * 733 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 734 * @param gridInfo Indicates the grid information. 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_AccessibilityElementInfoSetGridInfo( 740 ArkUI_AccessibilityElementInfo* elementInfo, ArkUI_AccessibleGridInfo* gridInfo); 741 742 /** 743 * @brief Sets the grid item for an <b>ArkUI_AccessibilityElementInfo</b> object. 744 * 745 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 746 * @param gridItem Indicates the grid item. 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_AccessibilityElementInfoSetGridItemInfo( 752 ArkUI_AccessibilityElementInfo* elementInfo, ArkUI_AccessibleGridItemInfo* gridItem); 753 754 /** 755 * @brief Sets the starting index of the selected text for an <b>ArkUI_AccessibilityElementInfo</b> object. 756 * 757 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 758 * @param selectedTextStart Indicates the starting index of the selected text 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_AccessibilityElementInfoSetSelectedTextStart( 764 ArkUI_AccessibilityElementInfo* elementInfo, int32_t selectedTextStart); 765 766 /** 767 * @brief Sets the end index of the selected text for an <b>ArkUI_AccessibilityElementInfo</b> object. 768 * 769 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 770 * @param selectedTextEnd Indicates the end index of the selected text 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_AccessibilityElementInfoSetSelectedTextEnd( 776 ArkUI_AccessibilityElementInfo* elementInfo, int32_t selectedTextEnd); 777 778 /** 779 * @brief Sets the index of the currently selected item for an <b>ArkUI_AccessibilityElementInfo</b> object. 780 * 781 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 782 * @param currentItemIndex Indicates the index of the currently selected item. 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_AccessibilityElementInfoSetCurrentItemIndex( 788 ArkUI_AccessibilityElementInfo* elementInfo, int32_t currentItemIndex); 789 790 /** 791 * @brief Sets the index of the first item for an <b>ArkUI_AccessibilityElementInfo</b> object. 792 * 793 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 794 * @param startItemIndex Indicates the index of the first item. 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_AccessibilityElementInfoSetStartItemIndex( 800 ArkUI_AccessibilityElementInfo* elementInfo, int32_t startItemIndex); 801 802 /** 803 * @brief Sets the index of the last item for an <b>ArkUI_AccessibilityElementInfo</b> object. 804 * 805 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 806 * @param endItemIndex Indicates the index of the last item. 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_AccessibilityElementInfoSetEndItemIndex( 812 ArkUI_AccessibilityElementInfo* elementInfo, int32_t endItemIndex); 813 814 /** 815 * @brief Sets the number of items for an <b>ArkUI_AccessibilityElementInfo</b> object. 816 * 817 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 818 * @param itemCount Indicates the number of items. 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_AccessibilityElementInfoSetItemCount( 824 ArkUI_AccessibilityElementInfo* elementInfo, int32_t itemCount); 825 826 /** 827 * @brief Sets the offset for an <b>ArkUI_AccessibilityElementInfo</b> object. 828 * 829 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 830 * @param offset Indicates the scroll pixel offset relative to the top of the element. 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_AccessibilityElementInfoSetAccessibilityOffset( 836 ArkUI_AccessibilityElementInfo* elementInfo, int32_t offset); 837 838 /** 839 * @brief Sets the accessibility group for an <b>ArkUI_AccessibilityElementInfo</b> object. 840 * 841 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 842 * @param accessibilityGroup Indicates the accessibility group. 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_AccessibilityElementInfoSetAccessibilityGroup( 848 ArkUI_AccessibilityElementInfo* elementInfo, bool accessibilityGroup); 849 850 /** 851 * @brief Sets the accessibility level for an <b>ArkUI_AccessibilityElementInfo</b> object. 852 * 853 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 854 * @param accessibilityLevel Indicates the accessibility level. 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_AccessibilityElementInfoSetAccessibilityLevel( 860 ArkUI_AccessibilityElementInfo* elementInfo, const char* accessibilityLevel); 861 862 /** 863 * @brief Sets the z-index for an <b>ArkUI_AccessibilityElementInfo</b> object. 864 * 865 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 866 * @param zIndex Indicates the z-index value. 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_AccessibilityElementInfoSetZIndex( 872 ArkUI_AccessibilityElementInfo* elementInfo, int32_t zIndex); 873 874 /** 875 * @brief Sets the opacity for an <b>ArkUI_AccessibilityElementInfo</b> object. 876 * 877 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 878 * @param opacity Indicates the opacity. 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_AccessibilityElementInfoSetAccessibilityOpacity( 884 ArkUI_AccessibilityElementInfo* elementInfo, float opacity); 885 886 /** 887 * @brief Sets the background color for an <b>ArkUI_AccessibilityElementInfo</b> object. 888 * 889 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 890 * @param backgroundColor Indicates the background color. 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_AccessibilityElementInfoSetBackgroundColor( 896 ArkUI_AccessibilityElementInfo* elementInfo, const char* backgroundColor); 897 898 /** 899 * @brief Sets the background image for an <b>ArkUI_AccessibilityElementInfo</b> object. 900 * 901 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 902 * @param backgroundImage Indicates the backgroundImage. 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_AccessibilityElementInfoSetBackgroundImage( 908 ArkUI_AccessibilityElementInfo* elementInfo, const char* backgroundImage); 909 910 /** 911 * @brief Sets the blur effect for an <b>ArkUI_AccessibilityElementInfo</b> object. 912 * 913 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 914 * @param blur Indicates the blur effect. 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_AccessibilityElementInfoSetBlur( 920 ArkUI_AccessibilityElementInfo* elementInfo, const char* blur); 921 922 /** 923 * @brief Sets the hit test behavior for an <b>ArkUI_AccessibilityElementInfo</b> object. 924 * 925 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 926 * @param hitTestBehavior Indicates the hit test behavior. 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_AccessibilityElementInfoSetHitTestBehavior( 932 ArkUI_AccessibilityElementInfo* elementInfo, const char* hitTestBehavior); 933 934 /** 935 * @brief Creates an <b>ArkUI_AccessibilityElementInfo</b> object. 936 * 937 * @return Returns the <b>ArkUI_AccessibilityElementInfo</b> object, or NULL if it fails to create. 938 * The possible reason for failure is that the memory error occurred during object creation. 939 * @since 13 940 * @version 1.0 941 */ 942 ArkUI_AccessibilityElementInfo* OH_ArkUI_CreateAccessibilityElementInfo(void); 943 944 /** 945 * @brief Destroys an <b>ArkUI_AccessibilityElementInfo</b> object. 946 * 947 * @param elementInfo Indicates the pointer to the <b>ArkUI_AccessibilityElementInfo</b> object to destroy. 948 * @since 13 949 * @version 1.0 950 */ 951 void OH_ArkUI_DestoryAccessibilityElementInfo(ArkUI_AccessibilityElementInfo* elementInfo); 952 953 /** 954 * @brief Creates an <b>ArkUI_AccessibilityEventInfo</b> object. 955 * 956 * @return Returns the <b>ArkUI_AccessibilityEventInfo</b> object, or NULL if it fails to create. 957 * The possible reason for failure is that the memory error occurred during object creation. 958 * @since 13 959 */ 960 ArkUI_AccessibilityEventInfo* OH_ArkUI_CreateAccessibilityEventInfo(void); 961 962 /** 963 * @brief Destroys an <b>ArkUI_AccessibilityEventInfo</b> object. 964 * 965 * @param eventInfo Indicates the pointer to the <b>ArkUI_AccessibilityEventInfo</b> object to destroy. 966 * @since 13 967 */ 968 void OH_ArkUI_DestoryAccessibilityEventInfo(ArkUI_AccessibilityEventInfo* eventInfo); 969 970 /** 971 * @brief Sets the event type for an <b>ArkUI_AccessibilityEventInfo</b> object. 972 * 973 * @param eventInfo Indicates the pointer to an <b>ArkUI_AccessibilityEventInfo</b> object. 974 * @param eventType Indicates the event type. 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_AccessibilityEventSetEventType( 980 ArkUI_AccessibilityEventInfo* eventInfo, ArkUI_AccessibilityEventType eventType); 981 982 /** 983 * @brief Sets the text announced for accessibility for an <b>ArkUI_AccessibilityEventInfo</b> object. 984 * 985 * @param eventInfo Indicates the pointer to an <b>ArkUI_AccessibilityEventInfo</b> object. 986 * @param textAnnouncedForAccessibility Indicates the text announced for accessibility. 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_AccessibilityEventSetTextAnnouncedForAccessibility( 992 ArkUI_AccessibilityEventInfo* eventInfo, const char* textAnnouncedForAccessibility); 993 994 /** 995 * @brief Sets the request focus ID for an <b>ArkUI_AccessibilityEventInfo</b> object. 996 * 997 * @param eventInfo Indicates the pointer to an <b>ArkUI_AccessibilityEventInfo</b> object. 998 * @param requestFocusId Indicates the request focus ID. 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_AccessibilityEventSetRequestFocusId( 1004 ArkUI_AccessibilityEventInfo* eventInfo, int32_t requestFocusId); 1005 1006 /** 1007 * @brief Sets the element information for an <b>ArkUI_AccessibilityEventInfo</b> object. 1008 * 1009 * @param eventInfo Indicates the pointer to an <b>ArkUI_AccessibilityEventInfo</b> object. 1010 * @param elementInfo Indicates the pointer to an <b>ArkUI_AccessibilityElementInfo</b> object. 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_AccessibilityEventSetElementInfo( 1016 ArkUI_AccessibilityEventInfo* eventInfo, ArkUI_AccessibilityElementInfo* elementInfo); 1017 1018 /** 1019 * @brief Obtains the value of a key from an <b>ArkUI_AccessibilityActionArguments</b> object. 1020 * 1021 * @param arguments Indicates the pointer to an <b>ArkUI_AccessibilityActionArguments</b> object. 1022 * @param key Indicates the key. 1023 * @param value Indicates the value. 1024 * @return Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESSFUL} if the operation is successful. 1025 * Returns {@link ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER} if a parameter is incorrect. 1026 * @since 13 1027 */ 1028 int32_t OH_ArkUI_FindAccessibilityActionArgumentByKey( 1029 ArkUI_AccessibilityActionArguments* arguments, const char* key, char** value); 1030 #ifdef __cplusplus 1031 }; 1032 #endif 1033 #endif // _NATIVE_INTERFACE_ACCESSIBILITY_H 1034