Module native_node

Module native_node 

Source
Available on crate feature api-12 only.

Structs§

ArkUI_AttributeItem
Defines the general input parameter structure of the [setAttribute] function.
ArkUI_InspectorErrorCodeapi-15
Enumerates the inspector error codes.
ArkUI_NativeNodeAPI_1
Declares a collection of native node APIs provided by ArkUI.
ArkUI_NodeAdapter
ArkUI_NodeAdapterEvent
Defines the component adapter event.
ArkUI_NodeAdapterEventType
Enumerates component adapter events.
ArkUI_NodeAttributeType
Defines the ArkUI style attributes that can be set on the native side.
ArkUI_NodeComponentEvent
Defines the parameter type of the component callback event.
ArkUI_NodeContentEvent
Defines the general structure of a node content event.
ArkUI_NodeContentEventType
Defines the node content event type.
ArkUI_NodeCustomEvent
Defines the general structure of a custom component event.
ArkUI_NodeCustomEventType
Defines the custom component event type.
ArkUI_NodeDirtyFlag
Defines the dirty area flag passed in the ::markDirty API.
ArkUI_NodeEvent
Defines the common structure type of a component event.
ArkUI_NodeEventType
Enumerates the event types supported by the NativeNode component.
ArkUI_NodeType
Enumerates ArkUI component types that can be created on the native side.
ArkUI_StringAsyncEvent
Defines the string type parameter used by the component callback event.
ArkUI_TextChangeEventapi-15
Defines a hybrid data structure for component events.

Functions§

