• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 11
46 */
47export interface Configuration {
48  /**
49   * Indicates the current language of the application.
50   *
51   * @type { ?string }
52   * @syscap SystemCapability.Ability.AbilityBase
53   * @since 9
54   */
55  /**
56   * Indicates the current language of the application.
57   *
58   * @type { ?string }
59   * @syscap SystemCapability.Ability.AbilityBase
60   * @atomicservice
61   * @since 11
62   */
63  /**
64   * Indicates the current language of the application.
65   *
66   * @type { ?string }
67   * @syscap SystemCapability.Ability.AbilityBase
68   * @crossplatform
69   * @atomicservice
70   * @since 18
71   */
72  language?: string;
73
74  /**
75   * Indicates the current colorMode of the application.
76   *
77   * @type { ?ConfigurationConstant.ColorMode }
78   * @syscap SystemCapability.Ability.AbilityBase
79   * @since 9
80   */
81  /**
82   * Indicates the current colorMode of the application.
83   *
84   * @type { ?ConfigurationConstant.ColorMode }
85   * @syscap SystemCapability.Ability.AbilityBase
86   * @crossplatform
87   * @since 10
88   */
89  /**
90   * Indicates the current colorMode of the application.
91   *
92   * @type { ?ConfigurationConstant.ColorMode }
93   * @syscap SystemCapability.Ability.AbilityBase
94   * @crossplatform
95   * @atomicservice
96   * @since 11
97   */
98  colorMode?: ConfigurationConstant.ColorMode;
99
100  /**
101   * Indicates the screen direction of the current device.
102   *
103   * @type { ?ConfigurationConstant.Direction }
104   * @syscap SystemCapability.Ability.AbilityBase
105   * @since 9
106   */
107  /**
108   * Indicates the screen direction of the current device.
109   *
110   * @type { ?ConfigurationConstant.Direction }
111   * @syscap SystemCapability.Ability.AbilityBase
112   * @crossplatform
113   * @since 10
114   */
115  /**
116   * Indicates the screen direction of the current device.
117   *
118   * @type { ?ConfigurationConstant.Direction }
119   * @syscap SystemCapability.Ability.AbilityBase
120   * @crossplatform
121   * @atomicservice
122   * @since 11
123   */
124  direction?: ConfigurationConstant.Direction;
125
126  /**
127   * Indicates the screen density of the current device.
128   *
129   * @type { ?ConfigurationConstant.ScreenDensity }
130   * @syscap SystemCapability.Ability.AbilityBase
131   * @since 9
132   */
133  /**
134   * Indicates the screen density of the current device.
135   *
136   * @type { ?ConfigurationConstant.ScreenDensity }
137   * @syscap SystemCapability.Ability.AbilityBase
138   * @atomicservice
139   * @since 11
140   */
141  /**
142   * Indicates the screen density of the current device.
143   *
144   * @type { ?ConfigurationConstant.ScreenDensity }
145   * @syscap SystemCapability.Ability.AbilityBase
146   * @crossplatform
147   * @atomicservice
148   * @since 18
149   */
150  screenDensity?: ConfigurationConstant.ScreenDensity;
151
152  /**
153   * Indicates the displayId of the current device.
154   *
155   * @type { ?number }
156   * @syscap SystemCapability.Ability.AbilityBase
157   * @since 9
158   */
159  /**
160   * Indicates the displayId of the current device.
161   *
162   * @type { ?number }
163   * @syscap SystemCapability.Ability.AbilityBase
164   * @atomicservice
165   * @since 11
166   */
167  displayId?: number;
168
169  /**
170   * Indicates whether a pointer type device has connected.
171   *
172   * @type { ?boolean }
173   * @syscap SystemCapability.Ability.AbilityBase
174   * @since 9
175   */
176  /**
177   * Indicates whether a pointer type device has connected.
178   *
179   * @type { ?boolean }
180   * @syscap SystemCapability.Ability.AbilityBase
181   * @atomicservice
182   * @since 11
183   */
184  hasPointerDevice?: boolean;
185
186  /**
187   * Indicates the font id.
188   *
189   * @type { ?string }
190   * @syscap SystemCapability.Ability.AbilityBase
191   * @atomicservice
192   * @since 14
193   */
194  fontId?: string;
195
196  /**
197   * Indicates the font size scale.
198   *
199   * @type { ?number }
200   * @syscap SystemCapability.Ability.AbilityBase
201   * @atomicservice
202   * @since 12
203   */
204  /**
205   * Indicates the font size scale.
206   *
207   * @type { ?number }
208   * @syscap SystemCapability.Ability.AbilityBase
209   * @crossplatform
210   * @atomicservice
211   * @since 18
212   */
213  fontSizeScale?: number;
214
215  /**
216   * Indicates the font weight scale.
217   *
218   * @type { ?number }
219   * @syscap SystemCapability.Ability.AbilityBase
220   * @atomicservice
221   * @since 12
222   */
223  fontWeightScale?: number;
224
225  /**
226   * Indicates the mobile country code.
227   *
228   * @type { ?string }
229   * @syscap SystemCapability.Ability.AbilityBase
230   * @atomicservice
231   * @since 12
232   */
233  mcc?: string;
234
235  /**
236   * Indicates the mobile network code.
237   *
238   * @type { ?string }
239   * @syscap SystemCapability.Ability.AbilityBase
240   * @atomicservice
241   * @since 12
242   */
243  mnc?: string;
244}
245