pub unsafe extern "C" fn OH_ArkUI_XComponent_SetAutoInitialize(
node: ArkUI_NodeHandle,
autoInitialize: bool,
) -> i32Available on crate feature
api-19 only.Expand description
Set whether the XComponent node needs to initialize automatically.
§Arguments
-
node- Indicates the pointer to the XComponent node. -
autoInitialize- Indicates whether the XComponent node needs to initialize automatically or not. If the value is true, OnSurfaceCreated will be called when the node is mounted and OnSurfaceDestroyed will be called when the node is unmounted. Default value is true.
§Returns
- Returns the status code of the execution.
[
ARKUI_ERROR_CODE_NO_ERROR] the execution is successful. [ARKUI_ERROR_CODE_PARAM_INVALID] if the node is invalid.
Available since API-level: 19