1e41f4b71Sopenharmony_ci# @ohos.accessibility.config (系统辅助功能配置)(系统接口) 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci本模块提供系统辅助功能的配置,包括辅助扩展的启用与关闭、高对比度文字显示、鼠标键、无障碍字幕配置等。 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci> **说明:** 6e41f4b71Sopenharmony_ci> 7e41f4b71Sopenharmony_ci> - 本模块首批接口从 API version 9 开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 8e41f4b71Sopenharmony_ci> - 本模块接口为系统接口。 9e41f4b71Sopenharmony_ci 10e41f4b71Sopenharmony_ci## 导入模块 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ci```ts 13e41f4b71Sopenharmony_ciimport { config } from '@kit.AccessibilityKit'; 14e41f4b71Sopenharmony_ci``` 15e41f4b71Sopenharmony_ci 16e41f4b71Sopenharmony_ci## 属性 17e41f4b71Sopenharmony_ci 18e41f4b71Sopenharmony_ci**系统能力**:以下各项对应的系统能力均为SystemCapability.BarrierFree.Accessibility.Core 19e41f4b71Sopenharmony_ci 20e41f4b71Sopenharmony_ci| 名称 | 类型 | 可读 | 可写 | 说明 | 21e41f4b71Sopenharmony_ci|------------------------------------|--------------------------------------------------------------------------------------------| -------- | -------- |-----------------------------------------------------------| 22e41f4b71Sopenharmony_ci| highContrastText | [Config](#config)\<boolean> | 是 | 是 | 表示高对比度文字功能启用状态。 | 23e41f4b71Sopenharmony_ci| invertColor | [Config](#config)\<boolean> | 是 | 是 | 表示颜色反转功能启用状态。 | 24e41f4b71Sopenharmony_ci| daltonizationState<sup>11+</sup> | [Config](#config)\<boolean> | 是 | 是 | 表示颜色滤镜功能启动状态。配合daltonizationColorFilter使用。 | 25e41f4b71Sopenharmony_ci| daltonizationColorFilter | [Config](#config)<[DaltonizationColorFilter](#daltonizationcolorfilter)> | 是 | 是 | 表示颜色滤镜功能配置。 | 26e41f4b71Sopenharmony_ci| contentTimeout | [Config](#config)\<number> | 是 | 是 | 表示内容显示建议时长配置。取值 0~5000,单位为毫秒。 | 27e41f4b71Sopenharmony_ci| animationOff | [Config](#config)\<boolean> | 是 | 是 | 表示关闭动画功能启用状态。 | 28e41f4b71Sopenharmony_ci| brightnessDiscount | [Config](#config)\<number> | 是 | 是 | 表示亮度折扣系统配置。取值 0~1.0。 | 29e41f4b71Sopenharmony_ci| mouseKey | [Config](#config)\<boolean> | 是 | 是 | 表示鼠标键功能启用状态。 | 30e41f4b71Sopenharmony_ci| mouseAutoClick | [Config](#config)\<number> | 是 | 是 | 表示鼠标自动点击功能启用状态。取值 0~5000,单位为毫秒。 | 31e41f4b71Sopenharmony_ci| shortkey | [Config](#config)\<boolean> | 是 | 是 | 表示辅助扩展快捷键功能启用状态。 | 32e41f4b71Sopenharmony_ci| shortkeyTarget | [Config](#config)\<string> | 是 | 是 | 表示辅助扩展快捷键的目标配置。取值为辅助应用的名称,格式为:'bundleName/abilityName'。 | 33e41f4b71Sopenharmony_ci| captions | [Config](#config)\<boolean> | 是 | 是 | 表示辅助字幕功能启用状态。 | 34e41f4b71Sopenharmony_ci| captionsStyle | [Config](#config)\<[accessibility.CaptionsStyle](js-apis-accessibility.md#captionsstyle8)> | 是 | 是 | 表示辅助字幕的配置。 | 35e41f4b71Sopenharmony_ci| audioMono<sup>10+</sup> | [Config](#config)\<boolean> | 是 | 是 | 表示音频单声道的配置。 | 36e41f4b71Sopenharmony_ci| audioBalance<sup>10+</sup> | [Config](#config)\<number> | 是 | 是 | 表示左右声道音量平衡的配置。取值 -1.0~1.0。 | 37e41f4b71Sopenharmony_ci| shortkeyMultiTargets<sup>11+</sup> | [Config](#config)<Array\<string>> | 是 | 是 | 表示辅助扩展快捷键的列表配置。取值为辅助应用的名称,格式为:['bundleName/abilityName']。 | 38e41f4b71Sopenharmony_ci| clickResponseTime<sup>11+</sup> | [Config](#config)<[ClickResponseTime](#clickresponsetime11)> | 是 | 是 | 表示点击持续时间功能配置。 | 39e41f4b71Sopenharmony_ci| ignoreRepeatClick<sup>11+</sup> | [Config](#config)\<boolean> | 是 | 是 | 表示忽略重复点击功能启用状态。配合repeatClickInterval使用。 | 40e41f4b71Sopenharmony_ci| repeatClickInterval<sup>11+</sup> | [Config](#config)<[RepeatClickInterval](#repeatclickinterval11)> | 是 | 是 | 表示忽略重复点击功能配置。 | 41e41f4b71Sopenharmony_ci 42e41f4b71Sopenharmony_ciboolean返回值的含义:True表示开启,False表示关闭。 43e41f4b71Sopenharmony_ci[]() 44e41f4b71Sopenharmony_ci## enableAbility 45e41f4b71Sopenharmony_ci 46e41f4b71Sopenharmony_cienableAbility(name: string, capability: Array<accessibility.Capability>): Promise<void>; 47e41f4b71Sopenharmony_ci 48e41f4b71Sopenharmony_ci需要权限:ohos.permission.WRITE_ACCESSIBILITY_CONFIG 49e41f4b71Sopenharmony_ci 50e41f4b71Sopenharmony_ci启用辅助扩展,使用Promise异步回调。 51e41f4b71Sopenharmony_ci 52e41f4b71Sopenharmony_ci**系统能力**:SystemCapability.BarrierFree.Accessibility.Core 53e41f4b71Sopenharmony_ci 54e41f4b71Sopenharmony_ci**参数:** 55e41f4b71Sopenharmony_ci 56e41f4b71Sopenharmony_ci| 参数名 | 类型 | 必填 | 说明 | 57e41f4b71Sopenharmony_ci| -------- |------------------------------------------------------------------------------| -------- | -------- | 58e41f4b71Sopenharmony_ci| name | string | 是 | 辅助应用的名称,格式为:'bundleName/abilityName'。 | 59e41f4b71Sopenharmony_ci| capability | Array<[accessibility.Capability](js-apis-accessibility.md#capability)> | 是 | 辅助应用的能力属性。 | 60e41f4b71Sopenharmony_ci 61e41f4b71Sopenharmony_ci**返回值:** 62e41f4b71Sopenharmony_ci 63e41f4b71Sopenharmony_ci| 类型 | 说明 | 64e41f4b71Sopenharmony_ci| -------- | -------- | 65e41f4b71Sopenharmony_ci| Promise<void> | 无返回结果的Promise对象。 | 66e41f4b71Sopenharmony_ci 67e41f4b71Sopenharmony_ci**错误码:** 68e41f4b71Sopenharmony_ci 69e41f4b71Sopenharmony_ci以下错误码的详细介绍请参见[无障碍子系统错误码](errorcode-accessibility.md)。 70e41f4b71Sopenharmony_ci 71e41f4b71Sopenharmony_ci| 错误码ID | 错误信息 | 72e41f4b71Sopenharmony_ci| ------- | -------------------------------- | 73e41f4b71Sopenharmony_ci| 201 | Permission verification failed. The application does not have the permission required to call the API. | 74e41f4b71Sopenharmony_ci| 202 | Permission verification failed. A non-system application calls a system API. | 75e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. | 76e41f4b71Sopenharmony_ci| 9300001 | Invalid bundle name or ability name. | 77e41f4b71Sopenharmony_ci| 9300002 | Target ability already enabled. | 78e41f4b71Sopenharmony_ci 79e41f4b71Sopenharmony_ci**示例:** 80e41f4b71Sopenharmony_ci 81e41f4b71Sopenharmony_ci```ts 82e41f4b71Sopenharmony_ciimport { accessibility, config } from '@kit.AccessibilityKit'; 83e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 84e41f4b71Sopenharmony_ci 85e41f4b71Sopenharmony_cilet name: string = 'com.ohos.example/axExtension'; 86e41f4b71Sopenharmony_cilet capability: accessibility.Capability[] = ['retrieve']; 87e41f4b71Sopenharmony_ci 88e41f4b71Sopenharmony_ciconfig.enableAbility(name, capability).then(() => { 89e41f4b71Sopenharmony_ci console.info(`Succeeded in enable ability, name is ${name}, capability is ${capability}`); 90e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 91e41f4b71Sopenharmony_ci console.error(`failed to enable ability, Code is ${err.code}, message is ${err.message}`); 92e41f4b71Sopenharmony_ci}); 93e41f4b71Sopenharmony_ci``` 94e41f4b71Sopenharmony_ci 95e41f4b71Sopenharmony_ci## enableAbility 96e41f4b71Sopenharmony_ci 97e41f4b71Sopenharmony_cienableAbility(name: string, capability: Array<[accessibility.Capability](js-apis-accessibility.md#capability)>, callback: AsyncCallback<void>): void; 98e41f4b71Sopenharmony_ci 99e41f4b71Sopenharmony_ci需要权限:ohos.permission.WRITE_ACCESSIBILITY_CONFIG 100e41f4b71Sopenharmony_ci 101e41f4b71Sopenharmony_ci启用辅助扩展,使用callback异步回调。 102e41f4b71Sopenharmony_ci 103e41f4b71Sopenharmony_ci**系统能力**:SystemCapability.BarrierFree.Accessibility.Core 104e41f4b71Sopenharmony_ci 105e41f4b71Sopenharmony_ci**参数:** 106e41f4b71Sopenharmony_ci 107e41f4b71Sopenharmony_ci| 参数名 | 类型 | 必填 | 说明 | 108e41f4b71Sopenharmony_ci| -------- |---------------------------------------------------------------------------------| -------- | -------- | 109e41f4b71Sopenharmony_ci| name | string | 是 | 辅助应用的名称,格式为:'bundleName/abilityName'。 | 110e41f4b71Sopenharmony_ci| capability | Array<[accessibility.Capability](js-apis-accessibility.md#capability)> | 是 | 辅助应用的能力属性。 | 111e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | 是 | 回调函数。 | 112e41f4b71Sopenharmony_ci 113e41f4b71Sopenharmony_ci**错误码:** 114e41f4b71Sopenharmony_ci 115e41f4b71Sopenharmony_ci以下错误码的详细介绍请参见[无障碍子系统错误码](errorcode-accessibility.md)。 116e41f4b71Sopenharmony_ci 117e41f4b71Sopenharmony_ci| 错误码ID | 错误信息 | 118e41f4b71Sopenharmony_ci| ------- | -------------------------------- | 119e41f4b71Sopenharmony_ci| 201 | Permission verification failed. The application does not have the permission required to call the API. | 120e41f4b71Sopenharmony_ci| 202 | Permission verification failed. A non-system application calls a system API. | 121e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. | 122e41f4b71Sopenharmony_ci| 9300001 | Invalid bundle name or ability name. | 123e41f4b71Sopenharmony_ci| 9300002 | Target ability already enabled. | 124e41f4b71Sopenharmony_ci 125e41f4b71Sopenharmony_ci**示例:** 126e41f4b71Sopenharmony_ci 127e41f4b71Sopenharmony_ci```ts 128e41f4b71Sopenharmony_ciimport { accessibility, config } from '@kit.AccessibilityKit'; 129e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 130e41f4b71Sopenharmony_ci 131e41f4b71Sopenharmony_cilet name: string = 'com.ohos.example/axExtension'; 132e41f4b71Sopenharmony_cilet capability: accessibility.Capability[] = ['retrieve']; 133e41f4b71Sopenharmony_ci 134e41f4b71Sopenharmony_ciconfig.enableAbility(name, capability, (err: BusinessError) => { 135e41f4b71Sopenharmony_ci if (err) { 136e41f4b71Sopenharmony_ci console.error(`failed to enable ability, Code is ${err.code}, message is ${err.message}`); 137e41f4b71Sopenharmony_ci return; 138e41f4b71Sopenharmony_ci } 139e41f4b71Sopenharmony_ci console.info(`Succeeded in enable ability, name is ${name}, capability is ${capability}`); 140e41f4b71Sopenharmony_ci}); 141e41f4b71Sopenharmony_ci``` 142e41f4b71Sopenharmony_ci 143e41f4b71Sopenharmony_ci## disableAbility 144e41f4b71Sopenharmony_ci 145e41f4b71Sopenharmony_cidisableAbility(name: string): Promise<void>; 146e41f4b71Sopenharmony_ci 147e41f4b71Sopenharmony_ci需要权限:ohos.permission.WRITE_ACCESSIBILITY_CONFIG 148e41f4b71Sopenharmony_ci 149e41f4b71Sopenharmony_ci关闭辅助扩展,使用Promise异步回调。 150e41f4b71Sopenharmony_ci 151e41f4b71Sopenharmony_ci**系统能力**:SystemCapability.BarrierFree.Accessibility.Core 152e41f4b71Sopenharmony_ci 153e41f4b71Sopenharmony_ci**参数:** 154e41f4b71Sopenharmony_ci 155e41f4b71Sopenharmony_ci| 参数名 | 类型 | 必填 | 说明 | 156e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 157e41f4b71Sopenharmony_ci| name | string | 是 | 辅助应用的名称,格式为:'bundleName/abilityName'。 | 158e41f4b71Sopenharmony_ci 159e41f4b71Sopenharmony_ci**返回值:** 160e41f4b71Sopenharmony_ci 161e41f4b71Sopenharmony_ci| 类型 | 说明 | 162e41f4b71Sopenharmony_ci| -------- | -------- | 163e41f4b71Sopenharmony_ci| Promise<void> | 无返回结果的Promise对象。 | 164e41f4b71Sopenharmony_ci 165e41f4b71Sopenharmony_ci**错误码:** 166e41f4b71Sopenharmony_ci 167e41f4b71Sopenharmony_ci以下错误码的详细介绍请参见[无障碍子系统错误码](errorcode-accessibility.md)。 168e41f4b71Sopenharmony_ci 169e41f4b71Sopenharmony_ci| 错误码ID | 错误信息 | 170e41f4b71Sopenharmony_ci| ------- | -------------------------------- | 171e41f4b71Sopenharmony_ci| 201 | Permission verification failed. The application does not have the permission required to call the API. | 172e41f4b71Sopenharmony_ci| 202 | Permission verification failed. A non-system application calls a system API. | 173e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. | 174e41f4b71Sopenharmony_ci| 9300001 | Invalid bundle name or ability name. | 175e41f4b71Sopenharmony_ci 176e41f4b71Sopenharmony_ci**示例:** 177e41f4b71Sopenharmony_ci 178e41f4b71Sopenharmony_ci```ts 179e41f4b71Sopenharmony_ciimport { accessibility, config } from '@kit.AccessibilityKit'; 180e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 181e41f4b71Sopenharmony_ci 182e41f4b71Sopenharmony_cilet name: string = 'com.ohos.example/axExtension'; 183e41f4b71Sopenharmony_ci 184e41f4b71Sopenharmony_ciconfig.disableAbility(name).then(() => { 185e41f4b71Sopenharmony_ci console.info(`Succeeded in disable ability, name is ${name}`); 186e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 187e41f4b71Sopenharmony_ci console.error(`failed to disable ability, Code is ${err.code}, message is ${err.message}`); 188e41f4b71Sopenharmony_ci}) 189e41f4b71Sopenharmony_ci``` 190e41f4b71Sopenharmony_ci 191e41f4b71Sopenharmony_ci## disableAbility 192e41f4b71Sopenharmony_ci 193e41f4b71Sopenharmony_cidisableAbility(name: string, callback: AsyncCallback<void>): void; 194e41f4b71Sopenharmony_ci 195e41f4b71Sopenharmony_ci需要权限:ohos.permission.WRITE_ACCESSIBILITY_CONFIG 196e41f4b71Sopenharmony_ci 197e41f4b71Sopenharmony_ci关闭辅助扩展,使用callback异步回调。 198e41f4b71Sopenharmony_ci 199e41f4b71Sopenharmony_ci**系统能力**:SystemCapability.BarrierFree.Accessibility.Core 200e41f4b71Sopenharmony_ci 201e41f4b71Sopenharmony_ci**参数:** 202e41f4b71Sopenharmony_ci 203e41f4b71Sopenharmony_ci| 参数名 | 类型 | 必填 | 说明 | 204e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 205e41f4b71Sopenharmony_ci| name | string | 是 | 辅助应用的名称,格式为:'bundleName/abilityName'。 | 206e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | 是 | 回调函数。 | 207e41f4b71Sopenharmony_ci 208e41f4b71Sopenharmony_ci**错误码:** 209e41f4b71Sopenharmony_ci 210e41f4b71Sopenharmony_ci以下错误码的详细介绍请参见[无障碍子系统错误码](errorcode-accessibility.md)。 211e41f4b71Sopenharmony_ci 212e41f4b71Sopenharmony_ci| 错误码ID | 错误信息 | 213e41f4b71Sopenharmony_ci| ------- | -------------------------------- | 214e41f4b71Sopenharmony_ci| 201 | Permission verification failed. The application does not have the permission required to call the API. | 215e41f4b71Sopenharmony_ci| 202 | Permission verification failed. A non-system application calls a system API. | 216e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. | 217e41f4b71Sopenharmony_ci| 9300001 | Invalid bundle name or ability name. | 218e41f4b71Sopenharmony_ci 219e41f4b71Sopenharmony_ci**示例:** 220e41f4b71Sopenharmony_ci 221e41f4b71Sopenharmony_ci```ts 222e41f4b71Sopenharmony_ciimport { accessibility, config } from '@kit.AccessibilityKit'; 223e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 224e41f4b71Sopenharmony_ci 225e41f4b71Sopenharmony_cilet name: string = 'com.ohos.example/axExtension'; 226e41f4b71Sopenharmony_ci 227e41f4b71Sopenharmony_ciconfig.disableAbility(name, (err: BusinessError) => { 228e41f4b71Sopenharmony_ci if (err) { 229e41f4b71Sopenharmony_ci console.error(`failed to enable ability, Code is ${err.code}, message is ${err.message}`); 230e41f4b71Sopenharmony_ci return; 231e41f4b71Sopenharmony_ci } 232e41f4b71Sopenharmony_ci console.info(`Succeeded in disable, name is ${name}`); 233e41f4b71Sopenharmony_ci}); 234e41f4b71Sopenharmony_ci``` 235e41f4b71Sopenharmony_ci 236e41f4b71Sopenharmony_ci## on('enabledAccessibilityExtensionListChange') 237e41f4b71Sopenharmony_ci 238e41f4b71Sopenharmony_cion(type: 'enabledAccessibilityExtensionListChange', callback: Callback<void>): void; 239e41f4b71Sopenharmony_ci 240e41f4b71Sopenharmony_ci需要权限:ohos.permission.READ_ACCESSIBILITY_CONFIG 241e41f4b71Sopenharmony_ci 242e41f4b71Sopenharmony_ci添加启用的辅助扩展的列表变化监听,使用callback异步回调。 243e41f4b71Sopenharmony_ci 244e41f4b71Sopenharmony_ci**系统能力**:SystemCapability.BarrierFree.Accessibility.Core 245e41f4b71Sopenharmony_ci 246e41f4b71Sopenharmony_ci**参数:** 247e41f4b71Sopenharmony_ci 248e41f4b71Sopenharmony_ci| 参数名 | 类型 | 必填 | 说明 | 249e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 250e41f4b71Sopenharmony_ci| type | string | 是 | 参数固定为enabledAccessibilityExtensionListChange,监听启用的辅助扩展的列表变化。 | 251e41f4b71Sopenharmony_ci| callback | Callback<void> | 是 | 回调函数,在启用的辅助扩展的列表变化时通过此函数进行通知。 | 252e41f4b71Sopenharmony_ci 253e41f4b71Sopenharmony_ci**错误码:** 254e41f4b71Sopenharmony_ci 255e41f4b71Sopenharmony_ci以下错误码的详细介绍请参见[无障碍子系统错误码](errorcode-accessibility.md)。 256e41f4b71Sopenharmony_ci 257e41f4b71Sopenharmony_ci| 错误码ID | 错误信息 | 258e41f4b71Sopenharmony_ci| ------- | -------------------------------- | 259e41f4b71Sopenharmony_ci| 201 | Permission verification failed. The application does not have the permission required to call the API. | 260e41f4b71Sopenharmony_ci| 202 | Permission verification failed. A non-system application calls a system API. | 261e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. | 262e41f4b71Sopenharmony_ci 263e41f4b71Sopenharmony_ci**示例:** 264e41f4b71Sopenharmony_ci 265e41f4b71Sopenharmony_ci```ts 266e41f4b71Sopenharmony_ciimport { config } from '@kit.AccessibilityKit'; 267e41f4b71Sopenharmony_ci 268e41f4b71Sopenharmony_ciconfig.on('enabledAccessibilityExtensionListChange', () => { 269e41f4b71Sopenharmony_ci console.info('subscribe enabled accessibility extension list change state success'); 270e41f4b71Sopenharmony_ci}); 271e41f4b71Sopenharmony_ci``` 272e41f4b71Sopenharmony_ci 273e41f4b71Sopenharmony_ci## off('enabledAccessibilityExtensionListChange') 274e41f4b71Sopenharmony_ci 275e41f4b71Sopenharmony_cioff(type: 'enabledAccessibilityExtensionListChange', callback?: Callback<void>): void; 276e41f4b71Sopenharmony_ci 277e41f4b71Sopenharmony_ci需要权限:ohos.permission.READ_ACCESSIBILITY_CONFIG 278e41f4b71Sopenharmony_ci 279e41f4b71Sopenharmony_ci取消启用的辅助扩展的列表变化监听,使用callback异步回调。 280e41f4b71Sopenharmony_ci 281e41f4b71Sopenharmony_ci**系统能力**:SystemCapability.BarrierFree.Accessibility.Core 282e41f4b71Sopenharmony_ci 283e41f4b71Sopenharmony_ci**参数:** 284e41f4b71Sopenharmony_ci 285e41f4b71Sopenharmony_ci| 参数名 | 类型 | 必填 | 说明 | 286e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 287e41f4b71Sopenharmony_ci| type | string | 是 | 参数固定为enabledAccessibilityExtensionListChange,监听启用的辅助扩展的列表变化。 | 288e41f4b71Sopenharmony_ci| callback | Callback<void> | 否 | 取消指定callback对象的事件响应。需与on('enabledAccessibilityExtensionListChange')的callback一致。缺省时,表示注销所有已注册事件。 | 289e41f4b71Sopenharmony_ci 290e41f4b71Sopenharmony_ci**错误码:** 291e41f4b71Sopenharmony_ci 292e41f4b71Sopenharmony_ci以下错误码的详细介绍请参见[无障碍子系统错误码](errorcode-accessibility.md)。 293e41f4b71Sopenharmony_ci 294e41f4b71Sopenharmony_ci| 错误码ID | 错误信息 | 295e41f4b71Sopenharmony_ci| ------- | -------------------------------- | 296e41f4b71Sopenharmony_ci| 201 | Permission verification failed. The application does not have the permission required to call the API. | 297e41f4b71Sopenharmony_ci| 202 | Permission verification failed. A non-system application calls a system API. | 298e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. | 299e41f4b71Sopenharmony_ci 300e41f4b71Sopenharmony_ci**示例:** 301e41f4b71Sopenharmony_ci 302e41f4b71Sopenharmony_ci```ts 303e41f4b71Sopenharmony_ciimport { config } from '@kit.AccessibilityKit'; 304e41f4b71Sopenharmony_ci 305e41f4b71Sopenharmony_ciconfig.off('enabledAccessibilityExtensionListChange', () => { 306e41f4b71Sopenharmony_ci console.info('Unsubscribe enabled accessibility extension list change state success'); 307e41f4b71Sopenharmony_ci}); 308e41f4b71Sopenharmony_ci``` 309e41f4b71Sopenharmony_ci 310e41f4b71Sopenharmony_ci## on('installedAccessibilityListChange')<sup>12+</sup> 311e41f4b71Sopenharmony_ci 312e41f4b71Sopenharmony_cion(type: 'installedAccessibilityListChange', callback: Callback<void>): void; 313e41f4b71Sopenharmony_ci 314e41f4b71Sopenharmony_ci需要权限:ohos.permission.READ_ACCESSIBILITY_CONFIG 315e41f4b71Sopenharmony_ci 316e41f4b71Sopenharmony_ci添加已安装的辅助扩展的列表变化监听,使用callback异步回调。 317e41f4b71Sopenharmony_ci 318e41f4b71Sopenharmony_ci**系统能力**:SystemCapability.BarrierFree.Accessibility.Core 319e41f4b71Sopenharmony_ci 320e41f4b71Sopenharmony_ci**参数:** 321e41f4b71Sopenharmony_ci 322e41f4b71Sopenharmony_ci| 参数名 | 类型 | 必填 | 说明 | 323e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 324e41f4b71Sopenharmony_ci| type | string | 是 | 参数固定为installedAccessibilityListChange,监听已安装的辅助扩展的列表变化。 | 325e41f4b71Sopenharmony_ci| callback | Callback<void> | 是 | 回调函数,在已安装的辅助扩展的列表变化时通过此函数进行通知。 | 326e41f4b71Sopenharmony_ci 327e41f4b71Sopenharmony_ci**错误码:** 328e41f4b71Sopenharmony_ci 329e41f4b71Sopenharmony_ci以下错误码的详细介绍请参见[无障碍子系统错误码](errorcode-accessibility.md)。 330e41f4b71Sopenharmony_ci 331e41f4b71Sopenharmony_ci| 错误码ID | 错误信息 | 332e41f4b71Sopenharmony_ci| ------- | -------------------------------- | 333e41f4b71Sopenharmony_ci| 201 | Permission verification failed. The application does not have the permission required to call the API. | 334e41f4b71Sopenharmony_ci| 202 | Permission verification failed. A non-system application calls a system API. | 335e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. | 336e41f4b71Sopenharmony_ci 337e41f4b71Sopenharmony_ci**示例:** 338e41f4b71Sopenharmony_ci 339e41f4b71Sopenharmony_ci```ts 340e41f4b71Sopenharmony_ciimport { config } from '@kit.AccessibilityKit'; 341e41f4b71Sopenharmony_ci 342e41f4b71Sopenharmony_ciconfig.on('installedAccessibilityListChange', () => { 343e41f4b71Sopenharmony_ci console.info('subscribe installed accessibility extension list change state success'); 344e41f4b71Sopenharmony_ci}); 345e41f4b71Sopenharmony_ci``` 346e41f4b71Sopenharmony_ci 347e41f4b71Sopenharmony_ci## off('installedAccessibilityListChange')<sup>12+</sup> 348e41f4b71Sopenharmony_ci 349e41f4b71Sopenharmony_cioff(type: 'installedAccessibilityListChange', callback?: Callback<void>): void; 350e41f4b71Sopenharmony_ci 351e41f4b71Sopenharmony_ci需要权限:ohos.permission.READ_ACCESSIBILITY_CONFIG 352e41f4b71Sopenharmony_ci 353e41f4b71Sopenharmony_ci取消已安装的辅助扩展的列表变化监听,使用callback异步回调。 354e41f4b71Sopenharmony_ci 355e41f4b71Sopenharmony_ci**系统能力**:SystemCapability.BarrierFree.Accessibility.Core 356e41f4b71Sopenharmony_ci 357e41f4b71Sopenharmony_ci**参数:** 358e41f4b71Sopenharmony_ci 359e41f4b71Sopenharmony_ci| 参数名 | 类型 | 必填 | 说明 | 360e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 361e41f4b71Sopenharmony_ci| type | string | 是 | 参数固定为installedAccessibilityListChange,监听已安装的辅助扩展的列表变化。 | 362e41f4b71Sopenharmony_ci| callback | Callback<void> | 否 | 取消指定callback对象的事件响应。需与on('installedAccessibilityListChange')的callback一致。缺省时,表示注销所有已注册事件。 | 363e41f4b71Sopenharmony_ci 364e41f4b71Sopenharmony_ci**错误码:** 365e41f4b71Sopenharmony_ci 366e41f4b71Sopenharmony_ci以下错误码的详细介绍请参见[无障碍子系统错误码](errorcode-accessibility.md)。 367e41f4b71Sopenharmony_ci 368e41f4b71Sopenharmony_ci| 错误码ID | 错误信息 | 369e41f4b71Sopenharmony_ci| ------- | -------------------------------- | 370e41f4b71Sopenharmony_ci| 201 | Permission verification failed. The application does not have the permission required to call the API. | 371e41f4b71Sopenharmony_ci| 202 | Permission verification failed. A non-system application calls a system API. | 372e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. | 373e41f4b71Sopenharmony_ci 374e41f4b71Sopenharmony_ci**示例:** 375e41f4b71Sopenharmony_ci 376e41f4b71Sopenharmony_ci```ts 377e41f4b71Sopenharmony_ciimport { config } from '@kit.AccessibilityKit'; 378e41f4b71Sopenharmony_ci 379e41f4b71Sopenharmony_ciconfig.off('installedAccessibilityListChange', () => { 380e41f4b71Sopenharmony_ci console.info('Unsubscribe installed accessibility extension list change state success'); 381e41f4b71Sopenharmony_ci}); 382e41f4b71Sopenharmony_ci``` 383e41f4b71Sopenharmony_ci 384e41f4b71Sopenharmony_ci## Config 385e41f4b71Sopenharmony_ci 386e41f4b71Sopenharmony_ci用于属性的设置、获取与监听。 387e41f4b71Sopenharmony_ci 388e41f4b71Sopenharmony_ci### set 389e41f4b71Sopenharmony_ci 390e41f4b71Sopenharmony_ciset(value: T): Promise<void>; 391e41f4b71Sopenharmony_ci 392e41f4b71Sopenharmony_ci需要权限:ohos.permission.WRITE_ACCESSIBILITY_CONFIG 393e41f4b71Sopenharmony_ci 394e41f4b71Sopenharmony_ci设置属性,使用Promise异步回调。 395e41f4b71Sopenharmony_ci 396e41f4b71Sopenharmony_ci**系统能力**:SystemCapability.BarrierFree.Accessibility.Core 397e41f4b71Sopenharmony_ci 398e41f4b71Sopenharmony_ci**参数:** 399e41f4b71Sopenharmony_ci 400e41f4b71Sopenharmony_ci| 参数名 | 类型 | 必填 | 说明 | 401e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 402e41f4b71Sopenharmony_ci| value | T | 是 | 设置的属性值。 | 403e41f4b71Sopenharmony_ci 404e41f4b71Sopenharmony_ci**返回值:** 405e41f4b71Sopenharmony_ci 406e41f4b71Sopenharmony_ci| 类型 | 说明 | 407e41f4b71Sopenharmony_ci| -------- | -------- | 408e41f4b71Sopenharmony_ci| Promise<void> | 无返回结果的Promise对象。 | 409e41f4b71Sopenharmony_ci 410e41f4b71Sopenharmony_ci**错误码:** 411e41f4b71Sopenharmony_ci 412e41f4b71Sopenharmony_ci以下错误码的详细介绍请参见[无障碍子系统错误码](errorcode-accessibility.md)。 413e41f4b71Sopenharmony_ci 414e41f4b71Sopenharmony_ci| 错误码ID | 错误信息 | 415e41f4b71Sopenharmony_ci| ------- | -------------------------------- | 416e41f4b71Sopenharmony_ci| 201 | Permission verification failed. The application does not have the permission required to call the API. | 417e41f4b71Sopenharmony_ci| 202 | Permission verification failed. A non-system application calls a system API. | 418e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. | 419e41f4b71Sopenharmony_ci 420e41f4b71Sopenharmony_ci**示例:** 421e41f4b71Sopenharmony_ci 422e41f4b71Sopenharmony_ci```ts 423e41f4b71Sopenharmony_ciimport { config } from '@kit.AccessibilityKit'; 424e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 425e41f4b71Sopenharmony_ci 426e41f4b71Sopenharmony_cilet value: boolean = true; 427e41f4b71Sopenharmony_ci 428e41f4b71Sopenharmony_ciconfig.highContrastText.set(value).then(() => { 429e41f4b71Sopenharmony_ci console.info(`Succeeded in set highContrastText value is ${value}`); 430e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 431e41f4b71Sopenharmony_ci console.error(`failed to set highContrastText, Code is ${err.code}, message is ${err.message}`); 432e41f4b71Sopenharmony_ci}); 433e41f4b71Sopenharmony_ci``` 434e41f4b71Sopenharmony_ci 435e41f4b71Sopenharmony_ci### set 436e41f4b71Sopenharmony_ci 437e41f4b71Sopenharmony_ciset(value: T, callback: AsyncCallback<void>): void; 438e41f4b71Sopenharmony_ci 439e41f4b71Sopenharmony_ci需要权限:ohos.permission.WRITE_ACCESSIBILITY_CONFIG 440e41f4b71Sopenharmony_ci 441e41f4b71Sopenharmony_ci设置属性,使用callback异步回调。 442e41f4b71Sopenharmony_ci 443e41f4b71Sopenharmony_ci**系统能力**:SystemCapability.BarrierFree.Accessibility.Core 444e41f4b71Sopenharmony_ci 445e41f4b71Sopenharmony_ci**参数:** 446e41f4b71Sopenharmony_ci 447e41f4b71Sopenharmony_ci| 参数名 | 类型 | 必填 | 说明 | 448e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 449e41f4b71Sopenharmony_ci| value | T | 是 | 设置的属性值。 | 450e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | 是 | 回调函数。 | 451e41f4b71Sopenharmony_ci 452e41f4b71Sopenharmony_ci**错误码:** 453e41f4b71Sopenharmony_ci 454e41f4b71Sopenharmony_ci以下错误码的详细介绍请参见[无障碍子系统错误码](errorcode-accessibility.md)。 455e41f4b71Sopenharmony_ci 456e41f4b71Sopenharmony_ci| 错误码ID | 错误信息 | 457e41f4b71Sopenharmony_ci| ------- | -------------------------------- | 458e41f4b71Sopenharmony_ci| 201 | Permission verification failed. The application does not have the permission required to call the API. | 459e41f4b71Sopenharmony_ci| 202 | Permission verification failed. A non-system application calls a system API. | 460e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. | 461e41f4b71Sopenharmony_ci 462e41f4b71Sopenharmony_ci**示例:** 463e41f4b71Sopenharmony_ci 464e41f4b71Sopenharmony_ci```ts 465e41f4b71Sopenharmony_ciimport { config } from '@kit.AccessibilityKit'; 466e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 467e41f4b71Sopenharmony_ci 468e41f4b71Sopenharmony_cilet value: boolean = true; 469e41f4b71Sopenharmony_ci 470e41f4b71Sopenharmony_ciconfig.highContrastText.set(value, (err: BusinessError) => { 471e41f4b71Sopenharmony_ci if (err) { 472e41f4b71Sopenharmony_ci console.error(`failed to set highContrastText, Code is ${err.code}, message is ${err.message}`); 473e41f4b71Sopenharmony_ci return; 474e41f4b71Sopenharmony_ci } 475e41f4b71Sopenharmony_ci console.info(`Succeeded in set highContrastText, value is ${value}`); 476e41f4b71Sopenharmony_ci}); 477e41f4b71Sopenharmony_ci``` 478e41f4b71Sopenharmony_ci 479e41f4b71Sopenharmony_ci### get 480e41f4b71Sopenharmony_ci 481e41f4b71Sopenharmony_ciget(): Promise<T>; 482e41f4b71Sopenharmony_ci 483e41f4b71Sopenharmony_ci获取属性,使用Promise异步回调。 484e41f4b71Sopenharmony_ci 485e41f4b71Sopenharmony_ci**系统能力**:SystemCapability.BarrierFree.Accessibility.Core 486e41f4b71Sopenharmony_ci 487e41f4b71Sopenharmony_ci**返回值:** 488e41f4b71Sopenharmony_ci 489e41f4b71Sopenharmony_ci| 类型 | 说明 | 490e41f4b71Sopenharmony_ci| -------- | -------- | 491e41f4b71Sopenharmony_ci| Promise<T> | Promise对象,返回对应属性值。 | 492e41f4b71Sopenharmony_ci 493e41f4b71Sopenharmony_ci**错误码:** 494e41f4b71Sopenharmony_ci 495e41f4b71Sopenharmony_ci以下错误码的详细介绍请参见[无障碍子系统错误码](errorcode-accessibility.md)。 496e41f4b71Sopenharmony_ci 497e41f4b71Sopenharmony_ci| 错误码ID | 错误信息 | 498e41f4b71Sopenharmony_ci| ------- | -------------------------------- | 499e41f4b71Sopenharmony_ci| 201 | Permission verification failed. The application does not have the permission required to call the API. | 500e41f4b71Sopenharmony_ci| 202 | Permission verification failed. A non-system application calls a system API. | 501e41f4b71Sopenharmony_ci 502e41f4b71Sopenharmony_ci**示例:** 503e41f4b71Sopenharmony_ci 504e41f4b71Sopenharmony_ci```ts 505e41f4b71Sopenharmony_ciimport { config } from '@kit.AccessibilityKit'; 506e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 507e41f4b71Sopenharmony_ci 508e41f4b71Sopenharmony_ciconfig.highContrastText.get().then((data: boolean) => { 509e41f4b71Sopenharmony_ci console.info(`Succeeded in get highContrastText, data is ${data}`); 510e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 511e41f4b71Sopenharmony_ci console.error(`failed to get highContrastText, Code is ${err.code}, message is ${err.message}`); 512e41f4b71Sopenharmony_ci}); 513e41f4b71Sopenharmony_ci``` 514e41f4b71Sopenharmony_ci 515e41f4b71Sopenharmony_ci### get 516e41f4b71Sopenharmony_ci 517e41f4b71Sopenharmony_ciget(callback: AsyncCallback<T>): void; 518e41f4b71Sopenharmony_ci 519e41f4b71Sopenharmony_ci获取属性,使用callback异步回调。 520e41f4b71Sopenharmony_ci 521e41f4b71Sopenharmony_ci**系统能力**:SystemCapability.BarrierFree.Accessibility.Core 522e41f4b71Sopenharmony_ci 523e41f4b71Sopenharmony_ci**参数:** 524e41f4b71Sopenharmony_ci 525e41f4b71Sopenharmony_ci| 参数名 | 类型 | 必填 | 说明 | 526e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 527e41f4b71Sopenharmony_ci| callback | AsyncCallback<T> | 是 | 回调函数,返回属性值。 | 528e41f4b71Sopenharmony_ci 529e41f4b71Sopenharmony_ci**错误码:** 530e41f4b71Sopenharmony_ci 531e41f4b71Sopenharmony_ci以下错误码的详细介绍请参见[无障碍子系统错误码](errorcode-accessibility.md)。 532e41f4b71Sopenharmony_ci 533e41f4b71Sopenharmony_ci| 错误码ID | 错误信息 | 534e41f4b71Sopenharmony_ci| ------- | -------------------------------- | 535e41f4b71Sopenharmony_ci| 202 | Permission verification failed. A non-system application calls a system API. | 536e41f4b71Sopenharmony_ci 537e41f4b71Sopenharmony_ci**示例:** 538e41f4b71Sopenharmony_ci 539e41f4b71Sopenharmony_ci```ts 540e41f4b71Sopenharmony_ciimport { config } from '@kit.AccessibilityKit'; 541e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 542e41f4b71Sopenharmony_ci 543e41f4b71Sopenharmony_ciconfig.highContrastText.get((err: BusinessError, data: boolean) => { 544e41f4b71Sopenharmony_ci if (err) { 545e41f4b71Sopenharmony_ci console.error(`failed to get highContrastText, Code is ${err.code}, message is ${err.message}`); 546e41f4b71Sopenharmony_ci return; 547e41f4b71Sopenharmony_ci } 548e41f4b71Sopenharmony_ci console.info(`Succeeded in get highContrastText, data is ${data}`); 549e41f4b71Sopenharmony_ci}); 550e41f4b71Sopenharmony_ci``` 551e41f4b71Sopenharmony_ci 552e41f4b71Sopenharmony_ci### on 553e41f4b71Sopenharmony_ci 554e41f4b71Sopenharmony_cion(callback: Callback<T>): void; 555e41f4b71Sopenharmony_ci 556e41f4b71Sopenharmony_ci需要权限:ohos.permission.READ_ACCESSIBILITY_CONFIG 557e41f4b71Sopenharmony_ci 558e41f4b71Sopenharmony_ci添加属性变化监听,使用callback异步回调。 559e41f4b71Sopenharmony_ci 560e41f4b71Sopenharmony_ci**系统能力**:SystemCapability.BarrierFree.Accessibility.Core 561e41f4b71Sopenharmony_ci 562e41f4b71Sopenharmony_ci**参数:** 563e41f4b71Sopenharmony_ci 564e41f4b71Sopenharmony_ci| 参数名 | 类型 | 必填 | 说明 | 565e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 566e41f4b71Sopenharmony_ci| callback | Callback<T> | 是 | 回调函数,在属性变化时通过此函数进行通知。 | 567e41f4b71Sopenharmony_ci 568e41f4b71Sopenharmony_ci**错误码:** 569e41f4b71Sopenharmony_ci 570e41f4b71Sopenharmony_ci以下错误码的详细介绍请参见[无障碍子系统错误码](errorcode-accessibility.md)。 571e41f4b71Sopenharmony_ci 572e41f4b71Sopenharmony_ci| 错误码ID | 错误信息 | 573e41f4b71Sopenharmony_ci| ------- | -------------------------------- | 574e41f4b71Sopenharmony_ci| 201 | Permission verification failed. The application does not have the permission required to call the API. | 575e41f4b71Sopenharmony_ci| 202 | Permission verification failed. A non-system application calls a system API. | 576e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. | 577e41f4b71Sopenharmony_ci 578e41f4b71Sopenharmony_ci**示例:** 579e41f4b71Sopenharmony_ci 580e41f4b71Sopenharmony_ci```ts 581e41f4b71Sopenharmony_ciimport { config } from '@kit.AccessibilityKit'; 582e41f4b71Sopenharmony_ci 583e41f4b71Sopenharmony_ciconfig.highContrastText.on((data: boolean) => { 584e41f4b71Sopenharmony_ci console.info(`subscribe highContrastText success, result: ${JSON.stringify(data)}`); 585e41f4b71Sopenharmony_ci}); 586e41f4b71Sopenharmony_ci``` 587e41f4b71Sopenharmony_ci 588e41f4b71Sopenharmony_ci### off 589e41f4b71Sopenharmony_ci 590e41f4b71Sopenharmony_cioff(callback?: Callback<T>): void; 591e41f4b71Sopenharmony_ci 592e41f4b71Sopenharmony_ci需要权限:ohos.permission.READ_ACCESSIBILITY_CONFIG 593e41f4b71Sopenharmony_ci 594e41f4b71Sopenharmony_ci取消属性变化监听,使用callback异步回调。 595e41f4b71Sopenharmony_ci 596e41f4b71Sopenharmony_ci**系统能力**:SystemCapability.BarrierFree.Accessibility.Core 597e41f4b71Sopenharmony_ci 598e41f4b71Sopenharmony_ci**参数:** 599e41f4b71Sopenharmony_ci 600e41f4b71Sopenharmony_ci| 参数名 | 类型 | 必填 | 说明 | 601e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 602e41f4b71Sopenharmony_ci| callback | Callback<T> | 否 | 取消指定callback对象的事件响应。需与on()的callback一致。缺省时,表示注销所有已注册事件。 | 603e41f4b71Sopenharmony_ci 604e41f4b71Sopenharmony_ci**错误码:** 605e41f4b71Sopenharmony_ci 606e41f4b71Sopenharmony_ci以下错误码的详细介绍请参见[无障碍子系统错误码](errorcode-accessibility.md)。 607e41f4b71Sopenharmony_ci 608e41f4b71Sopenharmony_ci| 错误码ID | 错误信息 | 609e41f4b71Sopenharmony_ci| ------- | -------------------------------- | 610e41f4b71Sopenharmony_ci| 201 | Permission verification failed. The application does not have the permission required to call the API. | 611e41f4b71Sopenharmony_ci| 202 | Permission verification failed. A non-system application calls a system API. | 612e41f4b71Sopenharmony_ci 613e41f4b71Sopenharmony_ci**示例:** 614e41f4b71Sopenharmony_ci 615e41f4b71Sopenharmony_ci```ts 616e41f4b71Sopenharmony_ciimport { config } from '@kit.AccessibilityKit'; 617e41f4b71Sopenharmony_ci 618e41f4b71Sopenharmony_ciconfig.highContrastText.off((data: boolean) => { 619e41f4b71Sopenharmony_ci console.info(`Unsubscribe highContrastText success, result: ${JSON.stringify(data)}`); 620e41f4b71Sopenharmony_ci}); 621e41f4b71Sopenharmony_ci``` 622e41f4b71Sopenharmony_ci 623e41f4b71Sopenharmony_ci## DaltonizationColorFilter 624e41f4b71Sopenharmony_ci 625e41f4b71Sopenharmony_ci用于不同弱视类型的校正颜色滤镜。 626e41f4b71Sopenharmony_ci颜色滤镜功能开启时([daltonizationState](#属性)设置为true),颜色滤镜的配置(即设置的DaltonizationColorFilter的值)生效;颜色滤镜功能关闭时([daltonizationState](#属性)设置为false),显示为正常类型<sup>11+</sup>。 627e41f4b71Sopenharmony_ci 628e41f4b71Sopenharmony_ci**系统能力**:以下各项对应的系统能力均为 SystemCapability.BarrierFree.Accessibility.Core 629e41f4b71Sopenharmony_ci 630e41f4b71Sopenharmony_ci| 名称 | 说明 | 631e41f4b71Sopenharmony_ci| -------- | -------- | 632e41f4b71Sopenharmony_ci| Normal | 表示正常类型。 | 633e41f4b71Sopenharmony_ci| Protanomaly | 表示红色弱视类型。 | 634e41f4b71Sopenharmony_ci| Deuteranomaly | 表示绿色弱视类型。 | 635e41f4b71Sopenharmony_ci| Tritanomaly | 表示蓝色弱视类型。 | 636e41f4b71Sopenharmony_ci 637e41f4b71Sopenharmony_ci## ClickResponseTime<sup>11+</sup> 638e41f4b71Sopenharmony_ci 639e41f4b71Sopenharmony_ci用于不同时间长短的点击重复时间。 640e41f4b71Sopenharmony_ci 641e41f4b71Sopenharmony_ci**系统能力**:以下各项对应的系统能力均为 SystemCapability.BarrierFree.Accessibility.Core 642e41f4b71Sopenharmony_ci 643e41f4b71Sopenharmony_ci| 名称 | 说明 | 644e41f4b71Sopenharmony_ci|-------------|------------| 645e41f4b71Sopenharmony_ci| Short | 表示短 (默认)。 | 646e41f4b71Sopenharmony_ci| Medium | 表示中。 | 647e41f4b71Sopenharmony_ci| Long | 表示长。 | 648e41f4b71Sopenharmony_ci 649e41f4b71Sopenharmony_ci## RepeatClickInterval<sup>11+</sup> 650e41f4b71Sopenharmony_ci 651e41f4b71Sopenharmony_ci用于不同时间间隔的忽略重复点击。 652e41f4b71Sopenharmony_ci忽略重复点击功能开启时([ignoreRepeatClick](#属性)设置为true),忽略重复点击的配置(即设置的RepeatClickInterval的值)生效;忽略重复点击功能关闭时([ignoreRepeatClick](#属性)设置为false),显示为正常类型。 653e41f4b71Sopenharmony_ci 654e41f4b71Sopenharmony_ci**系统能力**:以下各项对应的系统能力均为 SystemCapability.BarrierFree.Accessibility.Core 655e41f4b71Sopenharmony_ci 656e41f4b71Sopenharmony_ci| 名称 | 说明 | 657e41f4b71Sopenharmony_ci|----------|-------| 658e41f4b71Sopenharmony_ci| Shortest | 表示最短。 | 659e41f4b71Sopenharmony_ci| Short | 表示短。 | 660e41f4b71Sopenharmony_ci| Medium | 表示中。 | 661e41f4b71Sopenharmony_ci| Long | 表示长。 | 662e41f4b71Sopenharmony_ci| Longest | 表示最长。 | 663e41f4b71Sopenharmony_ci 664