1 /* 2 * Copyright (c) 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 #ifndef FRAMEWORKS_BRIDGE_DECLARATIVE_FRONTEND_ENGINE_JSI_NATIVEMODULE_ARKTS_NATIVE_COMMON_BRIDGE_H 17 #define FRAMEWORKS_BRIDGE_DECLARATIVE_FRONTEND_ENGINE_JSI_NATIVEMODULE_ARKTS_NATIVE_COMMON_BRIDGE_H 18 19 #include "bridge/declarative_frontend/engine/jsi/nativeModule/arkts_native_api_bridge.h" 20 #include "core/components_ng/pattern/gesture/gesture_model.h" 21 #include "core/event/focus_axis_event.h" 22 23 namespace OHOS::Ace::NG { 24 class CommonBridge { 25 public: 26 static ArkUINativeModuleValue SetBackgroundColor(ArkUIRuntimeCallInfo* runtimeCallInfo); 27 static ArkUINativeModuleValue ResetBackgroundColor(ArkUIRuntimeCallInfo* runtimeCallInfo); 28 static ArkUINativeModuleValue SetWidth(ArkUIRuntimeCallInfo* runtimeCallInfo); 29 static ArkUINativeModuleValue ResetWidth(ArkUIRuntimeCallInfo* runtimeCallInfo); 30 static ArkUINativeModuleValue SetHeight(ArkUIRuntimeCallInfo* runtimeCallInfo); 31 static ArkUINativeModuleValue ResetHeight(ArkUIRuntimeCallInfo* runtimeCallInfo); 32 static ArkUINativeModuleValue SetBorderWidth(ArkUIRuntimeCallInfo* runtimeCallInfo); 33 static ArkUINativeModuleValue ResetBorderWidth(ArkUIRuntimeCallInfo* runtimeCallInfo); 34 static ArkUINativeModuleValue SetBorderRadius(ArkUIRuntimeCallInfo* runtimeCallInfo); 35 static ArkUINativeModuleValue ResetBorderRadius(ArkUIRuntimeCallInfo* runtimeCallInfo); 36 static ArkUINativeModuleValue SetPosition(ArkUIRuntimeCallInfo* runtimeCallInfo); 37 static ArkUINativeModuleValue ResetPosition(ArkUIRuntimeCallInfo* runtimeCallInfo); 38 static ArkUINativeModuleValue SetTransform(ArkUIRuntimeCallInfo* runtimeCallInfo); 39 static ArkUINativeModuleValue ResetTransform(ArkUIRuntimeCallInfo* runtimeCallInfo); 40 static ArkUINativeModuleValue SetBorderColor(ArkUIRuntimeCallInfo* runtimeCallInfo); 41 static ArkUINativeModuleValue ResetBorderColor(ArkUIRuntimeCallInfo* runtimeCallInfo); 42 static ArkUINativeModuleValue SetOutlineColor(ArkUIRuntimeCallInfo* runtimeCallInfo); 43 static ArkUINativeModuleValue ResetOutlineColor(ArkUIRuntimeCallInfo* runtimeCallInfo); 44 static ArkUINativeModuleValue SetOutlineRadius(ArkUIRuntimeCallInfo* runtimeCallInfo); 45 static ArkUINativeModuleValue ResetOutlineRadius(ArkUIRuntimeCallInfo* runtimeCallInfo); 46 static ArkUINativeModuleValue SetOutlineWidth(ArkUIRuntimeCallInfo* runtimeCallInfo); 47 static ArkUINativeModuleValue ResetOutlineWidth(ArkUIRuntimeCallInfo* runtimeCallInfo); 48 static ArkUINativeModuleValue SetOutlineStyle(ArkUIRuntimeCallInfo* runtimeCallInfo); 49 static ArkUINativeModuleValue ResetOutlineStyle(ArkUIRuntimeCallInfo* runtimeCallInfo); 50 static ArkUINativeModuleValue SetOutline(ArkUIRuntimeCallInfo* runtimeCallInfo); 51 static ArkUINativeModuleValue ResetOutline(ArkUIRuntimeCallInfo* runtimeCallInfo); 52 static ArkUINativeModuleValue SetBorderStyle(ArkUIRuntimeCallInfo* runtimeCallInfo); 53 static ArkUINativeModuleValue ResetBorderStyle(ArkUIRuntimeCallInfo* runtimeCallInfo); 54 static ArkUINativeModuleValue SetShadow(ArkUIRuntimeCallInfo* runtimeCallInfo); 55 static ArkUINativeModuleValue ResetShadow(ArkUIRuntimeCallInfo* runtimeCallInfo); 56 static ArkUINativeModuleValue SetHitTestBehavior(ArkUIRuntimeCallInfo* runtimeCallInfo); 57 static ArkUINativeModuleValue ResetHitTestBehavior(ArkUIRuntimeCallInfo* runtimeCallInfo); 58 static ArkUINativeModuleValue SetZIndex(ArkUIRuntimeCallInfo* runtimeCallInfo); 59 static ArkUINativeModuleValue ResetZIndex(ArkUIRuntimeCallInfo* runtimeCallInfo); 60 static ArkUINativeModuleValue SetOpacity(ArkUIRuntimeCallInfo* runtimeCallInfo); 61 static ArkUINativeModuleValue ResetOpacity(ArkUIRuntimeCallInfo* runtimeCallInfo); 62 static ArkUINativeModuleValue SetAlign(ArkUIRuntimeCallInfo* runtimeCallInfo); 63 static ArkUINativeModuleValue ResetAlign(ArkUIRuntimeCallInfo* runtimeCallInfo); 64 static ArkUINativeModuleValue SetBackdropBlur(ArkUIRuntimeCallInfo* runtimeCallInfo); 65 static ArkUINativeModuleValue ResetBackdropBlur(ArkUIRuntimeCallInfo* runtimeCallInfo); 66 static ArkUINativeModuleValue SetHueRotate(ArkUIRuntimeCallInfo* runtimeCallInfo); 67 static ArkUINativeModuleValue ResetHueRotate(ArkUIRuntimeCallInfo* runtimeCallInfo); 68 static ArkUINativeModuleValue SetInvert(ArkUIRuntimeCallInfo* runtimeCallInfo); 69 static ArkUINativeModuleValue ResetInvert(ArkUIRuntimeCallInfo* runtimeCallInfo); 70 static ArkUINativeModuleValue SetSepia(ArkUIRuntimeCallInfo* runtimeCallInfo); 71 static ArkUINativeModuleValue ResetSepia(ArkUIRuntimeCallInfo* runtimeCallInfo); 72 static ArkUINativeModuleValue SetSaturate(ArkUIRuntimeCallInfo* runtimeCallInfo); 73 static ArkUINativeModuleValue ResetSaturate(ArkUIRuntimeCallInfo* runtimeCallInfo); 74 static ArkUINativeModuleValue SetColorBlend(ArkUIRuntimeCallInfo* runtimeCallInfo); 75 static ArkUINativeModuleValue ResetColorBlend(ArkUIRuntimeCallInfo* runtimeCallInfo); 76 static ArkUINativeModuleValue SetGrayscale(ArkUIRuntimeCallInfo* runtimeCallInfo); 77 static ArkUINativeModuleValue ResetGrayscale(ArkUIRuntimeCallInfo* runtimeCallInfo); 78 static ArkUINativeModuleValue SetContrast(ArkUIRuntimeCallInfo* runtimeCallInfo); 79 static ArkUINativeModuleValue ResetContrast(ArkUIRuntimeCallInfo* runtimeCallInfo); 80 static ArkUINativeModuleValue SetBrightness(ArkUIRuntimeCallInfo* runtimeCallInfo); 81 static ArkUINativeModuleValue ResetBrightness(ArkUIRuntimeCallInfo* runtimeCallInfo); 82 static ArkUINativeModuleValue SetBlur(ArkUIRuntimeCallInfo* runtimeCallInfo); 83 static ArkUINativeModuleValue ResetBlur(ArkUIRuntimeCallInfo* runtimeCallInfo); 84 static ArkUINativeModuleValue SetLinearGradient(ArkUIRuntimeCallInfo* runtimeCallInfo); 85 static ArkUINativeModuleValue ResetLinearGradient(ArkUIRuntimeCallInfo* runtimeCallInfo); 86 static ArkUINativeModuleValue SetSweepGradient(ArkUIRuntimeCallInfo* runtimeCallInfo); 87 static ArkUINativeModuleValue ResetSweepGradient(ArkUIRuntimeCallInfo* runtimeCallInfo); 88 static ArkUINativeModuleValue SetRadialGradient(ArkUIRuntimeCallInfo* runtimeCallInfo); 89 static ArkUINativeModuleValue ResetRadialGradient(ArkUIRuntimeCallInfo* runtimeCallInfo); 90 static ArkUINativeModuleValue SetOverlay(ArkUIRuntimeCallInfo* runtimeCallInfo); 91 static ArkUINativeModuleValue ResetOverlay(ArkUIRuntimeCallInfo* runtimeCallInfo); 92 static ArkUINativeModuleValue SetBorderImage(ArkUIRuntimeCallInfo* runtimeCallInfo); 93 static ArkUINativeModuleValue ResetBorderImage(ArkUIRuntimeCallInfo* runtimeCallInfo); 94 static ArkUINativeModuleValue SetForegroundBlurStyle(ArkUIRuntimeCallInfo* runtimeCallInfo); 95 static ArkUINativeModuleValue ResetForegroundBlurStyle(ArkUIRuntimeCallInfo* runtimeCallInfo); 96 static ArkUINativeModuleValue SetLinearGradientBlur(ArkUIRuntimeCallInfo* runtimeCallInfo); 97 static ArkUINativeModuleValue ResetLinearGradientBlur(ArkUIRuntimeCallInfo* runtimeCallInfo); 98 static ArkUINativeModuleValue SetBackgroundBlurStyle(ArkUIRuntimeCallInfo* runtimeCallInfo); 99 static ArkUINativeModuleValue ResetBackgroundBlurStyle(ArkUIRuntimeCallInfo* runtimeCallInfo); 100 static ArkUINativeModuleValue SetBorder(ArkUIRuntimeCallInfo* runtimeCallInfo); 101 static ArkUINativeModuleValue SetLocalizedBorder(ArkUIRuntimeCallInfo* runtimeCallInfo); 102 static ArkUINativeModuleValue SetBorderWithDashParams(ArkUIRuntimeCallInfo* runtimeCallInfo); 103 static ArkUINativeModuleValue ResetBorder(ArkUIRuntimeCallInfo* runtimeCallInfo); 104 static ArkUINativeModuleValue SetBackgroundImagePosition(ArkUIRuntimeCallInfo* runtimeCallInfo); 105 static ArkUINativeModuleValue ResetBackgroundImagePosition(ArkUIRuntimeCallInfo* runtimeCallInfo); 106 static ArkUINativeModuleValue SetBackgroundImageResizable(ArkUIRuntimeCallInfo* runtimeCallInfo); 107 static ArkUINativeModuleValue ResetBackgroundImageResizable(ArkUIRuntimeCallInfo* runtimeCallInfo); 108 static ArkUINativeModuleValue SetBackgroundImageSize(ArkUIRuntimeCallInfo* runtimeCallInfo); 109 static ArkUINativeModuleValue ResetBackgroundImageSize(ArkUIRuntimeCallInfo* runtimeCallInfo); 110 static ArkUINativeModuleValue SetBackgroundImage(ArkUIRuntimeCallInfo* runtimeCallInfo); 111 static ArkUINativeModuleValue ResetBackgroundImage(ArkUIRuntimeCallInfo* runtimeCallInfo); 112 static ArkUINativeModuleValue SetTranslate(ArkUIRuntimeCallInfo* runtimeCallInfo); 113 static ArkUINativeModuleValue ResetTranslate(ArkUIRuntimeCallInfo* runtimeCallInfo); 114 static ArkUINativeModuleValue SetScale(ArkUIRuntimeCallInfo* runtimeCallInfo); 115 static ArkUINativeModuleValue ResetScale(ArkUIRuntimeCallInfo* runtimeCallInfo); 116 static ArkUINativeModuleValue SetRotate(ArkUIRuntimeCallInfo* runtimeCallInfo); 117 static ArkUINativeModuleValue ResetRotate(ArkUIRuntimeCallInfo* runtimeCallInfo); 118 static ArkUINativeModuleValue SetGeometryTransition(ArkUIRuntimeCallInfo* runtimeCallInfo); 119 static ArkUINativeModuleValue ResetGeometryTransition(ArkUIRuntimeCallInfo* runtimeCallInfo); 120 static ArkUINativeModuleValue ResetClip(ArkUIRuntimeCallInfo* runtimeCallInfo); 121 static ArkUINativeModuleValue SetClip(ArkUIRuntimeCallInfo* runtimeCallInfo); 122 static ArkUINativeModuleValue SetClipShape(ArkUIRuntimeCallInfo* runtimeCallInfo); 123 static ArkUINativeModuleValue ResetClipShape(ArkUIRuntimeCallInfo* runtimeCallInfo); 124 static ArkUINativeModuleValue SetPixelStretchEffect(ArkUIRuntimeCallInfo* runtimeCallInfo); 125 static ArkUINativeModuleValue ResetPixelStretchEffect(ArkUIRuntimeCallInfo* runtimeCallInfo); 126 static ArkUINativeModuleValue SetLightUpEffect(ArkUIRuntimeCallInfo* runtimeCallInfo); 127 static ArkUINativeModuleValue ResetLightUpEffect(ArkUIRuntimeCallInfo* runtimeCallInfo); 128 static ArkUINativeModuleValue SetSphericalEffect(ArkUIRuntimeCallInfo* runtimeCallInfo); 129 static ArkUINativeModuleValue ResetSphericalEffect(ArkUIRuntimeCallInfo* runtimeCallInfo); 130 static ArkUINativeModuleValue SetRenderGroup(ArkUIRuntimeCallInfo* runtimeCallInfo); 131 static ArkUINativeModuleValue ResetRenderGroup(ArkUIRuntimeCallInfo* runtimeCallInfo); 132 static ArkUINativeModuleValue SetRenderFit(ArkUIRuntimeCallInfo* runtimeCallInfo); 133 static ArkUINativeModuleValue ResetRenderFit(ArkUIRuntimeCallInfo* runtimeCallInfo); 134 static ArkUINativeModuleValue SetUseEffect(ArkUIRuntimeCallInfo* runtimeCallInfo); 135 static ArkUINativeModuleValue ResetUseEffect(ArkUIRuntimeCallInfo* runtimeCallInfo); 136 static ArkUINativeModuleValue SetForegroundColor(ArkUIRuntimeCallInfo* runtimeCallInfo); 137 static ArkUINativeModuleValue ResetForegroundColor(ArkUIRuntimeCallInfo* runtimeCallInfo); 138 static ArkUINativeModuleValue SetMotionPath(ArkUIRuntimeCallInfo* runtimeCallInfo); 139 static ArkUINativeModuleValue ResetMotionPath(ArkUIRuntimeCallInfo* runtimeCallInfo); 140 static ArkUINativeModuleValue SetMotionBlur(ArkUIRuntimeCallInfo* runtimeCallInfo); 141 static ArkUINativeModuleValue ResetMotionBlur(ArkUIRuntimeCallInfo* runtimeCallInfo); 142 static ArkUINativeModuleValue SetGroupDefaultFocus(ArkUIRuntimeCallInfo* runtimeCallInfo); 143 static ArkUINativeModuleValue ResetGroupDefaultFocus(ArkUIRuntimeCallInfo* runtimeCallInfo); 144 static ArkUINativeModuleValue SetFocusOnTouch(ArkUIRuntimeCallInfo* runtimeCallInfo); 145 static ArkUINativeModuleValue ResetFocusOnTouch(ArkUIRuntimeCallInfo* runtimeCallInfo); 146 static ArkUINativeModuleValue SetFocusable(ArkUIRuntimeCallInfo* runtimeCallInfo); 147 static ArkUINativeModuleValue ResetFocusable(ArkUIRuntimeCallInfo* runtimeCallInfo); 148 static ArkUINativeModuleValue SetTabStop(ArkUIRuntimeCallInfo* runtimeCallInfo); 149 static ArkUINativeModuleValue ResetTabStop(ArkUIRuntimeCallInfo* runtimeCallInfo); 150 static ArkUINativeModuleValue SetTouchable(ArkUIRuntimeCallInfo* runtimeCallInfo); 151 static ArkUINativeModuleValue ResetTouchable(ArkUIRuntimeCallInfo* runtimeCallInfo); 152 static ArkUINativeModuleValue SetDefaultFocus(ArkUIRuntimeCallInfo* runtimeCallInfo); 153 static ArkUINativeModuleValue ResetDefaultFocus(ArkUIRuntimeCallInfo* runtimeCallInfo); 154 static ArkUINativeModuleValue SetDisplayPriority(ArkUIRuntimeCallInfo* runtimeCallInfo); 155 static ArkUINativeModuleValue ResetDisplayPriority(ArkUIRuntimeCallInfo* runtimeCallInfo); 156 static ArkUINativeModuleValue SetOffset(ArkUIRuntimeCallInfo* runtimeCallInfo); 157 static ArkUINativeModuleValue ResetOffset(ArkUIRuntimeCallInfo* runtimeCallInfo); 158 static ArkUINativeModuleValue SetPadding(ArkUIRuntimeCallInfo* runtimeCallInfo); 159 static ArkUINativeModuleValue ResetPadding(ArkUIRuntimeCallInfo* runtimeCallInfo); 160 static ArkUINativeModuleValue SetMargin(ArkUIRuntimeCallInfo* runtimeCallInfo); 161 static ArkUINativeModuleValue ResetMargin(ArkUIRuntimeCallInfo* runtimeCallInfo); 162 static ArkUINativeModuleValue SetMarkAnchor(ArkUIRuntimeCallInfo* runtimeCallInfo); 163 static ArkUINativeModuleValue ResetMarkAnchor(ArkUIRuntimeCallInfo* runtimeCallInfo); 164 static ArkUINativeModuleValue SetVisibility(ArkUIRuntimeCallInfo* runtimeCallInfo); 165 static ArkUINativeModuleValue ResetVisibility(ArkUIRuntimeCallInfo* runtimeCallInfo); 166 static ArkUINativeModuleValue SetAccessibilityText(ArkUIRuntimeCallInfo* runtimeCallInfo); 167 static ArkUINativeModuleValue ResetAccessibilityText(ArkUIRuntimeCallInfo* runtimeCallInfo); 168 static ArkUINativeModuleValue SetAllowDrop(ArkUIRuntimeCallInfo* runtimeCallInfo); 169 static ArkUINativeModuleValue ResetAllowDrop(ArkUIRuntimeCallInfo* runtimeCallInfo); 170 static ArkUINativeModuleValue SetAccessibilityLevel(ArkUIRuntimeCallInfo* runtimeCallInfo); 171 static ArkUINativeModuleValue ResetAccessibilityLevel(ArkUIRuntimeCallInfo* runtimeCallInfo); 172 static ArkUINativeModuleValue SetConstraintSize(ArkUIRuntimeCallInfo* runtimeCallInfo); 173 static ArkUINativeModuleValue ResetConstraintSize(ArkUIRuntimeCallInfo* runtimeCallInfo); 174 static ArkUINativeModuleValue SetDirection(ArkUIRuntimeCallInfo* runtimeCallInfo); 175 static ArkUINativeModuleValue ResetDirection(ArkUIRuntimeCallInfo* runtimeCallInfo); 176 static ArkUINativeModuleValue SetLayoutWeight(ArkUIRuntimeCallInfo* runtimeCallInfo); 177 static ArkUINativeModuleValue ResetLayoutWeight(ArkUIRuntimeCallInfo* runtimeCallInfo); 178 static ArkUINativeModuleValue SetSize(ArkUIRuntimeCallInfo* runtimeCallInfo); 179 static ArkUINativeModuleValue ResetSize(ArkUIRuntimeCallInfo* runtimeCallInfo); 180 static ArkUINativeModuleValue SetAlignSelf(ArkUIRuntimeCallInfo* runtimeCallInfo); 181 static ArkUINativeModuleValue ResetAlignSelf(ArkUIRuntimeCallInfo* runtimeCallInfo); 182 static ArkUINativeModuleValue SetAspectRatio(ArkUIRuntimeCallInfo* runtimeCallInfo); 183 static ArkUINativeModuleValue ResetAspectRatio(ArkUIRuntimeCallInfo* runtimeCallInfo); 184 static ArkUINativeModuleValue SetFlexGrow(ArkUIRuntimeCallInfo* runtimeCallInfo); 185 static ArkUINativeModuleValue ResetFlexGrow(ArkUIRuntimeCallInfo* runtimeCallInfo); 186 static ArkUINativeModuleValue SetFlexShrink(ArkUIRuntimeCallInfo* runtimeCallInfo); 187 static ArkUINativeModuleValue ResetFlexShrink(ArkUIRuntimeCallInfo* runtimeCallInfo); 188 static ArkUINativeModuleValue SetGridOffset(ArkUIRuntimeCallInfo* runtimeCallInfo); 189 static ArkUINativeModuleValue ResetGridOffset(ArkUIRuntimeCallInfo* runtimeCallInfo); 190 static ArkUINativeModuleValue SetGridSpan(ArkUIRuntimeCallInfo* runtimeCallInfo); 191 static ArkUINativeModuleValue ResetGridSpan(ArkUIRuntimeCallInfo* runtimeCallInfo); 192 static ArkUINativeModuleValue SetExpandSafeArea(ArkUIRuntimeCallInfo* runtimeCallInfo); 193 static ArkUINativeModuleValue ResetExpandSafeArea(ArkUIRuntimeCallInfo* runtimeCallInfo); 194 static ArkUINativeModuleValue SetAlignRules(ArkUIRuntimeCallInfo* runtimeCallInfo); 195 static ArkUINativeModuleValue ResetAlignRules(ArkUIRuntimeCallInfo* runtimeCallInfo); 196 static ArkUINativeModuleValue SetFlexBasis(ArkUIRuntimeCallInfo* runtimeCallInfo); 197 static ArkUINativeModuleValue ResetFlexBasis(ArkUIRuntimeCallInfo* runtimeCallInfo); 198 static ArkUINativeModuleValue SetAccessibilityDescription(ArkUIRuntimeCallInfo* runtimeCallInfo); 199 static ArkUINativeModuleValue ResetAccessibilityDescription(ArkUIRuntimeCallInfo* runtimeCallInfo); 200 static ArkUINativeModuleValue SetId(ArkUIRuntimeCallInfo* runtimeCallInfo); 201 static ArkUINativeModuleValue ResetId(ArkUIRuntimeCallInfo* runtimeCallInfo); 202 static ArkUINativeModuleValue SetKey(ArkUIRuntimeCallInfo* runtimeCallInfo); 203 static ArkUINativeModuleValue ResetKey(ArkUIRuntimeCallInfo* runtimeCallInfo); 204 static ArkUINativeModuleValue SetRestoreId(ArkUIRuntimeCallInfo* runtimeCallInfo); 205 static ArkUINativeModuleValue ResetRestoreId(ArkUIRuntimeCallInfo* runtimeCallInfo); 206 static ArkUINativeModuleValue SetTabIndex(ArkUIRuntimeCallInfo* runtimeCallInfo); 207 static ArkUINativeModuleValue ResetTabIndex(ArkUIRuntimeCallInfo* runtimeCallInfo); 208 static ArkUINativeModuleValue SetObscured(ArkUIRuntimeCallInfo* runtimeCallInfo); 209 static ArkUINativeModuleValue ResetObscured(ArkUIRuntimeCallInfo* runtimeCallInfo); 210 static ArkUINativeModuleValue SetForegroundEffect(ArkUIRuntimeCallInfo* runtimeCallInfo); 211 static ArkUINativeModuleValue ResetForegroundEffect(ArkUIRuntimeCallInfo* runtimeCallInfo); 212 static ArkUINativeModuleValue SetBackgroundEffect(ArkUIRuntimeCallInfo* runtimeCallInfo); 213 static ArkUINativeModuleValue ResetBackgroundEffect(ArkUIRuntimeCallInfo* runtimeCallInfo); 214 static ArkUINativeModuleValue SetBackgroundBrightness(ArkUIRuntimeCallInfo* runtimeCallInfo); 215 static ArkUINativeModuleValue ResetBackgroundBrightness(ArkUIRuntimeCallInfo* runtimeCallInfo); 216 static ArkUINativeModuleValue SetBackgroundBrightnessInternal(ArkUIRuntimeCallInfo* runtimeCallInfo); 217 static ArkUINativeModuleValue ResetBackgroundBrightnessInternal(ArkUIRuntimeCallInfo* runtimeCallInfo); 218 static ArkUINativeModuleValue SetForegroundBrightness(ArkUIRuntimeCallInfo* runtimeCallInfo); 219 static ArkUINativeModuleValue ResetForegroundBrightness(ArkUIRuntimeCallInfo* runtimeCallInfo); 220 static ArkUINativeModuleValue SetDragPreviewOptions(ArkUIRuntimeCallInfo* runtimeCallInfo); 221 static ArkUINativeModuleValue ResetDragPreviewOptions(ArkUIRuntimeCallInfo* runtimeCallInfo); 222 static ArkUINativeModuleValue SetDragPreview(ArkUIRuntimeCallInfo* runtimeCallInfo); 223 static ArkUINativeModuleValue ResetDragPreview(ArkUIRuntimeCallInfo* runtimeCallInfo); 224 static ArkUINativeModuleValue SetResponseRegion(ArkUIRuntimeCallInfo* runtimeCallInfo); 225 static ArkUINativeModuleValue ResetResponseRegion(ArkUIRuntimeCallInfo* runtimeCallInfo); 226 static ArkUINativeModuleValue SetMouseResponseRegion(ArkUIRuntimeCallInfo* runtimeCallInfo); 227 static ArkUINativeModuleValue ResetMouseResponseRegion(ArkUIRuntimeCallInfo* runtimeCallInfo); 228 static ArkUINativeModuleValue SetTransition(ArkUIRuntimeCallInfo* runtimeCallInfo); 229 static ArkUINativeModuleValue ResetTransition(ArkUIRuntimeCallInfo* runtimeCallInfo); 230 static ArkUINativeModuleValue SetTransitionPassThrough(ArkUIRuntimeCallInfo* runtimeCallInfo); 231 static ArkUINativeModuleValue ResetTransitionPassThrough(ArkUIRuntimeCallInfo* runtimeCallInfo); 232 static ArkUINativeModuleValue SetSharedTransition(ArkUIRuntimeCallInfo* runtimeCallInfo); 233 static ArkUINativeModuleValue ResetSharedTransition(ArkUIRuntimeCallInfo* runtimeCallInfo); 234 static ArkUINativeModuleValue SetMask(ArkUIRuntimeCallInfo* runtimeCallInfo); 235 static ArkUINativeModuleValue ResetMask(ArkUIRuntimeCallInfo* runtimeCallInfo); 236 static ArkUINativeModuleValue SetMaskShape(ArkUIRuntimeCallInfo* runtimeCallInfo); 237 static ArkUINativeModuleValue ResetMaskShape(ArkUIRuntimeCallInfo* runtimeCallInfo); 238 static ArkUINativeModuleValue SetEnabled(ArkUIRuntimeCallInfo* runtimeCallInfo); 239 static ArkUINativeModuleValue ResetEnabled(ArkUIRuntimeCallInfo* runtimeCallInfo); 240 static ArkUINativeModuleValue SetUseShadowBatching(ArkUIRuntimeCallInfo* runtimeCallInfo); 241 static ArkUINativeModuleValue ResetUseShadowBatching(ArkUIRuntimeCallInfo* runtimeCallInfo); 242 static ArkUINativeModuleValue SetBlendMode(ArkUIRuntimeCallInfo* runtimeCallInfo); 243 static ArkUINativeModuleValue ResetBlendMode(ArkUIRuntimeCallInfo* runtimeCallInfo); 244 static ArkUINativeModuleValue SetAdvancedBlendMode(ArkUIRuntimeCallInfo* runtimeCallInfo); 245 static ArkUINativeModuleValue ResetAdvancedBlendMode(ArkUIRuntimeCallInfo* runtimeCallInfo); 246 static ArkUINativeModuleValue SetMonopolizeEvents(ArkUIRuntimeCallInfo* runtimeCallInfo); 247 static ArkUINativeModuleValue ResetMonopolizeEvents(ArkUIRuntimeCallInfo* runtimeCallInfo); 248 static ArkUINativeModuleValue SetDraggable(ArkUIRuntimeCallInfo* runtimeCallInfo); 249 static ArkUINativeModuleValue ResetDraggable(ArkUIRuntimeCallInfo* runtimeCallInfo); 250 static ArkUINativeModuleValue SetAccessibilityGroup(ArkUIRuntimeCallInfo* runtimeCallInfo); 251 static ArkUINativeModuleValue ResetAccessibilityGroup(ArkUIRuntimeCallInfo* runtimeCallInfo); 252 static ArkUINativeModuleValue SetHoverEffect(ArkUIRuntimeCallInfo* runtimeCallInfo); 253 static ArkUINativeModuleValue ResetHoverEffect(ArkUIRuntimeCallInfo* runtimeCallInfo); 254 static ArkUINativeModuleValue SetClickEffect(ArkUIRuntimeCallInfo* runtimeCallInfo); 255 static ArkUINativeModuleValue ResetClickEffect(ArkUIRuntimeCallInfo* runtimeCallInfo); 256 static ArkUINativeModuleValue SetKeyBoardShortCut(ArkUIRuntimeCallInfo* runtimeCallInfo); 257 static ArkUINativeModuleValue ResetKeyBoardShortCut(ArkUIRuntimeCallInfo* runtimeCallInfo); 258 static ArkUINativeModuleValue SetPointLightStyle(ArkUIRuntimeCallInfo* runtimeCallInfo); 259 static ArkUINativeModuleValue ResetPointLightStyle(ArkUIRuntimeCallInfo* runtimeCallInfo); 260 static ArkUINativeModuleValue SetClipWithEdge(ArkUIRuntimeCallInfo* runtimeCallInfo); 261 static ArkUINativeModuleValue ResetClipWithEdge(ArkUIRuntimeCallInfo* runtimeCallInfo); 262 static FrameNode* GetFrameNode(ArkUIRuntimeCallInfo* runtimeCallInfo); 263 static Local<panda::ObjectRef> CreateChangeValueInfoObj(EcmaVM* vm, const ChangeValueInfo& changeValueInfo); 264 static Local<panda::ObjectRef> CreateGestureInfo(EcmaVM* vm, const RefPtr<NG::GestureInfo>& gestureInfo); 265 static Local<panda::ObjectRef> CreateGestureEventInfo( 266 EcmaVM* vm, GestureTypeName typeName, const std::shared_ptr<BaseGestureEvent>& info); 267 static Local<panda::ObjectRef> SetUniqueAttributes( 268 EcmaVM* vm, GestureTypeName typeName, const std::shared_ptr<BaseGestureEvent>& info); 269 static Local<panda::ObjectRef> CreateRecognizerObject(EcmaVM* vm, const RefPtr<NG::NGGestureRecognizer>& target); 270 static Local<panda::ObjectRef> CreateFingerInfo(EcmaVM* vm, const FingerInfo& fingerInfo); 271 static Local<panda::ObjectRef> CreateEventTargetObject(EcmaVM* vm, const std::shared_ptr<BaseGestureEvent>& info); 272 static Local<panda::ObjectRef> CreateAreaObject(EcmaVM* vm, const RectF& rect, const OffsetF& origin); 273 static Local<panda::ObjectRef> CreateHoverInfo(EcmaVM* vm, const HoverInfo& hoverInfo); 274 static void GetGestureCommonValue(ArkUIRuntimeCallInfo* runtimeCallInfo, int32_t& priority, int32_t& mask); 275 static void SetGestureTag(ArkUIRuntimeCallInfo* runtimeCallInfo, uint32_t argNumber, ArkUIGesture* gesture); 276 static void SetGestureAllowedTypes( 277 ArkUIRuntimeCallInfo* runtimeCallInfo, uint32_t argNumber, ArkUIGesture* gesture); 278 static void GetTapGestureValue(ArkUIRuntimeCallInfo* runtimeCallInfo, int32_t& fingers, 279 int32_t& count, double& distanceThreshold, bool& limitFingerCount, uint32_t argNumber); 280 static void GetLongPressGestureValue( 281 ArkUIRuntimeCallInfo* runtimeCallInfo, int32_t& fingers, bool& repeat, int32_t& duration, 282 bool& limitFingerCount, uint32_t argNumber); 283 static void GetPanGestureValue(ArkUIRuntimeCallInfo* runtimeCallInfo, int32_t& fingers, int32_t& direction, 284 double& distance, bool& limitFingerCount, uint32_t argNumber); 285 static void GetSwipeGestureValue( 286 ArkUIRuntimeCallInfo* runtimeCallInfo, int32_t& fingers, int32_t& direction, double& speed, 287 bool& limitFingerCount, uint32_t argNumber); 288 static void GetPinchGestureValue( 289 ArkUIRuntimeCallInfo* runtimeCallInfo, int32_t& fingers, double& distance, 290 bool& limitFingerCount, uint32_t argNumber); 291 static void GetRotationGestureValue( 292 ArkUIRuntimeCallInfo* runtimeCallInfo, int32_t& fingers, double& angle, bool& limitFingerCount, 293 uint32_t argNumber); 294 static void GetGestureModeValue(ArkUIRuntimeCallInfo* runtimeCallInfo, int32_t& mode, uint32_t argNumber); 295 static void SetOnGestureEvent(ArkUIRuntimeCallInfo* runtimeCallInfo, const GestureEventAction& action, 296 uint32_t argNumber, ArkUIGesture* gesture); 297 static void ParseLocalizedBorder(ArkUIRuntimeCallInfo* runtimeCallInfo, int& isLocalizedBorderWidth, 298 int& isLocalizedBorderColor, int& isLocalizedBorderRadius); 299 static ArkUIGesture* GetGestureGroup(ArkUIRuntimeCallInfo* runtimeCallInfo, uint32_t argNumber); 300 static Local<panda::ObjectRef> CreateCommonGestureEventInfo(EcmaVM* vm, GestureEvent& info); 301 static Local<panda::ArrayRef> CreateFingerListArray(EcmaVM* vm, GestureEvent& info); 302 static ArkUINativeModuleValue SetOnClick(ArkUIRuntimeCallInfo* runtimeCallInfo); 303 static ArkUINativeModuleValue ResetOnClick(ArkUIRuntimeCallInfo* runtimeCallInfo); 304 static ArkUINativeModuleValue SetOnDragStart(ArkUIRuntimeCallInfo* runtimeCallInfo); 305 static ArkUINativeModuleValue ResetOnDragStart(ArkUIRuntimeCallInfo* runtimeCallInfo); 306 static ArkUINativeModuleValue SetOnDragEnter(ArkUIRuntimeCallInfo* runtimeCallInfo); 307 static ArkUINativeModuleValue ResetOnDragEnter(ArkUIRuntimeCallInfo* runtimeCallInfo); 308 static ArkUINativeModuleValue SetOnDragMove(ArkUIRuntimeCallInfo* runtimeCallInfo); 309 static ArkUINativeModuleValue ResetOnDragMove(ArkUIRuntimeCallInfo* runtimeCallInfo); 310 static ArkUINativeModuleValue SetOnDragLeave(ArkUIRuntimeCallInfo* runtimeCallInfo); 311 static ArkUINativeModuleValue ResetOnDragLeave(ArkUIRuntimeCallInfo* runtimeCallInfo); 312 static ArkUINativeModuleValue SetOnDrop(ArkUIRuntimeCallInfo* runtimeCallInfo); 313 static ArkUINativeModuleValue ResetOnDrop(ArkUIRuntimeCallInfo* runtimeCallInfo); 314 static ArkUINativeModuleValue SetOnDragEnd(ArkUIRuntimeCallInfo* runtimeCallInfo); 315 static ArkUINativeModuleValue ResetOnDragEnd(ArkUIRuntimeCallInfo* runtimeCallInfo); 316 static ArkUINativeModuleValue SetOnTouch(ArkUIRuntimeCallInfo* runtimeCallInfo); 317 static ArkUINativeModuleValue ResetOnTouch(ArkUIRuntimeCallInfo* runtimeCallInfo); 318 static ArkUINativeModuleValue SetOnAppear(ArkUIRuntimeCallInfo* runtimeCallInfo); 319 static ArkUINativeModuleValue ResetOnAppear(ArkUIRuntimeCallInfo* runtimeCallInfo); 320 static ArkUINativeModuleValue SetOnDisappear(ArkUIRuntimeCallInfo* runtimeCallInfo); 321 static ArkUINativeModuleValue ResetOnDisappear(ArkUIRuntimeCallInfo* runtimeCallInfo); 322 static ArkUINativeModuleValue SetOnAttach(ArkUIRuntimeCallInfo* runtimeCallInfo); 323 static ArkUINativeModuleValue ResetOnAttach(ArkUIRuntimeCallInfo* runtimeCallInfo); 324 static ArkUINativeModuleValue SetOnDetach(ArkUIRuntimeCallInfo* runtimeCallInfo); 325 static ArkUINativeModuleValue ResetOnDetach(ArkUIRuntimeCallInfo* runtimeCallInfo); 326 static ArkUINativeModuleValue SetOnKeyEvent(ArkUIRuntimeCallInfo* runtimeCallInfo); 327 static ArkUINativeModuleValue ResetOnKeyEvent(ArkUIRuntimeCallInfo* runtimeCallInfo); 328 static ArkUINativeModuleValue SetOnKeyPreIme(ArkUIRuntimeCallInfo* runtimeCallInfo); 329 static ArkUINativeModuleValue ResetOnKeyPreIme(ArkUIRuntimeCallInfo* runtimeCallInfo); 330 static ArkUINativeModuleValue SetOnFocus(ArkUIRuntimeCallInfo* runtimeCallInfo); 331 static ArkUINativeModuleValue ResetOnFocus(ArkUIRuntimeCallInfo* runtimeCallInfo); 332 static ArkUINativeModuleValue SetOnBlur(ArkUIRuntimeCallInfo* runtimeCallInfo); 333 static ArkUINativeModuleValue ResetOnBlur(ArkUIRuntimeCallInfo* runtimeCallInfo); 334 static ArkUINativeModuleValue SetOnHover(ArkUIRuntimeCallInfo* runtimeCallInfo); 335 static ArkUINativeModuleValue ResetOnHover(ArkUIRuntimeCallInfo* runtimeCallInfo); 336 static ArkUINativeModuleValue SetOnHoverMove(ArkUIRuntimeCallInfo* runtimeCallInfo); 337 static ArkUINativeModuleValue ResetOnHoverMove(ArkUIRuntimeCallInfo* runtimeCallInfo); 338 static ArkUINativeModuleValue SetOnMouse(ArkUIRuntimeCallInfo* runtimeCallInfo); 339 static ArkUINativeModuleValue ResetOnMouse(ArkUIRuntimeCallInfo* runtimeCallInfo); 340 static ArkUINativeModuleValue SetOnSizeChange(ArkUIRuntimeCallInfo* runtimeCallInfo); 341 static ArkUINativeModuleValue ResetOnSizeChange(ArkUIRuntimeCallInfo* runtimeCallInfo); 342 static ArkUINativeModuleValue SetOnAreaChange(ArkUIRuntimeCallInfo* runtimeCallInfo); 343 static ArkUINativeModuleValue ResetOnAreaChange(ArkUIRuntimeCallInfo* runtimeCallInfo); 344 static ArkUINativeModuleValue SetOnGestureJudgeBegin(ArkUIRuntimeCallInfo* runtimeCallInfo); 345 static ArkUINativeModuleValue ResetOnGestureJudgeBegin(ArkUIRuntimeCallInfo* runtimeCallInfo); 346 static ArkUINativeModuleValue SetOnGestureRecognizerJudgeBegin(ArkUIRuntimeCallInfo* runtimeCallInfo); 347 static ArkUINativeModuleValue ResetOnGestureRecognizerJudgeBegin(ArkUIRuntimeCallInfo* runtimeCallInfo); 348 static ArkUINativeModuleValue SetShouldBuiltInRecognizerParallelWith(ArkUIRuntimeCallInfo* runtimeCallInfo); 349 static ArkUINativeModuleValue ResetShouldBuiltInRecognizerParallelWith(ArkUIRuntimeCallInfo* runtimeCallInfo); 350 static ArkUINativeModuleValue AddTapGesture(ArkUIRuntimeCallInfo* runtimeCallInfo); 351 static ArkUINativeModuleValue AddLongPressGesture(ArkUIRuntimeCallInfo* runtimeCallInfo); 352 static ArkUINativeModuleValue AddPanGesture(ArkUIRuntimeCallInfo* runtimeCallInfo); 353 static ArkUINativeModuleValue AddSwipeGesture(ArkUIRuntimeCallInfo* runtimeCallInfo); 354 static ArkUINativeModuleValue AddPinchGesture(ArkUIRuntimeCallInfo* runtimeCallInfo); 355 static ArkUINativeModuleValue AddRotationGesture(ArkUIRuntimeCallInfo* runtimeCallInfo); 356 static ArkUINativeModuleValue AddGestureGroup(ArkUIRuntimeCallInfo* runtimeCallInfo); 357 static ArkUINativeModuleValue AddTapGestureToGroup(ArkUIRuntimeCallInfo* runtimeCallInfo); 358 static ArkUINativeModuleValue AddLongPressGestureToGroup(ArkUIRuntimeCallInfo* runtimeCallInfo); 359 static ArkUINativeModuleValue AddPanGestureToGroup(ArkUIRuntimeCallInfo* runtimeCallInfo); 360 static ArkUINativeModuleValue AddSwipeGestureToGroup(ArkUIRuntimeCallInfo* runtimeCallInfo); 361 static ArkUINativeModuleValue AddPinchGestureToGroup(ArkUIRuntimeCallInfo* runtimeCallInfo); 362 static ArkUINativeModuleValue AddRotationGestureToGroup(ArkUIRuntimeCallInfo* runtimeCallInfo); 363 static ArkUINativeModuleValue AddGestureGroupToGroup(ArkUIRuntimeCallInfo* runtimeCallInfo); 364 static ArkUINativeModuleValue AttachGestureGroup(ArkUIRuntimeCallInfo* runtimeCallInfo); 365 static ArkUINativeModuleValue RemoveGestureByTag(ArkUIRuntimeCallInfo* runtimeCallInfo); 366 static ArkUINativeModuleValue ClearGestures(ArkUIRuntimeCallInfo* runtimeCallInfo); 367 static ArkUINativeModuleValue GetWindowName(ArkUIRuntimeCallInfo* runtimeCallInfo); 368 static ArkUINativeModuleValue GetWindowWidthBreakpoint(ArkUIRuntimeCallInfo* runtimeCallInfo); 369 static ArkUINativeModuleValue GetWindowHeightBreakpoint(ArkUIRuntimeCallInfo* runtimeCallInfo); 370 static ArkUINativeModuleValue SetSystemBarEffect(ArkUIRuntimeCallInfo* runtimeCallInfo); 371 static ArkUINativeModuleValue PostFrameCallback(ArkUIRuntimeCallInfo* runtimeCallInfo); 372 static ArkUINativeModuleValue SetFocusScopeId(ArkUIRuntimeCallInfo* runtimeCallInfo); 373 static ArkUINativeModuleValue ResetFocusScopeId(ArkUIRuntimeCallInfo* runtimeCallInfo); 374 static ArkUINativeModuleValue SetFocusScopePriority(ArkUIRuntimeCallInfo* runtimeCallInfo); 375 static ArkUINativeModuleValue ResetFocusScopePriority(ArkUIRuntimeCallInfo* runtimeCallInfo); 376 static ArkUINativeModuleValue SetPixelRound(ArkUIRuntimeCallInfo* runtimeCallInfo); 377 static ArkUINativeModuleValue ResetPixelRound(ArkUIRuntimeCallInfo *runtimeCallInfo); 378 static ArkUINativeModuleValue SetChainMode(ArkUIRuntimeCallInfo* runtimeCallInfo); 379 static ArkUINativeModuleValue ResetChainMode(ArkUIRuntimeCallInfo* runtimeCallInfo); 380 static ArkUINativeModuleValue GreatOrEqualAPITargetVersion(ArkUIRuntimeCallInfo* runtimeCallInfo); 381 static ArkUINativeModuleValue LessThanAPITargetVersion(ArkUIRuntimeCallInfo* runtimeCallInfo); 382 static ArkUINativeModuleValue GetApiTargetVersion(ArkUIRuntimeCallInfo* runtimeCallInfo); 383 static ArkUINativeModuleValue SetFocusBox(ArkUIRuntimeCallInfo* runtimeCallInfo); 384 static ArkUINativeModuleValue ResetFocusBox(ArkUIRuntimeCallInfo* runtimeCallInfo); 385 static Local<panda::ObjectRef> CreateFocusAxisEventInfo(EcmaVM* vm, NG::FocusAxisEventInfo& info); 386 static ArkUINativeModuleValue SetOnFocusAxisEvent(ArkUIRuntimeCallInfo* runtimeCallInfo); 387 static ArkUINativeModuleValue ResetOnFocusAxisEvent(ArkUIRuntimeCallInfo* runtimeCallInfo); 388 static ArkUINativeModuleValue RegisterFrameNodeDestructorCallback(ArkUIRuntimeCallInfo* runtimeCallInfo); 389 }; 390 } // namespace OHOS::Ace::NG 391 #endif // FRAMEWORKS_BRIDGE_DECLARATIVE_FRONTEND_ENGINE_JSI_NATIVEMODULE_ARKTS_NATIVE_COMMON_BRIDGE_H 392