1 /* 2 * Copyright (c) 2024 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 GLOBAL_VARIABLES_H 17 #define GLOBAL_VARIABLES_H 18 19 // MockJsAppImpl 20 extern bool g_getOrientation; 21 extern bool g_getColorMode; 22 extern bool g_memoryRefresh; 23 extern bool g_getJSONTree; 24 extern bool g_getDefaultJSONTree; 25 extern bool g_loadDocument; 26 extern bool g_reloadRuntimePage; 27 extern bool g_restart; 28 extern bool g_dispatchBackPressedEvent; 29 extern bool g_dispatchPointerEvent; 30 extern bool g_dispatchAxisEvent; 31 extern bool g_dispatchInputMethodEvent; 32 extern bool g_dispatchKeyEvent; 33 34 // MockKeyInputImpl 35 extern bool g_dispatchOsInputMethodEvent; 36 extern bool g_dispatchOsKeyEvent; 37 38 // MockMouseInputImpl 39 extern bool g_dispatchOsTouchEvent; 40 extern bool g_dispatchOsBackEvent; 41 42 // MockVirtualMessageImpl 43 extern bool g_sendVirtualMessage; 44 45 // MockLocalSocket 46 extern bool g_input; 47 extern bool g_output; 48 extern bool g_disconnectFromServer; 49 50 // MockWebSocketServer 51 extern bool g_run; 52 extern bool g_writeData; 53 54 // MockVirtualScreen 55 extern bool g_getCurrentWidth; 56 extern bool g_getCurrentHeight; 57 extern bool g_getCurrentRouter; 58 extern bool g_getAbilityCurrentRouter; 59 extern bool g_getFastPreviewMsg; 60 extern bool g_getFoldStatus; 61 62 // MockAceAbility 63 extern bool g_setMockModuleList; 64 extern bool g_initEnv; 65 extern bool g_onBackPressed; 66 extern bool g_onInputEvent; 67 extern bool g_onInputMethodEvent; 68 extern bool g_onConfigurationChanged; 69 extern bool g_surfaceChanged; 70 extern bool g_replacePage; 71 extern bool g_loadAceDocument; 72 extern bool g_getAceJSONTree; 73 extern bool g_operateComponent; 74 extern bool g_setWindow; 75 76 // MockWindowDisplay 77 extern bool g_execStatusChangedCallback; 78 79 // MockGlfwRenderContext 80 extern bool g_glfwInit; 81 extern bool g_createGlfwWindow; 82 extern bool g_destroyWindow; 83 extern bool g_terminate; 84 extern bool g_pollEvents; 85 86 // MockWindow 87 extern bool g_setContentInfoCallback; 88 extern bool g_createSurfaceNode; 89 extern bool g_getSystemBarPropertyByType; 90 extern bool g_updateAvoidArea; 91 92 // MockSimulator 93 extern bool g_terminateAbility; 94 extern bool g_updateConfiguration; 95 extern bool g_setAbilityMockList; 96 extern bool g_setHostResolveBufferTracker; 97 98 99 #endif // GLOBAL_VARIABLES_H