diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 3a129e8513165a962b3c12d276d8f94fe2992d9a..d76e8f0be90222304730a8ad24d29ccd21a6cc05 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -3318,5 +3318,21 @@ { "first_introduced": "18", "name": "OH_ArkUI_PanGesture_GetDistanceByToolType" + }, + { + "first_introduced": "20", + "name": "OH_ArkUI_EmbeddedComponentItem_Create" + }, + { + "first_introduced": "20", + "name": "OH_ArkUI_EmbeddedComponentItem_Dispose" + }, + { + "first_introduced": "20", + "name": "OH_ArkUI_EmbeddedComponentItem_SetOnError" + }, + { + "first_introduced": "20", + "name": "OH_ArkUI_EmbeddedComponentItem_SetOnTerminated" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index c1458a02f899bd229dcfdea0ebb2ace220994112..78fff9e25b56c526b37047d9894120e484acebbb 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -138,6 +138,11 @@ typedef enum { ARKUI_NODE_GRID_ITEM, /** Custom span. */ ARKUI_NODE_CUSTOM_SPAN, + /** + * EmbeddedComponent. + * @since 20 + */ + ARKUI_NODE_EMBEDDED_COMPONENT, } ArkUI_NodeType; /** @@ -6301,6 +6306,28 @@ typedef enum { * @since 18 */ NODE_CALENDAR_PICKER_MARK_TODAY = 16007, + + /** + * @brief Defines the want used to start EmbeddedAbility. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * value[0].i32: want. The default value is nullptr.\n + * + * @since 20 + */ + NODE_EMBEDDED_COMPONENT_WANT = MAX_NODE_SCOPE_NUM * ARKUI_NODE_EMBEDDED_COMPONENT, + + /** + * @brief Set onError and onTerminated callbacks for EMBEDDED_COMPONENT. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .object: OH_ArkUI_EmbeddedComponentItem_SetOnError set onError callback. \n + * OH_ArkUI_EmbeddedComponentItem_SetOnTerminated set onTerminated callback.\n + * + * @since 20 + */ + NODE_EMBEDDED_COMPONENT_OPTION, } ArkUI_NodeAttributeType; #define MAX_COMPONENT_EVENT_ARG_NUM 12 diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 5d4d1769125036da29cf3fa68b98944ff52d5868..285ede68dd6a7ef9f46f4ea96caecc6e8a20ceb7 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -242,6 +242,20 @@ typedef struct ArkUI_ProgressLinearStyleOption ArkUI_ProgressLinearStyleOption; */ typedef struct ArkUI_CrossLanguageOption ArkUI_CrossLanguageOption; +/** + * @brief Defines the Ability base want. + * + * @since 20 + */ +typedef struct AbilityBase_Want AbilityBase_Want; + +/** + * @brief Define the EmbeddedComponentItem for the EmbeddedComponent. + * + * @since 20 + */ +typedef struct ArkUI_EmbeddedComponentItem ArkUI_EmbeddedComponentItem; + /** * @brief Defines the event callback type. * @@ -5128,6 +5142,45 @@ void OH_ArkUI_TextCascadePickerRangeContentArray_SetChildAtIndex( *@since 18 */ void OH_ArkUI_TextCascadePickerRangeContentArray_Destroy(ArkUI_TextCascadePickerRangeContentArray* handle); + +/** + * @brief Create a configuration item for the EmbeddedComponentItem interface settings. + * + * @return EmbeddedComponent Item configuration item instance. + * @since 20 + */ +ArkUI_EmbeddedComponentItem *OH_ArkUI_EmbeddedComponentItem_Create(); + +/** + * @brief Destroy the EmbeddedComponentItem instance. + * + * @param item EmbeddedComponent Item instance to be destroyed. + * @since 20 + */ +void OH_ArkUI_EmbeddedComponentItem_Dispose(ArkUI_EmbeddedComponentItem *item); + +/** + * @brief Set the onError of EmbeddedComponentItem. + * + * @param item EmbeddedComponentItem instance. + * @param code Common error information about the API invoking failure. + * @param name Common error name information about the API invoking failure. + * @param message Common error message information about the API invoking failure. + * @since 20 + */ +void OH_ArkUI_EmbeddedComponentItem_SetOnError( + ArkUI_EmbeddedComponentItem *item, void (*callback)(int32_t code, const char *name, const char *message)); + +/** + * @brief Set the onTerminated of EmbeddedComponentItem. + * + * @param item EmbeddedComponentItem instance. + * @param code Result code returned when the EmbeddedUIExtensionAbility exits. + * @param want Data returned when the EmbeddedUIExtensionAbility exits. + * @since 20 + */ +void OH_ArkUI_EmbeddedComponentItem_SetOnTerminated( + ArkUI_EmbeddedComponentItem *item, void (*callback)(int32_t code, AbilityBase_Want *want)); #ifdef __cplusplus }; #endif