js-apidiff-accessibility.md 4.4 KB
Newer Older
Z
zengyawen 已提交
1
# 无障碍子系统JS API变更
R
RayShih 已提交
2

Z
zengyawen 已提交
3
OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,无障碍子系统的API变更如下:
R
RayShih 已提交
4 5 6

## 接口变更

Z
zengyawen 已提交
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
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| ohos.accessibility | EventInfo | itemCount?: number; | 新增 |
| ohos.accessibility | EventInfo | endIndex?: number; | 新增 |
| ohos.accessibility | EventInfo | currentIndex?: number; | 新增 |
| ohos.accessibility | EventInfo | beginIndex?: number; | 新增 |
| ohos.accessibility | EventInfo | lastContent?: string; | 新增 |
| ohos.accessibility | EventInfo | contents?: Array<string>; | 新增 |
| ohos.accessibility | EventInfo | textMoveUnit?: TextMoveUnit; | 新增 |
| ohos.accessibility | EventInfo | triggerAction: Action; | 新增 |
| ohos.accessibility | EventInfo | description?: string; | 新增 |
| ohos.accessibility | EventInfo | pageId ?: number; | 新增 |
| ohos.accessibility | EventInfo | componentType?: string; | 新增 |
| ohos.accessibility | EventInfo | bundleName: string; | 新增 |
| ohos.accessibility | EventInfo | windowUpdateType?: WindowUpdateType; | 新增 |
| ohos.accessibility | EventInfo | type: EventType; | 新增 |
| ohos.accessibility | EventInfo | constructor(jsonObject); | 新增 |
| ohos.accessibility | AccessibilityAbilityInfo | readonly eventTypes: Array<EventType>; | 新增 |
| ohos.accessibility | AccessibilityAbilityInfo | readonly description: string; | 新增 |
| ohos.accessibility | AccessibilityAbilityInfo | readonly capabilities: Array<Capability>; | 新增 |
| ohos.accessibility | AccessibilityAbilityInfo | readonly abilityTypes: Array<AbilityType>; | 新增 |
| ohos.accessibility | AccessibilityAbilityInfo | readonly bundleName: string; | 新增 |
| ohos.accessibility | AccessibilityAbilityInfo | readonly name: string; | 新增 |
| ohos.accessibility | AccessibilityAbilityInfo | readonly id: string; | 新增 |
| ohos.accessibility | CaptionsStyle | windowColor: number \| string; | 新增 |
| ohos.accessibility | CaptionsStyle | backgroundColor: number \| string; | 新增 |
| ohos.accessibility | CaptionsStyle | fontEdgeType: CaptionsFontEdgeType; | 新增 |
| ohos.accessibility | CaptionsStyle | fontColor: number \| string; | 新增 |
| ohos.accessibility | CaptionsStyle | fontScale: number; | 新增 |
| ohos.accessibility | CaptionsStyle | fontFamily: CaptionsFontFamily; | 新增 |
| ohos.accessibility | CaptionsManager | off(type: 'styleChange', callback?: Callback<CaptionsStyle>): void; | 新增 |
| ohos.accessibility | CaptionsManager | off(type: 'enableChange', callback?: Callback<boolean>): void; | 新增 |
| ohos.accessibility | CaptionsManager | on(type: 'styleChange', callback: Callback<CaptionsStyle>): void; | 新增 |
| ohos.accessibility | CaptionsManager | on(type: 'enableChange', callback: Callback<boolean>): void; | 新增 |
| ohos.accessibility | CaptionsManager | style: CaptionsStyle; | 新增 |
| ohos.accessibility | CaptionsManager | enabled: boolean; | 新增 |
| ohos.accessibility | accessibility | function getCaptionsManager(): CaptionsManager; | 新增 |
| ohos.accessibility | accessibility | function off(type: 'touchGuideStateChange', callback?: Callback<boolean>): void; | 新增 |
| ohos.accessibility | accessibility | function off(type: 'accessibilityStateChange', callback?: Callback<boolean>): void; | 新增 |
| ohos.accessibility | accessibility | function on(type: 'touchGuideStateChange', callback: Callback<boolean>): void; | 新增 |
| ohos.accessibility | accessibility | function on(type: 'accessibilityStateChange', callback: Callback<boolean>): void; | 新增 |
| ohos.accessibility | accessibility | function sendEvent(event: EventInfo, callback: AsyncCallback<void>): void;<br>function sendEvent(event: EventInfo): Promise<void>; | 新增 |
| ohos.accessibility | accessibility | function getAbilityLists(abilityType: AbilityType, stateType: AbilityState, callback: AsyncCallback<Array<AccessibilityAbilityInfo>>): void;<br>function getAbilityLists(abilityType: AbilityType, stateType: AbilityState): Promise<Array<AccessibilityAbilityInfo>>; | 新增 |
| ohos.accessibility | accessibility | function isOpenTouchGuide(callback: AsyncCallback<boolean>): void;<br>function isOpenTouchGuide(): Promise<boolean>; | 新增 |
| ohos.accessibility | accessibility | function isOpenAccessibility(callback: AsyncCallback<boolean>): void;<br>function isOpenAccessibility(): Promise<boolean>; | 新增 |