1/* 2 * Copyright (c) 2022-2025 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 16/** 17 * @file 18 * @kit AbilityKit 19 */ 20 21import ConfigurationConstant from './@ohos.app.ability.ConfigurationConstant'; 22 23/** 24 * configuration item. 25 * 26 * @typedef Configuration 27 * @syscap SystemCapability.Ability.AbilityBase 28 * @since 9 29 */ 30/** 31 * configuration item. 32 * 33 * @typedef Configuration 34 * @syscap SystemCapability.Ability.AbilityBase 35 * @crossplatform 36 * @since 10 37 */ 38/** 39 * configuration item. 40 * 41 * @typedef Configuration 42 * @syscap SystemCapability.Ability.AbilityBase 43 * @crossplatform 44 * @atomicservice 45 * @since arkts {'1.1':'11', '1.2':'20'} 46 * @arkts 1.1&1.2 47 */ 48export interface Configuration { 49 /** 50 * Indicates the current language of the application. 51 * 52 * @type { ?string } 53 * @syscap SystemCapability.Ability.AbilityBase 54 * @since 9 55 */ 56 /** 57 * Indicates the current language of the application. 58 * 59 * @type { ?string } 60 * @syscap SystemCapability.Ability.AbilityBase 61 * @atomicservice 62 * @since 11 63 */ 64 /** 65 * Indicates the current language of the application. 66 * 67 * @type { ?string } 68 * @syscap SystemCapability.Ability.AbilityBase 69 * @crossplatform 70 * @atomicservice 71 * @since arkts {'1.1':'18', '1.2':'20'} 72 * @arkts 1.1&1.2 73 */ 74 language?: string; 75 76 /** 77 * Indicates the current colorMode of the application. 78 * 79 * @type { ?ConfigurationConstant.ColorMode } 80 * @syscap SystemCapability.Ability.AbilityBase 81 * @since 9 82 */ 83 /** 84 * Indicates the current colorMode of the application. 85 * 86 * @type { ?ConfigurationConstant.ColorMode } 87 * @syscap SystemCapability.Ability.AbilityBase 88 * @crossplatform 89 * @since 10 90 */ 91 /** 92 * Indicates the current colorMode of the application. 93 * 94 * @type { ?ConfigurationConstant.ColorMode } 95 * @syscap SystemCapability.Ability.AbilityBase 96 * @crossplatform 97 * @atomicservice 98 * @since arkts {'1.1':'11', '1.2':'20'} 99 * @arkts 1.1&1.2 100 */ 101 colorMode?: ConfigurationConstant.ColorMode; 102 103 /** 104 * Indicates the screen direction of the current device. 105 * 106 * @type { ?ConfigurationConstant.Direction } 107 * @syscap SystemCapability.Ability.AbilityBase 108 * @since 9 109 */ 110 /** 111 * Indicates the screen direction of the current device. 112 * 113 * @type { ?ConfigurationConstant.Direction } 114 * @syscap SystemCapability.Ability.AbilityBase 115 * @crossplatform 116 * @since 10 117 */ 118 /** 119 * Indicates the screen direction of the current device. 120 * 121 * @type { ?ConfigurationConstant.Direction } 122 * @syscap SystemCapability.Ability.AbilityBase 123 * @crossplatform 124 * @atomicservice 125 * @since arkts {'1.1':'11', '1.2':'20'} 126 * @arkts 1.1&1.2 127 */ 128 direction?: ConfigurationConstant.Direction; 129 130 /** 131 * Indicates the screen density of the current device. 132 * 133 * @type { ?ConfigurationConstant.ScreenDensity } 134 * @syscap SystemCapability.Ability.AbilityBase 135 * @since 9 136 */ 137 /** 138 * Indicates the screen density of the current device. 139 * 140 * @type { ?ConfigurationConstant.ScreenDensity } 141 * @syscap SystemCapability.Ability.AbilityBase 142 * @atomicservice 143 * @since 11 144 */ 145 /** 146 * Indicates the screen density of the current device. 147 * 148 * @type { ?ConfigurationConstant.ScreenDensity } 149 * @syscap SystemCapability.Ability.AbilityBase 150 * @crossplatform 151 * @atomicservice 152 * @since arkts {'1.1':'18', '1.2':'20'} 153 * @arkts 1.1&1.2 154 */ 155 screenDensity?: ConfigurationConstant.ScreenDensity; 156 157 /** 158 * Indicates the displayId of the current device. 159 * 160 * @type { ?number } 161 * @syscap SystemCapability.Ability.AbilityBase 162 * @since 9 163 */ 164 /** 165 * Indicates the displayId of the current device. 166 * 167 * @type { ?number } 168 * @syscap SystemCapability.Ability.AbilityBase 169 * @atomicservice 170 * @since arkts {'1.1':'11', '1.2':'20'} 171 * @arkts 1.1&1.2 172 */ 173 displayId?: number; 174 175 /** 176 * Indicates whether a pointer type device has connected. 177 * 178 * @type { ?boolean } 179 * @syscap SystemCapability.Ability.AbilityBase 180 * @since 9 181 */ 182 /** 183 * Indicates whether a pointer type device has connected. 184 * 185 * @type { ?boolean } 186 * @syscap SystemCapability.Ability.AbilityBase 187 * @atomicservice 188 * @since arkts {'1.1':'11', '1.2':'20'} 189 * @arkts 1.1&1.2 190 */ 191 hasPointerDevice?: boolean; 192 193 /** 194 * Indicates the font id. 195 * 196 * @type { ?string } 197 * @syscap SystemCapability.Ability.AbilityBase 198 * @atomicservice 199 * @since 14 200 */ 201 fontId?: string; 202 203 /** 204 * Indicates the font size scale. 205 * 206 * @type { ?number } 207 * @syscap SystemCapability.Ability.AbilityBase 208 * @atomicservice 209 * @since 12 210 */ 211 /** 212 * Indicates the font size scale. 213 * 214 * @type { ?number } 215 * @syscap SystemCapability.Ability.AbilityBase 216 * @crossplatform 217 * @atomicservice 218 * @since arkts {'1.1':'18', '1.2':'20'} 219 * @arkts 1.1&1.2 220 */ 221 fontSizeScale?: number; 222 223 /** 224 * Indicates the font weight scale. 225 * 226 * @type { ?number } 227 * @syscap SystemCapability.Ability.AbilityBase 228 * @atomicservice 229 * @since arkts {'1.1':'12', '1.2':'20'} 230 * @arkts 1.1&1.2 231 */ 232 fontWeightScale?: number; 233 234 /** 235 * Indicates the mobile country code. 236 * 237 * @type { ?string } 238 * @syscap SystemCapability.Ability.AbilityBase 239 * @atomicservice 240 * @since arkts {'1.1':'12', '1.2':'20'} 241 * @arkts 1.1&1.2 242 */ 243 mcc?: string; 244 245 /** 246 * Indicates the mobile network code. 247 * 248 * @type { ?string } 249 * @syscap SystemCapability.Ability.AbilityBase 250 * @atomicservice 251 * @since arkts {'1.1':'12', '1.2':'20'} 252 * @arkts 1.1&1.2 253 */ 254 mnc?: string; 255 256 /** 257 * Current locale. 258 * 259 * @type { ?Intl.Locale } 260 * @syscap SystemCapability.Ability.AbilityBase 261 * @atomicservice 262 * @since 20 263 */ 264 locale?: Intl.Locale; 265} 266