OH_ArkUI_AddSupportedUIStatesapi-20
Adds the UI state style supported by the component. To handle states change efficiently, need to specify the states of interest and the corresponding handler. When a state of interest occurs, the handler will be executed.
OH_ArkUI_GetContextByNode
Obtain the UIContext pointer to the page where the node is located.
OH_ArkUI_GetNodeSnapshotapi-15
Get the snapshot pixelmap for the given node synchronously, will get error if the node is not on the tree or is not rendered yet. Note: the pixelmap should be released through OH_PixelmapNative_Release when it’s not used any more.
OH_ArkUI_List_CloseAllSwipeActions
Collapse the ListItem in its expanded state.
OH_ArkUI_NativeModule_InvalidateAttributesapi-21
Triggers node updates in the current frame. When node attributes are modified after the current frame’s build phase (i.e., after the unified processing of dirty nodes), the node updates will be deferred to the next frame. This function forces immediate node updates within the current frame to ensure rendering effects are applied synchronously.
OH_ArkUI_NativeModule_RegisterCommonEventapi-21
Register common event callback of target node.
OH_ArkUI_NativeModule_RegisterCommonVisibleAreaApproximateChangeEventapi-21
Register common visible area approximate change event callback of target node.
OH_ArkUI_NativeModule_UnregisterCommonEventapi-21
Unregister common event callback of target node.
OH_ArkUI_NativeModule_UnregisterCommonVisibleAreaApproximateChangeEventapi-21
Unregister common visible area approximate change event callback of target node.
OH_ArkUI_NodeAdapterEvent_GetHostNode
Obtains the scrollable container node that uses the specified adapter.
OH_ArkUI_NodeAdapterEvent_GetItemIndex
Obtains the index of the element to be operated for the specified adapter event.
OH_ArkUI_NodeAdapterEvent_GetRemovedNode
Obtains the element to be removed for the event to be destroyed.
OH_ArkUI_NodeAdapterEvent_GetType
Obtains the event type.
OH_ArkUI_NodeAdapterEvent_GetUserData
Obtains the custom data passed in during registration of the specified event.
OH_ArkUI_NodeAdapterEvent_SetItem
Sets the component to be added to the specified adapter.
OH_ArkUI_NodeAdapterEvent_SetNodeId
Sets the component ID to be generated.
OH_ArkUI_NodeAdapter_Create
Creates a component adapter.
OH_ArkUI_NodeAdapter_Dispose
Destroys a component adapter.
OH_ArkUI_NodeAdapter_GetAllItems
Obtains all elements stored in the specified adapter.
OH_ArkUI_NodeAdapter_GetTotalNodeCount
Obtains the total number of elements in the specified adapter.
OH_ArkUI_NodeAdapter_InsertItem
Instructs the specified adapter to insert certain elements.
OH_ArkUI_NodeAdapter_MoveItem
Instructs the specified adapter to move certain elements.
OH_ArkUI_NodeAdapter_RegisterEventReceiver
Registers an event callback for the adapter.
OH_ArkUI_NodeAdapter_ReloadAllItems
Instructs the specified adapter to reload all elements.
OH_ArkUI_NodeAdapter_ReloadItem
Instructs the specified adapter to reload certain elements.
OH_ArkUI_NodeAdapter_RemoveItem
Instructs the specified adapter to remove certain elements.
OH_ArkUI_NodeAdapter_SetTotalNodeCount
Sets the total number of elements in the specified adapter.
OH_ArkUI_NodeAdapter_UnregisterEventReceiver
Deregisters an event callback for the adapter.
OH_ArkUI_NodeContentEvent_GetEventType
Obtains the type of a node content event.
OH_ArkUI_NodeContentEvent_GetNodeContentHandle
Obtains the node content object that triggers a node content event.
OH_ArkUI_NodeContent_AddNode
Add a node to a node content.
OH_ArkUI_NodeContent_GetUserData
Obtains the custom data saved on the specified node content.
OH_ArkUI_NodeContent_InsertNode
insert a node into a node content at a given position.
OH_ArkUI_NodeContent_RegisterCallback
register a callback function to a node content.
OH_ArkUI_NodeContent_RemoveNode
remove a node from a node content.
OH_ArkUI_NodeContent_SetUserData
Saves custom data on the specified node content.
OH_ArkUI_NodeCustomEvent_GetCustomSpanDrawInfo
Obtains the drawing information of a custom span through a custom component event.
OH_ArkUI_NodeCustomEvent_GetCustomSpanMeasureInfo
Obtains the measurement information of a custom span through a custom component event.
OH_ArkUI_NodeCustomEvent_GetDrawContextInDraw
Obtains the drawing context through a custom component event.
OH_ArkUI_NodeCustomEvent_GetEventTargetId
Obtains the ID of a custom component event.
OH_ArkUI_NodeCustomEvent_GetEventType
Obtains the event type through a custom component event.
OH_ArkUI_NodeCustomEvent_GetLayoutConstraintInMeasure
Obtains the size constraint for measurement through a custom component event.
OH_ArkUI_NodeCustomEvent_GetNodeHandle
Obtains a component object through a custom component event.
OH_ArkUI_NodeCustomEvent_GetPositionInLayout
Obtains the expected position of a component relative to its parent component in the layout phase through a custom component event.
OH_ArkUI_NodeCustomEvent_GetUserData
Obtains custom event parameters through a custom component event.
OH_ArkUI_NodeCustomEvent_SetCustomSpanMetrics
Sets the measurement metrics of a custom span through a custom component event.
OH_ArkUI_NodeEvent_GetEventType
Obtains the type of a component event.
OH_ArkUI_NodeEvent_GetInputEvent
Obtains input event (for example, touch event) data for a component event.
OH_ArkUI_NodeEvent_GetNodeComponentEvent
Obtains the numerical data in a component event.
OH_ArkUI_NodeEvent_GetNodeHandle
Obtains the component object that triggers a component event.
OH_ArkUI_NodeEvent_GetNumberValue
Obtains the numeric-type parameter of a component event.
OH_ArkUI_NodeEvent_GetStringAsyncEvent
Obtains the string data in a component event.
OH_ArkUI_NodeEvent_GetStringValue
Obtains the string-type parameter of a component event. The string data is valid only during an event callback. To use it outside an event callback, you are advised to copy the string data.
OH_ArkUI_NodeEvent_GetTargetId
Obtains the custom ID of a component event.
OH_ArkUI_NodeEvent_GetTextChangeEventapi-15
Obtains the ArkUI_TextChangeEvent data from a component event.
OH_ArkUI_NodeEvent_GetUserData
Obtains the custom data in a component event.
OH_ArkUI_NodeEvent_SetReturnNumberValue
Sets the return value for a component event.
OH_ArkUI_NodeUtils_AddCustomPropertyapi-13
Add the custom property of the component. This interface only works on the main thread.
OH_ArkUI_NodeUtils_GetActiveChildrenInfoapi-14
Retrieve all active child nodes of a node. Span will not be counted in the children.
OH_ArkUI_NodeUtils_GetAttachedNodeHandleByIdapi-15
Get the node handle by id.
OH_ArkUI_NodeUtils_GetChildWithExpandModeapi-15
Obtains a subnode by position with the expand mode.
OH_ArkUI_NodeUtils_GetCrossLanguageOptionapi-15
Get the cross-language option of the target node handle.
OH_ArkUI_NodeUtils_GetCurrentPageRootNodeapi-14
Retrieve the root node of the current page.
OH_ArkUI_NodeUtils_GetCustomPropertyapi-14
Get the value of the custom property of the component.
OH_ArkUI_NodeUtils_GetFirstChildIndexWithoutExpandapi-15
Obtains the index of the current FrameNode’s first child node which is on the tree.
OH_ArkUI_NodeUtils_GetLastChildIndexWithoutExpandapi-15
Obtains the index of the current FrameNode’s last child node which is on the tree.
OH_ArkUI_NodeUtils_GetLayoutPosition
Obtain the position of the component layout area relative to the parent component. The relative position of the layout area does not include graphic variation attributes, such as translation.
OH_ArkUI_NodeUtils_GetLayoutPositionInGlobalDisplayapi-20
Obtains the offset of a component relative to the global display. The relative position does not count in transformation attributes, such as translate.
OH_ArkUI_NodeUtils_GetLayoutPositionInScreen
Obtain the position of the component layout area relative to the screen. The relative position of the layout area does not include graphic variation attributes, such as translation.
OH_ArkUI_NodeUtils_GetLayoutPositionInWindow
Obtain the position of the component layout area relative to the window. The relative position of the layout area does not include graphic variation attributes, such as translation.
OH_ArkUI_NodeUtils_GetLayoutSize
Get the size of the component layout area. The layout area size does not include graphic variation attributes such as scaling.
OH_ArkUI_NodeUtils_GetNodeHandleByUniqueIdapi-20
Get the node handle by uniqueId.
OH_ArkUI_NodeUtils_GetNodeTypeapi-14
Get the type of node.
OH_ArkUI_NodeUtils_GetNodeUniqueIdapi-20
Get the uniqueId of the target node handle.
OH_ArkUI_NodeUtils_GetParentInPageTreeapi-14
Get the parent node to obtain the component nodes created by ArkTs.
OH_ArkUI_NodeUtils_GetPositionToParentapi-15
Obtains the offset of a specific node relative to its parent node.
OH_ArkUI_NodeUtils_GetPositionWithTranslateInScreen
Obtain the position of the component on the screen, including the attributes of graphic translation changes.
OH_ArkUI_NodeUtils_GetPositionWithTranslateInWindow
Obtain the position of the component in the window, including the properties of graphic translation changes.
OH_ArkUI_NodeUtils_GetWindowInfoapi-15
Get info of the window to which the node belongs.
OH_ArkUI_NodeUtils_IsCreatedByNDKapi-14
Retrieve whether the component is labeled by C-API.
OH_ArkUI_NodeUtils_MoveToapi-18
Move the node handle to target parent node as child.
OH_ArkUI_NodeUtils_RemoveCustomPropertyapi-13
Remove the custom property of the component.
OH_ArkUI_NodeUtils_SetCrossLanguageOptionapi-15
Set the cross-language option of the target node handle.
OH_ArkUI_RegisterDrawCallbackOnNodeHandleapi-15
Registers a callback for node when draw is completed.
OH_ArkUI_RegisterLayoutCallbackOnNodeHandleapi-15
Registers a callback for node when layout is completed.
OH_ArkUI_RegisterSystemColorModeChangeEvent
The event called when the system color mode changes. Only one system color change callback can be registered for the same component.
OH_ArkUI_RegisterSystemFontStyleChangeEvent
The event called when the system font style changes. Only one system font change callback can be registered for the same component.
OH_ArkUI_RemoveSupportedUIStatesapi-20
Removes registered UI states. When all states registered using OH_ArkUI_AddSupportedUIStates are removed, the registered stateChangeHandler will no longer be executed.
OH_ArkUI_RunTaskInScopeapi-20
Run a custom function inside the UIContext scope.
OH_ArkUI_SetForceDarkConfigapi-20
Sets the inverse color algorithm for components and instances.
OH_ArkUI_SystemFontStyleEvent_GetFontSizeScale
Retrieve the font size value for system font change events.
OH_ArkUI_SystemFontStyleEvent_GetFontWeightScale
Retrieve the font thickness values for system font change events.
OH_ArkUI_UnregisterDrawCallbackOnNodeHandleapi-15
Unregisters the draw completed callback for node.
OH_ArkUI_UnregisterLayoutCallbackOnNodeHandleapi-15
Unregisters the layout completed callback for node.
OH_ArkUI_UnregisterSystemColorModeChangeEvent
Unregister the event callback when the system color mode changes.
OH_ArkUI_UnregisterSystemFontStyleChangeEvent
Unregister the event callback when the system font style changes.

Type Aliases§

ArkUI_NodeAdapterHandle
Defines the component adapter, which is used for lazy loading of elements of scrollable components.
ArkUI_NodeContentCallback
Defines the callback function of a node content event.