• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# @ohos.arkui.node
2
3The **Node** module provides level-2 module APIs of custom nodes to export and use.
4
5> **NOTE**
6>
7> The initial APIs of this module are supported since API version 11. Newly added APIs will be marked with a superscript to indicate their earliest API version.
8>
9> Custom nodes are not available in DevEco Studio Previewer.
10
11## BuilderNode
12
13The [BuilderNode](./js-apis-arkui-builderNode.md#buildernode) module provides APIs for creating a BuilderNode – a custom node that can be used to mount built-in components. Avoid mounting a BuilderNode as a child node to other custom nodes.
14
15**System capability**: SystemCapability.ArkUI.ArkUI.Full
16
17## FrameNode
18
19The [FrameNode](./js-apis-arkui-frameNode.md#framenode) module provides APIs for a FrameNode, which represents an entity node in the component tree. It can be used by a [NodeController](./js-apis-arkui-nodeController.md#nodecontroller) to mount a [BuilderNode](./js-apis-arkui-builderNode.md#buildernode) (that holds the FrameNode) to a [NodeContainer](arkui-ts/ts-basic-components-nodecontainer.md#nodecontainer) or mount a [RenderNode](./js-apis-arkui-renderNode.md#rendernode) to another FrameNode.
20
21**System capability**: SystemCapability.ArkUI.ArkUI.Full
22
23## NodeController
24
25The [NodeController](./js-apis-arkui-nodeController.md#nodecontroller) module provides APIs for managing custom nodes, such as creating, showing, and updating custom nodes, and APIs for mounting custom nodes to a [NodeContainer](arkui-ts/ts-basic-components-nodecontainer.md#nodecontainer) component.
26
27**System capability**: SystemCapability.ArkUI.ArkUI.Full
28
29## Graphics
30
31[Graphics](./js-apis-arkui-graphics.md#graphics) module: provides APIs for defining attributes of a custom node.
32
33**System capability**: SystemCapability.ArkUI.ArkUI.Full
34
35## RenderNode
36
37The [RenderNode](./js-apis-arkui-renderNode.md#rendernode) module provides APIs for creating a RenderNode in custom drawing settings with C APIs.
38
39**System capability**: SystemCapability.ArkUI.ArkUI.Full
40
41## XComponentNode
42
43The [XComponentNode](./js-apis-arkui-xcomponentNode.md#xcomponentnode) module provides APIs a XComponentNode, an **XComponent** in the component tree. You can write EGL/OpenGL ES and media data and display it on the **XComponent**, whose rendering type can be dynamically modified.
44
45**System capability**: SystemCapability.ArkUI.ArkUI.Full
46
47
48
49## Obtaining UI Context
50To obtain the UI context, use any of the following methods:
51
521. Call [getUIContext()](arkts-apis-window-Window.md#getuicontext10) in **ohos.window** to obtain the **UIContext **instance.
53
542. Call the built-in method [getUIContext()](arkui-ts/ts-custom-component-api.md#getuicontext) of the custom component.
55
563. Use the [makeNode](./js-apis-arkui-nodeController.md#makenode) callback of [NodeController](./js-apis-arkui-nodeController.md#nodecontroller).
57