diff --git a/api/@ohos.accessibility.config.d.ts b/api/@ohos.accessibility.config.d.ts index d7d3632e72757855eef1badb40fb1fd04e7970d7..2dfac6d56a12e8b0f7d6f5389a8e05bf6d719822 100644 --- a/api/@ohos.accessibility.config.d.ts +++ b/api/@ohos.accessibility.config.d.ts @@ -14,7 +14,7 @@ */ import accessibility from './@ohos.accessibility'; -import { AsyncCallback } from './basic'; +import { AsyncCallback, Callback } from './basic'; /** * Configuration of the accessibility. @@ -25,7 +25,56 @@ import { AsyncCallback } from './basic'; */ declare namespace config { /** - * Enable the acceessibility extension ability. + * Indicates the configuration of high-contrast text. + */ + var highContrastText: Config; + /** + * Indicates the configuration of invert color. + */ + var invertColor: Config; + /** + * Indicates the configuration of daltonization color filter. + */ + var daltonizationColorFilter: Config; + /** + * Indicates the configuration of content timeout. + */ + var contentTimeout: Config; + /** + * Indicates the configuration of animation state. + */ + var animationOff: Config; + /** + * Indicates the configuration of brightness discount. + */ + var brightnessDiscount: Config; + /** + * Indicates the configuration of mouse key state. + */ + var mouseKey: Config; + /** + * Indicates the configuration of mouse auto click. + */ + var mouseAutoClick: Config; + /** + * Indicates the configuration of short key state. + */ + var shortkey: Config; + /** + * Indicates the configuration of short key target. + */ + var shortkeyTarget: Config; + /** + * Indicates the configuration of captions state. + */ + var captions: Config; + /** + * Indicates the configuration of captions style. + */ + var captionsStyle: Config; + + /** + * Enable the accessibility extension ability. * @param name Indicates the accessibility extension name, in "bundleName/abilityName" format. * @param capability Indicates the ability. */ @@ -33,10 +82,59 @@ declare namespace config { function enableAbility(name: string, capability: Array, callback: AsyncCallback): void; /** - * Disable the acceessibility extension ability. + * Disable the accessibility extension ability. * @param name Indicates the accessibility extension name, in "bundleName/abilityName" format. */ function disableAbility(name: string): Promise; function disableAbility(name: string, callback: AsyncCallback): void; + + /** + * Register the listener that watches for changes in the enabled status of accessibility extensions. + * @param type Indicates the enableAbilityListsStateChanged type. + * @param callback Indicates the listener. + */ + function on(type: 'enableAbilityListsStateChanged', callback: Callback): void; + + /** + * Deregister listener that watches for changes in the enabled status of accessibility extensions. + * @param type Indicates the enableAbilityListsStateChanged type. + * @param callback Indicates the listener. + */ + function off(type: 'enableAbilityListsStateChanged', callback?: Callback): void; + + /** + * Indicates setting, getting, and listening to changes in configuration. + */ + interface Config { + /** + * Setting configuration value. + * @param value Indicates the value. + */ + set(value: T): Promise; + set(value: T, callback: AsyncCallback): void; + + /** + * Getting configuration value. + */ + get(): Promise; + get(callback: AsyncCallback): void; + + /** + * Register the listener to listen for configuration changes. + * @param callback Indicates the listener. + */ + on(callback: Callback): void; + + /** + * Deregister the listener to listen for configuration changes. + * @param callback Indicates the listener. + */ + off(callback?: Callback): void; + } + + /** + * Indicates the type of daltonization color filter. + */ + type DaltonizationColorFilter = 'Normal' | 'Protanomaly' | 'Deuteranomaly' | 'Tritanomaly'; } export default config; \ No newline at end of file