Skip to main content

OH_ArkUI_RenderNodeUtils_AddChild

Function OH_ArkUI_RenderNodeUtils_AddChild 

Source
pub unsafe extern "C" fn OH_ArkUI_RenderNodeUtils_AddChild(
    node: ArkUI_RenderNodeHandle,
    child: ArkUI_RenderNodeHandle,
) -> i32
Available on crate feature api-20 only.
Expand description

Add a child node to the specified RenderNode.

§Arguments

  • node - the parent RenderNode.

  • child - the child RenderNode to add.

§Returns

  • Error code. [ARKUI_ERROR_CODE_NO_ERROR] Success. [ARKUI_ERROR_CODE_PARAM_INVALID] Function parameter exception. [ARKUI_ERROR_CODE_CAPI_INIT_ERROR] if CAPI init error. [ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE] if the node is obtained from a FrameNode. Add since api 22. [ARKUI_ERROR_CODE_RENDER_HAS_INVALID_FRAME_NODE] if the child is obtained from a FrameNode, and its corresponding FrameNode is no longer in the adopted state. Add since api 22.

Available since API-level: 20