js-apidiff-accessibility.md 21.4 KB
Newer Older
W
wangqing 已提交
1 2
| 操作 | 旧版本 | 新版本 | d.ts文件 |
| ---- | ------ | ------ | -------- |
W
wangqing 已提交
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|新增|NA|类名:config;<br>方法or属性:function enableAbility(name: string, capability: Array\<accessibility.Capability>): Promise\<void>;|@ohos.accessibility.config.d.ts|
|新增|NA|类名:config;<br>方法or属性:function enableAbility(name: string, capability: Array\<accessibility.Capability>, callback: AsyncCallback\<void>): void;|@ohos.accessibility.config.d.ts|
|新增|NA|类名:config;<br>方法or属性:function disableAbility(name: string): Promise\<void>;|@ohos.accessibility.config.d.ts|
|新增|NA|类名:config;<br>方法or属性:function disableAbility(name: string, callback: AsyncCallback\<void>): void;|@ohos.accessibility.config.d.ts|
|新增|NA|类名:config;<br>方法or属性:function on(type: 'enabledAccessibilityExtensionListChange', callback: Callback\<void>): void;|@ohos.accessibility.config.d.ts|
|新增|NA|类名:config;<br>方法or属性:function off(type: 'enabledAccessibilityExtensionListChange', callback?: Callback\<void>): void;|@ohos.accessibility.config.d.ts|
|新增|NA|类名:config;<br>方法or属性:type DaltonizationColorFilter = 'Normal' \| 'Protanomaly' \| 'Deuteranomaly' \| 'Tritanomaly';|@ohos.accessibility.config.d.ts|
|新增|NA|类名:Config;<br>方法or属性:set(value: T): Promise\<void>;|@ohos.accessibility.config.d.ts|
|新增|NA|类名:Config;<br>方法or属性:set(value: T, callback: AsyncCallback\<void>): void;|@ohos.accessibility.config.d.ts|
|新增|NA|类名:Config;<br>方法or属性:get(): Promise\<T>;|@ohos.accessibility.config.d.ts|
|新增|NA|类名:Config;<br>方法or属性:get(callback: AsyncCallback\<T>): void;|@ohos.accessibility.config.d.ts|
|新增|NA|类名:Config;<br>方法or属性:on(callback: Callback\<T>): void;|@ohos.accessibility.config.d.ts|
|新增|NA|类名:Config;<br>方法or属性:off(callback?: Callback\<T>): void;|@ohos.accessibility.config.d.ts|
|新增|NA|类名:accessibility;<br>方法or属性:function getAccessibilityExtensionList(abilityType: AbilityType, stateType: AbilityState): Promise\<Array\<AccessibilityAbilityInfo>>;|@ohos.accessibility.d.ts|
|新增|NA|类名:accessibility;<br>方法or属性:function getAccessibilityExtensionList(abilityType: AbilityType, stateType: AbilityState, callback: AsyncCallback\<Array\<AccessibilityAbilityInfo>>): void;|@ohos.accessibility.d.ts|
|新增|NA|类名:accessibility;<br>方法or属性:function sendAccessibilityEvent(event: EventInfo, callback: AsyncCallback\<void>): void;|@ohos.accessibility.d.ts|
|新增|NA|类名:accessibility;<br>方法or属性:function sendAccessibilityEvent(event: EventInfo): Promise\<void>;|@ohos.accessibility.d.ts|
|新增|NA|类名:GesturePath;<br>方法or属性:constructor(durationTime: number);|@ohos.accessibility.GesturePath.d.ts|
|新增|NA|类名:GesturePath;<br>方法or属性:points: Array\<GesturePoint>;|@ohos.accessibility.GesturePath.d.ts|
|新增|NA|类名:GesturePath;<br>方法or属性:durationTime: number;|@ohos.accessibility.GesturePath.d.ts|
|新增|NA|类名:GesturePoint;<br>方法or属性:constructor(positionX: number, positionY: number);|@ohos.accessibility.GesturePoint.d.ts|
|新增|NA|类名:GesturePoint;<br>方法or属性:positionX: number;|@ohos.accessibility.GesturePoint.d.ts|
|新增|NA|类名:GesturePoint;<br>方法or属性:positionY: number;|@ohos.accessibility.GesturePoint.d.ts|
|新增|NA|类名:sourcefile;<br>方法or属性:type GestureType = 'left' \| 'leftThenRight' \| 'leftThenUp' \| 'leftThenDown' \|<br>    'right' \| 'rightThenLeft' \| 'rightThenUp' \| 'rightThenDown' \|<br>    'up' \| 'upThenLeft' \| 'upThenRight' \| 'upThenDown' \|<br>    'down' \| 'downThenLeft' \| 'downThenRight' \| 'downThenUp';|@ohos.application.AccessibilityExtensionAbility.d.ts|
|新增|NA|类名:sourcefile;<br>方法or属性:type PageUpdateType = 'pageContentUpdate' \| 'pageStateUpdate';|@ohos.application.AccessibilityExtensionAbility.d.ts|
|新增|NA|类名:sourcefile;<br>方法or属性:type TouchGuideType = 'touchBegin' \| 'touchEnd';|@ohos.application.AccessibilityExtensionAbility.d.ts|
|新增|NA|类名:AccessibilityExtensionAbility;<br>方法or属性:context: AccessibilityExtensionContext;|@ohos.application.AccessibilityExtensionAbility.d.ts|
|新增|NA|类名:AccessibilityExtensionAbility;<br>方法or属性:onConnect(): void;|@ohos.application.AccessibilityExtensionAbility.d.ts|
|新增|NA|类名:AccessibilityExtensionAbility;<br>方法or属性:onDisconnect(): void;|@ohos.application.AccessibilityExtensionAbility.d.ts|
|新增|NA|类名:AccessibilityExtensionAbility;<br>方法or属性:onAccessibilityEvent(event: AccessibilityEvent): void;|@ohos.application.AccessibilityExtensionAbility.d.ts|
|新增|NA|类名:AccessibilityExtensionAbility;<br>方法or属性:onKeyEvent(keyEvent: KeyEvent): boolean;|@ohos.application.AccessibilityExtensionAbility.d.ts|
|新增|NA|类名:AccessibilityEvent;<br>方法or属性:eventType: accessibility.EventType \| accessibility.WindowUpdateType \|<br>        TouchGuideType \| GestureType \| PageUpdateType;|@ohos.application.AccessibilityExtensionAbility.d.ts|
|新增|NA|类名:AccessibilityEvent;<br>方法or属性:target?: AccessibilityElement;|@ohos.application.AccessibilityExtensionAbility.d.ts|
|新增|NA|类名:AccessibilityEvent;<br>方法or属性:timeStamp?: number;|@ohos.application.AccessibilityExtensionAbility.d.ts|
|新增|NA|类名:sourcefile;<br>方法or属性:type ElementAttributeValues = {<br>    /**<br>     * Indicates accessibility focus state.<br>     */<br>    'accessibilityFocused': boolean;<br>    /**<br>     * Indicates the bundle name to which it belongs.<br>     */<br>    'bundleName': string;<br>    /**<br>     * Indicates whether the element is checkable.<br>     */<br>    'checkable': boolean;<br>    /**<br>     * Indicates whether the element is checked.<br>     */<br>    'checked': boolean;<br>    /**<br>     * Indicates all child elements.<br>     */<br>    'children': Array\<AccessibilityElement>;<br>    /**<br>     * Indicates whether the element is clickable.<br>     */<br>    'clickable': boolean;<br>    /**<br>     * Indicates the component ID to which the element belongs.<br>     */<br>    'componentId': number;<br>    /**<br>     * Indicates the component type to which the element belongs.<br>     */<br>    'componentType': string;<br>    /**<br>     * Indicates the content.<br>     */<br>    'contents': Array\<string>;<br>    /**<br>     * Indicates the index of the current item.<br>     */<br>    'currentIndex': number;<br>    /**<br>     * Indicates the description of the element.<br>     */<br>    'description': string;<br>    /**<br>     * Indicates whether the element is editable.<br>     */<br>    'editable': boolean;<br>    /**<br>     * Indicates the list index of the last item displayed on the screen.<br>     */<br>    'endIndex': number;<br>    /**<br>     * Indicates the string of error state.<br>     */<br>    'error': string;<br>    /**<br>     * Indicates whether the element is focusable.<br>     */<br>    'focusable': boolean;<br>    /**<br>     * Indicates the hint text.<br>     */<br>    'hintText': string;<br>    /**<br>     * Indicates the type of input text.<br>     */<br>    'inputType': number;<br>    /**<br>     * Indicates the inspector key.<br>     */<br>    'inspectorKey': string<br>    /**<br>     * Indicates whether the element is active or not.<br>     */<br>    'isActive': boolean;<br>    /**<br>     * Indicates whether the element is enable or not.<br>     */<br>    'isEnable': boolean;<br>    /**<br>     * Indicates whether the element is hint state or not.<br>     */<br>    'isHint': boolean;<br>    /**<br>     * Indicates whether the element is focused or not.<br>     */<br>    'isFocused': boolean;<br>    /**<br>     * Indicates whether the element is password or not.<br>     */<br>    'isPassword': boolean;<br>    /**<br>     * Indicates whether the element is visible or not.<br>     */<br>    'isVisible': boolean;<br>    /**<br>     * Indicates the total count of the items.<br>     */<br>    'itemCount': number;<br>    /**<br>     * Indicates the last content.<br>     */<br>    'lastContent': string;<br>    /**<br>     * Indicates the display layer of the element.<br>     */<br>    'layer': number;<br>    /**<br>     * Indicates whether the element is long clickable.<br>     */<br>    'longClickable': boolean;<br>    /**<br>     * Indicates the page id.<br>     */<br>    'pageId': number;<br>    /**<br>     * Indicates the parent of the element.<br>     */<br>    'parent': AccessibilityElement;<br>    /**<br>     * Indicates whether the element supports multiple lines of text.<br>     */<br>    'pluralLineSupported': boolean;<br>    /**<br>     * Indicates the area of the element.<br>     */<br>    'rect': Rect;<br>    /**<br>     * Indicates the resource name of the element.<br>     */<br>    'resourceName': string;<br>    /**<br>     * Indicates the root element of the window element.<br>     */<br>    'rootElement': AccessibilityElement;<br>    /**<br>     * Indicates the display area of the element.<br>     */<br>    'screenRect': Rect;<br>    /**<br>     * Indicates whether the element is scrollable.<br>     */<br>    'scrollable': boolean;<br>    /**<br>     * Indicates whether the element is selected.<br>     */<br>    'selected': boolean;<br>    /**<br>     * Indicates the list index of the first item displayed on the screen.<br>     */<br>    'startIndex': number;<br>    /**<br>     * Indicates the text of the element.<br>     */<br>    'text': string;<br>    /**<br>     * Indicates the maximum length limit of the element text.<br>     */<br>    'textLengthLimit': number;<br>    /**<br>     * Indicates the unit of movement of the element text as it is read.<br>     */<br>    'textMoveUnit': accessibility.TextMoveUnit;<br>    /**<br>     * Indicates the action that triggered the element event.<br>     */<br>    'triggerAction': accessibility.Action;<br>    /**<br>     * Indicates the window type of the element.<br>     */<br>    'type': WindowType;<br>    /**<br>     * Indicates the maximum value.<br>     */<br>    'valueMax': number;<br>    /**<br>     * Indicates the minimum value.<br>     */<br>    'valueMin': number;<br>    /**<br>     * Indicates the current value.<br>     */<br>    'valueNow': number;<br>    /**<br>     * Indicates the window id.<br>     */<br>    'windowId': number;<br>}|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:sourcefile;<br>方法or属性:type FocusDirection = 'up' \| 'down' \| 'left' \| 'right' \| 'forward' \| 'backward';|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:sourcefile;<br>方法or属性:type FocusType = 'accessibility' \| 'normal';|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:sourcefile;<br>方法or属性:type WindowType = 'application' \| 'system';|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityExtensionContext;<br>方法or属性:setTargetBundleName(targetNames: Array\<string>): Promise\<void>;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityExtensionContext;<br>方法or属性:setTargetBundleName(targetNames: Array\<string>, callback: AsyncCallback\<void>): void;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityExtensionContext;<br>方法or属性:getFocusElement(isAccessibilityFocus?: boolean): Promise\<AccessibilityElement>;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityExtensionContext;<br>方法or属性:getFocusElement(callback: AsyncCallback\<AccessibilityElement>): void;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityExtensionContext;<br>方法or属性:getFocusElement(isAccessibilityFocus: boolean, callback: AsyncCallback\<AccessibilityElement>): void;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityExtensionContext;<br>方法or属性:getWindowRootElement(windowId?: number): Promise\<AccessibilityElement>;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityExtensionContext;<br>方法or属性:getWindowRootElement(callback: AsyncCallback\<AccessibilityElement>): void;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityExtensionContext;<br>方法or属性:getWindowRootElement(windowId: number, callback: AsyncCallback\<AccessibilityElement>): void;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityExtensionContext;<br>方法or属性:getWindows(displayId?: number): Promise\<Array\<AccessibilityElement>>;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityExtensionContext;<br>方法or属性:getWindows(callback: AsyncCallback\<Array\<AccessibilityElement>>): void;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityExtensionContext;<br>方法or属性:getWindows(displayId: number, callback: AsyncCallback\<Array\<AccessibilityElement>>): void;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityExtensionContext;<br>方法or属性:injectGesture(gesturePath: GesturePath): Promise\<void>;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityExtensionContext;<br>方法or属性:injectGesture(gesturePath: GesturePath, callback: AsyncCallback\<void>): void;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityElement;<br>方法or属性:attributeNames\<T extends keyof ElementAttributeValues>(): Promise\<Array\<T>>;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityElement;<br>方法or属性:attributeNames\<T extends keyof ElementAttributeValues>(callback: AsyncCallback\<Array\<T>>): void;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityElement;<br>方法or属性:attributeValue\<T extends keyof ElementAttributeValues>(attributeName: T): Promise\<ElementAttributeValues[T]>;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityElement;<br>方法or属性:attributeValue\<T extends keyof ElementAttributeValues>(attributeName: T,<br>        callback: AsyncCallback\<ElementAttributeValues[T]>): void;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityElement;<br>方法or属性:actionNames(): Promise\<Array\<string>>;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityElement;<br>方法or属性:actionNames(callback: AsyncCallback\<Array\<string>>): void;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityElement;<br>方法or属性:performAction(actionName: string, parameters?: object): Promise\<void>;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityElement;<br>方法or属性:performAction(actionName: string, callback: AsyncCallback\<void>): void;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityElement;<br>方法or属性:performAction(actionName: string, parameters: object, callback: AsyncCallback\<void>): void;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityElement;<br>方法or属性:findElement(type: 'content', condition: string): Promise\<Array\<AccessibilityElement>>;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityElement;<br>方法or属性:findElement(type: 'content', condition: string, callback: AsyncCallback\<Array\<AccessibilityElement>>): void|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityElement;<br>方法or属性:findElement(type: 'focusType', condition: FocusType): Promise\<AccessibilityElement>;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityElement;<br>方法or属性:findElement(type: 'focusType', condition: FocusType, callback: AsyncCallback\<AccessibilityElement>): void|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityElement;<br>方法or属性:findElement(type: 'focusDirection', condition: FocusDirection): Promise\<AccessibilityElement>;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:AccessibilityElement;<br>方法or属性:findElement(type: 'focusDirection', condition: FocusDirection, callback: AsyncCallback\<AccessibilityElement>): void|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:Rect;<br>方法or属性:left: number;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:Rect;<br>方法or属性:top: number;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:Rect;<br>方法or属性:width: number;|AccessibilityExtensionContext.d.ts|
|新增|NA|类名:Rect;<br>方法or属性:height: number;|AccessibilityExtensionContext.d.ts|
|废弃版本有变化|类名:accessibility;<br>方法or属性:function getAbilityLists(abilityType: AbilityType, stateType: AbilityState,<br><br>    callback: AsyncCallback\<Array\<AccessibilityAbilityInfo>>): void;<br>旧版本信息:|类名:accessibility;<br>方法or属性:function getAbilityLists(abilityType: AbilityType, stateType: AbilityState,<br><br>    callback: AsyncCallback\<Array\<AccessibilityAbilityInfo>>): void;<br>新版本信息:9<br>代替接口: ohos.accessibility#getAccessibilityExtensionList|@ohos.accessibility.d.ts|
|废弃版本有变化|类名:accessibility;<br>方法or属性:function getAbilityLists(abilityType: AbilityType,<br><br>    stateType: AbilityState): Promise\<Array\<AccessibilityAbilityInfo>>;<br>旧版本信息:|类名:accessibility;<br>方法or属性:function getAbilityLists(abilityType: AbilityType,<br><br>    stateType: AbilityState): Promise\<Array\<AccessibilityAbilityInfo>>;<br>新版本信息:9<br>代替接口: ohos.accessibility#getAccessibilityExtensionList|@ohos.accessibility.d.ts|
|废弃版本有变化|类名:accessibility;<br>方法or属性:function sendEvent(event: EventInfo, callback: AsyncCallback\<void>): void;<br>旧版本信息:|类名:accessibility;<br>方法or属性:function sendEvent(event: EventInfo, callback: AsyncCallback\<void>): void;<br>新版本信息:9<br>代替接口: ohos.accessibility#sendAccessibilityEvent|@ohos.accessibility.d.ts|
|废弃版本有变化|类名:accessibility;<br>方法or属性:function sendEvent(event: EventInfo): Promise\<void>;<br>旧版本信息:|类名:accessibility;<br>方法or属性:function sendEvent(event: EventInfo): Promise\<void>;<br>新版本信息:9<br>代替接口: ohos.accessibility#sendAccessibilityEvent|@ohos.accessibility.d.ts|
|新增(错误码)|类名:accessibility;<br>方法or属性:function on(type: 'accessibilityStateChange', callback: Callback\<boolean>): void;<br>旧版本信息:|类名:accessibility;<br>方法or属性:function on(type: 'accessibilityStateChange', callback: Callback\<boolean>): void;<br>新版本信息:401|@ohos.accessibility.d.ts|
|新增(错误码)|类名:accessibility;<br>方法or属性:function on(type: 'touchGuideStateChange', callback: Callback\<boolean>): void;<br>旧版本信息:|类名:accessibility;<br>方法or属性:function on(type: 'touchGuideStateChange', callback: Callback\<boolean>): void;<br>新版本信息:401|@ohos.accessibility.d.ts|
|新增(错误码)|类名:accessibility;<br>方法or属性:function off(type: 'accessibilityStateChange', callback?: Callback\<boolean>): void;<br>旧版本信息:|类名:accessibility;<br>方法or属性:function off(type: 'accessibilityStateChange', callback?: Callback\<boolean>): void;<br>新版本信息:401|@ohos.accessibility.d.ts|
|新增(错误码)|类名:accessibility;<br>方法or属性:function off(type: 'touchGuideStateChange', callback?: Callback\<boolean>): void;<br>旧版本信息:|类名:accessibility;<br>方法or属性:function off(type: 'touchGuideStateChange', callback?: Callback\<boolean>): void;<br>新版本信息:401|@ohos.accessibility.d.ts|
|新增(错误码)|类名:CaptionsManager;<br>方法or属性:on(type: 'enableChange', callback: Callback\<boolean>): void;<br>旧版本信息:|类名:CaptionsManager;<br>方法or属性:on(type: 'enableChange', callback: Callback\<boolean>): void;<br>新版本信息:401|@ohos.accessibility.d.ts|
|新增(错误码)|类名:CaptionsManager;<br>方法or属性:on(type: 'styleChange', callback: Callback\<CaptionsStyle>): void;<br>旧版本信息:|类名:CaptionsManager;<br>方法or属性:on(type: 'styleChange', callback: Callback\<CaptionsStyle>): void;<br>新版本信息:401|@ohos.accessibility.d.ts|
|新增(错误码)|类名:CaptionsManager;<br>方法or属性:off(type: 'enableChange', callback?: Callback\<boolean>): void;<br>旧版本信息:|类名:CaptionsManager;<br>方法or属性:off(type: 'enableChange', callback?: Callback\<boolean>): void;<br>新版本信息:401|@ohos.accessibility.d.ts|
|新增(错误码)|类名:CaptionsManager;<br>方法or属性:off(type: 'styleChange', callback?: Callback\<CaptionsStyle>): void;<br>旧版本信息:|类名:CaptionsManager;<br>方法or属性:off(type: 'styleChange', callback?: Callback\<CaptionsStyle>): void;<br>新版本信息:401|@ohos.accessibility.d.ts|
|type有变化|类名:accessibility;<br>方法or属性:type AbilityType = 'audible' \| 'generic' \| 'haptic' \| 'spoken' \| 'visual' \| 'all';<br>旧版本信息:|类名:accessibility;<br>方法or属性:type AbilityType = 'audible' \| 'generic' \| 'haptic' \| 'spoken' \| 'visual' \| 'all';<br>新版本信息:'audible' \| 'generic' \| 'haptic' \| 'spoken' \| 'visual' \| 'all'|@ohos.accessibility.d.ts|
|函数有变化|类名:accessibility;<br>方法or属性:type AbilityType = 'audible' \| 'generic' \| 'haptic' \| 'spoken' \| 'visual';|类名:accessibility;<br>方法or属性:type AbilityType = 'audible' \| 'generic' \| 'haptic' \| 'spoken' \| 'visual' \| 'all';|@ohos.accessibility.d.ts|