1/* 2 * Copyright (c) 2021-2022 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 16import type { AsyncCallback } from '../@ohos.base'; 17import ExtensionContext from './ExtensionContext'; 18import type accessibility from '../@ohos.accessibility'; 19import type { GesturePath } from '../@ohos.accessibility.GesturePath'; 20 21/** 22 * The accessibility extension context. Used to configure, query information, and inject gestures. 23 * 24 * @extends ExtensionContext 25 * @syscap SystemCapability.BarrierFree.Accessibility.Core 26 * @since 9 27 */ 28export default class AccessibilityExtensionContext extends ExtensionContext { 29 /** 30 * Set the bundle names that is interested in sending the event. 31 * 32 * @param { Array<string> } targetNames The bundle names that are interested in sending the event. 33 * @param { AsyncCallback<void> } callback Indicates the listener. 34 * @throws { BusinessError } 401 - Input parameter error. 35 * @syscap SystemCapability.BarrierFree.Accessibility.Core 36 * @since 9 37 */ 38 setTargetBundleName(targetNames: Array<string>, callback: AsyncCallback<void>): void; 39 40 /** 41 * Set the bundle names that is interested in sending the event. 42 * 43 * @param { Array<string> } targetNames The bundle names that are interested in sending the event. 44 * @returns { Promise<void> } 45 * @throws { BusinessError } 401 - Input parameter error. 46 * @syscap SystemCapability.BarrierFree.Accessibility.Core 47 * @since 9 48 */ 49 setTargetBundleName(targetNames: Array<string>): Promise<void>; 50 51 /** 52 * Get focus element. 53 * 54 * @param { boolean } isAccessibilityFocus Indicates whether the acquired element has an accessibility focus. 55 * @param { AsyncCallback<AccessibilityElement> } callback Indicates the listener. 56 * @throws { BusinessError } 401 - Input parameter error. 57 * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. 58 * @syscap SystemCapability.BarrierFree.Accessibility.Core 59 * @since 9 60 */ 61 getFocusElement(isAccessibilityFocus: boolean, callback: AsyncCallback<AccessibilityElement>): void; 62 63 /** 64 * Get focus element. 65 * 66 * @param { boolean } isAccessibilityFocus Indicates whether the acquired element has an accessibility focus. 67 * @returns { Promise<AccessibilityElement> } 68 * @throws { BusinessError } 401 - Input parameter error. 69 * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. 70 * @syscap SystemCapability.BarrierFree.Accessibility.Core 71 * @since 9 72 */ 73 getFocusElement(isAccessibilityFocus?: boolean): Promise<AccessibilityElement>; 74 75 /** 76 * Get focus element. 77 * @param { AsyncCallback<AccessibilityElement> } callback Indicates the listener. 78 * @throws { BusinessError } 401 - Input parameter error. 79 * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. 80 * @syscap SystemCapability.BarrierFree.Accessibility.Core 81 * @since 9 82 */ 83 getFocusElement(callback: AsyncCallback<AccessibilityElement>): void; 84 85 /** 86 * Get window root element. 87 * 88 * @param { number } windowId Indicates the window ID. 89 * @param { AsyncCallback<AccessibilityElement> } callback Indicates the listener. 90 * @throws { BusinessError } 401 - Input parameter error. 91 * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. 92 * @syscap SystemCapability.BarrierFree.Accessibility.Core 93 * @since 9 94 */ 95 getWindowRootElement(windowId: number, callback: AsyncCallback<AccessibilityElement>): void; 96 97 /** 98 * Get window root element. 99 * 100 * @param { number } windowId Indicates the window ID. 101 * @returns { Promise<AccessibilityElement> } 102 * @throws { BusinessError } 401 - Input parameter error. 103 * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. 104 * @syscap SystemCapability.BarrierFree.Accessibility.Core 105 * @since 9 106 */ 107 getWindowRootElement(windowId?: number): Promise<AccessibilityElement>; 108 109 /** 110 * Get window root element. 111 * @param { AsyncCallback<AccessibilityElement> } callback Indicates the listener. 112 * @throws { BusinessError } 401 - Input parameter error. 113 * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. 114 * @syscap SystemCapability.BarrierFree.Accessibility.Core 115 * @since 9 116 */ 117 getWindowRootElement(callback: AsyncCallback<AccessibilityElement>): void; 118 119 /** 120 * Get window list. 121 * 122 * @param { number } displayId Indicates the display ID. 123 * @param { AsyncCallback<Array<AccessibilityElement>> } callback Indicates the listener. 124 * @throws { BusinessError } 401 - Input parameter error. 125 * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. 126 * @syscap SystemCapability.BarrierFree.Accessibility.Core 127 * @since 9 128 */ 129 getWindows(displayId: number, callback: AsyncCallback<Array<AccessibilityElement>>): void; 130 131 /** 132 * Get window list. 133 * 134 * @param { number } displayId Indicates the display ID. 135 * @returns { Promise<Array<AccessibilityElement>> } 136 * @throws { BusinessError } 401 - Input parameter error. 137 * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. 138 * @syscap SystemCapability.BarrierFree.Accessibility.Core 139 * @since 9 140 */ 141 getWindows(displayId?: number): Promise<Array<AccessibilityElement>>; 142 143 /** 144 * Get window list. 145 * @param { AsyncCallback<Array<AccessibilityElement>> } callback Indicates the listener. 146 * @throws { BusinessError } 401 - Input parameter error. 147 * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. 148 * @syscap SystemCapability.BarrierFree.Accessibility.Core 149 * @since 9 150 */ 151 getWindows(callback: AsyncCallback<Array<AccessibilityElement>>): void; 152 153 /** 154 * Inject gesture path events. 155 * 156 * @param { GesturePath } gesturePath Indicates the gesture path. 157 * @param { AsyncCallback<void> } callback Indicates the listener. 158 * @throws { BusinessError } 401 - Input parameter error. 159 * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. 160 * @syscap SystemCapability.BarrierFree.Accessibility.Core 161 * @since 9 162 * @deprecated since 10 163 * @useinstead AccessibilityExtensionContext/AccessibilityExtensionContext#injectGestureSync 164 */ 165 injectGesture(gesturePath: GesturePath, callback: AsyncCallback<void>): void; 166 167 /** 168 * Inject gesture path events. 169 * 170 * @param { GesturePath } gesturePath Indicates the gesture path. 171 * @returns { Promise<void> } 172 * @throws { BusinessError } 401 - Input parameter error. 173 * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. 174 * @syscap SystemCapability.BarrierFree.Accessibility.Core 175 * @since 9 176 * @deprecated since 10 177 * @useinstead AccessibilityExtensionContext/AccessibilityExtensionContext#injectGestureSync 178 */ 179 injectGesture(gesturePath: GesturePath): Promise<void>; 180 181 /** 182 * Inject gesture path events. 183 * 184 * @param { GesturePath } gesturePath Indicates the gesture path. 185 * @throws { BusinessError } 401 - Input parameter error. 186 * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. 187 * @syscap SystemCapability.BarrierFree.Accessibility.Core 188 * @since 10 189 */ 190 injectGestureSync(gesturePath: GesturePath): void; 191} 192 193/** 194 * Indicates an accessibility element. 195 * Supports querying element attributes, requesting execution actions, and finding child elements by condition. 196 * 197 * @typedef AccessibilityElement 198 * @syscap SystemCapability.BarrierFree.Accessibility.Core 199 * @since 9 200 */ 201declare interface AccessibilityElement { 202 /** 203 * Get a list of attribute names. 204 * 205 * @param { AsyncCallback<Array<T>> } callback Indicates the listener. 206 * @syscap SystemCapability.BarrierFree.Accessibility.Core 207 * @since 9 208 */ 209 attributeNames<T extends keyof ElementAttributeValues>(callback: AsyncCallback<Array<T>>): void; 210 211 /** 212 * Get a list of attribute names. 213 * @returns { Promise<Array<T>> } 214 * @syscap SystemCapability.BarrierFree.Accessibility.Core 215 * @since 9 216 */ 217 attributeNames<T extends keyof ElementAttributeValues>(): Promise<Array<T>>; 218 219 /** 220 * Get the value of an attribute. 221 * 222 * @param { T } attributeName Indicates the attribute name. 223 * @param { AsyncCallback<ElementAttributeValues[T]> } callback Indicates the listener. 224 * @throws { BusinessError } 401 - Input parameter error. 225 * @throws { BusinessError } 9300004 - This property does not exist. 226 * @syscap SystemCapability.BarrierFree.Accessibility.Core 227 * @since 9 228 */ 229 attributeValue<T extends keyof ElementAttributeValues>( 230 attributeName: T, 231 callback: AsyncCallback<ElementAttributeValues[T]> 232 ): void; 233 234 /** 235 * Get the value of an attribute. 236 * 237 * @param { T } attributeName Indicates the attribute name. 238 * @returns { Promise<ElementAttributeValues[T]> } 239 * @throws { BusinessError } 401 - Input parameter error. 240 * @throws { BusinessError } 9300004 - This property does not exist. 241 * @syscap SystemCapability.BarrierFree.Accessibility.Core 242 * @since 9 243 */ 244 attributeValue<T extends keyof ElementAttributeValues>(attributeName: T): Promise<ElementAttributeValues[T]>; 245 246 /** 247 * Get a list of supported actions. 248 * 249 * @param { AsyncCallback<Array<string>> } callback Indicates the listener. 250 * @syscap SystemCapability.BarrierFree.Accessibility.Core 251 * @since 9 252 */ 253 actionNames(callback: AsyncCallback<Array<string>>): void; 254 255 /** 256 * Get a list of supported actions. 257 * 258 * @returns { Promise<Array<string>> } 259 * @syscap SystemCapability.BarrierFree.Accessibility.Core 260 * @since 9 261 */ 262 actionNames(): Promise<Array<string>>; 263 264 /** 265 * Perform the specified action. 266 * 267 * @param { string } actionName Indicates the action name. 268 * @param { object } parameters Indicates the parameters needed to execute the action. 269 * @param { AsyncCallback<void> } callback Indicates the listener. 270 * @throws { BusinessError } 401 - Input parameter error. 271 * @throws { BusinessError } 9300005 - This action is not supported. 272 * @syscap SystemCapability.BarrierFree.Accessibility.Core 273 * @since 9 274 */ 275 performAction(actionName: string, parameters: object, callback: AsyncCallback<void>): void; 276 277 /** 278 * Perform the specified action. 279 * 280 * @param { string } actionName Indicates the action name. 281 * @param { object } parameters Indicates the parameters needed to execute the action. 282 * @returns { Promise<void> } 283 * @throws { BusinessError } 401 - Input parameter error. 284 * @throws { BusinessError } 9300005 - This action is not supported. 285 * @syscap SystemCapability.BarrierFree.Accessibility.Core 286 * @since 9 287 */ 288 performAction(actionName: string, parameters?: object): Promise<void>; 289 290 /** 291 * Perform the specified action. 292 * 293 * @param { string } actionName Indicates the action name. 294 * @param { AsyncCallback<void> } callback Indicates the listener. 295 * @throws { BusinessError } 401 - Input parameter error. 296 * @throws { BusinessError } 9300005 - This action is not supported. 297 * @syscap SystemCapability.BarrierFree.Accessibility.Core 298 * @since 9 299 */ 300 performAction(actionName: string, callback: AsyncCallback<void>): void; 301 302 /** 303 * Find elements that match the condition. 304 * 305 * @param { 'content' } type The type of query condition is content. 306 * @param { string } condition Indicates the specific content to be queried. 307 * @param { AsyncCallback<Array<AccessibilityElement>> } callback Indicates the listener. 308 * @throws { BusinessError } 401 - Input parameter error. 309 * @syscap SystemCapability.BarrierFree.Accessibility.Core 310 * @since 9 311 */ 312 findElement(type: 'content', condition: string, callback: AsyncCallback<Array<AccessibilityElement>>): void; 313 314 /** 315 * Find elements that match the condition. 316 * 317 * @param { 'content' } type The type of query condition is content. 318 * @param { string } condition Indicates the specific content to be queried. 319 * @returns { Promise<Array<AccessibilityElement>> } 320 * @throws { BusinessError } 401 - Input parameter error. 321 * @syscap SystemCapability.BarrierFree.Accessibility.Core 322 * @since 9 323 */ 324 findElement(type: 'content', condition: string): Promise<Array<AccessibilityElement>>; 325 326 /** 327 * Find elements that match the condition. 328 * 329 * @param { 'focusType' } type The type of query condition is focus type. 330 * @param { FocusType } condition Indicates the type of focus to query. 331 * @param { AsyncCallback<AccessibilityElement> } callback Indicates the listener. 332 * @throws { BusinessError } 401 - Input parameter error. 333 * @syscap SystemCapability.BarrierFree.Accessibility.Core 334 * @since 9 335 */ 336 findElement(type: 'focusType', condition: FocusType, callback: AsyncCallback<AccessibilityElement>): void; 337 338 /** 339 * Find elements that match the condition. 340 * 341 * @param { 'focusType' } type The type of query condition is focus type. 342 * @param { FocusType } condition Indicates the type of focus to query. 343 * @returns { Promise<AccessibilityElement> } 344 * @throws { BusinessError } 401 - Input parameter error. 345 * @syscap SystemCapability.BarrierFree.Accessibility.Core 346 * @since 9 347 */ 348 findElement(type: 'focusType', condition: FocusType): Promise<AccessibilityElement>; 349 350 /** 351 * Find elements that match the condition. 352 * 353 * @param { 'focusDirection' } type The type of query condition is focus direction. 354 * @param { FocusDirection } condition Indicates the direction of search focus to query. 355 * @param { AsyncCallback<AccessibilityElement> } callback Indicates the listener. 356 * @throws { BusinessError } 401 - Input parameter error. 357 * @syscap SystemCapability.BarrierFree.Accessibility.Core 358 * @since 9 359 */ 360 findElement(type: 'focusDirection', condition: FocusDirection, callback: AsyncCallback<AccessibilityElement>): void; 361 362 /** 363 * Find elements that match the condition. 364 * 365 * @param { 'focusDirection' } type The type of query condition is focus direction. 366 * @param { FocusDirection } condition Indicates the direction of search focus to query. 367 * @returns { Promise<AccessibilityElement> } 368 * @throws { BusinessError } 401 - Input parameter error. 369 * @syscap SystemCapability.BarrierFree.Accessibility.Core 370 * @since 9 371 */ 372 findElement(type: 'focusDirection', condition: FocusDirection): Promise<AccessibilityElement>; 373} 374 375/** 376 * Indicates the possible attributes of the element and the type of the attribute value. 377 * 378 * @syscap SystemCapability.BarrierFree.Accessibility.Core 379 * @since 9 380 */ 381type ElementAttributeValues = { 382 /** 383 * Indicates accessibility focus state. 384 * 385 * @syscap SystemCapability.BarrierFree.Accessibility.Core 386 * @since 9 387 */ 388 'accessibilityFocused': boolean; 389 /** 390 * Indicates the bundle name to which it belongs. 391 * 392 * @syscap SystemCapability.BarrierFree.Accessibility.Core 393 * @since 9 394 */ 395 'bundleName': string; 396 /** 397 * Indicates whether the element is checkable. 398 * 399 * @syscap SystemCapability.BarrierFree.Accessibility.Core 400 * @since 9 401 */ 402 'checkable': boolean; 403 /** 404 * Indicates whether the element is checked. 405 * 406 * @syscap SystemCapability.BarrierFree.Accessibility.Core 407 * @since 9 408 */ 409 'checked': boolean; 410 /** 411 * Indicates all child elements. 412 * 413 * @syscap SystemCapability.BarrierFree.Accessibility.Core 414 * @since 9 415 */ 416 'children': Array<AccessibilityElement>; 417 /** 418 * Indicates whether the element is clickable. 419 * 420 * @syscap SystemCapability.BarrierFree.Accessibility.Core 421 * @since 9 422 */ 423 'clickable': boolean; 424 /** 425 * Indicates the component ID to which the element belongs. 426 * 427 * @syscap SystemCapability.BarrierFree.Accessibility.Core 428 * @since 9 429 */ 430 'componentId': number; 431 /** 432 * Indicates the component type to which the element belongs. 433 * 434 * @syscap SystemCapability.BarrierFree.Accessibility.Core 435 * @since 9 436 */ 437 'componentType': string; 438 /** 439 * Indicates the content. 440 * 441 * @syscap SystemCapability.BarrierFree.Accessibility.Core 442 * @since 9 443 */ 444 'contents': Array<string>; 445 /** 446 * Indicates the index of the current item. 447 * 448 * @syscap SystemCapability.BarrierFree.Accessibility.Core 449 * @since 9 450 */ 451 'currentIndex': number; 452 /** 453 * Indicates the description of the element. 454 * 455 * @syscap SystemCapability.BarrierFree.Accessibility.Core 456 * @since 9 457 */ 458 'description': string; 459 /** 460 * Indicates whether the element is editable. 461 * 462 * @syscap SystemCapability.BarrierFree.Accessibility.Core 463 * @since 9 464 */ 465 'editable': boolean; 466 /** 467 * Indicates the list index of the last item displayed on the screen. 468 * 469 * @syscap SystemCapability.BarrierFree.Accessibility.Core 470 * @since 9 471 */ 472 'endIndex': number; 473 /** 474 * Indicates the string of error state. 475 * 476 * @syscap SystemCapability.BarrierFree.Accessibility.Core 477 * @since 9 478 */ 479 'error': string; 480 /** 481 * Indicates whether the element is focusable. 482 * 483 * @syscap SystemCapability.BarrierFree.Accessibility.Core 484 * @since 9 485 */ 486 'focusable': boolean; 487 /** 488 * Indicates the hint text. 489 * 490 * @syscap SystemCapability.BarrierFree.Accessibility.Core 491 * @since 9 492 */ 493 'hintText': string; 494 /** 495 * Indicates the type of input text. 496 * 497 * @syscap SystemCapability.BarrierFree.Accessibility.Core 498 * @since 9 499 */ 500 'inputType': number; 501 /** 502 * Indicates the inspector key. 503 * 504 * @syscap SystemCapability.BarrierFree.Accessibility.Core 505 * @since 9 506 */ 507 'inspectorKey': string; 508 /** 509 * Indicates whether the element is active or not. 510 * 511 * @syscap SystemCapability.BarrierFree.Accessibility.Core 512 * @since 9 513 */ 514 'isActive': boolean; 515 /** 516 * Indicates whether the element is enable or not. 517 * 518 * @syscap SystemCapability.BarrierFree.Accessibility.Core 519 * @since 9 520 */ 521 'isEnable': boolean; 522 /** 523 * Indicates whether the element is hint state or not. 524 * 525 * @syscap SystemCapability.BarrierFree.Accessibility.Core 526 * @since 9 527 */ 528 'isHint': boolean; 529 /** 530 * Indicates whether the element is focused or not. 531 * 532 * @syscap SystemCapability.BarrierFree.Accessibility.Core 533 * @since 9 534 */ 535 'isFocused': boolean; 536 /** 537 * Indicates whether the element is password or not. 538 * 539 * @syscap SystemCapability.BarrierFree.Accessibility.Core 540 * @since 9 541 */ 542 'isPassword': boolean; 543 /** 544 * Indicates whether the element is visible or not. 545 * 546 * @syscap SystemCapability.BarrierFree.Accessibility.Core 547 * @since 9 548 */ 549 'isVisible': boolean; 550 /** 551 * Indicates the total count of the items. 552 * 553 * @syscap SystemCapability.BarrierFree.Accessibility.Core 554 * @since 9 555 */ 556 'itemCount': number; 557 /** 558 * Indicates the last content. 559 * 560 * @syscap SystemCapability.BarrierFree.Accessibility.Core 561 * @since 9 562 */ 563 'lastContent': string; 564 /** 565 * Indicates the display layer of the element. 566 * 567 * @syscap SystemCapability.BarrierFree.Accessibility.Core 568 * @since 9 569 */ 570 'layer': number; 571 /** 572 * Indicates whether the element is long clickable. 573 * 574 * @syscap SystemCapability.BarrierFree.Accessibility.Core 575 * @since 9 576 */ 577 'longClickable': boolean; 578 /** 579 * Indicates the page id. 580 * 581 * @syscap SystemCapability.BarrierFree.Accessibility.Core 582 * @since 9 583 */ 584 'pageId': number; 585 /** 586 * Indicates the parent of the element. 587 * 588 * @syscap SystemCapability.BarrierFree.Accessibility.Core 589 * @since 9 590 */ 591 'parent': AccessibilityElement; 592 /** 593 * Indicates whether the element supports multiple lines of text. 594 * 595 * @syscap SystemCapability.BarrierFree.Accessibility.Core 596 * @since 9 597 */ 598 'pluralLineSupported': boolean; 599 /** 600 * Indicates the area of the element. 601 * 602 * @syscap SystemCapability.BarrierFree.Accessibility.Core 603 * @since 9 604 */ 605 'rect': Rect; 606 /** 607 * Indicates the resource name of the element. 608 * 609 * @syscap SystemCapability.BarrierFree.Accessibility.Core 610 * @since 9 611 */ 612 'resourceName': string; 613 /** 614 * Indicates the root element of the window element. 615 * 616 * @syscap SystemCapability.BarrierFree.Accessibility.Core 617 * @since 9 618 */ 619 'rootElement': AccessibilityElement; 620 /** 621 * Indicates the display area of the element. 622 * 623 * @syscap SystemCapability.BarrierFree.Accessibility.Core 624 * @since 9 625 */ 626 'screenRect': Rect; 627 /** 628 * Indicates whether the element is scrollable. 629 * 630 * @syscap SystemCapability.BarrierFree.Accessibility.Core 631 * @since 9 632 */ 633 'scrollable': boolean; 634 /** 635 * Indicates whether the element is selected. 636 * 637 * @syscap SystemCapability.BarrierFree.Accessibility.Core 638 * @since 9 639 */ 640 'selected': boolean; 641 /** 642 * Indicates the list index of the first item displayed on the screen. 643 * 644 * @syscap SystemCapability.BarrierFree.Accessibility.Core 645 * @since 9 646 */ 647 'startIndex': number; 648 /** 649 * Indicates the text of the element. 650 * 651 * @syscap SystemCapability.BarrierFree.Accessibility.Core 652 * @since 9 653 */ 654 'text': string; 655 /** 656 * Indicates the maximum length limit of the element text. 657 * 658 * @syscap SystemCapability.BarrierFree.Accessibility.Core 659 * @since 9 660 */ 661 'textLengthLimit': number; 662 /** 663 * Indicates the unit of movement of the element text as it is read. 664 * 665 * @syscap SystemCapability.BarrierFree.Accessibility.Core 666 * @since 9 667 */ 668 'textMoveUnit': accessibility.TextMoveUnit; 669 /** 670 * Indicates the action that triggered the element event. 671 * 672 * @syscap SystemCapability.BarrierFree.Accessibility.Core 673 * @since 9 674 */ 675 'triggerAction': accessibility.Action; 676 /** 677 * Indicates the window type of the element. 678 * 679 * @syscap SystemCapability.BarrierFree.Accessibility.Core 680 * @since 9 681 */ 682 'type': WindowType; 683 /** 684 * Indicates the maximum value. 685 * 686 * @syscap SystemCapability.BarrierFree.Accessibility.Core 687 * @since 9 688 */ 689 'valueMax': number; 690 /** 691 * Indicates the minimum value. 692 * 693 * @syscap SystemCapability.BarrierFree.Accessibility.Core 694 * @since 9 695 */ 696 'valueMin': number; 697 /** 698 * Indicates the current value. 699 * 700 * @syscap SystemCapability.BarrierFree.Accessibility.Core 701 * @since 9 702 */ 703 'valueNow': number; 704 /** 705 * Indicates the window id. 706 * 707 * @syscap SystemCapability.BarrierFree.Accessibility.Core 708 * @since 9 709 */ 710 'windowId': number; 711}; 712 713/** 714 * Indicates the direction of the search focus. 715 * 716 * @syscap SystemCapability.BarrierFree.Accessibility.Core 717 * @since 9 718 */ 719type FocusDirection = 'up' | 'down' | 'left' | 'right' | 'forward' | 'backward'; 720 721/** 722 * Indicates the type of the focus. 723 * 724 * @syscap SystemCapability.BarrierFree.Accessibility.Core 725 * @since 9 726 */ 727type FocusType = 'accessibility' | 'normal'; 728 729/** 730 * Indicates the type of the window. 731 * 732 * @syscap SystemCapability.BarrierFree.Accessibility.Core 733 * @since 9 734 */ 735type WindowType = 'application' | 'system'; 736 737/** 738 * Indicates rectangle. 739 * 740 * @typedef Rect 741 * @syscap SystemCapability.BarrierFree.Accessibility.Core 742 * @since 9 743 */ 744interface Rect { 745 left: number; 746 top: number; 747 width: number; 748 height: number; 749} 750