• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-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 
16 #include <cstdint>
17 
18 #include "base/utils/macros.h"
19 
20 #ifndef FOUNDATION_ACE_FRAMEWORKS_BRIDGE_JS_FRONTEND_ENGINE_COMMON_JS_CONSTANTS_H
21 #define FOUNDATION_ACE_FRAMEWORKS_BRIDGE_JS_FRONTEND_ENGINE_COMMON_JS_CONSTANTS_H
22 
23 namespace OHOS::Ace::Framework {
24 
25 ACE_EXPORT extern const int32_t JS_CALL_FAIL;
26 ACE_EXPORT extern const int32_t JS_CALL_SUCCESS;
27 ACE_EXPORT extern const int32_t MAX_STACK_SIZE;
28 
29 // for pcPreview
30 ACE_EXPORT extern const char PC_PREVIEW[];
31 
32 // for common
33 ACE_EXPORT extern const char COMMON_SUCCESS[];
34 ACE_EXPORT extern const char COMMON_FAIL[];
35 ACE_EXPORT extern const char COMMON_COMPLETE[];
36 ACE_EXPORT extern const char COMMON_CANCEL[];
37 
38 // for page route
39 ACE_EXPORT extern const char ROUTE_PAGE_PUSH[];
40 ACE_EXPORT extern const char ROUTE_PAGE_REPLACE[];
41 ACE_EXPORT extern const char ROUTE_PAGE_BACK[];
42 ACE_EXPORT extern const char ROUTE_PAGE_CLEAR[];
43 ACE_EXPORT extern const char ROUTE_PAGE_GET_LENGTH[];
44 ACE_EXPORT extern const char ROUTE_PAGE_GET_STATE[];
45 ACE_EXPORT extern const char ROUTE_PAGE_GET_PARAMS[];
46 ACE_EXPORT extern const char ROUTE_KEY_URI[];
47 ACE_EXPORT extern const char ROUTE_KEY_PATH[];
48 ACE_EXPORT extern const char ROUTE_KEY_PARAMS[];
49 ACE_EXPORT extern const char ROUTE_KEY_DONT_OVERWRITE[];
50 ACE_EXPORT extern const char ROUTE_ENABLE_ALERT_BEFORE_BACK_PAGE[];
51 ACE_EXPORT extern const char ROUTE_DISABLE_ALERT_BEFORE_BACK_PAGE[];
52 ACE_EXPORT extern const char ROUTE_POSTPONE[];
53 ACE_EXPORT extern const char ROUTE_LAUNCH[];
54 
55 // for prompt
56 ACE_EXPORT extern const char PROMPT_SHOW_TOAST[];
57 ACE_EXPORT extern const char PROMPT_KEY_MESSAGE[];
58 ACE_EXPORT extern const char PROMPT_KEY_DURATION[];
59 ACE_EXPORT extern const char PROMPT_KEY_BOTTOM[];
60 ACE_EXPORT extern const char PROMPT_SHOW_DIALOG[];
61 ACE_EXPORT extern const char PROMPT_KEY_TITLE[];
62 ACE_EXPORT extern const char PROMPT_KEY_BUTTONS[];
63 ACE_EXPORT extern const char PROMPT_DIALOG_AUTO_CANCEL[];
64 ACE_EXPORT extern const char PROMPT_SHOW_ACTION_MENU[];
65 
66 // for callback
67 ACE_EXPORT extern const char APP_DESTROY_FINISH[];
68 ACE_EXPORT extern const char CALLBACK_NATIVE[];
69 ACE_EXPORT extern const char KEY_STEPPER_PENDING_INDEX[];
70 
71 // for configuration
72 ACE_EXPORT extern const char CONFIGURATION_GET_LOCALE[];
73 ACE_EXPORT extern const char CONFIGURATION_SET_LOCALE[];
74 ACE_EXPORT extern const char LOCALE_LANGUAGE[];
75 ACE_EXPORT extern const char LOCALE_COUNTRY_OR_REGION[];
76 ACE_EXPORT extern const char LOCALE_UNICODE_SETTING[];
77 ACE_EXPORT extern const char LOCALE_TEXT_DIR[];
78 ACE_EXPORT extern const char LOCALE_TEXT_DIR_LTR[];
79 ACE_EXPORT extern const char LOCALE_TEXT_DIR_RTL[];
80 
81 // for mediaquery
82 ACE_EXPORT extern const char ADD_LISTENER[];
83 ACE_EXPORT extern const char GET_DEVICE_TYPE[];
84 
85 // for timer
86 ACE_EXPORT extern const char SET_TIMEOUT[];
87 ACE_EXPORT extern const char CLEAR_TIMEOUT[];
88 ACE_EXPORT extern const char CLEAR_INTERVAL[];
89 ACE_EXPORT extern const char SET_INTERVAL[];
90 ACE_EXPORT extern const char CAN_IUSE[];
91 
92 // for app
93 ACE_EXPORT extern const char APP_GET_INFO[];
94 ACE_EXPORT extern const char APP_TERMINATE[];
95 ACE_EXPORT extern const char APP_GET_PACKAGE_INFO[];
96 ACE_EXPORT extern const char APP_PACKAGE_NAME[];
97 ACE_EXPORT extern const char APP_REQUEST_FULL_WINDOW[];
98 ACE_EXPORT extern const char APP_SCREEN_ON_VISIBLE[];
99 ACE_EXPORT extern const char APP_SET_SWIPE_TO_DISMISS[];
100 ACE_EXPORT extern const char APP_REQUEST_FULL_WINDOW_DUATION[];
101 ACE_EXPORT extern const char APP_SCREEN_ON_VISIBLE_FLAG[];
102 ACE_EXPORT extern const char APP_SET_IMAGE_CACHE_COUNT[];
103 ACE_EXPORT extern const char APP_SET_IMAGE_RAWDATA_CACHE_SIZE[];
104 ACE_EXPORT extern const char APP_SET_IMAGE_FILE_CACHE_SIZE[];
105 
106 // for animation
107 ACE_EXPORT extern const char ANIMATION_REQUEST_ANIMATION_FRAME[];
108 ACE_EXPORT extern const char ANIMATION_CANCEL_ANIMATION_FRAME[];
109 
110 // for animator
111 ACE_EXPORT extern const char ANIMATOR_CREATE_ANIMATOR[];
112 
113 // for curves
114 ACE_EXPORT extern const char CURVES_INIT[];
115 ACE_EXPORT extern const char CURVES_CUBIC_BEZIER[];
116 ACE_EXPORT extern const char CURVES_SPRING[];
117 ACE_EXPORT extern const char CURVE_INTERPOLATE[];
118 
119 // for grid
120 ACE_EXPORT extern const char GRID_GET_SYSTEM_LAYOUT_INFO[];
121 
122 // for plugin
123 ACE_EXPORT extern const int32_t PLUGIN_REQUEST_SUCCESS;
124 ACE_EXPORT extern const int32_t PLUGIN_REQUEST_FAIL;
125 ACE_EXPORT extern const int32_t PLUGIN_CALLBACK_DESTROY;
126 
127 // for offscreenCanvas
128 ACE_EXPORT extern const char OFFSCERRN_CANVAS_CREATE[];
129 
130 // for readResource
131 ACE_EXPORT extern const char READ_TEXT[];
132 ACE_EXPORT extern const char READ_ARRAY_BUFFER[];
133 ACE_EXPORT extern const char READ_KEY_URI[];
134 ACE_EXPORT extern const char READ_KEY_POSITION[];
135 ACE_EXPORT extern const char READ_KEY_LENGTH[];
136 
137 // for matrix
138 ACE_EXPORT extern const char MATRIX_INIT[];
139 ACE_EXPORT extern const char MATRIX_IDENTITY[];
140 ACE_EXPORT extern const char MATRIX_COPY[];
141 ACE_EXPORT extern const char MATRIX_COMBINE[];
142 ACE_EXPORT extern const char MATRIX_INVERT[];
143 ACE_EXPORT extern const char MATRIX_TRANSLATE[];
144 ACE_EXPORT extern const char MATRIX_SCALE[];
145 ACE_EXPORT extern const char MATRIX_ROTATE[];
146 ACE_EXPORT extern const char MATRIX_TRANSFORM_POINT[];
147 ACE_EXPORT extern const char MATRIX_4X4[];
148 } // namespace OHOS::Ace::Framework
149 
150 #endif // FOUNDATION_ACE_FRAMEWORKS_BRIDGE_JS_FRONTEND_ENGINE_COMMON_JS_CONSTANTS_H
151