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