diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index dc3d30be4c1491c195b569a958e86367b7945d40..1b92896e6b3fab4202d03802054003b64ae32b7a 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -4138,5 +4138,21 @@ { "first_introduced": "21", "name": "OH_ArkUI_ContentTransitionEffect_Create" + }, + { + "first_introduced": "22", + "name": "OH_ArkUI_XComponentSurfaceOptions_Create" + }, + { + "first_introduced": "22", + "name": "OH_ArkUI_XComponentSurfaceOptions_Dispose" + }, + { + "first_introduced": "22", + "name": "OH_ArkUI_XComponentSurfaceOptions_SetIsOpaque" + }, + { + "first_introduced": "22", + "name": "OH_ArkUI_SurfaceHolder_SetSurfaceOptions" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_interface_xcomponent.h b/arkui/ace_engine/native/native_interface_xcomponent.h index 35dfa7934ec193e0a84c3b0ad99b728298c9b859..e86aceec6d755aeea65a698fb442fdde06c703db 100644 --- a/arkui/ace_engine/native/native_interface_xcomponent.h +++ b/arkui/ace_engine/native/native_interface_xcomponent.h @@ -1308,6 +1308,52 @@ void OH_ArkUI_SurfaceCallback_SetSurfaceShowEvent( void OH_ArkUI_SurfaceCallback_SetSurfaceHideEvent( OH_ArkUI_SurfaceCallback* callback, void (*onSurfaceHide)(OH_ArkUI_SurfaceHolder* surfaceHolder)); + +/** + * @brief Declares the options for Surface held by XComponent. + * + * @since 22 + */ +typedef struct ArkUI_XComponentSurfaceOptions ArkUI_XComponentSurfaceOptions; + +/** + * @brief Create an ArkUI_XComponentSurfaceOptions object. + * + * @return A pointer to the object of the XComponent's surface options. + * @since 22 + */ +ArkUI_XComponentSurfaceOptions* OH_ArkUI_XComponentSurfaceOptions_Create(); + +/** + * @brief Dispose of an ArkUI_XComponentSurfaceOptions object. + * + * @param option A pointer to the object of the XComponent's surface options to be destroyed. + * @since 22 + */ +void OH_ArkUI_XComponentSurfaceOptions_Dispose(ArkUI_XComponentSurfaceOptions* options); + +/** + * @brief Set whether the surface held by XComponent is opaque. + * + * @param option A pointer to the object of the XComponent's surface options. + * @param isOpaque Indicates whether the surface held by XComponent is opaque. + * @since 22 + */ +void OH_ArkUI_XComponentSurfaceOptions_SetIsOpaque(ArkUI_XComponentSurfaceOptions* option, bool isOpaque); + +/** + * @brief Set surface options for this OH_ArkUI_SurfaceHolder instance. + * + * @param surfaceHolder Indicates the pointer to this OH_ArkUI_SurfaceHolder instance. + * @param options Indicates the pointer to the XComponent's surface options. + * @return Returns the status code of the execution. + * {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. + * @since 22 + */ +int32_t OH_ArkUI_SurfaceHolder_SetSurfaceOptions( + OH_ArkUI_SurfaceHolder *surfaceHolder, + ArkUI_XComponentSurfaceOptions *options); #ifdef __cplusplus }; #endif