diff --git a/frameworks/core/interfaces/native/common/api_impl.cpp b/frameworks/core/interfaces/native/common/api_impl.cpp index a680d9b9afa0c95d0aa71b7170920b394c8cf786..6bb1bfd03ee65347cf6a66ca32f005d3e61fc172 100644 --- a/frameworks/core/interfaces/native/common/api_impl.cpp +++ b/frameworks/core/interfaces/native/common/api_impl.cpp @@ -162,34 +162,38 @@ void RemoveChild(Ark_NodeHandle parentNode, Ark_NodeHandle childNode) CHECK_NULL_VOID(childNode); auto* parent = reinterpret_cast(parentNode); auto* child = reinterpret_cast(childNode); + if (parent->GetTag() != V2::STAGE_ETS_TAG) { + parent->RemoveChild(AceType::Claim(child), true); + } child->MarkRemoving(); - parent->RemoveChild(AceType::Claim(child), true); } Ark_Int32 InsertChildAfter(Ark_NodeHandle parentNode, Ark_NodeHandle childNode, Ark_NodeHandle siblingNode) { - Ark_Int32 result = ERROR_CODE_NO_ERROR; - CHECK_NULL_RETURN(parentNode, result); - CHECK_NULL_RETURN(childNode, result); + CHECK_NULL_RETURN(parentNode, ERROR_CODE_INTERNAL_ERROR); + CHECK_NULL_RETURN(childNode, ERROR_CODE_INTERNAL_ERROR); auto* parent = reinterpret_cast(parentNode); auto* child = reinterpret_cast(childNode); - if (auto* groupNode = AceType::DynamicCast(parent); groupNode) { - groupNode->AddChildToGroup(AceType::Claim(child)); - parent->MarkDirtyNode(PROPERTY_UPDATE_MEASURE); - return result; - } - auto* sibling = reinterpret_cast(siblingNode); - if (sibling) { - parent->AddChildAfter(AceType::Claim(child), AceType::Claim(sibling)); - } else { - parent->AddChild(AceType::Claim(child)); + if (parent->GetTag() != V2::STAGE_ETS_TAG) { + if (auto* groupNode = AceType::DynamicCast(parent); groupNode) { + groupNode->AddChildToGroup(AceType::Claim(child)); + parent->MarkDirtyNode(PROPERTY_UPDATE_MEASURE); + return ERROR_CODE_NO_ERROR; + } + auto* sibling = reinterpret_cast(siblingNode); + if (sibling) { + parent->AddChildAfter(AceType::Claim(child), AceType::Claim(sibling)); + } else { + parent->AddChild(AceType::Claim(child)); + } } + auto* frameNode = AceType::DynamicCast(child); if (frameNode) { frameNode->OnMountToParentDone(); } - return result; + return ERROR_CODE_NO_ERROR; } Ark_Boolean IsBuilderNode(Ark_NodeHandle nodePtr) @@ -347,23 +351,7 @@ Ark_Int32 MeasureLayoutAndDraw(Ark_VMContext vmContext, Ark_NodeHandle rootPtr) { auto* root = reinterpret_cast(rootPtr); CHECK_NULL_RETURN(root, 0); - while (root->GetTag() != V2::STAGE_ETS_TAG) { - auto parentNode = AceType::DynamicCast(root->GetParent()); - CHECK_NULL_RETURN(parentNode, 0); - root = AceType::RawPtr(parentNode); - } - float width = root->GetGeometryNode()->GetFrameSize().Width(); - float height = root->GetGeometryNode()->GetFrameSize().Height(); auto stagePtr = reinterpret_cast(root); - // measure - Ark_Float32 measureData[] = { width, height, width, height, width, height }; - MeasureNode(vmContext, stagePtr, &measureData[0]); - // layout - Ark_Float32 layoutData[] = { 0, 0 }; - LayoutNode(vmContext, stagePtr, &layoutData); - // draw - Ark_Float32 drawData[] = { 0, 0, 0, 0 }; - DrawNode(vmContext, stagePtr, &drawData[0]); if (auto companionNode = GetCompanion(stagePtr); companionNode) { companionNode->SetVMContext(vmContext); diff --git a/frameworks/core/interfaces/native/generated/interface/arkoala_api_generated.h b/frameworks/core/interfaces/native/generated/interface/arkoala_api_generated.h index 90c520ec12ba454e4a5cc78417f671b6b1501f30..00a2f3ebc40ebc497008f896313c0e8bb2f5362d 100644 --- a/frameworks/core/interfaces/native/generated/interface/arkoala_api_generated.h +++ b/frameworks/core/interfaces/native/generated/interface/arkoala_api_generated.h @@ -805,6 +805,9 @@ typedef struct Opt_WebContextMenuParam Opt_WebContextMenuParam; typedef struct WebContextMenuResultPeer WebContextMenuResultPeer; typedef struct WebContextMenuResultPeer* Ark_WebContextMenuResult; typedef struct Opt_WebContextMenuResult Opt_WebContextMenuResult; +typedef struct WebCookiePeer WebCookiePeer; +typedef struct WebCookiePeer* Ark_WebCookie; +typedef struct Opt_WebCookie Opt_WebCookie; typedef struct WebKeyboardControllerPeer WebKeyboardControllerPeer; typedef struct WebKeyboardControllerPeer* Ark_WebKeyboardController; typedef struct Opt_WebKeyboardController Opt_WebKeyboardController; @@ -1063,8 +1066,6 @@ typedef struct Callback_ErrorInformation_Void Callback_ErrorInformation_Void; typedef struct Opt_Callback_ErrorInformation_Void Opt_Callback_ErrorInformation_Void; typedef struct Callback_Extender_OnFinish Callback_Extender_OnFinish; typedef struct Opt_Callback_Extender_OnFinish Opt_Callback_Extender_OnFinish; -typedef struct Callback_Extender_OnProgress Callback_Extender_OnProgress; -typedef struct Opt_Callback_Extender_OnProgress Opt_Callback_Extender_OnProgress; typedef struct Callback_FocusAxisEvent_Void Callback_FocusAxisEvent_Void; typedef struct Opt_Callback_FocusAxisEvent_Void Opt_Callback_FocusAxisEvent_Void; typedef struct Callback_FormCallbackInfo_Void Callback_FormCallbackInfo_Void; @@ -1754,8 +1755,6 @@ typedef struct DismissPopupActionPeer* Ark_DismissPopupAction; typedef struct Opt_DismissPopupAction Opt_DismissPopupAction; typedef struct Ark_DismissSheetAction Ark_DismissSheetAction; typedef struct Opt_DismissSheetAction Opt_DismissSheetAction; -typedef struct Ark_DoubleAnimationParam Ark_DoubleAnimationParam; -typedef struct Opt_DoubleAnimationParam Opt_DoubleAnimationParam; typedef struct DragEventPeer DragEventPeer; typedef struct DragEventPeer* Ark_DragEvent; typedef struct Opt_DragEvent Opt_DragEvent; @@ -2024,6 +2023,8 @@ typedef struct Ark_OnWindowNewEvent Ark_OnWindowNewEvent; typedef struct Opt_OnWindowNewEvent Opt_OnWindowNewEvent; typedef struct Ark_OverlayOffset Ark_OverlayOffset; typedef struct Opt_OverlayOffset Opt_OverlayOffset; +typedef struct Ark_PageTransitionOptions Ark_PageTransitionOptions; +typedef struct Opt_PageTransitionOptions Opt_PageTransitionOptions; typedef struct Ark_PanGestureHandlerOptions Ark_PanGestureHandlerOptions; typedef struct Opt_PanGestureHandlerOptions Opt_PanGestureHandlerOptions; typedef struct Ark_PathOptions Ark_PathOptions; @@ -2607,6 +2608,8 @@ typedef struct Ark_ToggleOptions Ark_ToggleOptions; typedef struct Opt_ToggleOptions Opt_ToggleOptions; typedef struct Ark_ToolbarItem Ark_ToolbarItem; typedef struct Opt_ToolbarItem Opt_ToolbarItem; +typedef struct Ark_TransitionParam Ark_TransitionParam; +typedef struct Opt_TransitionParam Opt_TransitionParam; typedef struct Ark_Tuple_Dimension_Dimension Ark_Tuple_Dimension_Dimension; typedef struct Opt_Tuple_Dimension_Dimension Opt_Tuple_Dimension_Dimension; typedef struct Ark_Tuple_Length_Length Ark_Tuple_Length_Length; @@ -2931,6 +2934,9 @@ typedef struct HoverEventPeer* Ark_HoverEvent; typedef struct Opt_HoverEvent Opt_HoverEvent; typedef struct Ark_ImageAttachmentLayoutStyle Ark_ImageAttachmentLayoutStyle; typedef struct Opt_ImageAttachmentLayoutStyle Opt_ImageAttachmentLayoutStyle; +typedef struct LayoutChildPeer LayoutChildPeer; +typedef struct LayoutChildPeer* Ark_LayoutChild; +typedef struct Opt_LayoutChild Opt_LayoutChild; typedef struct LongPressGestureEventPeer LongPressGestureEventPeer; typedef struct LongPressGestureEventPeer* Ark_LongPressGestureEvent; typedef struct Opt_LongPressGestureEvent Opt_LongPressGestureEvent; @@ -5142,6 +5148,15 @@ typedef struct Opt_NavigationTitleMode { Ark_Tag tag; Ark_NavigationTitleMode value; } Opt_NavigationTitleMode; +typedef enum Ark_NavigationType { + ARK_NAVIGATION_TYPE_PUSH = 0, + ARK_NAVIGATION_TYPE_BACK = 1, + ARK_NAVIGATION_TYPE_REPLACE = 2, +} Ark_NavigationType; +typedef struct Opt_NavigationType { + Ark_Tag tag; + Ark_NavigationType value; +} Opt_NavigationType; typedef enum Ark_NestedScrollMode { ARK_NESTED_SCROLL_MODE_SELF_ONLY = 0, ARK_NESTED_SCROLL_MODE_SELF_FIRST = 1, @@ -5192,6 +5207,14 @@ typedef struct Opt_PageFlipMode { Ark_Tag tag; Ark_PageFlipMode value; } Opt_PageFlipMode; +typedef enum Ark_PageTransitionType { + ARK_PAGE_TRANSITION_TYPE_ENTER = 0, + ARK_PAGE_TRANSITION_TYPE_EXIT = 1, +} Ark_PageTransitionType; +typedef struct Opt_PageTransitionType { + Ark_Tag tag; + Ark_PageTransitionType value; +} Opt_PageTransitionType; typedef enum Ark_PanDirection { ARK_PAN_DIRECTION_NONE = 0, ARK_PAN_DIRECTION_HORIZONTAL = 1, @@ -8079,6 +8102,10 @@ typedef struct Opt_WebContextMenuResult { Ark_Tag tag; Ark_WebContextMenuResult value; } Opt_WebContextMenuResult; +typedef struct Opt_WebCookie { + Ark_Tag tag; + Ark_WebCookie value; +} Opt_WebCookie; typedef struct Opt_WebKeyboardController { Ark_Tag tag; Ark_WebKeyboardController value; @@ -9201,16 +9228,6 @@ typedef struct Opt_Callback_Extender_OnFinish { Ark_Tag tag; Callback_Extender_OnFinish value; } Opt_Callback_Extender_OnFinish; -typedef struct Callback_Extender_OnProgress { - /* kind: Callback */ - Ark_CallbackResource resource; - void (*call)(const Ark_Int32 resourceId, const Ark_Float32 value); - void (*callSync)(Ark_VMContext vmContext, const Ark_Int32 resourceId, const Ark_Float32 value); -} Callback_Extender_OnProgress; -typedef struct Opt_Callback_Extender_OnProgress { - Ark_Tag tag; - Callback_Extender_OnProgress value; -} Opt_Callback_Extender_OnProgress; typedef struct Callback_FocusAxisEvent_Void { /* kind: Callback */ Ark_CallbackResource resource; @@ -12456,21 +12473,6 @@ typedef struct Opt_DismissSheetAction { Ark_Tag tag; Ark_DismissSheetAction value; } Opt_DismissSheetAction; -typedef struct Ark_DoubleAnimationParam { - /* kind: Interface */ - Ark_String propertyName; - Ark_Float32 startValue; - Ark_Float32 endValue; - Ark_Int32 duration; - Ark_Int32 delay; - Ark_Union_Curve_String_ICurve curve; - Opt_Callback_Extender_OnProgress onProgress; - Opt_Callback_Extender_OnFinish onFinish; -} Ark_DoubleAnimationParam; -typedef struct Opt_DoubleAnimationParam { - Ark_Tag tag; - Ark_DoubleAnimationParam value; -} Opt_DoubleAnimationParam; typedef struct Opt_DragEvent { Ark_Tag tag; Ark_DragEvent value; @@ -13614,6 +13616,17 @@ typedef struct Opt_OverlayOffset { Ark_Tag tag; Ark_OverlayOffset value; } Opt_OverlayOffset; +typedef struct Ark_PageTransitionOptions { + /* kind: Interface */ + Opt_RouteType type; + Opt_Number duration; + Opt_Union_Curve_String_ICurve curve; + Opt_Number delay; +} Ark_PageTransitionOptions; +typedef struct Opt_PageTransitionOptions { + Ark_Tag tag; + Ark_PageTransitionOptions value; +} Opt_PageTransitionOptions; typedef struct Ark_PanGestureHandlerOptions { /* kind: Interface */ Opt_Boolean isFingerCountLimited; @@ -16558,6 +16571,22 @@ typedef struct Opt_ToolbarItem { Ark_Tag tag; Ark_ToolbarItem value; } Opt_ToolbarItem; +typedef struct Ark_TransitionParam { + /* kind: Interface */ + Ark_PageTransitionOptions pageTransitionOptions; + Ark_PageTransitionType pageTransitionType; + Opt_RouteType routeType; + Opt_SlideEffect slideEffect; + Opt_TranslateOptions translate; + Opt_ScaleOptions scale; + Opt_Number opacity; + Opt_PageTransitionCallback onProgress; + Opt_Callback_Extender_OnFinish onFinish; +} Ark_TransitionParam; +typedef struct Opt_TransitionParam { + Ark_Tag tag; + Ark_TransitionParam value; +} Opt_TransitionParam; typedef struct Ark_Tuple_Dimension_Dimension { /* kind: Interface */ Ark_Dimension value0; @@ -18436,6 +18465,10 @@ typedef struct Opt_ImageAttachmentLayoutStyle { Ark_Tag tag; Ark_ImageAttachmentLayoutStyle value; } Opt_ImageAttachmentLayoutStyle; +typedef struct Opt_LayoutChild { + Ark_Tag tag; + Ark_LayoutChild value; +} Opt_LayoutChild; typedef struct Opt_LongPressGestureEvent { Ark_Tag tag; Ark_LongPressGestureEvent value; @@ -21224,6 +21257,11 @@ typedef struct GENERATED_ArkUIRootSceneModifier { const Ark_RootSceneSession* session); } GENERATED_ArkUIRootSceneModifier; +typedef struct GENERATED_ArkUIRoutedPageModifier { + Ark_NativePointer (*construct)(Ark_Int32 id, + Ark_Int32 flags); +} GENERATED_ArkUIRoutedPageModifier; + typedef struct GENERATED_ArkUIRowModifier { Ark_NativePointer (*construct)(Ark_Int32 id, Ark_Int32 flags); @@ -22905,17 +22943,8 @@ typedef struct GENERATED_ArkUIAccessibilityHoverEventAccessor { } GENERATED_ArkUIAccessibilityHoverEventAccessor; typedef struct GENERATED_ArkUIAnimationExtenderAccessor { - void (*SetClipRect)(Ark_NativePointer node, - Ark_Float32 x, - Ark_Float32 y, - Ark_Float32 width, - Ark_Float32 height); void (*OpenImplicitAnimation)(const Ark_AnimateParam* param); void (*CloseImplicitAnimation)(); - void (*StartDoubleAnimation)(Ark_NativePointer node, - const Ark_DoubleAnimationParam* param); - void (*AnimationTranslate)(Ark_NativePointer node, - const Ark_TranslateOptions* options); } GENERATED_ArkUIAnimationExtenderAccessor; typedef struct GENERATED_ArkUIAppearSymbolEffectAccessor { @@ -24159,6 +24188,23 @@ typedef struct GENERATED_ArkUILayoutableAccessor { const Opt_Number* uniqueId); } GENERATED_ArkUILayoutableAccessor; +typedef struct GENERATED_ArkUILayoutChildAccessor { + void (*destroyPeer)(Ark_LayoutChild peer); + Ark_LayoutChild (*construct)(); + Ark_NativePointer (*getFinalizer)(); + void (*measure)(Ark_LayoutChild peer, + const Ark_ConstraintSizeOptions* childConstraint); + Ark_String (*getName)(Ark_LayoutChild peer); + void (*setName)(Ark_LayoutChild peer, + const Ark_String* name); + Ark_String (*getId)(Ark_LayoutChild peer); + void (*setId)(Ark_LayoutChild peer, + const Ark_String* id); + Ark_Position (*getPosition)(Ark_LayoutChild peer); + void (*setPosition)(Ark_LayoutChild peer, + const Ark_Position* position); +} GENERATED_ArkUILayoutChildAccessor; + typedef struct GENERATED_ArkUILayoutManagerAccessor { void (*destroyPeer)(Ark_LayoutManager peer); Ark_LayoutManager (*construct)(); @@ -25175,6 +25221,15 @@ typedef struct GENERATED_ArkUISslErrorHandlerAccessor { void (*handleCancel)(Ark_SslErrorHandler peer); } GENERATED_ArkUISslErrorHandlerAccessor; +typedef struct GENERATED_ArkUIStageExtenderAccessor { + void (*SetSrcPage)(Ark_NativePointer node); + void (*PushPage)(Ark_NativePointer node); + void (*PopPageAndSwitchTo)(Ark_NativePointer node); + void (*ResetTransitions)(Ark_NativePointer node); + void (*SetPageTransition)(Ark_NativePointer node, + const Ark_TransitionParam* param); +} GENERATED_ArkUIStageExtenderAccessor; + typedef struct GENERATED_ArkUIStateStylesOpsAccessor { void (*onStateStyleChange)(Ark_NativePointer node, const Callback_StateStylesChange* stateStyleChange); @@ -25732,6 +25787,14 @@ typedef struct GENERATED_ArkUIWebContextMenuResultAccessor { void (*selectAll)(Ark_WebContextMenuResult peer); } GENERATED_ArkUIWebContextMenuResultAccessor; +typedef struct GENERATED_ArkUIWebCookieAccessor { + void (*destroyPeer)(Ark_WebCookie peer); + Ark_WebCookie (*construct)(); + Ark_NativePointer (*getFinalizer)(); + void (*setCookie)(Ark_WebCookie peer); + void (*saveCookie)(Ark_WebCookie peer); +} GENERATED_ArkUIWebCookieAccessor; + typedef struct GENERATED_ArkUIWebKeyboardControllerAccessor { void (*destroyPeer)(Ark_WebKeyboardController peer); Ark_WebKeyboardController (*construct)(); @@ -25925,6 +25988,7 @@ typedef struct GENERATED_ArkUINodeModifiers { const GENERATED_ArkUIRichTextModifier* (*getRichTextModifier)(); const GENERATED_ArkUIRootModifier* (*getRootModifier)(); const GENERATED_ArkUIRootSceneModifier* (*getRootSceneModifier)(); + const GENERATED_ArkUIRoutedPageModifier* (*getRoutedPageModifier)(); const GENERATED_ArkUIRowModifier* (*getRowModifier)(); const GENERATED_ArkUIRowSplitModifier* (*getRowSplitModifier)(); const GENERATED_ArkUISaveButtonModifier* (*getSaveButtonModifier)(); @@ -26037,6 +26101,7 @@ typedef struct GENERATED_ArkUIAccessors { const GENERATED_ArkUIJsResultAccessor* (*getJsResultAccessor)(); const GENERATED_ArkUIKeyEventAccessor* (*getKeyEventAccessor)(); const GENERATED_ArkUILayoutableAccessor* (*getLayoutableAccessor)(); + const GENERATED_ArkUILayoutChildAccessor* (*getLayoutChildAccessor)(); const GENERATED_ArkUILayoutManagerAccessor* (*getLayoutManagerAccessor)(); const GENERATED_ArkUILayoutPolicyAccessor* (*getLayoutPolicyAccessor)(); const GENERATED_ArkUILazyForEachOpsAccessor* (*getLazyForEachOpsAccessor)(); @@ -26097,6 +26162,7 @@ typedef struct GENERATED_ArkUIAccessors { const GENERATED_ArkUISpringMotionAccessor* (*getSpringMotionAccessor)(); const GENERATED_ArkUISpringPropAccessor* (*getSpringPropAccessor)(); const GENERATED_ArkUISslErrorHandlerAccessor* (*getSslErrorHandlerAccessor)(); + const GENERATED_ArkUIStageExtenderAccessor* (*getStageExtenderAccessor)(); const GENERATED_ArkUIStateStylesOpsAccessor* (*getStateStylesOpsAccessor)(); const GENERATED_ArkUIStyledStringAccessor* (*getStyledStringAccessor)(); const GENERATED_ArkUIStyledStringControllerAccessor* (*getStyledStringControllerAccessor)(); @@ -26138,6 +26204,7 @@ typedef struct GENERATED_ArkUIAccessors { const GENERATED_ArkUIWaterFlowSectionsAccessor* (*getWaterFlowSectionsAccessor)(); const GENERATED_ArkUIWebContextMenuParamAccessor* (*getWebContextMenuParamAccessor)(); const GENERATED_ArkUIWebContextMenuResultAccessor* (*getWebContextMenuResultAccessor)(); + const GENERATED_ArkUIWebCookieAccessor* (*getWebCookieAccessor)(); const GENERATED_ArkUIWebKeyboardControllerAccessor* (*getWebKeyboardControllerAccessor)(); const GENERATED_ArkUIWebResourceErrorAccessor* (*getWebResourceErrorAccessor)(); const GENERATED_ArkUIWebResourceRequestAccessor* (*getWebResourceRequestAccessor)(); @@ -26226,6 +26293,7 @@ typedef enum GENERATED_Ark_NodeType { GENERATED_ARKUI_RICH_TEXT, GENERATED_ARKUI_ROOT, GENERATED_ARKUI_ROOT_SCENE, + GENERATED_ARKUI_ROUTED_PAGE, GENERATED_ARKUI_ROW, GENERATED_ARKUI_ROW_SPLIT, GENERATED_ARKUI_SAVE_BUTTON, diff --git a/frameworks/core/interfaces/native/generated/interface/node_interface.gni b/frameworks/core/interfaces/native/generated/interface/node_interface.gni index 5266da8811a5ed50d50fc8d82bcb6914db1ef78a..2ddaf240c2aa602925af94978e08823197f7a407 100644 --- a/frameworks/core/interfaces/native/generated/interface/node_interface.gni +++ b/frameworks/core/interfaces/native/generated/interface/node_interface.gni @@ -211,6 +211,7 @@ generated_sources = [ "implementation/rotation_gesture_event_accessor.cpp", "implementation/rotation_recognizer_accessor.cpp", "implementation/router_extender_accessor.cpp", + "implementation/routed_page_modifier.cpp", "implementation/row_modifier.cpp", "implementation/row_split_modifier.cpp", "implementation/save_button_modifier.cpp", @@ -238,6 +239,7 @@ generated_sources = [ "implementation/spring_prop_accessor.cpp", "implementation/ssl_error_handler_accessor.cpp", "implementation/stack_modifier.cpp", + "implementation/stage_extender_accessor.cpp", "implementation/state_styles_ops_accessor.cpp", "implementation/stepper_item_modifier.cpp", "implementation/stepper_modifier.cpp", diff --git a/frameworks/core/interfaces/native/implementation/all_modifiers.cpp b/frameworks/core/interfaces/native/implementation/all_modifiers.cpp index 1fa67cfbe07a567e2007cd447aaed2cfc727d0a9..e404a760e7f4bdf6de3345a02aff4615a460db7c 100644 --- a/frameworks/core/interfaces/native/implementation/all_modifiers.cpp +++ b/frameworks/core/interfaces/native/implementation/all_modifiers.cpp @@ -154,6 +154,7 @@ const GENERATED_ArkUIRichEditorModifier* GetRichEditorModifier(); const GENERATED_ArkUIRichTextModifier* GetRichTextModifier(); const GENERATED_ArkUIRootModifier* GetRootModifier(); const GENERATED_ArkUIRootSceneModifier* GetRootSceneModifier(); +const GENERATED_ArkUIRoutedPageModifier* GetRoutedPageModifier(); const GENERATED_ArkUIRowModifier* GetRowModifier(); const GENERATED_ArkUIRowSplitModifier* GetRowSplitModifier(); const GENERATED_ArkUISaveButtonModifier* GetSaveButtonModifier(); @@ -263,6 +264,7 @@ const GENERATED_ArkUIJsGeolocationAccessor* GetJsGeolocationAccessor(); const GENERATED_ArkUIJsResultAccessor* GetJsResultAccessor(); const GENERATED_ArkUIKeyEventAccessor* GetKeyEventAccessor(); const GENERATED_ArkUILayoutableAccessor* GetLayoutableAccessor(); +//const GENERATED_ArkUILayoutChildAccessor* GetLayoutChildAccessor(); const GENERATED_ArkUILayoutManagerAccessor* GetLayoutManagerAccessor(); const GENERATED_ArkUILayoutPolicyAccessor* GetLayoutPolicyAccessor(); const GENERATED_ArkUILazyForEachOpsAccessor* GetLazyForEachOpsAccessor(); @@ -323,6 +325,7 @@ const GENERATED_ArkUISearchOpsAccessor* GetSearchOpsAccessor(); const GENERATED_ArkUISpringMotionAccessor* GetSpringMotionAccessor(); const GENERATED_ArkUISpringPropAccessor* GetSpringPropAccessor(); const GENERATED_ArkUISslErrorHandlerAccessor* GetSslErrorHandlerAccessor(); +const GENERATED_ArkUIStageExtenderAccessor* GetStageExtenderAccessor(); const GENERATED_ArkUIStateStylesOpsAccessor* GetStateStylesOpsAccessor(); const GENERATED_ArkUIStyledStringAccessor* GetStyledStringAccessor(); const GENERATED_ArkUIStyledStringControllerAccessor* GetStyledStringControllerAccessor(); @@ -364,6 +367,7 @@ const GENERATED_ArkUIVideoControllerAccessor* GetVideoControllerAccessor(); const GENERATED_ArkUIWaterFlowSectionsAccessor* GetWaterFlowSectionsAccessor(); const GENERATED_ArkUIWebContextMenuParamAccessor* GetWebContextMenuParamAccessor(); const GENERATED_ArkUIWebContextMenuResultAccessor* GetWebContextMenuResultAccessor(); +// const GENERATED_ArkUIWebCookieAccessor* GetWebCookieAccessor(); const GENERATED_ArkUIWebKeyboardControllerAccessor* GetWebKeyboardControllerAccessor(); const GENERATED_ArkUIWebResourceErrorAccessor* GetWebResourceErrorAccessor(); const GENERATED_ArkUIWebResourceRequestAccessor* GetWebResourceRequestAccessor(); @@ -447,6 +451,7 @@ const GENERATED_ArkUINodeModifiers* GENERATED_GetArkUINodeModifiers() GetRichTextModifier, GetRootModifier, GetRootSceneModifier, + GetRoutedPageModifier, GetRowModifier, GetRowSplitModifier, GetSaveButtonModifier, @@ -562,6 +567,7 @@ const GENERATED_ArkUIAccessors* GENERATED_GetArkUIAccessors() GetJsResultAccessor, GetKeyEventAccessor, GetLayoutableAccessor, + nullptr, // GetLayoutChildAccessor, GetLayoutManagerAccessor, GetLayoutPolicyAccessor, GetLazyForEachOpsAccessor, @@ -622,6 +628,7 @@ const GENERATED_ArkUIAccessors* GENERATED_GetArkUIAccessors() GetSpringMotionAccessor, GetSpringPropAccessor, GetSslErrorHandlerAccessor, + GetStageExtenderAccessor, GetStateStylesOpsAccessor, GetStyledStringAccessor, GetStyledStringControllerAccessor, @@ -663,6 +670,7 @@ const GENERATED_ArkUIAccessors* GENERATED_GetArkUIAccessors() GetWaterFlowSectionsAccessor, GetWebContextMenuParamAccessor, GetWebContextMenuResultAccessor, + nullptr, // GetWebCookieAccessor, GetWebKeyboardControllerAccessor, GetWebResourceErrorAccessor, GetWebResourceRequestAccessor, diff --git a/frameworks/core/interfaces/native/implementation/animation_extender_accessor.cpp b/frameworks/core/interfaces/native/implementation/animation_extender_accessor.cpp index fe5d2f84300d35868a3c832f99cfa42d9429e0cd..d81fcae173922a9222eef8afda2648a1d7b6185b 100644 --- a/frameworks/core/interfaces/native/implementation/animation_extender_accessor.cpp +++ b/frameworks/core/interfaces/native/implementation/animation_extender_accessor.cpp @@ -29,20 +29,6 @@ constexpr int64_t MICROSEC_TO_MILLISEC = 1000; constexpr int32_t MAX_FLUSH_COUNT = 2; } // namespace namespace AnimationExtenderAccessor { -void SetClipRectImpl(Ark_NativePointer node, - Ark_Float32 x, - Ark_Float32 y, - Ark_Float32 width, - Ark_Float32 height) -{ - auto* frameNode = AceType::DynamicCast(reinterpret_cast(node)); - CHECK_NULL_VOID(frameNode); - auto renderContext = frameNode->GetRenderContext(); - CHECK_NULL_VOID(renderContext); - - renderContext->ClipWithRRect(RectF(x, y, width, height), RadiusF(EdgeF(0.0f, 0.0f))); -} - void AnimateToForStageMode(const RefPtr& pipelineContext, const AnimationOption& option, std::function jsAnimateToFunc, int32_t triggerId, const std::optional& count) { @@ -230,48 +216,6 @@ void CloseImplicitAnimationImpl() ViewContextModel::GetInstance()->closeAnimation(option, true); #endif } -void StartDoubleAnimationImpl(Ark_NativePointer node, - const Ark_DoubleAnimationParam* param) -{ - auto* frameNode = AceType::DynamicCast(reinterpret_cast(node)); - CHECK_NULL_VOID(frameNode); - CHECK_NULL_VOID(param); - - auto curve = Converter::OptConvert>(param->curve).value_or(Framework::CreateCurve(-1, true)); - auto duration = Converter::Convert(param->duration); - auto delay = Converter::Convert(param->delay); - auto propertyName = Converter::Convert(param->propertyName); - auto startValue = Converter::Convert(param->startValue); - auto endValue = Converter::Convert(param->endValue); - - auto progressFunction = Converter::OptConvert(param->onProgress); - if (progressFunction) { - auto progressCallbackFn = [cb = CallbackHelper(progressFunction.value())](float progress) { - cb.Invoke(static_cast(progress)); - }; - - frameNode->CreateAnimatablePropertyFloat(propertyName, startValue, progressCallbackFn); - progressCallbackFn(startValue); - } - - AnimationOption option(curve, duration); - option.SetDelay(delay); - - auto finishFunction = Converter::OptConvert(param->onFinish); - if (finishFunction) { - auto finishCallbackFn = [cb = CallbackHelper(finishFunction.value()), frameNode, propertyName]() { - frameNode->DeleteAnimatablePropertyFloat(propertyName); - cb.Invoke(); - }; - - AnimationUtils::OpenImplicitAnimation(option, option.GetCurve(), finishCallbackFn); - } else { - AnimationUtils::OpenImplicitAnimation(option, option.GetCurve(), nullptr); - } - - frameNode->UpdateAnimatablePropertyFloat(propertyName, endValue); - AnimationUtils::CloseImplicitAnimation(); -} struct Keyframe { int32_t duration = 0; @@ -405,36 +349,12 @@ void KeyFrameAnimationImpl(const Ark_KeyFrameAnimateParam* param, const Array_Ar pipelineContext->FlushAfterLayoutCallbackInImplicitAnimationTask(); } #endif -void AnimationTranslateImpl(Ark_NativePointer node, - const Ark_TranslateOptions* value) -{ - auto frameNode = reinterpret_cast(node); - CHECK_NULL_VOID(frameNode); - CHECK_NULL_VOID(value); - - TranslateOptions options = Converter::Convert(*value); - - if (options.x.Unit() == DimensionUnit::PERCENT) { - options.x = Dimension(options.x.Value() * frameNode->GetGeometryNode()->GetMarginFrameOffset().GetX(), - DimensionUnit::PX); - } - - if (options.y.Unit() == DimensionUnit::PERCENT) { - options.x = Dimension(options.y.Value() * frameNode->GetGeometryNode()->GetMarginFrameOffset().GetY(), - DimensionUnit::PX); - } - - ViewAbstract::SetTranslate(frameNode, options); -} } // AnimationExtenderAccessor const GENERATED_ArkUIAnimationExtenderAccessor* GetAnimationExtenderAccessor() { static const GENERATED_ArkUIAnimationExtenderAccessor AnimationExtenderAccessorImpl { - AnimationExtenderAccessor::SetClipRectImpl, AnimationExtenderAccessor::OpenImplicitAnimationImpl, - AnimationExtenderAccessor::CloseImplicitAnimationImpl, - AnimationExtenderAccessor::StartDoubleAnimationImpl, - AnimationExtenderAccessor::AnimationTranslateImpl, + AnimationExtenderAccessor::CloseImplicitAnimationImpl }; return &AnimationExtenderAccessorImpl; } diff --git a/frameworks/core/interfaces/native/implementation/common_method_modifier.cpp b/frameworks/core/interfaces/native/implementation/common_method_modifier.cpp index 1494f9713f33ae247253a898289bfb926658d3ab..438e412d1eb5c70cd0220f4635e0d5518e573407 100644 --- a/frameworks/core/interfaces/native/implementation/common_method_modifier.cpp +++ b/frameworks/core/interfaces/native/implementation/common_method_modifier.cpp @@ -1278,34 +1278,6 @@ void AssignCast(std::optional& dst, const Ark_FocusDrawLevel& sr } } -template<> -ScaleOptions Convert(const Ark_ScaleOptions& src) -{ - ScaleOptions scaleOptions(1.0f, 1.0f, 1.0f, 0.5_pct, 0.5_pct); - auto coord = OptConvert(src.x); - if (coord.has_value()) { - scaleOptions.xScale = coord.value(); - } - coord = OptConvert(src.y); - if (coord.has_value()) { - scaleOptions.yScale = coord.value(); - } - coord = OptConvert(src.z); - if (coord.has_value()) { - scaleOptions.zScale = coord.value(); - } - - auto center = OptConvert(src.centerX); - if (center.has_value()) { - scaleOptions.centerX = center.value(); - } - center = OptConvert(src.centerY); - if (center.has_value()) { - scaleOptions.centerY = center.value(); - } - return scaleOptions; -} - template<> RotateOptions Convert(const Ark_RotateOptions& src) { diff --git a/frameworks/core/interfaces/native/implementation/routed_page_modifier.cpp b/frameworks/core/interfaces/native/implementation/routed_page_modifier.cpp new file mode 100644 index 0000000000000000000000000000000000000000..72a52466928f11d82d071190676e333ed42c03b9 --- /dev/null +++ b/frameworks/core/interfaces/native/implementation/routed_page_modifier.cpp @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2024-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "core/components_ng/base/frame_node.h" +#include "core/interfaces/native/utility/converter.h" +#include "arkoala_api_generated.h" +#include "core/components_ng/pattern/stage/page_pattern.h" + +namespace OHOS::Ace::NG::GeneratedModifier { +namespace RoutedPageModifier { +Ark_NativePointer ConstructImpl(Ark_Int32 id, + Ark_Int32 flags) +{ + auto pageInfo = AceType::MakeRefPtr(id, "", ""); + CHECK_NULL_RETURN(pageInfo, nullptr); + auto pagePattern = AceType::MakeRefPtr(pageInfo); + CHECK_NULL_RETURN(pagePattern, nullptr); + auto pageNode = FrameNode::CreateFrameNode(V2::PAGE_ETS_TAG, id, pagePattern); + CHECK_NULL_RETURN(pageNode, nullptr); + pageNode->SetHostPageId(id); + pageNode->IncRefCount(); + return AceType::RawPtr(pageNode); +} +} // RoutedPageModifier +const GENERATED_ArkUIRoutedPageModifier* GetRoutedPageModifier() +{ + static const GENERATED_ArkUIRoutedPageModifier ArkUIRoutedPageModifierImpl { + RoutedPageModifier::ConstructImpl, + }; + return &ArkUIRoutedPageModifierImpl; +} + +} \ No newline at end of file diff --git a/frameworks/core/interfaces/native/implementation/stage_extender_accessor.cpp b/frameworks/core/interfaces/native/implementation/stage_extender_accessor.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d2ada287668ae6fdd85e653f87647e89810020b1 --- /dev/null +++ b/frameworks/core/interfaces/native/implementation/stage_extender_accessor.cpp @@ -0,0 +1,148 @@ +/* + * Copyright (c) 2024-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "arkoala_api_generated.h" + +#include "core/components_ng/base/frame_node.h" +#include "core/components_ng/pattern/view_context/view_context_model.h" +#include "core/interfaces/native/utility/callback_helper.h" +#include "core/interfaces/native/utility/converter.h" +#include "core/interfaces/native/utility/reverse_converter.h" + +namespace OHOS::Ace::NG::GeneratedModifier { +namespace StageExtenderAccessor { +static StageManager* getStageManager() +{ + auto container = Container::Current(); + CHECK_NULL_RETURN(container, nullptr); + RefPtr pipeline; + pipeline = container->GetPipelineContext(); + CHECK_NULL_RETURN(pipeline, nullptr); + auto context = AceType::DynamicCast(pipeline); + CHECK_NULL_RETURN(context, nullptr); + auto stageManager = context->GetStageManager(); + CHECK_NULL_RETURN(stageManager, nullptr); + + return AceType::RawPtr(stageManager); +} + +static RefPtr getPagePattern(Ark_NativePointer node) +{ + auto* page = AceType::DynamicCast(reinterpret_cast(node)); + CHECK_NULL_RETURN(page, nullptr); + + auto pagePattern = page->GetPattern(); + CHECK_NULL_RETURN(pagePattern, nullptr); + return pagePattern; +} + +void ResetTransitions(Ark_NativePointer node) +{ + auto pagePattern = getPagePattern(node); + CHECK_NULL_VOID(pagePattern); + + pagePattern->ClearPageTransitionEffect(); +} + +void SetSrcPage(Ark_NativePointer node) +{ + auto* page = AceType::DynamicCast(reinterpret_cast(node)); + auto stageManager = getStageManager(); + if (stageManager) { + stageManager->SetSrcPage(AceType::Claim(page)); + } +} + +void PushPage(Ark_NativePointer node) +{ + CHECK_NULL_VOID(node); + auto frameNode = AceType::DynamicCast(reinterpret_cast(node)); + auto stageManager = getStageManager(); + + if (stageManager && frameNode) { + // LOGI("############## StageExtenderAccessor::PushPage: pageID = %{public}d", frameNode->GetId()); + stageManager->PushPage(AceType::Claim(frameNode), true, true); + } +} + +void PopPageAndSwitchTo(Ark_NativePointer node) +{ + CHECK_NULL_VOID(node); + auto frameNode = AceType::DynamicCast(reinterpret_cast(node)); + auto stageManager = getStageManager(); + + if (stageManager && frameNode) { + // LOGI("############## StageExtenderAccessor::PopPageAndSwitchTo: pageID = %{public}d", frameNode->GetId()); + stageManager->PopPage(AceType::Claim(frameNode), true, true); + } +} + +void SetPageTransition(Ark_NativePointer node, const Ark_TransitionParam* param) +{ + auto pagePattern = getPagePattern(node); + CHECK_NULL_VOID(pagePattern); + CHECK_NULL_VOID(param); + + auto progressFunction = Converter::OptConvert(param->onProgress); + auto onFinishFunction = Converter::OptConvert(param->onFinish); + + auto progressCallbackFn = [pf = progressFunction ? CallbackHelper(progressFunction.value()): CallbackHelper(), + of = onFinishFunction ? CallbackHelper(onFinishFunction.value()): CallbackHelper()] + (RouteType type, const float& progress) { + pf.Invoke(static_cast(type), Converter::ArkValue(progress)); + if (progress == 1.0f) { // There is no other way to intercept onFinish + of.Invoke(); + } + }; + + PageTransitionOption options = { + .routeType = Converter::ConvertOrDefault(param->routeType, RouteType::NONE), + .duration = Converter::ConvertOrDefault(param->pageTransitionOptions.duration, 0), + .delay = Converter::ConvertOrDefault(param->pageTransitionOptions.delay, 0), + .curve = Converter::ConvertOrDefault>(param->pageTransitionOptions.curve, Curves::EASE_IN_OUT) + }; + + auto type = (param->pageTransitionType == ARK_PAGE_TRANSITION_TYPE_ENTER) ? PageTransitionType::ENTER : PageTransitionType::EXIT; + auto effect = AceType::MakeRefPtr(type, options); + + auto slideEffect = Converter::OptConvert(param->slideEffect); + if (slideEffect) effect->SetSlideEffect(slideEffect.value()); + + auto translate = Converter::OptConvert(param->translate); + if (translate) effect->SetTranslateEffect(translate.value()); + + auto scale = Converter::OptConvert(param->scale); + if (scale) effect->SetScaleEffect(scale.value()); + + auto opacity = Converter::OptConvert(param->opacity); + if (opacity) effect->SetOpacityEffect(opacity.value()); + + effect->SetUserCallback(progressCallbackFn); + + pagePattern->AddPageTransition(effect); +} +} // StageExtenderAccessor +const GENERATED_ArkUIStageExtenderAccessor* GetStageExtenderAccessor() +{ + static const GENERATED_ArkUIStageExtenderAccessor StageExtenderAccessorImpl { + StageExtenderAccessor::SetSrcPage, + StageExtenderAccessor::PushPage, + StageExtenderAccessor::PopPageAndSwitchTo, + StageExtenderAccessor::ResetTransitions, + StageExtenderAccessor::SetPageTransition, + }; + return &StageExtenderAccessorImpl; +} +} \ No newline at end of file diff --git a/frameworks/core/interfaces/native/utility/converter.cpp b/frameworks/core/interfaces/native/utility/converter.cpp index 0b4a04385e1802cf66d16b1d7ffd67182f79f167..469cc5daa9e37e9add869bd7f437b9292b1c3168 100644 --- a/frameworks/core/interfaces/native/utility/converter.cpp +++ b/frameworks/core/interfaces/native/utility/converter.cpp @@ -644,6 +644,34 @@ ScaleOpt Convert(const Ark_ScaleOptions& src) return scaleOptions; } +template<> +ScaleOptions Convert(const Ark_ScaleOptions& src) +{ + ScaleOptions scaleOptions(1.0f, 1.0f, 1.0f, 0.5_pct, 0.5_pct); + auto coord = OptConvert(src.x); + if (coord.has_value()) { + scaleOptions.xScale = coord.value(); + } + coord = OptConvert(src.y); + if (coord.has_value()) { + scaleOptions.yScale = coord.value(); + } + coord = OptConvert(src.z); + if (coord.has_value()) { + scaleOptions.zScale = coord.value(); + } + + auto center = OptConvert(src.centerX); + if (center.has_value()) { + scaleOptions.centerX = center.value(); + } + center = OptConvert(src.centerY); + if (center.has_value()) { + scaleOptions.centerY = center.value(); + } + return scaleOptions; +} + template<> SelectionOptions Convert(const Ark_SelectionOptions& options) { diff --git a/frameworks/core/interfaces/native/utility/converter.h b/frameworks/core/interfaces/native/utility/converter.h index 1261ce3b040dc9cc2ee2e452c57373cbbac776e4..384430b001b9da61975097db971600ea7ba58d21 100644 --- a/frameworks/core/interfaces/native/utility/converter.h +++ b/frameworks/core/interfaces/native/utility/converter.h @@ -845,6 +845,8 @@ namespace Converter { template<> void AssignCast(std::optional& dst, const Ark_Resource& src); template<> void AssignCast(std::optional& dst, const Ark_Number& src); template<> void AssignCast(std::optional& dst, const Ark_UIContext& src); + template<> void AssignCast(std::optional& dst, const Ark_RouteType& src); + template<> void AssignCast(std::optional& dst, const Ark_SlideEffect& src); // Long declarations goes below. DO NOT ADD SHORT DECLARATIONS HERE! template<> diff --git a/frameworks/core/interfaces/native/utility/converter_enums.cpp b/frameworks/core/interfaces/native/utility/converter_enums.cpp index bb7e9009203a7c0e7944d11f351a42b171d95be3..6a6a004c35c274931a30e1a541a1a1405c0ea525 100644 --- a/frameworks/core/interfaces/native/utility/converter_enums.cpp +++ b/frameworks/core/interfaces/native/utility/converter_enums.cpp @@ -2219,6 +2219,31 @@ void AssignCast(std::optional& dst, const Ark_SourceTool& src) } } +template<> +void AssignCast(std::optional& dst, const Ark_RouteType& src) { + switch (src) { + case ARK_ROUTE_TYPE_NONE: dst = RouteType::NONE; break; + case ARK_ROUTE_TYPE_PUSH: dst = RouteType::PUSH; break; + case ARK_ROUTE_TYPE_POP: dst = RouteType::POP; break; + default: { + LOGE("Unexpected enum value in Ark_RouteType: %{public}d", src); + dst = std::nullopt; + } + } +} + +template<> void AssignCast(std::optional& dst, const Ark_SlideEffect& src) { + switch (src) { + case ARK_SLIDE_EFFECT_LEFT: dst = SlideEffect::LEFT; break; + case ARK_SLIDE_EFFECT_RIGHT: dst = SlideEffect::RIGHT; break; + case ARK_SLIDE_EFFECT_TOP: dst = SlideEffect::TOP; break; + case ARK_SLIDE_EFFECT_BOTTOM: dst = SlideEffect::BOTTOM; break; + case ARK_SLIDE_EFFECT_START: dst = SlideEffect::START; break; + case ARK_SLIDE_EFFECT_END: dst = SlideEffect::END; break; + default: dst = SlideEffect::NONE; break; + } +} + template<> void AssignCast(std::optional& dst, const Ark_HapticFeedbackMode& src) { diff --git a/frameworks/core/interfaces/native/utility/generated/converter_generated.h b/frameworks/core/interfaces/native/utility/generated/converter_generated.h index d4a4e262b7240dbd2f427ff5fc471cd95aa383a8..055af28b7f73d8a2ef2eeea19870759bc6e56712 100644 --- a/frameworks/core/interfaces/native/utility/generated/converter_generated.h +++ b/frameworks/core/interfaces/native/utility/generated/converter_generated.h @@ -3430,6 +3430,7 @@ ASSIGN_OPT(Opt_OptionWidthMode) ASSIGN_OPT(Opt_OutlineStyle) ASSIGN_OPT(Opt_OverScrollMode) ASSIGN_OPT(Opt_PageFlipMode) +ASSIGN_OPT(Opt_PageTransitionOptions) ASSIGN_OPT(Opt_PanDirection) ASSIGN_OPT(Opt_PanGestureOptions) ASSIGN_OPT(Opt_PanRecognizer) @@ -3808,7 +3809,6 @@ ASSIGN_OPT(Opt_Callback_EditableTextChangeValue_Boolean) ASSIGN_OPT(Opt_Callback_EnterKeyType_Void) ASSIGN_OPT(Opt_Callback_ErrorInformation_Void) ASSIGN_OPT(Opt_Callback_Extender_OnFinish) -ASSIGN_OPT(Opt_Callback_Extender_OnProgress) ASSIGN_OPT(Opt_Callback_FocusAxisEvent_Void) ASSIGN_OPT(Opt_Callback_FormCallbackInfo_Void) ASSIGN_OPT(Opt_Callback_FullscreenInfo_Void) @@ -4146,7 +4146,6 @@ ASSIGN_OPT(Opt_DismissContentCoverAction) ASSIGN_OPT(Opt_DismissDialogAction) ASSIGN_OPT(Opt_DismissPopupAction) ASSIGN_OPT(Opt_DismissSheetAction) -ASSIGN_OPT(Opt_DoubleAnimationParam) ASSIGN_OPT(Opt_DragEvent) ASSIGN_OPT(Opt_DragInteractionOptions) ASSIGN_OPT(Opt_DragItemInfo)