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