• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 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 #ifndef OHOS_UI_CONFIG_H
17 #define OHOS_UI_CONFIG_H
18 
19 #include <cstdint>
20 #include <securec.h>
21 
22 namespace OHOS {
23 static constexpr int16_t LABEL_TITLE_HEIGHT = 30; // tail label height
24 static constexpr int16_t LABEL_TAIL_HEIGHT = 30;
25 static constexpr int16_t APP_WIDTH_COUNT = 7;       // blank + app + blank + app + blank
26 static constexpr int16_t APP_HEIGHT_COUNT = 4;      // app + label + app + label
27 static constexpr int16_t MAX_VIEWGROUP = 3;         // swipe window count
28 static constexpr int16_t APP_ROW_COUNT = 2;         // a swipe view app count in row
29 static constexpr int16_t APP_COL_COUNT = 3;         // a swipe view app count in col
30 static constexpr int16_t LAUNCHER_FOND_ID = 16;     // other view fond id
31 static constexpr int16_t APP_FOND_ID = 16;          // app name fond id
32 static constexpr int16_t BIGLAUNCHER_FOND_ID = 48;  // time big fond id
33 static constexpr int16_t TOTAL_OPACITY = 0;         // transparent
34 static constexpr int16_t HALF_OPACITY = 50;         // diaphanous
35 static constexpr int16_t UN_OPACITY = 255;          // opaque
36 static constexpr int16_t BUTTON_RADIUS = 20;        // app icon radius
37 static constexpr int16_t LABEL_RADIUS = 0;          // label icon radius
38 static constexpr int16_t TITLE_LABEL_OPACITY = 255; // translucent
39 static constexpr int16_t GROUP_VIEW_RADIUS = 20;    // view radius
40 
41 #ifndef TMP_BUF_SIZE
42 #define TMP_BUF_SIZE 128
43 #endif
44 
45 #define LAUNCHER_BUNDLE_NAME "com.huawei.launcher"
46 #define SCREENSAVER_BUNDLE_NAME "com.huawei.screensaver"
47 #define TABLE_BACKGROUND \
48     "/storage/app/run/com.huawei.launcher/launcher/assets/launcher/resources/base/media/background.png"
49 #define RES_WEATHER "/storage/app/run/com.huawei.launcher/launcher/assets/launcher/resources/base/media/weather.png"
50 #define FOND_PATH "SourceHanSansSC-Regular.otf"
51 
52 #ifndef LAUNCHER_SUCCESS
53 #define LAUNCHER_SUCCESS 0
54 #endif
55 
56 #ifndef LAUNCHER_PARAMERROR
57 #define LAUNCHER_PARAMERROR (-1)
58 #endif
59 
60 #ifndef WEEK_DAY_MAX
61 #define WEEK_DAY_MAX 7
62 #endif
63 } // namespace OHOS
64 #endif
65