• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022 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
16import ConfigurationConstant from "./@ohos.app.ability.ConfigurationConstant";
17
18/**
19 * configuration item.
20 * @typedef Configuration
21 * @syscap SystemCapability.Ability.AbilityBase
22 * @since 9
23 */
24export interface Configuration {
25    /**
26     * Indicates the current language of the application.
27     * @type { string }
28     * @syscap SystemCapability.Ability.AbilityBase
29     * @since 9
30     */
31    language?: string;
32
33    /**
34     * Indicates the current colorMode of the application.
35     * @type { ConfigurationConstant.ColorMode }
36     * @syscap SystemCapability.Ability.AbilityBase
37     * @since 9
38     */
39    colorMode?: ConfigurationConstant.ColorMode;
40
41    /**
42     * Indicates the screen direction of the current device.
43     * @type { ConfigurationConstant.Direction }
44     * @syscap SystemCapability.Ability.AbilityBase
45     * @since 9
46     */
47    direction?: ConfigurationConstant.Direction;
48
49    /**
50     * Indicates the screen density of the current device.
51     * @type { ConfigurationConstant.ScreenDensity }
52     * @syscap SystemCapability.Ability.AbilityBase
53     * @since 9
54     */
55    screenDensity?: ConfigurationConstant.ScreenDensity;
56
57    /**
58     * Indicates the displayId of the current device.
59     * @type { number }
60     * @syscap SystemCapability.Ability.AbilityBase
61     * @since 9
62     */
63    displayId?: number;
64
65    /**
66     * Indicates whether a pointer type device has connected.
67     * @type { boolean }
68     * @syscap SystemCapability.Ability.AbilityBase
69     * @since 9
70     */
71    hasPointerDevice?: boolean;
72}
73