native_node.h

Overview

Provides type definitions for NativeNode APIs.

File to include: <arkui/native_node.h>

Library: libace_ndk.z.so

System capability: SystemCapability.ArkUI.ArkUI.Full

Since: 12

Related module: ArkUI_NativeModule

Sample: native_node_sample

Summary

Structs

Name typedef Keyword Description
ArkUI_AttributeItem ArkUI_AttributeItem Defines the general input parameter structure of the setAttribute function.
ArkUI_NodeComponentEvent ArkUI_NodeComponentEvent Defines a struct for the component callback event.
ArkUI_StringAsyncEvent ArkUI_StringAsyncEvent Defines a struct for the component callback event that uses string parameters.
ArkUI_TextChangeEvent ArkUI_TextChangeEvent Defines a hybrid data structure for component events.
ArkUI_NativeNodeAPI_1 ArkUI_NativeNodeAPI_1 Defines a struct for node APIs of ArkUI on the native side. APIs related to the Node module must be called on the main thread.
ArkUI_NodeEvent ArkUI_NodeEvent Defines a struct for the component event.
ArkUI_NodeCustomEvent ArkUI_NodeCustomEvent Defines a struct for the custom component event.
ArkUI_NodeAdapter* ArkUI_NodeAdapterHandle Defines a struct for the component adapter, which is used for lazy loading of elements of scrollable components.
ArkUI_NodeAdapterEvent ArkUI_NodeAdapterEvent Defines a struct for the component adapter event.
ArkUI_NodeContentEvent ArkUI_NodeContentEvent Defines a struct for the NodeContent event.

Enums

Name typedef Keyword Description
ArkUI_NodeType ArkUI_NodeType Enumerates ArkUI component types that can be created on the native side.
ArkUI_NodeAttributeType ArkUI_NodeAttributeType Enumerates the ArkUI style attributes that can be set on the native side.
ArkUI_NodeEventType ArkUI_NodeEventType Enumerates the event types supported by the NativeNode component.
ArkUI_NodeDirtyFlag ArkUI_NodeDirtyFlag Enumerates the flags passed to indicate the need to re-execute measurement, layout, or rendering when a custom component calls the ::markDirty API.
ArkUI_NodeCustomEventType ArkUI_NodeCustomEventType Enumerates the custom component event types.
ArkUI_NodeAdapterEventType ArkUI_NodeAdapterEventType Enumerates node adapter events.
ArkUI_NodeContentEventType ArkUI_NodeContentEventType Enumerates the event types for NodeContent.
ArkUI_InspectorErrorCode ArkUI_InspectorErrorCode Enumerates the inspector error codes.

Functions

Name typedef Keyword Description
ArkUI_NodeEventType OH_ArkUI_NodeEvent_GetEventType(ArkUI_NodeEvent* event) - Obtains the type of a component event.
int32_t OH_ArkUI_NodeEvent_GetTargetId(ArkUI_NodeEvent* event) - Obtains the custom ID of a component event. The event ID is passed in as a parameter when the registerNodeEvent function is called and can be applied to the dispatch logic of the same event entry point function registerNodeEventReceiver.
ArkUI_NodeHandle OH_ArkUI_NodeEvent_GetNodeHandle(ArkUI_NodeEvent* event) - Obtains the component object that triggers an event.
ArkUI_UIInputEvent* OH_ArkUI_NodeEvent_GetInputEvent(ArkUI_NodeEvent* event) - Obtains input event (for example, touch event) data for a component event.
ArkUI_NodeComponentEvent* OH_ArkUI_NodeEvent_GetNodeComponentEvent(ArkUI_NodeEvent* event) - Obtains the numerical data in a component event.
ArkUI_StringAsyncEvent* OH_ArkUI_NodeEvent_GetStringAsyncEvent(ArkUI_NodeEvent* event) - Obtains the string data in a component event.
ArkUI_TextChangeEvent* OH_ArkUI_NodeEvent_GetTextChangeEvent(ArkUI_NodeEvent* event) - Obtains the ArkUI_TextChangeEvent data from the specified component event.
void* OH_ArkUI_NodeEvent_GetUserData(ArkUI_NodeEvent* event) - Obtains the custom data in a component event. This parameter is passed in registerNodeEvent and can be applied to the service logic when the event is triggered.
int32_t OH_ArkUI_NodeEvent_GetNumberValue(ArkUI_NodeEvent* event, int32_t index, ArkUI_NumberValue* value) - Obtains the numeric-type parameter of a component event.
int32_t OH_ArkUI_NodeEvent_GetStringValue(ArkUI_NodeEvent* event, int32_t index, char** string, int32_t* stringSize) - 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.
int32_t OH_ArkUI_NodeEvent_SetReturnNumberValue(ArkUI_NodeEvent* event, ArkUI_NumberValue* value, int32_t size) - Sets the return value for a component event.
ArkUI_NodeAdapterHandle OH_ArkUI_NodeAdapter_Create() - Creates a component adapter.
void OH_ArkUI_NodeAdapter_Dispose(ArkUI_NodeAdapterHandle handle) - Disposes of a component adapter.
int32_t OH_ArkUI_NodeAdapter_SetTotalNodeCount(ArkUI_NodeAdapterHandle handle, uint32_t size) - Sets the total number of elements in the specified adapter.
uint32_t OH_ArkUI_NodeAdapter_GetTotalNodeCount(ArkUI_NodeAdapterHandle handle) - Obtains the total number of elements in the specified adapter.
int32_t OH_ArkUI_NodeAdapter_RegisterEventReceiver(ArkUI_NodeAdapterHandle handle, void* userData, void (*receiver)(ArkUI_NodeAdapterEvent* event)) - Registers an event callback for the specified adapter.
void OH_ArkUI_NodeAdapter_UnregisterEventReceiver(ArkUI_NodeAdapterHandle handle) - Unregisters an event callback for the specified adapter.
int32_t OH_ArkUI_NodeAdapter_ReloadAllItems(ArkUI_NodeAdapterHandle handle) - Instructs the specified adapter to reload all elements.
int32_t OH_ArkUI_NodeAdapter_ReloadItem(ArkUI_NodeAdapterHandle handle, uint32_t startPosition, uint32_t itemCount) - Instructs the specified adapter to reload certain elements.
int32_t OH_ArkUI_NodeAdapter_RemoveItem(ArkUI_NodeAdapterHandle handle, uint32_t startPosition, uint32_t itemCount) - Instructs the specified adapter to remove certain elements.
int32_t OH_ArkUI_NodeAdapter_InsertItem(ArkUI_NodeAdapterHandle handle, uint32_t startPosition, uint32_t itemCount) - Instructs the specified adapter to insert certain elements.
int32_t OH_ArkUI_NodeAdapter_MoveItem(ArkUI_NodeAdapterHandle handle, uint32_t from, uint32_t to) - Instructs the specified adapter to move certain elements.
int32_t OH_ArkUI_NodeAdapter_GetAllItems(ArkUI_NodeAdapterHandle handle, ArkUI_NodeHandle** items, uint32_t* size) - Obtains all elements stored in the specified adapter. When the API is called, the array object pointer of the element is returned. You must release the memory data to which the pointer points.
void* OH_ArkUI_NodeAdapterEvent_GetUserData(ArkUI_NodeAdapterEvent* event) - Obtains the custom data passed in during registration of the specified event.
ArkUI_NodeAdapterEventType OH_ArkUI_NodeAdapterEvent_GetType(ArkUI_NodeAdapterEvent* event) - Obtains the event type.
ArkUI_NodeHandle OH_ArkUI_NodeAdapterEvent_GetRemovedNode(ArkUI_NodeAdapterEvent* event) - Obtains the element to be removed for the event to be destroyed.
uint32_t OH_ArkUI_NodeAdapterEvent_GetItemIndex(ArkUI_NodeAdapterEvent* event) - Obtains the index of the element to be operated for the specified adapter event.
ArkUI_NodeHandle OH_ArkUI_NodeAdapterEvent_GetHostNode(ArkUI_NodeAdapterEvent* event) - Obtains the scrollable container node that uses the specified adapter.
int32_t OH_ArkUI_NodeAdapterEvent_SetItem(ArkUI_NodeAdapterEvent* event, ArkUI_NodeHandle node) - Sets the component to be added to the specified adapter.
int32_t OH_ArkUI_NodeAdapterEvent_SetNodeId(ArkUI_NodeAdapterEvent* event, int32_t id) - Sets the component ID to be generated.
ArkUI_LayoutConstraint* OH_ArkUI_NodeCustomEvent_GetLayoutConstraintInMeasure(ArkUI_NodeCustomEvent* event) - Obtains the size constraint for measurement through a custom component event.
ArkUI_IntOffset OH_ArkUI_NodeCustomEvent_GetPositionInLayout(ArkUI_NodeCustomEvent* event) - Obtains the expected position of a component relative to its parent component in the layout phase through a custom component event.
ArkUI_DrawContext* OH_ArkUI_NodeCustomEvent_GetDrawContextInDraw(ArkUI_NodeCustomEvent* event) - Obtains the drawing context through a custom component event.
int32_t OH_ArkUI_NodeCustomEvent_GetEventTargetId(ArkUI_NodeCustomEvent* event) - Obtains the ID of a custom component event.
void* OH_ArkUI_NodeCustomEvent_GetUserData(ArkUI_NodeCustomEvent* event) - Obtains custom event parameters through a custom component event.
ArkUI_NodeHandle OH_ArkUI_NodeCustomEvent_GetNodeHandle(ArkUI_NodeCustomEvent* event) - Obtains a component object through a custom component event.
ArkUI_NodeCustomEventType OH_ArkUI_NodeCustomEvent_GetEventType(ArkUI_NodeCustomEvent* event) - Obtains the event type through a custom component event.
int32_t OH_ArkUI_NodeCustomEvent_GetCustomSpanMeasureInfo(ArkUI_NodeCustomEvent* event, ArkUI_CustomSpanMeasureInfo* info) - Obtains the measurement information of a custom span through a custom component event.
int32_t OH_ArkUI_NodeCustomEvent_SetCustomSpanMetrics(ArkUI_NodeCustomEvent* event, ArkUI_CustomSpanMetrics* metrics) - Sets the measurement metrics of a custom span through a custom component event.
int32_t OH_ArkUI_NodeCustomEvent_GetCustomSpanDrawInfo(ArkUI_NodeCustomEvent* event, ArkUI_CustomSpanDrawInfo* info) - Obtains the drawing information of a custom span through a custom component event.
typedef void (*ArkUI_NodeContentCallback)(ArkUI_NodeContentEvent* event) ArkUI_NodeContentCallback Defines a callback for the NodeContent event.
int32_t OH_ArkUI_NodeContent_RegisterCallback(ArkUI_NodeContentHandle content, ArkUI_NodeContentCallback callback) - Registers an event callback for the NodeContent.
ArkUI_NodeContentEventType OH_ArkUI_NodeContentEvent_GetEventType(ArkUI_NodeContentEvent* event) - Obtains the type of the specified NodeContent event.
ArkUI_NodeContentHandle OH_ArkUI_NodeContentEvent_GetNodeContentHandle(ArkUI_NodeContentEvent* event) - Obtains the object that triggers the specified NodeContent event.
int32_t OH_ArkUI_NodeContent_SetUserData(ArkUI_NodeContentHandle content, void* userData) - Saves custom data to the specified NodeContent object.
void* OH_ArkUI_NodeContent_GetUserData(ArkUI_NodeContentHandle content) - Obtains the custom data saved on the specified NodeContent object.
int32_t OH_ArkUI_NodeContent_AddNode(ArkUI_NodeContentHandle content, ArkUI_NodeHandle node) - Adds an ArkUI component node to the specified NodeContent object.
int32_t OH_ArkUI_NodeContent_RemoveNode(ArkUI_NodeContentHandle content, ArkUI_NodeHandle node) - Removes an ArkUI component node from the specified NodeContent object.
int32_t OH_ArkUI_NodeContent_InsertNode(ArkUI_NodeContentHandle content, ArkUI_NodeHandle node, int32_t position) - Inserts an ArkUI component node into a specific position of the specified NodeContent object.
int32_t OH_ArkUI_NodeUtils_GetLayoutSize(ArkUI_NodeHandle node, ArkUI_IntSize* size) - Obtains the layout area size of the component. The size does not count in transformation attributes, such as scale.
int32_t OH_ArkUI_NodeUtils_GetLayoutPosition(ArkUI_NodeHandle node, ArkUI_IntOffset* localOffset) - Obtains the position of the component's layout area relative to its parent component. The relative position does not count in transformation attributes, such as translate.
int32_t OH_ArkUI_NodeUtils_GetLayoutPositionInWindow(ArkUI_NodeHandle node, ArkUI_IntOffset* globalOffset) - Obtains the position of the component's layout area relative to the window. The relative position does not count in transformation attributes, such as translate.
int32_t OH_ArkUI_NodeUtils_GetLayoutPositionInScreen(ArkUI_NodeHandle node, ArkUI_IntOffset* screenOffset) - Obtains the position of the component's layout area relative to the screen. The relative position does not count in transformation attributes, such as translate.
int32_t OH_ArkUI_NodeUtils_GetLayoutPositionInGlobalDisplay(ArkUI_NodeHandle node, ArkUI_IntOffset* offset) - Obtains the offset of the specified component relative to the global display. The relative position does not count in transformation attributes, such as translate.
int32_t OH_ArkUI_NodeUtils_GetPositionWithTranslateInWindow(ArkUI_NodeHandle node, ArkUI_IntOffset* translateOffset) - Obtains the position of the component in the window, including the translate attribute.
int32_t OH_ArkUI_NodeUtils_GetPositionWithTranslateInScreen(ArkUI_NodeHandle node, ArkUI_IntOffset* translateOffset) - Obtains the position of the component on the screen, including the translate attribute.
void OH_ArkUI_NodeUtils_AddCustomProperty(ArkUI_NodeHandle node, const char* name, const char* value) - Sets a custom property for a component. This API takes effect only in the main thread.
void OH_ArkUI_NodeUtils_RemoveCustomProperty(ArkUI_NodeHandle node, const char* name) - Removes a custom property that has been set for the specified component.
int32_t OH_ArkUI_NodeUtils_GetCustomProperty(ArkUI_NodeHandle node, const char* name, ArkUI_CustomProperty** handle) - Obtains the value of a custom property of the specified component.
ArkUI_NodeHandle OH_ArkUI_NodeUtils_GetParentInPageTree(ArkUI_NodeHandle node) - Obtains the parent node, which can be a component node created with ArkTS.
int32_t OH_ArkUI_NodeUtils_GetActiveChildrenInfo(ArkUI_NodeHandle head, ArkUI_ActiveChildrenInfo** handle) - Obtains all active child nodes of the specified node. Spans are not counted as child nodes.
ArkUI_NodeHandle OH_ArkUI_NodeUtils_GetCurrentPageRootNode(ArkUI_NodeHandle node) - Obtains the root node of the current page.
bool OH_ArkUI_NodeUtils_IsCreatedByNDK(ArkUI_NodeHandle node) - Checks whether the specified component is created with C APIs.
int32_t OH_ArkUI_NodeUtils_GetNodeType(ArkUI_NodeHandle node) - Obtains the type of the specified node.
int32_t OH_ArkUI_NodeUtils_GetWindowInfo(ArkUI_NodeHandle node, ArkUI_HostWindowInfo** info) - Obtains the information about the window to which a node belongs.
int32_t OH_ArkUI_NodeUtils_MoveTo(ArkUI_NodeHandle node, ArkUI_NodeHandle target_parent, int32_t index) - Moves a node to a target parent node as a child.
int32_t OH_ArkUI_NativeModule_InvalidateAttributes(ArkUI_NodeHandle node) - Triggers the node attribute update in this frame.
int32_t OH_ArkUI_List_CloseAllSwipeActions(ArkUI_NodeHandle node, void* userData, void (*onFinish)(void* userData)) - Collapses list items in the expanded state.
ArkUI_ContextHandle OH_ArkUI_GetContextByNode(ArkUI_NodeHandle node) - Obtains the pointer to the UI context object of the specified node.
int32_t OH_ArkUI_RegisterSystemColorModeChangeEvent(ArkUI_NodeHandle node,void* userData, void (*onColorModeChange)(ArkUI_SystemColorMode colorMode, void* userData)) - Registers an event listener for system color mode changes. A single component can only register one callback for system color mode changes. For implementation examples, see Listening for Component Events.
void OH_ArkUI_UnregisterSystemColorModeChangeEvent(ArkUI_NodeHandle node) - Unregisters the event listener for system color mode changes.
int32_t OH_ArkUI_RegisterSystemFontStyleChangeEvent(ArkUI_NodeHandle node,void* userData, void (*onFontStyleChange)(ArkUI_SystemFontStyleEvent* event, void* userData)) - Registers an event listener for system font style changes. A single component can only register one callback for system font style changes.
void OH_ArkUI_UnregisterSystemFontStyleChangeEvent(ArkUI_NodeHandle node) - Unregisters the event listener for system font style changes.
float OH_ArkUI_SystemFontStyleEvent_GetFontSizeScale(const ArkUI_SystemFontStyleEvent* event) - Obtains the font size from the system font style change event.
float OH_ArkUI_SystemFontStyleEvent_GetFontWeightScale(const ArkUI_SystemFontStyleEvent* event) - Obtains the font weight from the system font style change event.
int32_t OH_ArkUI_RegisterLayoutCallbackOnNodeHandle(ArkUI_NodeHandle node,void* userData, void (*onLayoutCompleted)(void* userData)) - Registers a layout completion callback function for a specific node.
int32_t OH_ArkUI_RegisterDrawCallbackOnNodeHandle(ArkUI_NodeHandle node,void* userData, void (*onDrawCompleted)(void* userData)) - Registers a drawing completion callback function for a specific node.
int32_t OH_ArkUI_UnregisterLayoutCallbackOnNodeHandle(ArkUI_NodeHandle node) - Unregisters the layout completion callback function for a specific node.
int32_t OH_ArkUI_UnregisterDrawCallbackOnNodeHandle(ArkUI_NodeHandle node) - Unregisters the drawing completion callback function for a specific node.
int32_t OH_ArkUI_GetNodeSnapshot(ArkUI_NodeHandle node, ArkUI_SnapshotOptions* snapshotOptions,OH_PixelmapNative** pixelmap) - Obtains a snapshot of a given component. If the node is not in the component tree or has not been rendered, the snapshot operation will fail. When the PixelMap is no longer used, you should call OH_PixelmapNative_Release to release it.
int32_t OH_ArkUI_NodeUtils_GetAttachedNodeHandleById(const char* id, ArkUI_NodeHandle* node) - Obtains the target node based on the provided user ID.
int32_t OH_ArkUI_NodeUtils_GetNodeHandleByUniqueId(const uint32_t uniqueId, ArkUI_NodeHandle* node) - Obtain a node by its unique ID.
int32_t OH_ArkUI_NodeUtils_GetNodeUniqueId(ArkUI_NodeHandle node, int32_t* uniqueId) - Obtains the unique ID of the target node.
int32_t OH_ArkUI_NativeModule_AdoptChild(ArkUI_NodeHandle node, ArkUI_NodeHandle child) - Adopts the target node as an affiliated node. The adopted node must not have an existing parent. This API is not used to add a node as a child node. Instead, it only allows the node to receive lifecycle callbacks of the corresponding child node.
int32_t OH_ArkUI_NativeModule_RemoveAdoptedChild(ArkUI_NodeHandle node, ArkUI_NodeHandle child) - Removes a previously-adopted affiliated node.
int32_t OH_ArkUI_NativeModule_IsInRenderState(ArkUI_NodeHandle node, bool* isInRenderState) - Checks whether this node is in render state. A node is considered to be in render state when its corresponding RenderNode is present in the render tree.
int32_t OH_ArkUI_NodeUtils_SetCrossLanguageOption(ArkUI_NodeHandle node, ArkUI_CrossLanguageOption* option) - Sets the cross-language options for the target node.
int32_t OH_ArkUI_NodeUtils_GetCrossLanguageOption(ArkUI_NodeHandle node, ArkUI_CrossLanguageOption* option) - Obtains the cross-language options for the target node.
int32_t OH_ArkUI_NodeUtils_GetFirstChildIndexWithoutExpand(ArkUI_NodeHandle node, uint32_t* index) - Obtains the index of the first child node of the target node in the tree without expanding any nodes.
int32_t OH_ArkUI_NodeUtils_GetLastChildIndexWithoutExpand(ArkUI_NodeHandle node, uint32_t* index) - Obtains the index of the last child node of the target node in the tree without expanding any nodes.
int32_t OH_ArkUI_NodeUtils_GetChildWithExpandMode(ArkUI_NodeHandle node, int32_t position,ArkUI_NodeHandle* subnode, uint32_t expandMode) - Obtains a child node at the specified index using different expansion modes.
int32_t OH_ArkUI_NodeUtils_GetPositionToParent(ArkUI_NodeHandle node, ArkUI_IntOffset* globalOffset) - Obtains the offset of the target node relative to its parent node, in px.
ArkUI_ErrorCode OH_ArkUI_AddSupportedUIStates(ArkUI_NodeHandle node, int32_t uiStates,void (statesChangeHandler)(int32_t currentStates, void* userData), bool excludeInner, void* userData) - Adds the polymorphic style states supported by the component. To handle states efficiently, specify the states of interest and their corresponding handlers. When a state of interest occurs, the handler will be executed. You can adjust the UI style based on the current state within the callback. If this API is called multiple times on the same node, the last set of states and handlers will take precedence. Some component types have default system handling for certain states. For example, the Button component has a default style effect for the PRESSED state. When custom state handling is implemented on such components, the default style effect will be applied first, followed by the custom style changes, resulting in a combined effect. To disable the default style effects, set excludeInner to true, if this is allowed by the system implementation. When this API is called, the provided handler function will be executed immediately. There is no need to explicitly register a listener for the NORMAL state. Once a non-NORMAL state is registered, the system will automatically notify your application when the state changes back to NORMAL.
ArkUI_ErrorCode OH_ArkUI_RemoveSupportedUIStates(ArkUI_NodeHandle node, int32_t uiStates) - Removes registered UI states. When all states registered using OH_ArkUI_AddSupportedUIStates are removed, the registered stateChangeHandler will no longer be executed.
int32_t OH_ArkUI_RunTaskInScope(ArkUI_ContextHandle uiContext, void* userData, void(*callback)(void* userData)) - Executes the specified callback in the target UI context. For the implementation example, see Ensuring Multi-Instance Functionality in the NDK.
int32_t OH_ArkUI_PostAsyncUITask(ArkUI_ContextHandle context, void* asyncUITaskData, void (*asyncUITask)(void* asyncUITaskData), void (*onFinish)(void* asyncUITaskData)) - Submits the asyncUITask function to a non-UI thread provided by the ArkUI framework for execution. After asyncUITask finishes execution, the onFinish function is called in the UI thread. This is suitable for scenarios involving multi-threaded UI component creation. You can use this API to create UI components in non-UI threads and then mount the created components to the main tree in the UI thread.
int32_t OH_ArkUI_PostUITask(ArkUI_ContextHandle context, void* taskData, void (*task)(void* taskData)) - Submits the task function to the UI thread for execution. This is suitable for scenarios involving multi-threaded UI component creation. When you create UI components in a self-built thread, you can use this API to mount the created components to the main tree on the UI thread.
int32_t OH_ArkUI_PostUITaskAndWait(ArkUI_ContextHandle context, void* taskData, void (*task)(void* taskData)) - Submits the task function to the UI thread for execution. The thread calling this API will block until the task function completes execution. Calling this API from the UI thread is equivalent to synchronously calling the task function. This is suitable for scenarios involving multi-threaded UI component creation. When you need to call functions that are only supported on the UI thread during the multi-threaded component creation process, you can use this API to return to the UI thread to call the function and then resume multi-threaded component creation after the call completes. When the UI thread is under high load, non-UI threads calling this API may block for extended periods, affecting the performance of multi-threaded UI component creation. Frequent use is not recommended.
int32_t OH_ArkUI_NativeModule_RegisterCommonEvent(ArkUI_NodeHandle node, ArkUI_NodeEventType eventType, void* userData, void (callback)(ArkUI_NodeEvent event)) - Registers a basic event callback for the target node.
int32_t OH_ArkUI_NativeModule_UnregisterCommonEvent(ArkUI_NodeHandle node, ArkUI_NodeEventType eventType) - Unregisters the basic event callback for the target node.
int32_t OH_ArkUI_NativeModule_RegisterCommonVisibleAreaApproximateChangeEvent(ArkUI_NodeHandle node, float* ratios, int32_t size, float expectedUpdateInterval, void* userData, void (callback)(ArkUI_NodeEvent event)) - Registers a basic event callback for visible area changes with a constrained callback interval.
int32_t OH_ArkUI_NativeModule_UnregisterCommonVisibleAreaApproximateChangeEvent(ArkUI_NodeHandle node) - Unregisters the basic event callback for visible area changes with a constrained callback interval.
int32_t OH_ArkUI_Swiper_FinishAnimation(ArkUI_NodeHandle node) - Stops the page turning animation being executed by the specified Swiper node.
int32_t OH_ArkUI_SetForceDarkConfig(ArkUI_ContextHandle uiContext, bool forceDark, ArkUI_NodeType nodeType, uint32_t (*colorInvertFunc)(uint32_t color)) - Sets the color inversion algorithm for the component and instance.
ArkUI_TouchTestInfo* OH_ArkUI_NodeEvent_GetTouchTestInfo(ArkUI_NodeEvent* nodeEvent) - Obtains the touch test information in the component event.
int32_t OH_ArkUI_NativeModule_ConvertPositionToWindow(ArkUI_NodeHandle currentNode, ArkUI_IntOffset localPosition, ArkUI_IntOffset* windowPosition) - Converts the coordinates of a point from the coordinate system of the target node to the coordinate system of the current window.
int32_t OH_ArkUI_NativeModule_ConvertPositionFromWindow(ArkUI_NodeHandle targetNode, ArkUI_IntOffset windowPosition, ArkUI_IntOffset* localPosition) - Converts the coordinates of a point from the current window's coordinate system to the target node's coordinate system.
int32_t OH_ArkUI_Swiper_StartFakeDrag(ArkUI_NodeHandle node, bool* isSuccessful) - Starts a simulated drag on a Swiper node. OH_ArkUI_Swiper_FakeDragBy can be used to simulate a drag action. OH_ArkUI_Swiper_StopFakeDrag can be used to stop the drag simulation.
A simulated drag can be interrupted by a real drag. To ignore a drag event from a user during the simulated drag, use NODE_SWIPER_DISABLE_SWIPE.
int32_t OH_ArkUI_Swiper_FakeDragBy(ArkUI_NodeHandle node, float offset, bool* isConsumedOffset) - Simulates the drag effect by setting the offset of a Swiper node. Before calling this API, you must call OH_ArkUI_Swiper_StartFakeDrag to start the drag simulation.
int32_t OH_ArkUI_Swiper_StopFakeDrag(ArkUI_NodeHandle node, bool* isSuccessful) - Stops the drag simulation on a Swiper node.
int32_t OH_ArkUI_Swiper_IsFakeDragging(ArkUI_NodeHandle node, bool* isFakeDragging) - Obtains the drag simulation status on a Swiper node.
int32_t OH_ArkUI_Swiper_ShowPrevious(ArkUI_NodeHandle node) - Displays the previous page of a Swiper node.
int32_t OH_ArkUI_Swiper_ShowNext(ArkUI_NodeHandle node) - Displays the next page of a Swiper node.
int32_t OH_ArkUI_NativeModule_GetPageRootNodeHandleByContext(ArkUI_ContextHandle context, ArkUI_NodeHandle* rootNode) - Obtains the root node of the page in the window corresponding to the specified UI context.

Macros

Name Description
MAX_NODE_SCOPE_NUM 1000 Defines the maximum number methods for a component.
MAX_COMPONENT_EVENT_ARG_NUM 12 Defines the maximum number of parameters for a component event.

Enum Description

ArkUI_NodeType

enum ArkUI_NodeType

Description

Enumerates ArkUI component types that can be created on the native side.

Since: 12

Value Description
ARKUI_NODE_CUSTOM = 0 Custom node.
ARKUI_NODE_TEXT = 1 Text.
ARKUI_NODE_SPAN = 2 Text span.
ARKUI_NODE_IMAGE_SPAN = 3 Image span.
ARKUI_NODE_IMAGE = 4 Image.
ARKUI_NODE_TOGGLE = 5 Toggle.
ARKUI_NODE_LOADING_PROGRESS = 6 Loading icon.
ARKUI_NODE_TEXT_INPUT = 7 Single-line text input.
ARKUI_NODE_TEXT_AREA = 8 Multi-line text input.
ARKUI_NODE_BUTTON = 9 Icon.
ARKUI_NODE_PROGRESS = 10 Progress indicator.
ARKUI_NODE_CHECKBOX = 11 Check box.
ARKUI_NODE_XCOMPONENT = 12 XComponent of the SURFACE type.
ARKUI_NODE_DATE_PICKER = 13 Date picker.
ARKUI_NODE_TIME_PICKER = 14 Time picker.
ARKUI_NODE_TEXT_PICKER = 15 Text picker.
ARKUI_NODE_CALENDAR_PICKER = 16 Calendar picker.
ARKUI_NODE_SLIDER = 17 Slider.
ARKUI_NODE_RADIO = 18 Radio button.
ARKUI_NODE_IMAGE_ANIMATOR = 19 Frame animation component.
ARKUI_NODE_XCOMPONENT_TEXTURE XComponent of the TEXTURE type.
Since: 18
ARKUI_NODE_CHECKBOX_GROUP = 21 Check box group.
Since: 15
ARKUI_NODE_TEXT_EDITOR = 22 Text editor.
Since: 24
ARKUI_NODE_STACK = MAX_NODE_SCOPE_NUM Stack container.
ARKUI_NODE_SWIPER Swiper.
ARKUI_NODE_SCROLL Scrolling container.
ARKUI_NODE_LIST = 1003 List.
ARKUI_NODE_LIST_ITEM = 1004 List item.
ARKUI_NODE_LIST_ITEM_GROUP = 1005 List item group.
ARKUI_NODE_COLUMN Column container.
ARKUI_NODE_ROW Row container.
ARKUI_NODE_FLEX Flex container.
ARKUI_NODE_REFRESH Refresh component.
ARKUI_NODE_WATER_FLOW Water flow container.
ARKUI_NODE_FLOW_ITEM Water flow item.
ARKUI_NODE_RELATIVE_CONTAINER Relative layout component.
ARKUI_NODE_GRID Grid.
ARKUI_NODE_GRID_ITEM Grid item.
ARKUI_NODE_CUSTOM_SPAN Custom span.
ARKUI_NODE_EMBEDDED_COMPONENT In-application embedded component.
Since: 20
ARKUI_NODE_UNDEFINED Undefined component type. All component types in the color inversion API.
Since: 20
ARKUI_NODE_PICKER = 1018 Picker component, which is used to implement user selection operations.
Since: 23

ArkUI_NodeAttributeType

enum ArkUI_NodeAttributeType

Description

Enumerates the ArkUI style attributes that can be set on the native side.

Since: 12

Value Description
NODE_WIDTH = 0 Defines the width attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: width, in vp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: width, in vp.
NODE_HEIGHT = 1 Defines the height attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: height, in vp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: height, in vp.
NODE_BACKGROUND_COLOR = 2 Defines the background color attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: background color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: background color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
NODE_BACKGROUND_IMAGE = 3 Defines the background image attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: image address. In API version 22 and earlier versions, the value can be a network image resource address, local image resource address, Base64 image, or PixelMap, but cannot be an animated image such as an SVG, GIF, or WebP image. In API version 23 and later versions, animated images of the WebP and GIF types are supported. Only the first frame of the animated image is displayed. Other types of animated images are not supported.
.value[0]?.i32: whether to repeat the image. Optional. The parameter type is ArkUI_ImageRepeat. The default value is ARKUI_IMAGE_REPEAT_NONE.
.object: PixelMap object. The parameter type is ArkUI_DrawableDescriptor.
Format of the return value ArkUI_AttributeItem:
.string: image address. In API version 22 and earlier versions, the value can be network image resource addresses, local image resource addresses, Base64 strings, or PixelMap resources, but cannot be addresses of SVG images, or animated images such as GIF and WebP. In API version 23 and later versions, animated images of the WebP and GIF types are supported. Only the first frame of the animated image is displayed. Other types of animated images are not supported.
.value[0].i32: whether to repeat the image. The parameter type is ArkUI_ImageRepeat.
.object: PixelMap object. The parameter type is ArkUI_DrawableDescriptor.
Either .object or .string must be set.
NODE_PADDING = 4 Defines the padding attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
1: Specify the same padding for the four directions.
.value[0].f32: padding, in vp.
2: Specify different paddings for different directions.
.value[0].f32: top padding, in vp. The default value is 0.
.value[1].f32: right padding, in vp. The default value is 0.
.value[2].f32: bottom padding, in vp. The default value is 0.
.value[3].f32: left padding, in vp. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: top padding, in vp.
.value[1].f32: right padding, in vp.
.value[2].f32: bottom padding, in vp.
.value[3].f32: left padding, in vp.
NODE_ID = 5 Defines the component ID attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: component ID.
Format of the return value ArkUI_AttributeItem:
.string: component ID.
NODE_ENABLED = 6 Defines the interactivity attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: The value true means that the component can interact with users, and false means the opposite.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: The value 1 means that the component can interact with users, and 0 means the opposite.
NODE_MARGIN = 7 Defines the margin attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
1: Specify the same margin for the four directions.
.value[0].f32: margin, in vp.
2: Specify different margins for different directions.
.value[0].f32: top margin, in vp. The default value is 0.
.value[1].f32: right margin, in vp. The default value is 0.
.value[2].f32: bottom margin, in vp. The default value is 0.
.value[3].f32: left margin, in vp. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: top margin, in vp.
.value[1].f32: right margin, in vp.
.value[2].f32: bottom margin, in vp.
.value[3].f32: left margin, in vp.
NODE_TRANSLATE = 8 Defines the translation attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: distance to translate along the x-axis, in vp. The default value is 0.
.value[1].f32: distance to translate along the y-axis, in vp. The default value is 0.
.value[2].f32: translation distance along the z-axis, in vp. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: distance to translate along the x-axis, in vp.
.value[1].f32: distance to translate along the y-axis, in vp.
.value[2].f32: distance to translate along the z-axis, in vp.
NODE_SCALE = 9 Defines the scaling attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: scale factor along the x-axis. The default value is 1.
.value[1].f32: scale factor along the y-axis. The default value is 1.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: scale factor along the x-axis.
.value[1].f32: scale factor along the y-axis.
NODE_ROTATE = 10 Defines the rotation attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: X-coordinate of the rotation axis vector. The default value is 0.
.value[1].f32: Y-coordinate of the rotation axis vector. The default value is 0.
.value[2].f32: Z-coordinate of the rotation axis vector. The default value is 0.
.value[3].f32: rotation angle. The default value is 0.
.value[4].f32: line of sight, that is, the distance from the viewpoint to the z=0 plane, in vp. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: X-coordinate of the rotation axis vector.
.value[1].f32: Y-coordinate of the rotation axis vector.
.value[2].f32: Z-coordinate of the rotation axis vector.
.value[3].f32: rotation angle.
.value[4].f32: line of sight, that is, the distance from the viewpoint to the z=0 plane, in vp.
NODE_BRIGHTNESS = 11 Defines the brightness attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: brightness value. The default value is 1.0, and the recommended value range is [0, 2.0].
Format of the return value ArkUI_AttributeItem:
.value[0].f32: brightness value.
NODE_SATURATION = 12 Defines the saturation attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: saturation value. The default value is 1.0, and the recommended value range is [0, 50.0).
Format of the return value ArkUI_AttributeItem:
.value[0].f32: saturation value.
NODE_BLUR = 13 Defines the blur attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: blur radius. A larger value indicates a higher blur degree. If the value is 0, the component is not blurred. If the value is less than 0, it is treated as 0 and no error code is returned. The unit is vp. The default value is 0.0.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: blur radius. The larger the fuzzy radius, the more blurred the image. If the value is 0, the image is not blurred. The unit is vp.
NODE_LINEAR_GRADIENT = 14 Defines the gradient attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: start angle of the linear gradient. This attribute takes effect only when ArkUI_LinearGradientDirection is set to ARKUI_LINEAR_GRADIENT_DIRECTION_CUSTOM. A positive value indicates a clockwise rotation from the origin, (0, 0). The default value is 180.
.value[1].i32: direction of the linear gradient. When it is set to any value other than ARKUI_LINEAR_GRADIENT_DIRECTION_CUSTOM, the angle setting becomes ineffective. The data type is ArkUI_LinearGradientDirection.
.value[2].i32: whether the colors are repeated. The default value is false.
.object: The parameter type is ArkUI_ColorStop. It specifies an array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.
colors: colors of the color stops.
stops: stop positions of the color stops.
size: number of colors.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: start angle of the linear gradient. The set value is used only when ArkUI_LinearGradientDirection is set to ARKUI_LINEAR_GRADIENT_DIRECTION_CUSTOM. In other cases, the default value is used.
.value[1].i32: direction of the linear gradient.
.value[2].i32: whether the colors are repeated.
.object: The parameter type is ArkUI_ColorStop. It specifies an array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.
colors: colors of the color stops.
stops: stop positions of the color stops.
size: number of colors.
NODE_ALIGNMENT = 15 Defines the alignment attribute, which can be set, reset, and obtained as required through APIs. In the Stack component, this attribute has the same effect as NODE_STACK_ALIGN_CONTENT, which means that it sets the alignment mode of child components in the container.

Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: alignment mode. The parameter type is ArkUI_Alignment. The default value is ARKUI_ALIGNMENT_CENTER.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: alignment mode. The parameter type is ArkUI_Alignment.
NODE_OPACITY = 16 Defines the opacity attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: opacity value. The default value is 1. The value ranges from 0 to 1.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: opacity value. The value ranges from 0 to 1.
NODE_BORDER_WIDTH = 17 Defines the border width attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
1: .value[0].f32: width of the four borders.
2: .value[0].f32: width of the top border.
.value[1].f32: width of the right border.
.value[2].f32: width of the bottom border.
.value[3].f32: width of the left border.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: width of the top border.
.value[1].f32: width of the right border.
.value[2].f32: width of the bottom border.
.value[3].f32: width of the left border.
NODE_BORDER_RADIUS = 18 Defines the border corner radius attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
1: .value[0].f32: radius of the four corners.
2: .value[0].f32: radius of the upper left corner.
.value[1].f32: radius of the upper right corner.
.value[2].f32: radius of the lower left corner.
.value[3].f32: radius of the lower right corner.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: radius of the upper left corner.
.value[1].f32: radius of the upper right corner.
.value[2].f32: radius of the lower left corner.
.value[3].f32: radius of the lower right corner.
NODE_BORDER_COLOR = 19 Defines the border color attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
1: .value[0].u32: color of the four borders, in 0xARGB format, for example, 0xFFFF11FF.
2: .value[0].u32: color of the top border, in 0xARGB format. The default value is 0xFF000000.
.value[1].u32: color of the right border, in 0xARGB format. The default value is 0xFF000000.
.value[2].u32: color of the bottom border, in 0xARGB format. The default value is 0xFF000000.
.value[3].u32: color of the left border, in 0xARGB format. The default value is 0xFF000000.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color of the top border, in 0xARGB format, for example, 0xFFFF11FF.
.value[1].u32: color of the right border, in 0xARGB format, for example, 0xFFFF11FF.
.value[2].u32: color of the lower border, in 0xARGB format, for example, 0xFFFF11FF.
.value[3].u32: color of the left border, in 0xARGB format, for example, 0xFFFF11FF.
NODE_BORDER_STYLE = 20 Defines the border line style attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
1: .value[0].i32: line style of the four borders. The parameter type is ArkUI_BorderStyle. The default value is ARKUI_BORDER_STYLE_SOLID.
2: .value[0].i32: line style of the top border. The parameter type is ArkUI_BorderStyle. The default value is ARKUI_BORDER_STYLE_SOLID.
.value[1].i32: line style of the right border. The parameter type is ArkUI_BorderStyle. The default value is ARKUI_BORDER_STYLE_SOLID.
.value[2].i32: line style of the bottom border. The parameter type is ArkUI_BorderStyle. The default value is ARKUI_BORDER_STYLE_SOLID.
.value[3].i32: line style of the left border. The parameter type is ArkUI_BorderStyle. The default value is ARKUI_BORDER_STYLE_SOLID.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: line style of the top border.
.value[1].i32: line style of the right border.
.value[2].i32: line style of the bottom border.
.value[3].i32: line style of the left border.
NODE_Z_INDEX = 21 Defines the z-index attribute for the stack sequence. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: z-index value.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: z-index value.
NODE_VISIBILITY = 22 Defines the visibility attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to show or hide the component. The parameter type is ArkUI_Visibility. The default value is ARKUI_VISIBILITY_VISIBLE.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the component is shown or hidden. The parameter type is ArkUI_Visibility. The default value is ARKUI_VISIBILITY_VISIBLE.
NODE_CLIP = 23 Defines the clip attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to clip the area of child components that extend beyond the bounds of the parent component. The value 0 indicates not to clip, and the value 1 indicates to clip. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the area of child components that extend beyond the bounds of the parent component is clipped. The value 0 indicates no clipping, and the value 1 indicates clipping.
NODE_CLIP_SHAPE = 24 Defines the clipping shape on the component. This attribute can be set and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
1. Rectangle:
.value[0].i32: type of shape. The parameter type is ArkUI_ClipType. The value is ARKUI_CLIP_TYPE_RECTANGLE.
.value[1].f32: width of the rectangle.
.value[2].f32: height of the rectangle.
.value[3].f32: width of the rounded corner of the rectangle.
.value[4].f32: height of the rounded corner of the rectangle.
.value[5]?.f32: radius of the upper left corner of the rectangle.
.value[6]?.f32: radius of the lower left corner of the rectangle.
.value[7]?.f32: radius of the upper right corner of the rectangle.
.value[8]?.f32: radius of the lower right corner of the rectangle.
.object: coordinate offset of the rectangle. The parameter type is ArkUI_RenderNodeClipOption. It takes effect when only the .object parameter is passed.
2. Circle:
.value[0].i32: type of shape. The parameter type is ArkUI_ClipType. The value is ARKUI_CLIP_TYPE_CIRCLE.
.value[1].f32: width of the circle.
.value[2].f32: height of the circle.
.object: coordinate offset of the circle. The parameter type is ArkUI_RenderNodeClipOption. It takes effect when only the .object parameter is passed.
3. Ellipse:
.value[0].i32: type of shape. The parameter type is ArkUI_ClipType. The value is ARKUI_CLIP_TYPE_ELLIPSE.
.value[1].f32: width of the ellipse.
.value[2].f32: height of the ellipse.
.object: coordinate offset of the ellipse. The parameter type is ArkUI_RenderNodeClipOption. It takes effect when only the .object parameter is passed.
4. Path:
.value[0].i32: type of shape. The parameter type is ArkUI_ClipType. The value is ARKUI_CLIP_TYPE_PATH.
.value[1].f32: width of the path.
.value[2].f32: height of the path.
.string: command for drawing the path.
.object: command for drawing the path. The parameter type is ArkUI_RenderNodeClipOption. It takes effect when only the .object parameter is passed.
Format of the return value ArkUI_AttributeItem:
1. Rectangle:
.value[0].i32: type of shape. The parameter type is ArkUI_ClipType. The value is ARKUI_CLIP_TYPE_RECTANGLE.
.value[1].f32: width of the rectangle.
.value[2].f32: height of the rectangle.
.value[3].f32: width of the rounded corner of the rectangle.
.value[4].f32: height of the rounded corner of the rectangle.
.value[5]?.f32: radius of the upper left corner of the rectangle.
.value[6]?.f32: radius of the lower left corner of the rectangle.
.value[7]?.f32: radius of the upper right corner of the rectangle.
.value[8]?.f32: radius of the lower right corner of the rectangle.
.value[9]?.f32: horizontal coordinate offset of the rectangle.
.value[10]?.f32: vertical coordinate offset of the rectangle.
2. Circle:
.value[0].i32: type of shape. The parameter type is ArkUI_ClipType. The value is ARKUI_CLIP_TYPE_CIRCLE.
.value[1].f32: width of the circle.
.value[2].f32: height of the circle.
.value[3]?.f32: horizontal coordinate offset of the circle.
.value[4]?.f32: vertical coordinate offset of the circle.
3. Ellipse:
.value[0].i32: type of shape. The parameter type is ArkUI_ClipType. The value is ARKUI_CLIP_TYPE_ELLIPSE.
.value[1].f32: width of the ellipse.
.value[2].f32: height of the ellipse.
.value[3]?.f32: horizontal coordinate offset of the ellipse.
.value[4]?.f32: vertical coordinate offset of the ellipse.
4. Path:
.value[0].i32: type of shape. The parameter type is ArkUI_ClipType. The value is ARKUI_CLIP_TYPE_PATH.
.value[1].f32: width of the path.
.value[2].f32: height of the path.
.string: command for drawing the path.
NODE_TRANSFORM = 25 Defines the transform attribute, which can be used to translate, rotate, and scale images. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0...15].f32: 16 floating-point numbers. The value of size in ArkUI_AttributeItem cannot be 0.
.object: pointer to ArkUI_Matrix4. The value of size in ArkUI_AttributeItem is 0.
Format of the return value ArkUI_AttributeItem:
.value[0...15].f32: 16 floating-point numbers.
NODE_HIT_TEST_BEHAVIOR = 26 Defines the hit test behavior attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: hit test mode. The parameter type is ArkUI_HitTestMode. The default value is ARKUI_HIT_TEST_MODE_DEFAULT.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: hit test mode. The parameter type is ArkUI_HitTestMode. The default value is ARKUI_HIT_TEST_MODE_DEFAULT.
NODE_POSITION = 27 Defines the offset attribute, which specifies the offset of the component's upper left corner relative to the parent container's. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: x-coordinate.
.value[1].f32: y-coordinate.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: x-coordinate.
.value[1].f32: y-coordinate.
NODE_SHADOW = 28 Defines the shadow attribute. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: shadow effect. The parameter type is ArkUI_ShadowStyle.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: shadow effect. The parameter type is ArkUI_ShadowStyle.
NODE_CUSTOM_SHADOW = 29 Defines the custom shadow effect. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0]?.f32: blur radius of the shadow, in px.
.value[1]?.i32: whether to enable the coloring strategy. The value 1 means to enable the coloring strategy, and 0 (default value) means the opposite.
.value[2]?.f32: offset of the shadow along the x-axis, in px.
.value[3]?.f32: offset of the shadow along the y-axis, in px.
.value[4]?.i32: shadow type ArkUI_ShadowType. The default value is ARKUI_SHADOW_TYPE_COLOR.
.value[5]?.u32: shadow color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
.value[6]?.u32: whether to fill the shadow. The value 1 means to fill the shadow, and 0 means the opposite.

Format of the return value ArkUI_AttributeItem:
.value[0].f32: blur radius of the shadow, in px.
.value[1].i32: whether the coloring strategy is enabled.
.value[2].f32: offset of the shadow along the x-axis, in px.
.value[3].f32: offset of the shadow along the y-axis, in px.
.value[4].i32: shadow type ArkUI_ShadowType. The default value is ARKUI_SHADOW_TYPE_COLOR.
.value[5].u32: shadow color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
.value[6].u32: whether the shadow is filled. The value 1 means that the shadow is filled, and 0 means the opposite.
NODE_BACKGROUND_IMAGE_SIZE = 30 Defines the background image size attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: width of the image. The value range is [0, +∞), and the unit is vp.
.value[1].f32: height of the image. The value range is [0, +∞), and the unit is vp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: width of the image, in vp.
.value[1].f32: height of the image, in vp.
NODE_BACKGROUND_IMAGE_SIZE_WITH_STYLE = 31 Defines the background image size with style. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: size of the background image. The value is an enumerated value of ArkUI_ImageSize.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: size of the background image. The value is an enumerated value of ArkUI_ImageSize.
NODE_BACKGROUND_BLUR_STYLE = 32 Defines the background blur attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: blur type. The value is an enumerated value of ArkUI_BlurStyle.
.value[1]?.i32: color mode, specified by an enumerated value of ArkUI_ColorMode.
.value[2]?.i32: adaptive color mode, specified by an enumerated value of ArkUI_AdaptiveColor.
.value[3]?.f32: blur degree. The value range is [0.0, 1.0].
.value[4]?.f32: start boundary of grayscale blur.
.value[5]?.f32: end boundary of grayscale blur.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: blur type. The value is an enumerated value of ArkUI_BlurStyle.
.value[1].i32: color mode, specified by an enumerated value of ArkUI_ColorMode.
.value[2].i32: adaptive color mode, specified by an enumerated value of ArkUI_AdaptiveColor.
.value[3].f32: blur degree. The value range is [0.0, 1.0].
.value[4].f32: start boundary of grayscale blur.
.value[5].f32: end boundary of grayscale blur.
NODE_TRANSFORM_CENTER = 33 Defines the transform center attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0]?.f32: x-coordinate of the center point, in vp.
.value[1]?.f32: y-coordinate of the center point, in vp.
.value[2]?.f32: z-coordinate of the center point, in vp.
.value[3]?.f32: x-coordinate of the center point, expressed in a number that represents a percentage. For example, 0.2 indicates 20%. This attribute overwrites value[0].f32. The default value is 0.5f.
.value[4]?.f32: y-coordinate of the center point, expressed in a number that represents a percentage. For example, 0.2 indicates 20%. This attribute overwrites value[1].f32. The default value is 0.5f.
.value[5]?.f32: z-coordinate of the center point, expressed in a number that represents a percentage. For example, 0.2 indicates 20%. This attribute overwrites value[2].f32. The default value is 0.0f.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: x-coordinate of the center point, in vp.
.value[1].f32: y-coordinate of the center point, in vp.
.value[2].f32: z-coordinate of the center point, in vp.
Note: If the coordinate is expressed in a number that represents a percentage, the attribute obtaining API returns the calculated value in vp.
NODE_OPACITY_TRANSITION = 34 Defines the transition opacity attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: opacity values of the start and end points.
.value[1].i32: animation duration, in ms.
.value[2].i32: animation curve type. The value is an enumerated value of ArkUI_AnimationCurve.
.value[3]?.i32: animation delay duration, in ms.
.value[4]?.i32: number of times that the animation is played.
.value[5]?.i32: animation playback mode. The value is an enumerated value of ArkUI_AnimationPlayMode.
.value[6]?.f32: animation playback speed.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: opacity values of the start and end points.
.value[1].i32: animation duration, in ms.
.value[2].i32: animation curve type. The value is an enumerated value of ArkUI_AnimationCurve.
.value[3].i32: animation delay duration, in ms.
.value[4].i32: number of times that the animation is played.
.value[5].i32: animation playback mode. The value is an enumerated value of ArkUI_AnimationPlayMode.
.value[6].f32: animation playback speed.
NODE_ROTATE_TRANSITION = 35 Defines the transition rotation attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: x-component of the rotation vector.
.value[1].f32: y-component of the rotation vector.
.value[2].f32: z-component of the rotation vector
.value[3].f32: angle.
.value[4].f32: line of sight. The default value is 0.0f.
.value[5].i32: animation duration, in ms.
.value[6].i32: animation curve type. The value is an enumerated value of ArkUI_AnimationCurve.
.value[7]?.i32: animation delay duration, in ms.
.value[8]?.i32: number of times that the animation is played.
.value[9]?.i32: animation playback mode. The value is an enumerated value of ArkUI_AnimationPlayMode.
.value[10]?.f32: animation playback speed.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: x-component of the rotation vector.
.value[1].f32: y-component of the rotation vector.
.value[2].f32: z-component of the rotation vector
.value[3].f32: angle.
.value[4].f32: line of sight.
.value[5].i32: animation duration, in ms.
.value[6].i32: animation curve type. The value is an enumerated value of ArkUI_AnimationCurve.
.value[7].i32: animation delay duration, in ms.
.value[8].i32: number of times that the animation is played.
.value[9].i32: animation playback mode. The value is an enumerated value of ArkUI_AnimationPlayMode.
.value[10].f32: animation playback speed.
NODE_SCALE_TRANSITION = 36 Defines the transition scaling attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: scale factor along the X-axis.
.value[1].f32: scale factor along the Y-axis.
.value[2].f32: scale factor along the Z-axis.
value[3].i32: animation duration, in ms.
.value[4].i32: animation curve type. The value is an enumerated value of ArkUI_AnimationCurve.
.value[5]?.i32: animation delay duration, in ms.
.value[6]?.i32: number of times that the animation is played.
.value[7]?.i32: animation playback mode. The value is an enumerated value of ArkUI_AnimationPlayMode.
.value[8]?.f32: animation playback speed.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: scale factor along the X-axis.
.value[1].f32: scale factor along the Y-axis.
.value[2].f32: scale factor along the Z-axis.
value[3].i32: animation duration, in ms.
.value[4].i32: animation curve type. The value is an enumerated value of ArkUI_AnimationCurve.
.value[5].i32: animation delay duration, in ms.
.value[6].i32: number of times that the animation is played.
.value[7].i32: animation playback mode. The value is an enumerated value of ArkUI_AnimationPlayMode.
.value[8].f32: animation playback speed.
NODE_TRANSLATE_TRANSITION = 37 Defines the transition translation attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
value[0].f32: translation distance along the x-axis, in vp. The default value is 0.0.
value[1].f32: translation distance along the y-axis, in vp. The default value is 0.0.
value[2].f32: translation distance along the z-axis, in vp. The default value is 0.0.
value[3].i32: animation duration, in ms.
value[4].i32: animation curve type. The value is an enumerated value of ArkUI_AnimationCurve.
value[5]?.i32: animation delay duration, in ms.
value[6]?.i32: number of times that the animation is played.
value[7]?.i32: animation playback mode. The value is an enumerated value of ArkUI_AnimationPlayMode.
value[8]?.f32: animation playback speed.
Format of the return value ArkUI_AttributeItem:
value[0].f32: translation distance along the x-axis, in vp.
value[1].f32: translation distance along the y-axis, in vp.
value[2].f32: translation distance along the z-axis, in vp.
value[3].i32: animation duration, in ms.
value[4].i32: animation curve type. The value is an enumerated value of ArkUI_AnimationCurve.
value[5].i32: animation delay duration, in ms.
value[6].i32: number of times that the animation is played.
value[7].i32: animation playback mode. The value is an enumerated value of ArkUI_AnimationPlayMode.
value[8].f32: animation playback speed.
NODE_MOVE_TRANSITION = 38 Defines the slide-in and slide-out of the component from the screen edge during transition. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: ArkUI_TransitionEdge type.
.value[1].i32: animation duration, in ms.
.value[2].i32: animation curve type. The value is an enumerated value of ArkUI_AnimationCurve.
.value[3]?.i32: animation delay duration, in ms.
.value[4]?.i32: number of times that the animation is played.
.value[5]?.i32: animation playback mode. The value is an enumerated value of ArkUI_AnimationPlayMode.
.value[6]?.f32: animation playback speed.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: ArkUI_TransitionEdge type.
.value[1].i32: animation duration, in ms.
.value[2].i32: animation curve type. The value is an enumerated value of ArkUI_AnimationCurve.
.value[3].i32: animation delay duration, in ms.
.value[4].i32: number of times that the animation is played.
.value[5].i32: animation playback mode. The value is an enumerated value of ArkUI_AnimationPlayMode.
.value[6].f32: animation playback speed.
NODE_FOCUSABLE = 39 Defines the focus attribute, which can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: The value 1 indicates focusable, and 0 indicates not focusable. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: The value 1 indicates focusable, and 0 indicates not focusable.
NODE_DEFAULT_FOCUS = 40 Defines the default focus attribute, which can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
value[0].i32: The value 1 indicates that the target is the default focus, and 0 indicates that it is not the default focus.
Format of the return value ArkUI_AttributeItem:
value[0].i32: The value 1 indicates that the target is the default focus, and 0 indicates that it is not the default focus.
NODE_RESPONSE_REGION = 41 Defines the touch target attribute, which can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.data[0].f32: X coordinate of the touch point relative to the upper left corner of the component, in vp.
.data[1].f32: Y coordinate of the touch point relative to the upper left corner of the component, in vp.
.data[2].f32: width of the touch target, in percentage.
.data[3].f32: height of the touch target, in percentage.
.data[4...].f32: Multiple touch targets can be set. The sequence of the parameters is the same as the preceding.
Format of the return value ArkUI_AttributeItem:
.data[0].f32: X coordinate of the touch point relative to the upper left corner of the component, in vp.
.data[1].f32: Y coordinate of the touch point relative to the upper left corner of the component, in vp.
.data[2].f32: width of the touch target, in percentage.
.data[3].f32: height of the touch target, in percentage.
.data[4...].f32: Multiple touch targets can be set. The sequence of the parameters is the same as the preceding.
Note: During configuration, the data array can contain any number of values (all will be accepted), but only the first 20 values can be retrieved.
NODE_OVERLAY = 42 Defines the overlay attribute. This attribute can be set, reset, and obtained as required through APIs. You can set the overlay content through .string or .object, with .string having higher priority. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: mask text.
.value[0]?.i32: position of the overlay relative to the component. Optional. The parameter type is ArkUI_Alignment. The default value is ARKUI_ALIGNMENT_TOP_START.
.value[1]?.f32: offset of the overlay relative to the upper left corner of itself on the x-axis, in vp. Optional. The default value is 0 vp.
.value[2]? .f32: offset of the overlay relative to the upper left corner of itself on the y-axis, in vp. Optional. The default value is 0 vp.
.value[3]?.i32: layout direction of the overlay. Optional. The parameter type is ArkUI_Direction. The default value is ARKUI_DIRECTION_LTR.
In most scenarios, this parameter should be set to Auto, which allows the system to automatically handle the layout direction. If specific directions need to be maintained in certain scenarios, set this parameter to LTR (left-to-right) or RTL (right-to-left). It is supported since API version 21.
.object: node tree used for overlay. The parameter type is ArkUI_NodeHandle, and the default value is nullptr. It is supported since API version 21.
Format of the return value ArkUI_AttributeItem:
.string: mask text.
.value[0].i32: position of the overlay relative to the component. The parameter type is ArkUI_Alignment. The default value is ARKUI_ALIGNMENT_TOP_START.
.value[1].f32: offset of the overlay relative to the upper left corner of itself on the x-axis, in vp.
.value[2].f32: offset of the overlay relative to the upper left corner of itself on the y-axis, in vp.
.value[3].i32: layout direction of the overlay. The parameter type is ArkUI_Direction. The default value is ARKUI_DIRECTION_LTR. It is supported since API version 21.
.object: node tree used for overlay. The parameter type is ArkUI_NodeHandle. It is supported since API version 21.
NODE_SWEEP_GRADIENT = 43 Defines the sweep gradient effect. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0]?.f32: x-coordinate of the sweep gradient center relative to the upper left corner of the component.
.value[1]?.f32: y-coordinate of the sweep gradient center relative to the upper left corner of the component.
.value[2]?.f32: start point of the sweep gradient. The default value is 0.
.value[3]?.f32: end point of the sweep gradient. The default value is 0.
.value[4]?.f32: rotation angle of the sweep gradient. The default value is 0.
.value[5]?.i32: whether the colors are repeated. The value 1 means that the colors are repeated, and 0 means the opposite.
.object: The parameter type is ArkUI_ColorStop. It specifies an array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.
colors: colors of the color stops.
stops: stop positions of the color stops.
size: number of colors.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: x-coordinate of the sweep gradient center relative to the upper left corner of the component.
.value[1].f32: y-coordinate of the sweep gradient center relative to the upper left corner of the component.
.value[2].f32: start point of the sweep gradient. The default value is 0.
.value[3].f32: end point of the sweep gradient. The default value is 0.
.value[4].f32: rotation angle of the sweep gradient. The default value is 0.
.value[5].i32: whether the colors are repeated. The value 1 means that the colors are repeated, and 0 means the opposite.
.object: The parameter type is ArkUI_ColorStop. It specifies an array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.
colors: colors of the color stops.
stops: stop positions of the color stops.
size: number of colors.
NODE_RADIAL_GRADIENT = 44 Defines the radial gradient effect. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0]?.f32: x-coordinate of the radial gradient center relative to the upper left corner of the component.
.value[1]?.f32: y-coordinate of the radial gradient center relative to the upper left corner of the component.
.value[2]?.f32: radius of the radial gradient. The default value is 0.
.value[3]?.i32: whether the colors are repeated. The value 1 means that the colors are repeated, and 0 means the opposite.
.object: The parameter type is ArkUI_ColorStop. It specifies an array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.
colors: colors of the color stops.
stops: stop positions of the color stops.
size: number of colors.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: x-coordinate of the radial gradient center relative to the upper left corner of the component.
.value[1].f32: y-coordinate of the radial gradient center relative to the upper left corner of the component.
.value[2].f32: radius of the radial gradient. The default value is 0.
.value[3].i32: whether the colors are repeated. The value 1 means that the colors are repeated, and 0 means the opposite.
.object: The parameter type is ArkUI_ColorStop. It specifies an array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.
colors: colors of the color stops.
stops: stop positions of the color stops.
size: number of colors.
NODE_MASK = 45 Adds a mask of the specified shape to the component. This attribute can be set and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
1. Rectangle:
.value[0].u32: fill color, in 0xARGB format.
.value[1].u32: stroke color, in 0xARGB format.
.value[2].f32: stroke width, in vp.
.value[3].i32: mask type. The parameter type is ArkUI_MaskType. The value is ARKUI_MASK_TYPE_RECTANGLE.
.value[4].f32: width of the rectangle, in vp.
.value[5].f32: height of the rectangle, in vp.
.value[6].f32: corner radius width of the rectangle, in vp.
.value[7].f32: corner radius height of the rectangle, in vp.
.value[8]?.f32: radius of the upper left corner of the rectangle, in vp.
.value[9]?.f32: radius of the lower left corner of the rectangle, in vp.
.value[10]?.f32: radius of the upper right corner of the rectangle, in vp.
.value[11]?.f32: radius of the lower right corner of the rectangle, in vp.
2. Circle:
.value[0].u32: fill color, in 0xARGB format.
.value[1].u32: stroke color, in 0xARGB format.
.value[2].f32: stroke width, in vp.
.value[3].i32: mask type. The parameter type is ArkUI_MaskType. The value is ARKUI_MASK_TYPE_CIRCLE.
.value[4].f32: width of the circle, in vp.
.value[5].f32: height of the circle, in vp.
3. Ellipse:
.value[0].u32: fill color, in 0xARGB format.
.value[1].u32: stroke color, in 0xARGB format.
.value[2].f32: stroke width, in vp.
.value[3].i32: mask type. The parameter type is ArkUI_MaskType. The value is ARKUI_MASK_TYPE_ELLIPSE.
.value[4].f32: width of the ellipse, in vp.
.value[5].f32: height of the ellipse, in vp.
4. Path:
.value[0].u32: fill color, in 0xARGB format.
.value[1].u32: stroke color, in 0xARGB format.
.value[2].f32: stroke width, in vp.
.value[3].i32: mask type. The parameter type is ArkUI_MaskType. The value is ARKUI_MASK_TYPE_PATH.
.value[4].f32: width of the path, in vp.
.value[5].f32: height of the path, in vp.
.string: command for drawing the path.
5. Progress:
.value[0].i32: mask type. The parameter type is ArkUI_MaskType. The value is ARKUI_MASK_TYPE_PROGRESS.
.value[1].f32: current value of the progress indicator.
.value[2].f32: maximum value of the progress indicator.
.value[3].u32: color of the progress indicator.
Format of the return value ArkUI_AttributeItem:
1. Rectangle:
.value[0].u32: fill color, in 0xARGB format.
.value[1].u32: stroke color, in 0xARGB format.
.value[2].f32: stroke width, in vp.
.value[3].i32: mask type.
.value[4].f32: width of the rectangle, in vp.
.value[5].f32: height of the rectangle, in vp.
.value[6].f32: corner radius width of the rectangle, in vp.
.value[7].f32: corner radius height of the rectangle, in vp.
.value[8]?.f32: radius of the upper left corner of the rectangle, in vp.
.value[9]?.f32: radius of the lower left corner of the rectangle, in vp.
.value[10]?.f32: radius of the upper right corner of the rectangle, in vp.
.value[11]?.f32: radius of the lower right corner of the rectangle, in vp.
2. Circle:
.value[0].u32: fill color, in 0xARGB format.
.value[1].u32: stroke color, in 0xARGB format.
.value[2].f32: stroke width, in vp.
.value[3].i32: mask type.
.value[4].f32: width of the circle, in vp.
.value[5].f32: height of the circle, in vp.
3. Ellipse:
.value[0].u32: fill color, in 0xARGB format.
.value[1].u32: stroke color, in 0xARGB format.
.value[2].f32: stroke width, in vp.
.value[3].i32: mask type.
.value[4].f32: width of the ellipse, in vp.
.value[5].f32: height of the ellipse, in vp.
4. Path:
.value[0].u32: fill color, in 0xARGB format.
.value[1].u32: stroke color, in 0xARGB format.
.value[2].f32: stroke width, in vp.
.value[3].i32: mask type.
.value[4].f32: width of the path, in vp.
.value[5].f32: height of the path, in vp.
.string: command for drawing the path.
5. Progress:
.value[0].i32: mask type.
.value[1].f32: current value of the progress indicator.
.value[2].f32: maximum value of the progress indicator.
.value[3].u32: color of the progress indicator.
NODE_BLEND_MODE = 46 Blends the component's background with the content of the component's child node. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: blend mode. The parameter type is ArkUI_BlendMode. The default value is ARKUI_BLEND_MODE_NONE.
.value[1].?i32: how the specified blend mode is applied. The parameter type is ArkUI_BlendApplyType. The default value is BLEND_APPLY_TYPE_FAST.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: blend mode. The parameter type is ArkUI_BlendMode. The default value is ARKUI_BLEND_MODE_NONE.
.value[1].i32: how the specified blend mode is applied. The parameter type is ArkUI_BlendApplyType. The default value is BLEND_APPLY_TYPE_FAST.
NODE_DIRECTION = 47 Sets the direction of the main axis. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: direction of the main axis.
The parameter type is ArkUI_Direction. The default value is ARKUI_DIRECTION_AUTO.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: direction of the main axis.
The parameter type is ArkUI_Direction. The default value is ARKUI_DIRECTION_AUTO.
NODE_CONSTRAINT_SIZE = 48 Defines the size constraints. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: minimum width, in vp.
.value[1].f32: maximum width, in vp.
.value[2].f32: minimum height, in vp.
.value[3].f32: maximum height, in vp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: minimum width, in vp.
.value[1].f32: maximum width, in vp.
.value[2].f32: minimum height, in vp.
.value[3].f32: maximum height, in vp.
NODE_GRAY_SCALE = 49 Defines the grayscale effect. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: grayscale conversion ratio. The value ranges from 0 to 1. The default value is 0. For example, 0.5 indicates a 50% grayscale conversion ratio.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: grayscale conversion ratio. The value ranges from 0 to 1.
NODE_INVERT = 50 Inverts the image. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: image inversion ratio. The value ranges from 0 to 1. The default value is 0. For example, 0.5 indicates a 50% image inversion ratio.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: image inversion ratio. The value ranges from 0 to 1.
NODE_SEPIA = 51 Defines the sepia conversion ratio. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: sepia conversion ratio. The value ranges from 0 to 1. The default value is 0. For example, 0.5 indicates that a 50% sepia conversion ratio.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: sepia conversion ratio. The value ranges from 0 to 1.
NODE_CONTRAST = 52 Defines the contrast attribute. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: contrast. If the value is 1, the source image is displayed. A larger value indicates a higher contrast. The default value is 1. The value range is [0, 10).
Format of the return value ArkUI_AttributeItem:
.value[0].f32: contrast. Value range: [0, 10).
NODE_FOREGROUND_COLOR = 53 Sets the foreground color attribute. This attribute can be set and reset as required through APIs. However, the reset API has no effect on this attribute.
There are two parameter formats of ArkUI_AttributeItem for setting the attribute:
1: .value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red. The default value is 0xFF000000.
2: .value[0].i32: color enum ArkUI_ColoringStrategy.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color value, in 0xARGB format.
NODE_OFFSET = 54 Defines the offset of the component's child relative to the component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32 : offset along the x-axis, in vp.
.value[1].f32 : offset along the y-axis, in vp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32 : offset along the x-axis, in vp.
.value[1].f32 : offset along the y-axis, in vp.
NODE_MARK_ANCHOR = 55 Sets the anchor for locating the component's child. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: x-coordinate of the anchor, in vp.
.value[1].f32: y-coordinate of the anchor, in vp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: x-coordinate of the anchor, in vp.
.value[1].f32: y-coordinate of the anchor, in vp.
NODE_BACKGROUND_IMAGE_POSITION = 56 Defines the position of the background image in the component, that is, the coordinates relative to the upper left corner of the component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: position along the x-axis, in px.
.value[1].f32: position along the y-axis, in px.
.value[2].?i32: alignment mode. The parameter type is ArkUI_Alignment. The default value is ARKUI_ALIGNMENT_TOP_START. Since: 12
.value[3].?i32: layout direction. The parameter type is ArkUI_Direction. The default value is ARKUI_DIRECTION_AUTO. Since: 12
In most scenarios, this parameter should be set to AUTO, which allows the system to automatically handle the layout direction. If specific directions need to be maintained in certain scenarios, set this parameter to LTR (left-to-right) or RTL (right-to-left).
Format of the return value ArkUI_AttributeItem:
.value[0].f32: position along the x-axis, in px.
.value[1].f32: position along the y-axis, in px.
.value[2].i32: alignment mode. The parameter type is ArkUI_Alignment. The default value is ARKUI_ALIGNMENT_TOP_START. Since: 12
.value[3].i32: layout direction. The parameter type is ArkUI_Direction. The default value is ARKUI_DIRECTION_AUTO. Since: 12
NODE_ALIGN_RULES = 57 Sets the alignment rules in the relative container. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: ArkUI_AlignmentRuleOption object that defines the alignment rules.
Format of the return value ArkUI_AttributeItem:
.object: ArkUI_AlignmentRuleOption object that defines the alignment rules.
NODE_ALIGN_SELF = 58 Sets the alignment mode of the child components along the cross axis of the parent container. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: alignment mode of the child components along the cross axis of the parent container.
The parameter type is ArkUI_ItemAlignment. The default value is ARKUI_ITEM_ALIGNMENT_AUTO.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: alignment mode of the child components along the cross axis of the parent container.
The parameter type is ArkUI_ItemAlignment. The default value is ARKUI_ITEM_ALIGNMENT_AUTO.
NODE_FLEX_GROW = 59 Sets the percentage of the parent container's remaining space that is allocated to the component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: percentage of the parent container's remaining space that is allocated to the component.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: percentage of the parent container's remaining space that is allocated to the component.
NODE_FLEX_SHRINK = 60 Sets the percentage of the parent container's shrink size that is allocated to the component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: percentage of the parent container's shrink size that is allocated to the component.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: percentage of the parent container's shrink size that is allocated to the component.
NODE_FLEX_BASIS = 61 Sets the base size of the component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: base size of the component on the main axis of the parent container.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: base size of the component on the main axis of the parent container.
NODE_ACCESSIBILITY_GROUP = 62 Sets the accessibility group. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: Accessibility group. The value 1 means that the component and all its child components form an entire selectable component. In this case, the accessibility service will no longer be available for the content of its child components. The value is 1 or 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: Accessibility group. The value 1 means that the component and all its child components form an entire selectable component. In this case, the accessibility service will no longer be available for the content of its child components. The value is 1 or 0.
NODE_ACCESSIBILITY_TEXT = 63 Sets the accessibility text. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: accessibility text.
Format of the return value ArkUI_AttributeItem:
.string: accessibility text.
NODE_ACCESSIBILITY_MODE = 64 Defines the accessibility mode. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: accessibility mode. The parameter type is ArkUI_AccessibilityMode.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: accessibility mode. The parameter type is ArkUI_AccessibilityMode.
NODE_ACCESSIBILITY_DESCRIPTION = 65 Sets the accessibility description. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: accessibility description.
Format of the return value ArkUI_AttributeItem:
.string: accessibility description.
NODE_FOCUS_STATUS = 66 Defines the component focus status. This attribute can be set and obtained as required through APIs.
Note: Setting the parameter to 0 shifts focus from the currently focused component on the current level of the page to the root container.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: The value 1 indicates that the component gains focus and 0 indicates that the component loses focus.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: The value 1 indicates that the component gains focus and 0 indicates that the component loses focus.
NODE_ASPECT_RATIO = 67 Defines the aspect ratio attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: aspect ratio of the component, in width/height format.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: aspect ratio of the component, in width/height format.
NODE_LAYOUT_WEIGHT = 68 Defines the weight of the component within its row, column, or flex container for proportional distribution of available space within the container. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: weight of the component along the main axis.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: weight of the component along the main axis.
NODE_DISPLAY_PRIORITY = 69 Sets the display priority for the component in the row, column, or flex (single-line) container. When the displayPriority value of a child component is greater than 1, a larger value indicates higher priority. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: display priority of the component in the container.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: display priority of the component in the container.
NODE_OUTLINE_WIDTH = 70 Sets the thickness of an element's outline.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: thickness of the left outline.
.value[1].f32: thickness of the top outline.
.value[2].f32: thickness of the right outline.
.value[3].f32: thickness of the bottom outline.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: thickness of the left outline.
.value[1].f32: thickness of the top outline.
.value[2].f32: thickness of the right outline.
.value[3].f32: thickness of the bottom outline.
NODE_WIDTH_PERCENT = 71 Defines the width attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: width, in percentage.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: width, in percentage.
NODE_HEIGHT_PERCENT = 72 Defines the height attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: height, in percentage.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: height, in percentage.
NODE_PADDING_PERCENT = 73 Defines the padding attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
1: Specify the same padding for the four directions.
.value[0].f32: padding, in percentage.
2: Specify different paddings for different directions.
.value[0].f32: top padding, in percentage.
.value[1].f32: right padding, in percentage.
.value[2].f32: bottom padding, in percentage.
.value[3].f32: left padding, in percentage.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: top padding, in percentage.
.value[1].f32: right padding, in percentage.
.value[2].f32: bottom padding, in percentage.
.value[3].f32: left padding, in percentage.
NODE_MARGIN_PERCENT = 74 Defines the margin attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
1: Specify the same margin for the four directions.
.value[0].f32: margin, in percentage.
2: Specify different margins for different directions.
.value[0].f32: top margin, in percentage.
.value[1].f32: right margin, in percentage.
.value[2].f32: bottom margin, in percentage.
.value[3].f32: left margin, in percentage.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: top margin, in percentage.
.value[1].f32: right margin, in percentage.
.value[2].f32: bottom margin, in percentage.
.value[3].f32: left margin, in percentage.
NODE_GEOMETRY_TRANSITION = 75 Implements an implicit shared element transition. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0]?.i32: two components bound to the shared element. The parameter type is 1 or 0. By default, the out component does not continue to participate in the shared element animation when not yet deleted, which means that it stays in its original position.
.string: ID used to set up a binding relationship. If this attribute is set to an empty string "", the binding relationship is cleared. The value can be dynamically changed to refresh the binding relationship. One ID can be bound to only two components, which function as in and out components.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: two components bound to the shared element. The parameter type is 1 or 0. By default, the out component does not continue to participate in the shared element animation when not yet deleted, which means that it stays in its original position.
.string: ID used to set up a binding relationship. If this attribute is set to an empty string "", the binding relationship is cleared. The value can be dynamically changed to refresh the binding relationship. One ID can be bound to only two components, which function as in and out components.
NODE_RELATIVE_LAYOUT_CHAIN_MODE = 76 Sets the parameters of the chain in which the component is the head. This attribute can be set, reset, and obtained as required through APIs. This attribute has effect only when the parent container is RelativeContainer.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: direction of the chain. The value is an enumerated value of ArkUI_Axis.
.value[1].i32: style of the chain. The value is an enumerated value of ArkUI_RelativeLayoutChainStyle.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: direction of the chain. The value is an enumerated value of ArkUI_Axis.
.value[1].i32: style of the chain. The value is an enumerated value of ArkUI_RelativeLayoutChainStyle.
NODE_RENDER_FIT = 77 Sets how the final state of the component's content is rendered during its width and height animation process. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: how the final state of the component's content is rendered. The value is an enumerated value of ArkUI_RenderFit.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: how the final state of the component's content is rendered. The value is an enumerated value of ArkUI_RenderFit.
NODE_OUTLINE_COLOR = 78 Defines the border color attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
1: .value[0].u32: color of the four borders, in 0xARGB format, for example, 0xFFFF11FF.
2: .value[0].u32: color of the top border, in 0xARGB format, for example, 0xFFFF11FF.
.value[1].u32: color of the right border, in 0xARGB format, for example, 0xFFFF11FF.
.value[2].u32: color of the lower border, in 0xARGB format, for example, 0xFFFF11FF.
.value[3].u32: color of the left border, in 0xARGB format, for example, 0xFFFF11FF.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color of the top border, in 0xARGB format, for example, 0xFFFF11FF.
.value[1].u32: color of the right border, in 0xARGB format, for example, 0xFFFF11FF.
.value[2].u32: color of the lower border, in 0xARGB format, for example, 0xFFFF11FF.
.value[3].u32: color of the left border, in 0xARGB format, for example, 0xFFFF11FF.
NODE_SIZE = 79 Sets the size. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: width, in vp.
.value[1].f32: height, in vp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: width, in vp.
.value[1].f32: height, in vp.
NODE_RENDER_GROUP = 80 Sets whether the component and its child components are rendered off the screen and then drawn together with its parent. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the component and its child components are rendered off the screen and then drawn together with its parent. The value 1 means that the component and its child components are rendered off the screen and then drawn together with its parent, and 0 means the opposite. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the component and its child components are rendered off the screen and then drawn together with its parent. The value 1 means that the component and its child components are rendered off the screen and then drawn together with its parent, and 0 means the opposite.
NODE_COLOR_BLEND = 81 Applies a color blend effect to the component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: color to blend with the component, in 0xARGB format. The default value is 0x00000000.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color to blend with the component, in 0xARGB format, for example, 0xFFFF11FF.
NODE_FOREGROUND_BLUR_STYLE = 82 Applies a foreground blur style to the component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: foreground blur style. The value is an enumerated value of ArkUI_BlurStyle.
.value[1]?.i32: color mode used for the foreground blur. The value is an enumerated value of ArkUI_ColorMode.
.value[2]?.i32: adaptive color mode used for the foreground blur. The value is an enumerated value of ArkUI_AdaptiveColor.
.value[3]?.f32: blur degree. The value range is [0.0, 1.0].
.value[4]?.i32: brightness of black in the grayscale blur. The value range is [0, 127].
.value[5]?.i32: degree of darkening the white color in the grayscale blur. The value range is [0, 127].
Format of the return value ArkUI_AttributeItem:
.value[0].i32: foreground blur style. The value is an enumerated value of ArkUI_BlurStyle.
.value[1].i32: color mode used for the foreground blur. The value is an enumerated value of ArkUI_ColorMode.
.value[2].i32: adaptive color mode used for the foreground blur. The value is an enumerated value of ArkUI_AdaptiveColor.
.value[3].f32: blur degree. The value range is [0.0, 1.0].
.value[4].i32: brightness of black in the grayscale blur. The value range is [0, 127].
.value[5].i32: degree of darkening the white color in the grayscale blur. The value range is [0, 127].
NODE_LAYOUT_RECT = 83 Defines the component size and position for layout. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: X coordinate of the component, in px.
.value[1].i32: Y coordinate of the component, in px.
.value[2].i32: width of the component, in px.
.value[3].i32: height of the component, in px.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: X coordinate of the component, in px.
.value[1].i32: Y coordinate of the component, in px.
.value[2].i32: width of the component, in px.
.value[3].i32: height of the component, in px.
NODE_FOCUS_ON_TOUCH = 84 Sets whether the component is focusable on touch. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the component is focusable on touch. The value 1 means that the component is focusable on touch, and 0 means the opposite.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the component is focusable on touch. The value 1 means that the component is focusable on touch, and 0 means the opposite.
NODE_BORDER_WIDTH_PERCENT = 85 Defines the border width attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
1: .value[0].f32: width of the four borders, in percentage.
2: .value[0].f32: width of the top border, in percentage.
.value[1].f32: width of the right border, in percentage.
.value[2].f32: width of the bottom border, in percentage.
.value[3].f32: width of the left border, in percentage.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: width of the top border, in percentage.
.value[1].f32: width of the right border, in percentage.
.value[2].f32: width of the bottom border, in percentage.
.value[3].f32: width of the left border, in percentage.
NODE_BORDER_RADIUS_PERCENT = 86 Defines the border corner radius attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
1: .value[0].f32: radius of the four corners, in percentage.
2: .value[0].f32: radius of the upper left corner, in percentage.
.value[1].f32: radius of the upper right corner, in percentage.
.value[2].f32: radius of the lower left corner, in percentage.
.value[3].f32: radius of the lower right corner, in percentage.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: radius of the upper left corner, in percentage.
.value[1].f32: radius of the upper right corner, in percentage.
.value[2].f32: radius of the lower left corner, in percentage.
.value[3].f32: radius of the lower right corner, in percentage.
NODE_ACCESSIBILITY_ID = 87 Sets the custom accessibility ID. This attribute can be obtained. Format of the return value ArkUI_AttributeItem:
.value[0].i32: custom accessibility ID.
NODE_ACCESSIBILITY_ACTIONS = 88 Sets the accessibility action type. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: accessibility action type. The parameter type is ArkUI_AccessibilityActionType.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: accessibility action type. The parameter type is ArkUI_AccessibilityActionType.
NODE_ACCESSIBILITY_ROLE = 89 Defines the accessibility component role. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: accessibility component role. The parameter type is ArkUI_NodeType.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: accessibility component role. The parameter type is ArkUI_NodeType.
NODE_ACCESSIBILITY_STATE = 90 Sets the accessibility state. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: accessibility state. The parameter type is ArkUI_AccessibilityState.
Format of the return value ArkUI_AttributeItem:
.object: accessibility state. The parameter type is ArkUI_AccessibilityState.
NODE_ACCESSIBILITY_VALUE = 91 Sets the accessibility value. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: accessibility value. The parameter type is ArkUI_AccessibilityValue.
Format of the return value ArkUI_AttributeItem:
.object: accessibility value. The parameter type is ArkUI_AccessibilityValue.
NODE_EXPAND_SAFE_AREA = 92 Sets the safe area to be expanded to. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0]?.u32: types of the expanded safe area, which are enumerated values of ArkUI_SafeAreaType. Example: ARKUI_SAFE_AREA_TYPE_SYSTEM | ARKUI_SAFE_AREA_TYPE_CUTOUT.
.value[1]?.u32: edges for expanding the safe area, which are enumerated values of ArkUI_SafeAreaEdge. Example: ARKUI_SAFE_AREA_EDGE_TOP | ARKUI_SAFE_AREA_EDGE_BOTTOM.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: expanded safe area.
.value[1].u32: edges for expanding the safe area.
NODE_VISIBLE_AREA_CHANGE_RATIO = 93 Defines the visible area ratio (visible area/total area of the component) threshold for invoking the visible area change event of the component. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[...].f32: threshold array. The value ranges from 0 to 1.
.object: The parameter type is ArkUI_VisibleAreaEventOptions.
Since: 22
Format of the return value ArkUI_AttributeItem:
.value[...].f32: threshold array.
.object: The return type is ArkUI_VisibleAreaEventOptions.
Since: 22
NODE_TRANSITION = 94 Sets the transition effect when the component is inserted or deleted. This attribute can be set and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: transition effect. The parameter type is ArkUI_TransitionEffect.
Format of the return value ArkUI_AttributeItem:
.object: transition effect. The parameter type is ArkUI_TransitionEffect.
NODE_UNIQUE_ID(deprecated)  = 95 Defines the component ID. This attribute can be obtained through APIs.
The component ID is read-only and unique in a process.
This API is sudpported since API version 12 and deprecated since API version 20. You are advised to use OH_ArkUI_NodeUtils_GetNodeUniqueId instead.
NODE_FOCUS_BOX = 96 Sets the style of the system focus box for this component.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: distance between the focus box and the edge of the component
A positive number indicates the outside, and a negative number indicates the inside.
The value cannot be in percentage.
.value[1].f32: width of the focus box. Negative numbers and percentages are not supported.
.value[2].u32: color of the focus box.
NODE_CLICK_DISTANCE = 97 Defines the moving distance limit for the component-bound tap gesture. This attribute can be set as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: allowed moving distance of a finger, in vp.
NODE_TAB_STOP = 98 Sets whether the focus can be placed on this component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the focus can be placed on the current component. The value 1 means that the focus can be placed on the current component, and 0 means the opposite. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the focus can be placed on the current component. The value 1 means that the focus can be placed on the current component, and 0 means the opposite.
Since: 14
NODE_BACKDROP_BLUR = 99 Sets the background blur effect. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: background blur radius. The value range is [0, +∞). The unit is px. The default value is 0.0.
.value[1]?.f32: brightness of black in the grayscale blur. The value range is [0, 127].
.value[2]?.f32: degree of darkening the white color in the grayscale blur. The value range is [0, 127].
Format of the return value ArkUI_AttributeItem:
.value[0].f32: background blur radius. The value range is [0, +∞). The unit is px.
.value[1].f32: brightness of black in the grayscale blur. The value range is [0, 127].
.value[2].f32: degree of darkening the white color in the grayscale blur. The value range is [0, 127].
Since: 15
NODE_BACKGROUND_IMAGE_RESIZABLE_WITH_SLICE = 100 Sets the resizable attribute of a background image when it is stretched. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: pixel value of the image that remains unchanged when the left side of the image is stretched, in vp.
.value[1].f32: pixel value of the image that remains unchanged when the top side of the image is stretched, in vp.
.value[2].f32: pixel value of the image that remains unchanged when the right side of the image is stretched, in vp.
.value[3].f32: pixel value of the image that remains unchanged when the bottom side of the image is stretched, in vp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: pixel value of the image that remains unchanged when the left side of the image is stretched, in vp.
.value[1].f32: pixel value of the image that remains unchanged when the top side of the image is stretched, in vp.
.value[2].f32: pixel value of the image that remains unchanged when the right side of the image is stretched, in vp.
.value[3].f32: pixel value of the image that remains unchanged when the bottom side of the image is stretched, in vp.
Since: 19
NODE_NEXT_FOCUS = 101 Sets the next focus node. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: focus movement direction, as defined in ArkUI_FocusMove.
.object: next focus node. The parameter type is ArkUI_NodeHandle.
Since: 18
NODE_VISIBLE_AREA_APPROXIMATE_CHANGE_RATIO = 102 Sets the threshold ratio for triggering a visible area change event.
Note: The visible area change callback is not a real-time callback. The actual callback interval may differ from the expected interval due to system load and other factors. The interval between two visible area change callbacks will not be less than the expected update interval. If the provided expected interval is too short, the actual callback interval will be determined by the system load. By default, the interval threshold of the visible area change callback includes 0. This means that, if the provided threshold is [0.5], the effective threshold will be [0.0, 0.5].
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: parameters for visible area change events. The parameter type is ArkUI_VisibleAreaEventOptions.
Format of the return value ArkUI_AttributeItem:
.object: parameters for visible area change events. The parameter type is ArkUI_VisibleAreaEventOptions.
Since: 17
NODE_TRANSLATE_WITH_PERCENT = 103 Sets component translation, with support for percentage-based translation parameters. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: translation distance along the x-axis. The default unit is percentage, unless value[3] exists and is 0 (then the unit is vp). The default value is 0.
.value[1].f32: translation distance along the y-axis. The default unit is percentage, unless value[4] exists and is 0 (then the unit is vp). The default value is 0.
.value[2].f32: translation distance along the z-axis, in vp. The default value is 0.
.value[3]?.i32: whether the x-axis movement distance is in percentage format. Valid values: 0 or 1. The value 1 means percentage format (for example, value[0].f32=0.1 and value[3].i32=1 translates 10% along the x-axis). The default value is 1.
.value[4]?.i32: whether the y-axis movement distance is in percentage. Valid values: 0 or 1. The value 1 means percentage format (for example, value[1].f32=0.1 and value[4].i32=1 translates 10% along the y-axis). The default value is 1.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: translation distance along the x-axis. The unit depends on value[3].
.value[1].f32: translation distance along the y-axis. The unit depends on value[4].
.value[2].f32: translation distance along the z-axis, in vp.
.value[3].i32: whether the unit of x-axis movement distance is percentage. When value[3].i32 is 0, the unit of x-axis movement distance is vp; when value[3].i32 is 1, the unit is percentage.
.value[4].i32: whether the unit of y-axis movement distance is percentage. When value[4].i32 is 0, the unit of y-axis movement distance is vp; when value[4].i32 is 1, the unit is percentage.
Since: 20
NODE_ROTATE_ANGLE = 104 Sets component rotation with multi-axis angle control. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: x-axis rotation angle. The default value is 0.
.value[1].f32: y-axis rotation angle. The default value is 0.
.value[2].f32: z-axis rotation angle. The default value is 0.
.value[3].f32: perspective distance from the viewpoint to the z=0 plane, in px. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: x-axis rotation angle. The default value is 0.
.value[1].f32: y-axis rotation angle. The default value is 0.
.value[2].f32: z-axis rotation angle. The default value is 0.
.value[3].f32: perspective distance from the viewpoint to the z=0 plane, in px. The default value is 0.
Since: 20
NODE_WIDTH_LAYOUTPOLICY = 105 Sets the width layout policy of a component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: layout policy. The parameter type is ArkUI_LayoutPolicy.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: layout policy. The parameter type is ArkUI_LayoutPolicy.
Since: 21
NODE_HEIGHT_LAYOUTPOLICY = 106 Sets the height layout policy of a component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: layout policy. The parameter type is ArkUI_LayoutPolicy.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: layout policy. The parameter type is ArkUI_LayoutPolicy.
Since: 21
NODE_POSITION_EDGES = 107 Sets the position of a component relative to the boundaries of the container's content area. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: position of the component relative to the boundaries of the container's content area. The parameter type is ArkUI_PositionEdges.
Format of the return value ArkUI_AttributeItem:
.object: position of the component relative to the boundaries of the container's content area. The parameter type is ArkUI_PositionEdges.
Since: 21
NODE_ALLOW_FORCE_DARK = 108 Sets whether to enable color inversion of a component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable color inversion. The value can be 0 (no) or 1 (yes).
Since: 21
NODE_PIXEL_ROUND = 109 Sets the pixel rounding policy of a component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: pixel rounding policy of the component. The parameter type is ArkUI_PixelRoundPolicy.
Format of the return value ArkUI_AttributeItem:
.object: pixel rounding policy of the component. The parameter type is ArkUI_PixelRoundPolicy.
Since: 21
NODE_ENABLE_CLICK_SOUND_EFFECT = 110 Sets whether the component enables the default click sound effect. This API takes effect only on TVs. If the default click sound effect is enabled on other devices, the sound effect is not played. Whether the sound can be played depends on the sound settings of the device. For example, the sound effect is not played in mute mode.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: The value can be 1 or 0. The value 1 indicates that the default click sound effect is enabled, and the value 0 indicates that the default click sound effect is disabled. The default value is 1.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the default click sound effect is enabled for the node. The value can be 1 or 0. The value 1 indicates that the default click sound effect is enabled, and the value 0 indicates that the default click sound effect is disabled.
Since: 24
NODE_MOTION_PATH = 111 Sets the motion path of the component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: pointer to the motion path configuration item of the path animation. The parameter type is ArkUI_MotionPathOptions.
Format of the return value ArkUI_AttributeItem:
.object: pointer to the motion path configuration item of the path animation. The parameter type is ArkUI_MotionPathOptions.
Since: 23
NODE_HOVER_EFFECT = 112 Defines the hover effect applied when the component is hovered over. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: hover effect applied when the component is hovered over. The parameter type is ArkUI_HoverEffect. The default value is ARKUI_HOVER_EFFECT_AUTO.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: hover effect applied when the component is hovered over. The parameter type is ArkUI_HoverEffect.
Since: 23
NODE_FOCUS_SCOPE_ID = 113 Configures the container as a focus group with the specified identifier. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: focus scope identifier.
.value[0].i32: whether the scope is a focus group. The default value is 0. The value can be 1 or 0. The value 1 indicates that the component is set as a focus group. The value 0 indicates that the component is not set as a focus group.
.value[1].i32: whether arrow keys can move focus from inside the focus group to outside. This setting only takes effect when isGroup is true. The default value is 1. The value can be 1 or 0. The value 1 indicates that arrow keys can move focus from inside the focus group to outside, and the value 0 indicates that arrow keys cannot move focus from inside the focus group to outside.
Format of the return value ArkUI_AttributeItem:
.string: focus scope identifier.
.value[0].i32: whether the scope is a focus group. The default value is 0. The value can be 1 or 0. The value 1 indicates that the component is set as a focus group. The value 0 indicates that the component is not set as a focus group.
.value[1].i32: whether arrow keys can move focus from inside the focus group to outside. This setting only takes effect when isGroup is true. The default value is 1. The value can be 1 or 0. The value 1 indicates that arrow keys can move focus from inside the focus group to outside, and the value 0 indicates that arrow keys cannot move focus from inside the focus group to outside.
Since: 23
NODE_FOCUS_SCOPE_PRIORITY = 114 Sets the component focus priority within a specific focus scope. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: focus scope identifier.
.value[0].i32: focus priority within the focus scope. The parameter type is ArkUI_FocusPriority. The default value is ARKUI_FOCUS_PRIORITY_AUTO.
Format of the return value ArkUI_AttributeItem:
.string: focus scope identifier.
.value[0].i32: focus scope priority. The parameter type is ArkUI_FocusPriority.
Since: 23
NODE_ON_CLICK_EVENT_DISTANCE_THRESHOLD = 115 Sets the distance threshold for click events. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: movement threshold for click events. Value range: (0, +∞) Default value: +∞.
Unit: vp.

Format of the return value ArkUI_AttributeItem:
.value[0].f32: movement threshold for click events.
Since: 23
NODE_RESPONSE_REGION_LIST = 116 Defines the component event response region. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.data[0].i32: event tool type for the response region. The parameter type is ArkUI_ResponseRegionSupportedTool. Default value: ARKUI_RESPONSE_REGIN_SUPPORTED_TOOL_ALL.
.data[1].f32: X coordinate of the pointer position relative to the upper left corner of the component, in vp. The default value is 0.0.
.data[2].f32: Y coordinate of the pointer position relative to the upper left corner of the component, in vp. The default value is 0.0.
.data[3].f32: width of the response region, in percentage. The default value is 100.0.
.data[4].f32: height of the response region, in percentage. The default value is 100.0.
.data[5...].f32: additional response regions in the same parameter order.
Format of the return value ArkUI_AttributeItem:
.data[0].i32: event tool type for the response region. The parameter type is ArkUI_ResponseRegionSupportedTool. Default value: ARKUI_RESPONSE_REGIN_SUPPORTED_TOOL_ALL.
.data[1].f32: X coordinate of the pointer position relative to the upper left corner of the component, in vp. The default value is 0.0.
.data[2].f32: Y coordinate of the pointer position relative to the upper left corner of the component, in vp. The default value is 0.0.
.data[3].f32: width of the response region, in percentage. The default value is 100.0.
.data[4].f32: height of the response region, in percentage. The default value is 100.0.
.data[5...].f32: additional response regions in the same parameter order.
Note: During configuration, the data array can contain any number of values (all will be accepted), but only 20 values can be retrieved. The order of the retrieved data array may be different from that of the settings.
Since: 23
NODE_MONOPOLIZE_EVENTS = 117 Defines the event monopolization attribute. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: The value can be 1 or 0. The value 1 indicates that the component exclusively handles events. The value 0 indicates that the component does not exclusively handle events.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: The value can be 1 or 0. The value 1 indicates that the component exclusively handles events. The value 0 indicates that the component does not exclusively handle events.
Since: 23
NODE_CHAIN_WEIGHT = 118 Sets the layout location of components that have formed a chain when the parent component is RelativeContainer. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: layout weight of the component in the horizontal direction. The default value is 0.
If an invalid value is set, the default value is used.
.value[1].f32: layout weight of the component in the vertical direction. The default value is 0.
If an invalid value is set, the default value is used.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: layout weight of the component in the horizontal direction.
.value[1].f32: layout weight of the component in the vertical direction.
Since: 23
NODE_IGNORE_LAYOUT_SAFE_AREA = 119 Defines the safe area to be ignored when extending the layout of a component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: type for expanding the safe area. The parameter type is ArkUI_LayoutSafeAreaType. The default value is ARKUI_LAYOUT_SAFE_AREA_TYPE_SYSTEM.
If an invalid value is set, the default value is used.
.value[1].u32: edges for expanding the safe area. The parameter type is ArkUI_LayoutSafeAreaEdge. The default value is ARKUI_LAYOUT_SAFE_AREA_EDGE_ALL, for example, ARKUI_LAYOUT_SAFE_AREA_EDGE_TOP | ARKUI_LAYOUT_SAFE_AREA_EDGE_BOTTOM.
If an invalid value is set, the default value is used.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: type for expanding the safe area.
.value[1].u32: edges for expanding the safe area.
Since: 23
NODE_DASH_WIDTH = 120 Sets the length of the dashed line when the border style is set to dashed. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: length of the top border, in vp.
.value[1].f32: length of the right border, in vp.
.value[2].f32: length of the bottom border, in vp.
.value[3].f32: length of the left border, in vp.
Value range: [0, +∞).
If an abnormal value is set, the default dashed line effect is displayed.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: length of the top border, in vp.
.value[1].f32: length of the right border, in vp.
.value[2].f32: length of the bottom border, in vp.
.value[3].f32: length of the left border, in vp.
Since: 23
NODE_DASH_GAP = 121 Sets the gap between dashes on the dashed line when the border style is set to dashed. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: gap between dashes on the top border, in vp.
.value[1].f32: gap between dashes on the right border, in vp.
.value[2].f32: gap between dashes on the bottom border, in vp.
.value[3].f32: gap between dashes on the left border, in vp.
Value range: [0, +∞).
If an abnormal value is set, the default dashed line effect is displayed.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: gap between dashes on the top border, in vp.
.value[1].f32: gap between dashes on the right border, in vp.
.value[2].f32: gap between dashes on the bottom border, in vp.
.value[3].f32: gap between dashes on the left border, in vp.
Since: 23
NODE_LAYOUT_GRAVITY = 122 Defines the alignment rule of the child components in the Stack container. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: alignment rules of child components in a Stack container. The parameter type is ArkUI_LocalizedAlignment. The default value is ARKUI_ALIGNMENT_CENTER.
If an invalid value is set, the default value is used.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: alignment rules of child components in a Stack container. The parameter type is ArkUI_LocalizedAlignment.
Since: 23
NODE_BORDER_RADIUS_TYPE = 123 Defines the mode for drawing rounded corners of a component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: mode for drawing rounded corners. The parameter type is ArkUI_RenderStrategy. The default value is ARKUI_RENDERSTRATEGY_FAST.
If an invalid value is set, the default value is used.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: mode for drawing rounded corners. The parameter type is ArkUI_RenderStrategy.
Since: 23
NODE_TEXT_CONTENT = MAX_NODE_SCOPE_NUM * ARKUI_NODE_TEXT = 1000 Defines the text content attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: text content.
Format of the return value ArkUI_AttributeItem:
.string: text content.
NODE_FONT_COLOR = 1001 Defines the font color attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: font color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: font color value, in 0xARGB format.
NODE_FONT_SIZE = 1002 Defines the font size attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: font size, in fp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: font size, in fp.
NODE_FONT_STYLE = 1003 Defines the font style attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: font style ArkUI_FontStyle. The default value is ARKUI_FONT_STYLE_NORMAL.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: font style ArkUI_FontStyle.
NODE_FONT_WEIGHT = 1004 Defines the font weight attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: font weight ArkUI_FontWeight. The default value is ARKUI_FONT_WEIGHT_NORMAL.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: font weight ArkUI_FontWeight.
NODE_TEXT_LINE_HEIGHT = 1005 Defines the text line height attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: line height, in fp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: line height, in fp.
NODE_TEXT_DECORATION = 1006 Defines the text decoration line style and its color. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: text decoration type ArkUI_TextDecorationType. The default value is ARKUI_TEXT_DECORATION_TYPE_NONE.
.value[1]?.u32: text decoration color, in 0xARGB format. For example, 0xFFFF0000 indicates red. Optional.
.value[2]?.i32: text decoration style ArkUI_TextDecorationStyle.
.value[3]?.f32: thickness of the text decoration line. The parameter is optional. The default value is 1.0. The value range is [0, +∞). This parameter is supported since API version 22.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: text decoration type ArkUI_TextDecorationType.
.value[1].u32: text decoration color, in 0xARGB format.
.value[2].i32: text decoration style ArkUI_TextDecorationStyle.
.value[3].f32: thickness of the text decoration line. This return value is supported since API version 22.
NODE_TEXT_CASE = 1007 Defines the text case attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: text case ArkUI_TextCase. The default value is ARKUI_TEXT_CASE_NORMAL.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: text case ArkUI_TextCase.
NODE_TEXT_LETTER_SPACING = 1008 Defines the letter spacing attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: letter spacing, in fp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: letter spacing, in fp.
NODE_TEXT_MAX_LINES = 1009 Sets the maximum number of lines in the text. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: maximum number of lines in the text.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: maximum number of lines in the text.
NODE_TEXT_ALIGN = 1010 Defines the horizontal alignment mode of the text. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: horizontal alignment mode of the text. The value is an enumerated value of ArkUI_TextAlignment. The default value is ARKUI_TEXT_ALIGNMENT_START.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: horizontal alignment mode of the text. The value is an enumerated value of ArkUI_TextAlignment.
NODE_TEXT_OVERFLOW = 1011 Defines the text overflow attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: display mode when the text is too long, specified using ArkUI_TextOverflow. The default value is ARKUI_TEXT_OVERFLOW_NONE.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: display mode when the text is too long.ArkUI_TextOverflow
NODE_FONT_FAMILY = 1012 Defines the font family attribute, which can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: fonts, separated by commas (,).
Format of the return value ArkUI_AttributeItem:
.string: fonts, separated by commas (,).
NODE_TEXT_COPY_OPTION = 1013 Defines the copy option attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: copy option ArkUI_CopyOptions. The default value is ARKUI_COPY_OPTIONS_NONE.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: copy option ArkUI_CopyOptions.
NODE_TEXT_BASELINE_OFFSET = 1014 Defines the text baseline offset attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: baseline offset, in fp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: baseline offset, in fp.
NODE_TEXT_TEXT_SHADOW = 1015 Defines the text shadow attribute. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: blur radius of the shadow, in vp.
.value[1].i32: shadow type ArkUI_ShadowType. The default value is ARKUI_SHADOW_TYPE_COLOR.
.value[2].u32: shadow color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
.value[3].f32: offset of the shadow along the x-axis, in vp.
.value[4].f32: offset of the shadow along the y-axis, in vp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: blur radius of the shadow, in vp.
.value[1].i32: shadow type ArkUI_ShadowType.
.value[2].u32: shadow color, in 0xARGB format.
.value[3].f32: offset of the shadow along the x-axis, in vp.
.value[4].f32: offset of the shadow along the y-axis, in vp.
NODE_TEXT_MIN_FONT_SIZE = 1016 Defines the minimum font size attribute, which can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: minimum font size, in fp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: minimum font size, in fp.
NODE_TEXT_MAX_FONT_SIZE = 1017 Defines the maximum font size attribute, which can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: maximum font size, in fp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: maximum font size, in fp.
NODE_TEXT_FONT = 1018 Defines the text style attribute, which can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string?: font family. Optional. Use commas (,) to separate multiple fonts.
.value[0].f32: font size, in fp.
.value[1]? .i32: font weight. Optional. The parameter type is ArkUI_FontWeight. The default value is ARKUI_FONT_WEIGHT_NORMAL.
.value[2]?.i32: font style. Optional. The parameter type is ArkUI_FontStyle. The default value is ARKUI_FONT_STYLE_NORMAL.
Format of the return value ArkUI_AttributeItem:
.string: font family. Use commas (,) to separate multiple fonts.
.value[0].f32: font size, in fp.
.value[1] .i32: font weight. The parameter type is ArkUI_FontWeight. The default value is ARKUI_FONT_WEIGHT_NORMAL.
.value[2].i32: font style. The parameter type is ArkUI_FontStyle. The default value is ARKUI_FONT_STYLE_NORMAL.
NODE_TEXT_HEIGHT_ADAPTIVE_POLICY = 1019 Defines how the adaptive height is determined for the text. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: how the adaptive height is determined for the text. The parameter type is ArkUI_TextHeightAdaptivePolicy. The default value is ARKUI_TEXT_HEIGHT_ADAPTIVE_POLICY_MAX_LINES_FIRST.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: how the adaptive height is determined for the text. The parameter type is ArkUI_TextHeightAdaptivePolicy.
NODE_TEXT_INDENT = 1020 Defines the indentation of the first line. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: indentation of the first line, in fp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: indentation of the first line, in vp.
NODE_TEXT_WORD_BREAK = 1021 Defines the line break rule. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: line break rule. The parameter type is ArkUI_WordBreak. The default value is ARKUI_WORD_BREAK_BREAK_WORD.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: line break rule. The parameter type is ArkUI_WordBreak.
NODE_TEXT_ELLIPSIS_MODE = 1022 Defines the ellipsis position. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: ellipsis position. The parameter type is ArkUI_EllipsisMode. The default value is ARKUI_ELLIPSIS_MODE_END.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: ellipsis position. The parameter type is ArkUI_EllipsisMode.
NODE_TEXT_LINE_SPACING = 1023 Defines the line spacing attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: line spacing, in fp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: line spacing, in fp.
NODE_FONT_FEATURE = 1024 Sets the font feature. NODE_FONT_FEATURE provides advanced typographic features in OpenType fonts. These features such as hyphenation and monospace are generally used in custom fonts and require support from the respective fonts. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: string that describes the font feature settings. The value format is normal | <feature-tag-value>.
Syntax for <feature-tag-value>: <string> [ <integer> | on | off ],
There can be multiple <feature-tag-value> values, separated by commas (,). For example, for the monospace feature, you can pass in ss01 on.
Format of the return value ArkUI_AttributeItem:
.string: font feature. Multiple font features are separated by commas (,).
NODE_TEXT_ENABLE_DATA_DETECTOR = 1025 Sets whether to enable text recognition.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable text recognition. The default value is false. The value true means to enable text recognition, and false means the opposite.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether text recognition is enabled.
NODE_TEXT_ENABLE_DATA_DETECTOR_CONFIG = 1026 Configures text recognition settings.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0...].i32: array of entity types. The parameter type is ArkUI_TextDataDetectorType.
Format of the return value ArkUI_AttributeItem:
.value[0...].i32: array of entity types. The parameter type is ArkUI_TextDataDetectorType.
NODE_TEXT_SELECTED_BACKGROUND_COLOR = 1027 Defines the background color of the selected text. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color value, in 0xARGB format.
NODE_TEXT_CONTENT_WITH_STYLED_STRING = 1028 Sets the string to use in the styled string. This attribute can be set, reset, and obtained as required through APIs. Configuring a custom OH_Drawing_Typography object for the Text component will skip the layout measurement phase of the component. Note the following:
1. Ensure that the lifecycles of the** OH_ArkUI_StyledString** object and OH_Drawing_Typography object are aligned with the lifecycle of the Text component. Reset the OH_ArkUI_StyledString object when the Text component is destroyed; otherwise, it may lead to null pointer crashes in the application.
2. Ensure that the OH_Drawing_TypographyLayout API is called prior to the layout measurement of the Text component.
3. When the OH_ArkUI_StyledString and OH_Drawing_Typography objects are released, the reset API of the Text component must be called synchronously; otherwise, it may cause null pointer crashes in the application.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: string to use in the styled string. The parameter type is ArkUI_StyledString.
Format of the return value ArkUI_AttributeItem:
.object: string to use in the styled string. The parameter type is ArkUI_StyledString.
NODE_TEXT_HALF_LEADING = 1029 Sets whether to center text vertically in the Text component.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to center text vertically. The default value is false.
The value true means to center text vertically, and false means the opposite.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the text is centered vertically.
NODE_IMMUTABLE_FONT_WEIGHT = 1030 Defines the font weight attribute, which can be set, reset, and obtained as required through APIs. The font weight specified by this API is not affected by any changes in the system font weight settings.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: font weight ArkUI_FontWeight. The default value is ARKUI_FONT_WEIGHT_NORMAL.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: font weight ArkUI_FontWeight.
Since: 15
NODE_TEXT_LINE_COUNT = 1031 Sets the number of lines in the text. This attribute can be obtained through APIs. Format of the return value ArkUI_AttributeItem:
.value[0].i32: number of text lines.
Since: 20
NODE_TEXT_OPTIMIZE_TRAILING_SPACE = 1032 Sets whether to optimize the trailing spaces at the end of each line during text layout. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to optimize trailing spaces at the end of each line during text layout. The default value is false.
The value true means to optimize trailing spaces at the end of each line during text layout, and false means the opposite.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the trailing spaces at the end of each line is optimized during text layout.
Since: 20
NODE_TEXT_LINEAR_GRADIENT = 1033 Sets a linear gradient effect for text. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: start angle of the linear gradient. The setting takes effect only when direction is set to ARKUI_LINEAR_GRADIENT_DIRECTION_CUSTOM. A positive value indicates a clockwise rotation from the origin, (0, 0). The default value is 180.
.value[1].i32: direction of the linear gradient ArkUI_LinearGradientDirection. When a direction other than ARKUI_LINEAR_GRADIENT_DIRECTION_CUSTOM is set, the angle property is ignored. Default value: ARKUI_LINEAR_GRADIENT_DIRECTION_LEFT_BOTTOM.
.value[2].i32: whether the colors are repeated. The value true means that the colors are repeated, and false means the opposite. Default value: false.
.object: The parameter type is ArkUI_ColorStop. Array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.
colors: colors of the color stops, in 0xARGB format. For example, 0xFFFF0000 indicates red.
stops: stop positions of the color stops. The value range is [0, 1.0]. 0 represents the start of the gradient container, and 1.0 represents the end. To create a gradient with multiple color stops, you are advised to set the array elements in ascending order. If a later element is smaller than a previous one, it will be treated as equal to the previous value.
size: number of colors. If the value is smaller than the length of the colors array, only the first size colors take effect. Values greater than the colors array length, values less than or equal to 0, or invalid values are not recommended.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: start angle of the linear gradient. The set value is used only when ARKUI_LINEAR_GRADIENT_DIRECTION_CUSTOM is used. In other cases, the default value 0 is used.
.value[1].i32: direction of the linear gradient ArkUI_LinearGradientDirection.
.value[2].i32: whether the colors are repeated. The value 1 means that the colors are repeated, and 0 means the opposite. Default value: 0.
.object: The parameter type is ArkUI_ColorStop. It specifies an array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.
colors: colors of the color stops, in 0xARGB format. For example, 0xFFFF0000 indicates red.
stops: stop positions of the color stops. The value range is [0, 1.0]. 0 represents the start of the gradient container, and 1.0 represents the end.
size: number of effective gradient colors.
Since: 20
NODE_TEXT_RADIAL_GRADIENT = 1034 Sets a radial gradient effect for text. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0]?.f32: x-coordinate of the radial gradient center relative to the upper left corner of the text box.
.value[1]?.f32: y-coordinate of the radial gradient center relative to the upper left corner of the text box. The coordinates of the upper left corner of the text box are [0, 0].
.value[2]?.f32: radius of the radial gradient. The default value is 0.
.value[3].i32: whether the colors are repeated. The value true means that the colors are repeated, and false means the opposite. Default value: false.
.object: The parameter type is ArkUI_ColorStop. It specifies an array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.
colors: colors of the color stops, in 0xARGB format. For example, 0xFFFF0000 indicates red.
stops: stop positions of the color stops. The value range is [0, 1.0]. 0 represents the start of the gradient container, and 1.0 represents the end. To create a gradient with multiple color stops, you are advised to set the array elements in ascending order. If a later element is smaller than a previous one, it will be treated as equal to the previous value.
size: number of colors. If the value is smaller than the length of the colors array, only the first size colors take effect. Values greater than the colors array length, values less than or equal to 0, or invalid values are not recommended.
Format of the return value ArkUI_AttributeItem:
.value[0]?.f32: x-coordinate of the radial gradient center relative to the upper left corner of the text box.
.value[1]?.f32: y-coordinate of the radial gradient center relative to the upper left corner of the text box. The coordinates of the upper left corner of the text box are [0, 0].
.value[2]?.f32: radius of the radial gradient. The default value is 0.
.value[3]?.i32: whether the colors are repeated. The value 1 means that the colors are repeated, and 0 means the opposite. Default value: 0.
.object: The parameter type is ArkUI_ColorStop. It specifies an array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.
colors: colors of the color stops, in 0xARGB format. For example, 0xFFFF0000 indicates red.
stops: stop positions of the color stops. The value range is [0, 1.0]. 0 represents the start of the gradient container, and 1.0 represents the end.
size: number of effective gradient colors.
Since: 20
NODE_TEXT_VERTICAL_ALIGN = 1035 Sets the vertical alignment of the text content. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: vertical alignment of the text content, specified using the ArkUI_TextVerticalAlignment enum. The default value is ARKUI_TEXT_VERTICAL_ALIGNMENT_BASELINE.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: vertical alignment of the text content, specified using the ArkUI_TextVerticalAlignment enum.
Since: 20
NODE_TEXT_CONTENT_ALIGN = 1036 Sets the vertical alignment of the text content area. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: vertical alignment of the text content area, specified using the ArkUI_TextContentAlign enum. The default value is ARKUI_TEXT_CONTENT_ALIGN_CENTER.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: vertical alignment of the text content area, specified using the ArkUI_TextContentAlign enum.
Since: 21
NODE_TEXT_MIN_LINES = 1037 Sets the minimum number of lines in the text. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: minimum number of text lines.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: minimum number of text lines.
Since: 22
NODE_TEXT_ENABLE_SELECTED_DATA_DETECTOR = 1038 Defines whether to enable entity recognition for selected text.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable entity recognition for selected text. true indicates to enable; false otherwise. Default value: true.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether entity recognition for selected text is enabled.
Since: 22
NODE_TEXT_MIN_LINE_HEIGHT = 1040 Minimum line height. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: minimum line height of the text. The default value is 0. The unit is fp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: minimum line height of the text. The unit is fp.
Since: 22
NODE_TEXT_MAX_LINE_HEIGHT = 1041 Maximum line height. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: maximum line height of the text. The default value is 0, indicating that the maximum line height is not limited. The unit is fp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: maximum line height of the text. The unit is fp.
Since: 22
NODE_TEXT_LINE_HEIGHT_MULTIPLE = 1042 Defines the multiple value of the multiple line height mode. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: multiple value of the multiple line height mode. The default value is 0, indicating that the default line height is used.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: multiple value of the multiple line height mode.
Since: 22
NODE_TEXT_LAYOUT_MANAGER = 1043 Defines the text layout manager. This attribute can be obtained as required through APIs.
Format of the return value ArkUI_AttributeItem:
.object: text layout manager object. The parameter type is ArkUI_LayoutManager.
Since: 22
NODE_TEXT_EDIT_MENU_OPTIONS = 1044 Defines the extended options of the text menu. This attribute can be obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: configuration data of the extended item of the text menu. The parameter type is ArkUI_TextEditMenuOptions.
Since: 22
NODE_TEXT_BIND_SELECTION_MENU = 1045 Customizes the text selection menu. This attribute can be obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: configuration data of the custom text selection menu. The parameter type is ArkUI_TextSelectionMenuOptions.
Since: 22
NODE_TEXT_TEXT_SELECTION = 1046 Defines the text selection area. After the definition, the selected area will be highlighted. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: start position of the text selection.
.value[1].i32: end position of the text selection.
.object: selection option. The parameter type is ArkUI_SelectionOptions.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: start position of the text selection.
.value[1].i32: end position of the text selection.
.object: selection option. The parameter type is ArkUI_SelectionOptions.
Since: 23
NODE_TEXT_COMPRESS_LEADING_PUNCTUATION = 1048 Defines whether to enable the function of compressing punctuations at the beginning of a text line. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the function of compressing punctuations at the beginning of a text line.
true to enable; false otherwise. The default value is false.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the function of compressing punctuations is enabled at the beginning of a text line.
Since: 23
NODE_TEXT_INCLUDE_FONT_PADDING = 1049 Sets whether to add spacing to the first and last lines to avoid text truncation.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to add spacing to the first and last lines to avoid text truncation. true to add; false otherwise. The default value is false.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether spacing is added to the first and last lines. true means spacing is added; false otherwise.
Since: 23
NODE_TEXT_FALLBACK_LINE_SPACING = 1050 Defines whether the line height can be automatically adjusted based on the actual text height for multi-line text overlay. This attribute takes effect only when the line height is smaller than the actual text height.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the line height can be automatically adjusted based on the actual text height. true to be adjusted; false otherwise. The default value is false.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the function of automatically adjusting the line height is enabled based on the actual text height. true means enabled; false otherwise.
Since: 23
NODE_TEXT_MARQUEE_OPTIONS = 1051 Defines the configuration options of the text marquee mode. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: text marquee mode configuration. The parameter type is ArkUI_TextMarqueeOptions.
Format of the return value ArkUI_AttributeItem:
.object: text marquee mode configuration. The parameter type is ArkUI_TextMarqueeOptions.
Since: 23
NODE_TEXT_DIRECTION = 1052 Defines the text layout direction.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: text layout direction. The value is an enumerated value of ArkUI_TextDirection. The default value is ARKUI_TEXT_DIRECTION_DEFAULT.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: text layout direction. For details about the values and meanings, see the enumerated values of ArkUI_TextDirection.
Since: 23
NODE_TEXT_SELECTED_DRAG_PREVIEW_STYLE = 1053 Defines the drag preview style when the text is selected.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: drag preview style when the text is selected. The parameter type is ArkUI_SelectedDragPreviewStyle.
Format of the return value ArkUI_AttributeItem:
.object: drag preview style when the text is selected. The parameter type is ArkUI_SelectedDragPreviewStyle.
Since: 23
NODE_SPAN_CONTENT = MAX_NODE_SCOPE_NUM * ARKUI_NODE_SPAN = 2000 Defines the text content attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: text content of the span.
Format of the return value ArkUI_AttributeItem:
.string: content of the text span.
NODE_SPAN_TEXT_BACKGROUND_STYLE = 2001 Defines the text background style. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: color of the text background, in 0xARGB format, for example, 0xFFFF0000 indicating red.
The second parameter is used to set the rounded corner of the text background. The options are as follows:
-.value[1].f32: radius of the four corners, in vp.
- .value[1].f32: radius of the upper left corner, in vp.
.value[2].f32: radius of the upper right corner, in vp.
.value[3].f32: radius of the lower left corner, in vp.
.value[4].f32: radius of the lower right corner, in vp.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color of the text background, in 0xARGB format.
.value[1].f32: radius of the upper left corner, in vp.
.value[2].f32: radius of the upper right corner, in vp.
.value[3].f32: radius of the lower left corner, in vp.
.value[4].f32: radius of the lower right corner, in vp.
NODE_SPAN_BASELINE_OFFSET = 2002 Defines the text baseline offset attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: baseline offset, in fp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: baseline offset, in fp.
NODE_SPAN_FONT = 2003 Defines the text style, which can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string?: font family. Use commas (,) to separate multiple fonts. Optional.
.value[0].f32: font size, in fp.
.value[1]?.i32: font weight. Optional. The value range is [100, 900]. The default value is 400. A larger value indicates a bolder font.
.value[2]?.i32: font style. Optional. The parameter type is ArkUI_FontStyle. The default value is ARKUI_FONT_STYLE_NORMAL.
?.object: font configuration. Optional. The parameter type is OH_ArkUI_FontConfigs.
Format of the return value ArkUI_AttributeItem:
.string: font family. Use commas (,) to separate multiple fonts.
.value[0].f32: font size, in fp.
.value[1].i32: font weight, without a unit. A larger value indicates a bolder font.
.value[2].i32: font style. The parameter type is ArkUI_FontStyle.
.object: font configuration. The parameter type is OH_ArkUI_FontConfigs.
Since: 24
NODE_SPAN_FONT_WEIGHT = 2004 Defines the text font weight, which can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: font weight. The value range is [100, 900]. The default value is 400. A larger value indicates a bolder font.
?.object: (optional) font weight configuration. The parameter type is OH_ArkUI_FontWeightConfigs.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: font weight, without a unit. A larger value indicates a bolder font.
.object: font weight configuration. The parameter type is OH_ArkUI_FontWeightConfigs.
Since: 24
NODE_IMAGE_SPAN_SRC = MAX_NODE_SCOPE_NUM * ARKUI_NODE_IMAGE_SPAN = 3000 Defines the image source for an image span. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: image address of the image span.
.object: PixelMap object. The parameter type is ArkUI_DrawableDescriptor.
Format of the return value ArkUI_AttributeItem:
.string: image address of the image span.
.object: PixelMap object. The parameter type is ArkUI_DrawableDescriptor.
Either .object or .string must be set.
NODE_IMAGE_SPAN_VERTICAL_ALIGNMENT = 3001 Defines the alignment mode of the image with the text. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: alignment mode of the image with the text, specified using the ArkUI_ImageSpanAlignment enum.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: alignment mode of the image with the text, specified using the ArkUI_ImageSpanAlignment enum.
NODE_IMAGE_SPAN_ALT = 3002 Defines the image source for an image span. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: placeholder image address for the image span. GIF images are not supported.
.object: PixelMap object. The parameter type is ArkUI_DrawableDescriptor.
Either .object or .string must be set.
Format of the return value ArkUI_AttributeItem:
.string: image source for the image span.
.object: PixelMap object. The parameter type is ArkUI_DrawableDescriptor.
NODE_IMAGE_SPAN_BASELINE_OFFSET = 3003 Defines the baseline offset attribute of the ImageSpan component. This attribute can be set, reset, and obtained as required through APIs. A positive value means an upward offset, while a negative value means a downward offset. The default value is 0, and the unit is fp.

Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: baseline offset, in fp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: baseline offset, in fp.
Since: 13
NODE_IMAGE_SPAN_COLOR_FILTER = 3004 Defines the color filter of the image. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32 to .value[19].f32: filter matrix array.
.size: indicates that the size of the filter array is 5 x 4.
.object: color filter pointer. The parameter type is OH_Drawing_ColorFilter.
Either .object or .size must be set.
Format of the return value ArkUI_AttributeItem:
.value[0].f32 to .value[19].f32: filter matrix array.
.size: indicates that the size of the filter array is 5 x 4.
.object: color filter pointer. The parameter type is OH_Drawing_ColorFilter.
Since: 22
NODE_IMAGE_SPAN_SUPPORT_SVG2 = 3005 Sets whether to enable the SVG parsing capability, which allows you to set the scope of SVG parsing functionality support. This attribute can be set, reset, and obtained as required through APIs. After the ImageSpan component is created, the value of this attribute cannot be dynamically changed.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the new SVG parsing capability. true: enable enhanced SVG tag parsing. false: use original SVG tag parsing.
Default value: false.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the new SVG parsing capability is enabled.
Since: 22
NODE_IMAGE_SRC = MAX_NODE_SCOPE_NUM * ARKUI_NODE_IMAGE = 4000 Sets the image address for the Image component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: image address.
.object: PixelMap object. The parameter type is ArkUI_DrawableDescriptor.
Either .object or .string must be set.
Format of the return value ArkUI_AttributeItem:
.string: image address.
.object: PixelMap object. The parameter type is ArkUI_DrawableDescriptor.
NODE_IMAGE_OBJECT_FIT = 4001 Defines how the image is resized to fit its container. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: how the image is resized to fit its container, specified using the ArkUI_ObjectFit enum.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: how the image is resized to fit its container, specified using the ArkUI_ObjectFit enum.
NODE_IMAGE_INTERPOLATION = 4002 Defines the interpolation effect of the image. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: interpolation effect, specified using the ArkUI_ImageInterpolation enum.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: interpolation effect, specified using the ArkUI_ImageInterpolation enum.
NODE_IMAGE_OBJECT_REPEAT = 4003 Defines how the image is repeated. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: how the image is repeated, specified using the ArkUI_ImageRepeat enum.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: how the image is repeated, specified using the ArkUI_ImageRepeat enum.
NODE_IMAGE_COLOR_FILTER = 4004 Defines the color filter of the image. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32 to .value[19].f32: filter matrix array.
.size: 5 x 4 filter array size.
.object: pointer to the color filter. The parameter type is OH_Drawing_ColorFilter.
Either .object or .size must be set.
Format of the return value ArkUI_AttributeItem:
.value[0].f32 to .value[19].f32: filter matrix array.
.size: 5 x 4 filter array size.
.object: pointer to the color filter. The parameter type is OH_Drawing_ColorFilter.
NODE_IMAGE_AUTO_RESIZE = 4005 Defines the auto resize attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable auto resizing. The default value is false. true: Enable auto resizing. false: Disable auto resizing.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the image is resized.
NODE_IMAGE_ALT = 4006 Defines the placeholder image attribute. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: address of the placeholder image.
.object: PixelMap object. The parameter type is ArkUI_DrawableDescriptor.
Either .object or .string must be set. Network images are not supported.
Format of the return value ArkUI_AttributeItem:
.string: image source for the image span.
.object: PixelMap object. The parameter type is ArkUI_DrawableDescriptor.
NODE_IMAGE_DRAGGABLE = 4007 Defines whether the image is draggable. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the image is draggable. The value true means that the image is draggable.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the image is draggable.
NODE_IMAGE_RENDER_MODE = 4008 Defines the image rendering mode. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: image rendering mode. The parameter type is ArkUI_ImageRenderMode.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: image rendering mode. The parameter type is ArkUI_ImageRenderMode.
NODE_IMAGE_FIT_ORIGINAL_SIZE = 4009 Sets whether the display size of an image follows the original size of the image source. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: indicates whether the display size of an image follows the original size of the image source. The value 1 indicates that the display size of an image follows the original size of the image source, and the value 0 indicates the opposite. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: The value 1 indicates that the display size of an image follows the original size of the image source, and 0 means the opposite.
NODE_IMAGE_FILL_COLOR = 4010 Sets the fill color to be superimposed on the image. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: fill color. The value is in 0xARGB format. For example, 0xFFFF0000 indicates red.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: fill color. The value is in 0xARGB format.
NODE_IMAGE_RESIZABLE = 4011 Sets the resizable image options.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: fixed distance (unchanged during stretching) from the left edge of the image. The unit is vp.
.value[1].f32: fixed distance (unchanged during stretching) from the top edge of the image. The unit is vp.
.value[2].f32: fixed distance (unchanged during stretching) from the right edge of the image. The unit is vp.
.value[3].f32: fixed distance (unchanged during stretching) from the bottom edge of the image. The unit is vp. When this attribute is used together with NODE_IMAGE_ANTIALIASED, the NODE_IMAGE_ANTIALIASED attribute setting does not take effect.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: fixed distance (unchanged during stretching) from the left edge of the image. The unit is vp.
.value[1].f32: fixed distance (unchanged during stretching) from the top edge of the image. The unit is vp.
.value[2].f32: fixed distance (unchanged during stretching) from the right edge of the image. The unit is vp.
.value[3].f32: fixed distance (unchanged during stretching) from the bottom edge of the image. The unit is vp.
NODE_IMAGE_SYNC_LOAD = 4012 Defines the synchronous image loading attribute. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to load the image synchronously. The default value is false. true: Load the image synchronously. false: Load the image asynchronously.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the image is loaded synchronously.
Since: 20
NODE_IMAGE_SOURCE_SIZE = 4013 Sets the decoding size of the image. This attribute works only when the target size is smaller than the source size. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: width for image decoding, in px.
.value[1].i32: height for image decoding, in px. If either parameter is set to a value less than or equal to 0, the attribute setting fails, and ARKUI_ERROR_CODE_PARAM_INVALID is returned.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: width for image decoding, in px.
.value[1].i32: height for image decoding, in px.
Since: 21
NODE_IMAGE_IMAGE_MATRIX = 4014 Sets the transformation matrix of the image. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0...15].f32: 4x4 matrix represented by a floating-point array of length 16. If the number of parameters is less than 16, the attribute setting fails, and ARKUI_ERROR_CODE_PARAM_INVALID is returned. If the number of parameters exceeds 16, only the first 16 data entries are used.
Format of the return value ArkUI_AttributeItem:
.value[0...15].f32: 4x4 matrix represented by a floating-point array of length 16.
Since: 21
NODE_IMAGE_MATCH_TEXT_DIRECTION = 4015 Specifies whether the image follows the system language direction, displaying a mirrored effect in a right-to-left (RTL) language environments. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the image follows the system language direction. The default value is false. true: The image follows the system language direction. false: The image does not follow the system language direction.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the image follows the system language direction. true: The image follows the system language direction. false: The image does not follow the system language direction.
Since: 21
NODE_IMAGE_COPY_OPTION = 4016 Sets the image copy mode. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: image copy mode, specified using the ArkUI_CopyOptions enum. The default value is ARKUI_COPY_OPTIONS_NONE.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: image copy mode, specified using the ArkUI_CopyOptions enum.
Since: 21
NODE_IMAGE_ENABLE_ANALYZER = 4017 Sets whether to enable the AI image analyzer, which supports subject recognition, text recognition, and object lookup. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the AI image analyzer. The default value is false. true: enable the AI image analyzer. false: disable the AI image analyzer.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the AI image analyzer is enabled. true: enabled. false: disabled.
Since: 21
NODE_IMAGE_DYNAMIC_RANGE_MODE = 4018 Defines the dynamic range attribute for image display, specifying the dynamic range mode for image rendering (for example, SDR/HDR). This attribute can be set, reset, and obtained as required through APIs. It is used to match the capabilities of the display device and ensure accurate presentation of image brightness and colors.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: dynamic range mode, specified using the ArkUI_DynamicRangeMode enum. The default value is ARKUI_DYNAMIC_RANGE_MODE_STANDARD.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: dynamic range mode, specified using the ArkUI_DynamicRangeMode enum.
Since: 21
NODE_IMAGE_HDR_BRIGHTNESS = 4019 Defines the brightness attribute of the image in HDR mode, used to control brightness parameters for high dynamic range display. This attribute can be set, reset, and obtained as required through APIs. It is used to ensure accurate presentation of details in the bright and dark areas of HDR images.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: brightness value. The value range is [0, 1]. Values less than 0 or greater than 1 are clamped to 1. 0: The image is displayed at SDR brightness. 1: The image is displayed at the highest allowed HDR brightness.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: brightness value. The value range is [0, 1].
Since: 21
NODE_IMAGE_ORIENTATION = 4020 Sets the display orientation of the image content. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: expected display orientation of the image content, specified using the ArkUI_Orientation enum. The default value is ARKUI_ORIENTATION_UP.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: expected display orientation of the image content, specified using the ArkUI_Orientation enum.
Since: 21
NODE_IMAGE_SUPPORT_SVG2 = 4021 Sets whether to enable the SVG parsing capability, which allows you to set the scope of SVG parsing functionality support. This attribute can be set, reset, and obtained as required through APIs. After the Image component is created, the value of this attribute cannot be dynamically changed.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the new SVG parsing capability.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the new SVG parsing capability is enabled.
Since: 21
NODE_IMAGE_CONTENT_TRANSITION = 4022 Defines the transition effect when the image changes. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: custom transition animation. The parameter type is ArkUI_ContentTransitionEffect.
Format of the return value ArkUI_AttributeItem:
.object: custom transition animation. The parameter type is ArkUI_ContentTransitionEffect.
Since: 21
NODE_IMAGE_ALT_PLACEHOLDER = 4023 Configures a placeholder image during the loading process. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: placeholder image address during the loading of the image component.
.object: PixelMap object. The parameter type is ArkUI_DrawableDescriptor.
Either .object or .string must be set. Network images are not supported.
Format of the return value ArkUI_AttributeItem:
.string: placeholder image address during the loading of the image component.
.object: PixelMap object. The parameter type is ArkUI_DrawableDescriptor.
Since: 22
NODE_IMAGE_ALT_ERROR = 4024 Configures a placeholder image in the loading failure scenarios. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: placeholder image address in the loading failure scenarios.
.object: PixelMap object. The parameter type is ArkUI_DrawableDescriptor.
Either .object or .string must be set. Network images are not supported.
Format of the return value ArkUI_AttributeItem:
.string: placeholder image address in the loading failure scenarios.
.object: PixelMap object. The parameter type is ArkUI_DrawableDescriptor.
Since: 22
NODE_IMAGE_ANTIALIASED = 4025 Defines whether to enable anti-aliasing for the edges of a bitmap image. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable anti-aliasing for the edges of a bitmap image. The default value is false. true to enable; false otherwise. This attribute does not take effect when used together with NODE_IMAGE_RESIZABLE.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether anti-aliasing is enabled for the edges of a bitmap image. true means enabled; false otherwise.
Since: 23
NODE_TOGGLE_SELECTED_COLOR = MAX_NODE_SCOPE_NUM * ARKUI_NODE_TOGGLE = 5000 Defines the color of the component when it is selected. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: background color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: background color, in 0xARGB format.
NODE_TOGGLE_SWITCH_POINT_COLOR = 5001 Defines the color of the circular thumb for the component of the switch type. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: color of the circular thumb, in 0xARGB format. For example, 0xFFFF0000 indicates red.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color of the circular thumb, in 0xARGB format.
NODE_TOGGLE_VALUE = 5002 Defines the toggle switch value. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the toggle. The value true means to enable the toggle.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the toggle is enabled.
NODE_TOGGLE_UNSELECTED_COLOR = 5003 Defines the color of the component when it is deselected. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: background color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: background color, in 0xARGB format.
NODE_LOADING_PROGRESS_COLOR = MAX_NODE_SCOPE_NUM * ARKUI_NODE_LOADING_PROGRESS = 6000 Defines the foreground color of the loading progress bar. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: foreground color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: foreground color, in 0xARGB format.
NODE_LOADING_PROGRESS_ENABLE_LOADING = 6001 Defines whether to show the loading animation for the LoadingProgress component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to show the loading animation. true to show; false otherwise. The default value is true.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the loading animation is shown. The value 1 means that the loading animation is shown, and 0 means the opposite.
NODE_TEXT_INPUT_PLACEHOLDER = MAX_NODE_SCOPE_NUM * ARKUI_NODE_TEXT_INPUT = 7000 Defines the default placeholder text of the single-line text box. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: default placeholder text.
Format of the return value ArkUI_AttributeItem:
.string: default placeholder text.
NODE_TEXT_INPUT_TEXT = 7001 Defines the default text of the single-line text box. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: default text.
Format of the return value ArkUI_AttributeItem:
.string: default text.
NODE_TEXT_INPUT_CARET_COLOR = 7002 Defines the caret color attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: caret color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: caret color, in 0xARGB format.
NODE_TEXT_INPUT_CARET_STYLE = 7003 Defines the caret style attribute. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: caret width, in vp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: caret width, in vp.
NODE_TEXT_INPUT_SHOW_UNDERLINE = 7004 Defines the underline attribute of the single-line text box. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to show an underline. The value true means to show an underline, and false means the opposite.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: The value 1 means that an underline is shown, and 0 means the opposite.
NODE_TEXT_INPUT_MAX_LENGTH = 7005 Defines the maximum number of characters in the text input. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: maximum number of characters in the text input, without a unit.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: maximum number of characters in the text input.
NODE_TEXT_INPUT_ENTER_KEY_TYPE = 7006 Defines the type of the Enter key. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: type of the Enter key, specified using the ArkUI_EnterKeyType enum. The default value is ARKUI_ENTER_KEY_TYPE_DONE.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: type of the Enter key, specified using the ArkUI_EnterKeyType enum.
NODE_TEXT_INPUT_PLACEHOLDER_COLOR = 7007 Defines the placeholder text color. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color value, in 0xARGB format.
NODE_TEXT_INPUT_PLACEHOLDER_FONT = 7008 Defines the placeholder text font. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0]?.f32: font size, in fp. Optional. The default value is 16.0.
.value[1]?.i32: font style ArkUI_FontStyle. The default value is ARKUI_FONT_STYLE_NORMAL.
.value[2]?.i32: font weight ArkUI_FontWeight. The default value is ARKUI_FONT_WEIGHT_NORMAL.
?.string: font family. Multiple font families are separated by commas (,). For example, "font weight; font family 1, font family 2".
Format of the return value ArkUI_AttributeItem:
.value[0].f32: font size, in fp.
.value[1].i32: font style ArkUI_FontStyle.
.value[2].i32: font weight ArkUI_FontWeight.
.string: font family. Multiple font families are separated by commas (,).
NODE_TEXT_INPUT_ENABLE_KEYBOARD_ON_FOCUS = 7009 Defines whether to enable the input method when the component obtains focus. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the input method when the component obtains focus. The value true means to enable the input method, and false means the opposite.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the input method is enabled when the component obtains focus. The value 1 means that the input method is enabled when the component obtains focus, and 0 means the opposite.
NODE_TEXT_INPUT_TYPE = 7010 Defines the text box type. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: text box type, specified using the ArkUI_TextInputType enum. The default value is ARKUI_TEXTINPUT_TYPE_NORMAL.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: text box type, specified using the ArkUI_TextInputType enum.
NODE_TEXT_INPUT_SELECTED_BACKGROUND_COLOR = 7011 Defines the background color of the selected text. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color value, in 0xARGB format.
NODE_TEXT_INPUT_SHOW_PASSWORD_ICON = 7012 Defines whether to display the password icon at the end of the password text box. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to display the password icon. true to display; false otherwise. The default value is false.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: The value 1 means that the password icon is displayed at the end of the password text box, and 0 means the opposite.
NODE_TEXT_INPUT_EDITING = 7013 Defines the editable state for the single-line text box. This attribute can be set as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to remain in the editable state. The value true means to remain in the editable state, and false means to exit the editable state.
Format of the ArkUI_AttributeItem parameter for obtaining the attribute:
.value[0].i32: whether to remain in the editable state. The value true means to remain in the editable state, and false means to exit the editable state.
NODE_TEXT_INPUT_CANCEL_BUTTON = 7014 Defines the style of the cancel button on the right of the single-line text box. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: button style ArkUI_CancelButtonStyle. The default value is ARKUI_CANCELBUTTON_STYLE_INPUT.
.value[1]?.f32: button icon size, in vp.
.value[2]?.u32: button icon color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
?.string: button icon image address. The value is the local address of an image, for example, /pages/icon.png.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: button style ArkUI_CancelButtonStyle.
.value[1].f32: icon size, in vp.
.value[2].u32: button icon color, in 0xARGB format.
.string: button icon image source.
NODE_TEXT_INPUT_TEXT_SELECTION = 7015 Sets the text selection area, which will be highlighted. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: start position of the text selection.
.value[1].i32: end position of the text selection.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: start position of the text selection.
.value[1].i32: end position of the text selection.
NODE_TEXT_INPUT_UNDERLINE_COLOR = 7016 Sets the color of the underline when it is shown. The default underline color configured for the theme is '0x33182431'.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: color of the underline applied to the text being typed in. Mandatory. The value is in 0xARGB format.
.value[1].u32: color of the underline applied to the text in the normal state. Mandatory. The value is in 0xARGB format.
.value[2].u32: color of the underline applied to the text when an error is detected. Mandatory. The value is in 0xARGB format.
.value[3].u32: color of the underline applied to the text when it is disabled. Mandatory. The value is in 0xARGB format.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color of the underline applied to the text being typed in. The value is in 0xARGB format.
.value[1].u32: color of the underline applied to the text in the normal state. The value is in 0xARGB format.
.value[2].u32: color of the underline applied to the text when an error is detected. The value is in 0xARGB format.
.value[3].u32: color of the underline applied to the text when it is disabled. The value is in 0xARGB format.
NODE_TEXT_INPUT_ENABLE_AUTO_FILL = 7017 Sets whether to enable autofill.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable autofill. The default value is true.
true to enable; false otherwise.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether autofill is enabled.
NODE_TEXT_INPUT_CONTENT_TYPE = 7018 Sets the autofill type.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: autofill type. The parameter type is ArkUI_TextInputContentType.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: autofill type. The parameter type is ArkUI_TextInputContentType.
NODE_TEXT_INPUT_PASSWORD_RULES = 7019 Defines the rules for generating passwords. When autofill is used, these rules are transparently transmitted to Password Vault for generating a new password.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: rules for generating passwords.
Format of the return value ArkUI_AttributeItem:
.string: rules for generating passwords.
NODE_TEXT_INPUT_SELECT_ALL = 7020 Sets whether to select all text in the initial state. This attribute is not available for the inline input style.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to select all text in the initial state. The default value is false.
true: Select all text in the initial state. false: Do not select all text in the initial state.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether all text is selected in the initial state.
NODE_TEXT_INPUT_INPUT_FILTER = 7021 Sets the regular expression for input filtering. Only inputs that comply with the regular expression can be displayed. Other inputs are filtered out. For single-character input scenarios, only single-character matching is supported; for multi-character input scenarios (such as pasting), string matching is supported.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: regular expression.
Format of the return value ArkUI_AttributeItem:
.string: regular expression.
NODE_TEXT_INPUT_STYLE = 7022 Sets the text box to the default style or inline input style. The inline input style is only available when ArkUI_TextInputType is set to ARKUI_TEXTINPUT_TYPE_NORMAL.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: text input style. The parameter type is ArkUI_TextInputStyle. The default value is ARKUI_TEXTINPUT_STYLE_DEFAULT.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: text input style. The parameter type is ArkUI_TextInputStyle.
NODE_TEXT_INPUT_CARET_OFFSET = 7023 Sets or obtains the caret position.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
Sets the position of the caret.
.value[0].i32: length from the start of the string to the position where the input cursor is located.
Format of the return value ArkUI_AttributeItem:
Returns the position information of the caret. If this API is called when the caret position is updated in the current frame, it will not take effect.
.value[0].i32: index of the caret position.
.value[1].f32: x-coordinate of the caret relative to the text box.
.value[2].f32: y-coordinate of the caret relative to the text box.
NODE_TEXT_INPUT_CONTENT_RECT = 7024 Obtains the position of the edited text area relative to the component and its size. Format of the return value ArkUI_AttributeItem:
.value[0].f32: horizontal coordinate.
.value[1].f32: vertical coordinate.
.value[2].f32: content width.
.value[3].f32: content height.
NODE_TEXT_INPUT_CONTENT_LINE_COUNT = 7025 Obtains the number of lines of the edited text. Format of the return value ArkUI_AttributeItem:
value[0].i32: number of lines in the edited text.
NODE_TEXT_INPUT_SELECTION_MENU_HIDDEN = 7026 Sets whether to hide the text selection menu when the text box is long-pressed, double-clicked, or right-clicked. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to hide the text selection menu when the text box is long-pressed, double-clicked, or right-clicked. The default value is false.
true: The system text selection menu is hidden under the following circumstances: clicking the text box cursor, long-pressing the text box, double-tapping the text box, triple-tapping the text box, or right-clicking the text box.
false: The system text selection menu is displayed under the following circumstances: clicking the text box cursor, long-pressing the text box, double-tapping the text box, triple-tapping the text box, or right-clicking the text box.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the text selection menu is hidden when the text box is long-pressed, double-clicked, or right-clicked.
NODE_TEXT_INPUT_BLUR_ON_SUBMIT = 7027 Sets whether the text box loses focus after the Enter key is pressed to submit information.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the text box loses focus after the Enter key is pressed to submit information. The default value is true.
true: The text box loses focus. false: The text box does not lose focus.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the text box loses focus after the Enter key is pressed to submit information.
NODE_TEXT_INPUT_CUSTOM_KEYBOARD = 7028 Sets a custom keyboard.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: custom keyboard. The parameter type is ArkUI_NodeHandle.
.value[0]?.i32: whether the custom keyboard supports avoidance. The default value is false.
true: The custom keyboard supports avoidance. false: The custom keyboard does not support avoidance.
Format of the return value ArkUI_AttributeItem:
.object: custom keyboard. The parameter type is ArkUI_NodeHandle.
.value[0].i32: whether the custom keyboard supports avoidance.
NODE_TEXT_INPUT_WORD_BREAK = 7029 Defines the line break rule. This attribute can be set, reset, and obtained as required through APIs. It takes effect only when the component is in the inline input editing state.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: line break rule. The parameter type is ArkUI_WordBreak. The default value is ARKUI_WORD_BREAK_BREAK_WORD.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: line break rule. The parameter type is ArkUI_WordBreak.
NODE_TEXT_INPUT_NUMBER_OF_LINES = 7031 Sets the number of lines in the TextInput component, which can be used to work out the height of the component. For example, if numberOfLines is set to 3, the component displays three lines of text by default.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: number of lines.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: number of lines.
NODE_TEXT_INPUT_LETTER_SPACING = 7032 Sets the letter spacing of the TextInput component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: letter spacing. The default unit is fp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: letter spacing. The default unit is fp.
Since: 15
NODE_TEXT_INPUT_ENABLE_PREVIEW_TEXT = 7033 Sets whether to enable preview text for the TextInput component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable preview text. The default value is true.
true: Enable preview text. false: Disable preview text.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether preview text is enabled.
Since: 15
NODE_TEXT_INPUT_HALF_LEADING = 7034 Sets whether to enable half leading.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable half leading. The default value is false.
Half leading is the leading split in half and applied equally to the top and bottom edges. The value true means to enable half leading, and false means the opposite.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether half leading is enabled.
Since: 18
NODE_TEXT_INPUT_KEYBOARD_APPEARANCE = 7035 Sets the appearance of the keyboard when the text box is focused.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: appearance of the keyboard. The parameter type is ArkUI_KeyboardAppearance.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: appearance of the keyboard. The parameter type is ArkUI_KeyboardAppearance. The default value is ARKUI_KEYBOARD_APPEARANCE_NONE_IMMERSIVE.
Since: 15
NODE_TEXT_INPUT_ENABLE_FILL_ANIMATION = 7036 Sets whether to enable the autofill animation.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the autofill animation.
true to enable; false otherwise.
The default value is true.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the autofill animation is enabled. When enabled, the animation only takes effect for text boxes whose ArkUI_TextInputType is set to ARKUI_TEXTINPUT_TYPE_PASSWORD, ARKUI_TEXTINPUT_TYPE_NUMBER_PASSWORD, or ARKUI_TEXTINPUT_TYPE_NEW_PASSWORD.
Since: 20
NODE_TEXT_INPUT_SHOW_KEYBOARD_ON_FOCUS = 7030 Sets whether to show the keyboard when the text box obtains focus. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to show the keyboard when the text box obtains focus. true: Show the keyboard when the text box obtains focus. false: Do not show the keyboard when the text box obtains focus.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the keyboard is shown when the text box obtains focus.
NODE_TEXT_INPUT_LINE_HEIGHT = 7037 Sets the line height of text in the text box. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: numeric value for the text line height. Default value: adaptive to the font size. If this parameter is set to undefined, the text line height is 5.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: numeric value for the text line height.
Since: 20
NODE_TEXT_INPUT_ENABLE_SELECTED_DATA_DETECTOR = 7038 Defines whether to enable entity recognition for selected text.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable entity recognition for selected text. true indicates to enable; false otherwise. Default value: true.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether entity recognition for selected text is enabled.
Since: 22
NODE_TEXT_INPUT_SHOW_COUNTER = 7040 Sets whether to display a counter and its style when the number of input characters exceeds a threshold. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to show a character counter. true to enable; false otherwise.
.value[1]?.f32: percentage of the number of characters that can be entered to the maximum number of characters allowed. When the percentage exceeds this value, the counter is displayed. The value range is [1, 100]. If the value is a decimal, it is rounded down. If the value is out of the range, the attribute setting does not take effect.
.value[2]?.i32: whether to highlight the border when the number of entered characters exceeds the maximum. true means to highlight; false otherwise.
.object: counter configuration. The configuration attributes are the color of the counter when the number of characters entered in the text box does not reach the maximum and the color of the counter when the number of characters entered in the text box exceeds the maximum. The parameter type is ArkUI_ShowCounterConfig.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether a character counter is shown.
.value[1].f32: percentage of the number of characters that can be entered to the maximum number of characters allowed. When the percentage exceeds this value, the counter is displayed. The value range is [1, 100].
.value[2].i32: whether the border is highlighted when the number of entered characters exceeds the maximum. true indicates that the border is highlighted; false otherwise. The default value is true.
.object: counter configuration. The configuration attributes are the color of the counter when the number of characters entered in the text box does not reach the maximum and the color of the counter when the number of characters entered in the text box exceeds the maximum. The parameter type is ArkUI_ShowCounterConfig.
Since: 22
NODE_TEXT_INPUT_TEXT_CONTENT_CONTROLLER_BASE = 7041 Sets or obtains the text input controller.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: basic controller of the text content. The parameter type is ArkUI_TextContentBaseController.
Format of the return value ArkUI_AttributeItem:
.object: basic controller of the text content. The parameter type is ArkUI_TextContentBaseController.
Since: 23
NODE_TEXT_INPUT_ELLIPSIS_MODE = 7042 Sets the text ellipsis position of the single-line text box. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: ellipsis position. The parameter type is ArkUI_EllipsisMode. The default value is ARKUI_ELLIPSIS_MODE_END.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: ellipsis position. The parameter type is ArkUI_EllipsisMode.
Since: 24
NODE_TEXT_INPUT_COMPRESS_LEADING_PUNCTUATION = 7044 Defines whether to enable the function of compressing punctuations at the beginning of a text line. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the function of compressing punctuations at the beginning of a text line.
true to enable; false otherwise. The default value is false.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the function of compressing punctuations is enabled at the beginning of a text line.
Since: 23
NODE_TEXT_INPUT_INCLUDE_FONT_PADDING = 7045 Sets whether to add spacing to the top of the first line and the bottom of the last line of text in a single-line text box to avoid text truncation.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to add spacing to the top of the first line and the bottom of the last line of text in a single-line text box to avoid text truncation. true to add; false otherwise. The default value is false.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether spacing is added to the top of the first line and the bottom of the last line. true indicates spacing is added; false otherwise.
Since: 23
NODE_TEXT_INPUT_FALLBACK_LINE_SPACING = 7046 Defines whether the line height can be automatically adjusted based on the actual text height for multi-line text overlay. This attribute takes effect only when the line height is smaller than the actual text height.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the line height can be automatically adjusted based on the actual text height. true to be adjusted; false otherwise. The default value is false.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the function of automatically adjusting the line height is enabled based on the actual text height. true means enabled; false otherwise.
Since: 23
NODE_TEXT_INPUT_DIRECTION = 7047 Defines the text layout direction of a single-line text box.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: text layout direction. The value is an enumerated value of ArkUI_TextDirection. The default value is ARKUI_TEXT_DIRECTION_DEFAULT.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: text layout direction. For details about the values and meanings, see the enumerated values of ArkUI_TextDirection.
Since: 23
NODE_TEXT_INPUT_SELECTED_DRAG_PREVIEW_STYLE = 7048 Defines the drag preview style when the text in the text box is selected.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: drag preview style when the text is selected. The parameter type is ArkUI_SelectedDragPreviewStyle.
Format of the return value ArkUI_AttributeItem:
.object: drag preview style when the text is selected. The parameter type is ArkUI_SelectedDragPreviewStyle.
Since: 23
NODE_TEXT_INPUT_TEXT_OVERFLOW = 7049 Defines the display mode when the text is too long in a single-line text box. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: display mode when the text is too long, specified using ArkUI_TextOverflow. The default value is ARKUI_TEXT_OVERFLOW_ELLIPSIS in the non-editing state for the inline mode and ARKUI_TEXT_OVERFLOW_CLIP in the editing state for the inline mode.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: display mode when the text is too long, specified using ArkUI_TextOverflow.
Since: 24
NODE_TEXT_AREA_PLACEHOLDER = MAX_NODE_SCOPE_NUM * ARKUI_NODE_TEXT_AREA = 8000 Defines the default placeholder text of the multi-line text box. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: default placeholder text.
Format of the return value ArkUI_AttributeItem:
.string: default placeholder text.
NODE_TEXT_AREA_TEXT = 8001 Defines the default text content for the multi-line text box. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: default text.
Format of the return value ArkUI_AttributeItem:
.string: default text.
NODE_TEXT_AREA_MAX_LENGTH = 8002 Defines the maximum number of characters in the text input. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: maximum number of characters in the text input.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: maximum number of characters in the text input.
NODE_TEXT_AREA_PLACEHOLDER_COLOR = 8003 Defines the placeholder text color. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color value, in 0xARGB format.
NODE_TEXT_AREA_PLACEHOLDER_FONT = 8004 Defines the placeholder text font. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0]?.f32: font size, in fp. Optional. The default value is 16.0.
.value[1]?.i32: font style ArkUI_FontStyle. The default value is ARKUI_FONT_STYLE_NORMAL.
.value[2]?.i32: font weight ArkUI_FontWeight. The default value is ARKUI_FONT_WEIGHT_NORMAL.
?.string: font family. Multiple font families are separated by commas (,). For example, "font weight; font family 1, font family 2".
Format of the return value ArkUI_AttributeItem:
.value[0].f32: font size, in fp.
.value[1].i32: font style ArkUI_FontStyle.
.value[2].i32: font weight ArkUI_FontWeight.
.string: font family. Multiple font families are separated by commas (,).
NODE_TEXT_AREA_CARET_COLOR = 8005 Defines the caret color attribute, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: background color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: background color, in 0xARGB format.
NODE_TEXT_AREA_EDITING = 8006 Defines the editable state for the multi-line text box. This attribute can be set and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to remain in the editable state. The value true means to remain in the editable state, and false means to exit the editable state.
Format of the ArkUI_AttributeItem parameter for obtaining the attribute:
.value[0].i32: whether to remain in the editable state. The value true means to remain in the editable state, and false means to exit the editable state.
NODE_TEXT_AREA_TYPE = 8007 Defines the text box type. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: text box type, specified using the ArkUI_TextAreaType enum. The default value is ARKUI_TEXTAREA_TYPE_NORMAL.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: text box type, specified using the ArkUI_TextAreaType enum.
NODE_TEXT_AREA_SHOW_COUNTER = 8008 Sets whether to display a counter and its style when the number of input characters exceeds a threshold. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to show a character counter. The value true means to show a character counter. The default value is false.
.value[1]?.f32: percentage of the number of characters that can be entered to the maximum number of characters allowed. When the percentage exceeds this value, the counter is displayed. The value range is [1, 100]. If the value is a decimal, it is rounded down. If the value is out of the range, the attribute setting does not take effect.
.value[2]?.i32: whether to highlight the border when the number of entered characters reaches the maximum. true to highlight; false otherwise. The default value is true.
.object: counter configuration. The configuration attributes are the color of the counter when the number of characters entered in the text box does not reach the maximum and the color of the counter when the number of characters entered in the text box exceeds the maximum. The parameter type is ArkUI_ShowCounterConfig.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether a character counter is shown. The value true means that a character counter is shown.
.value[1].f32: percentage of the number of characters that can be entered to the maximum number of characters allowed. When the percentage exceeds this value, the counter is displayed. The value range is [1, 100].
.value[2].i32: whether the border is highlighted when the number of entered characters exceeds the maximum. The value true means that the border is highlighted.
.object: counter configuration. The configuration attributes are the color of the counter when the number of characters entered in the text box does not reach the maximum and the color of the counter when the number of characters entered in the text box exceeds the maximum. The parameter type is ArkUI_ShowCounterConfig.
NODE_TEXT_AREA_SELECTION_MENU_HIDDEN = 8009 Sets whether to hide the text selection menu when the text box is long-pressed, double-clicked, or right-clicked. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to hide the text selection menu when the text box is long-pressed, double-clicked, or right-clicked. The default value is false.
true: The system text selection menu is hidden under the following circumstances: clicking the text box cursor, long-pressing the text box, double-tapping the text box, triple-tapping the text box, or right-clicking the text box.
false: The system text selection menu is displayed under the following circumstances: clicking the text box cursor, long-pressing the text box, double-tapping the text box, triple-tapping the text box, or right-clicking the text box.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the text selection menu is hidden when the text box is long-pressed, double-clicked, or right-clicked.
NODE_TEXT_AREA_BLUR_ON_SUBMIT = 8010 Sets whether the multi-line text box loses focus after the Enter key is pressed to submit information.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the text box loses focus after the Enter key is pressed to submit information. true: The text box loses focus. false: The text box does not lose focus.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the text box loses focus after the Enter key is pressed to submit information.
NODE_TEXT_AREA_INPUT_FILTER = 8011 Sets the regular expression for input filtering. Only inputs that comply with the regular expression can be displayed. Other inputs are filtered out. For single-character input scenarios, only single-character matching is supported; for multi-character input scenarios (such as pasting), string matching is supported.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: regular expression.
Format of the return value ArkUI_AttributeItem:
.string: regular expression.
NODE_TEXT_AREA_SELECTED_BACKGROUND_COLOR = 8012 Sets the background color of the selected text. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color value, in 0xARGB format.
NODE_TEXT_AREA_ENTER_KEY_TYPE = 8013 Defines the type of the Enter key. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: type of the Enter key, specified using the ArkUI_EnterKeyType enum. The default value is ARKUI_ENTER_KEY_TYPE_DONE.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: type of the Enter key, specified using the ArkUI_EnterKeyType enum.
NODE_TEXT_AREA_ENABLE_KEYBOARD_ON_FOCUS = 8014 Sets whether to enable the input method when the multi-line text box obtains focus in a way other than clicking. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the input method when the multi-line text box obtains focus in a way other than clicking. The value true means to enable the input method, and false means the opposite. The default value is true.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the input method is enabled when the component obtains focus. The value 1 means that the input method is enabled when the component obtains focus, and 0 means the opposite.
NODE_TEXT_AREA_CARET_OFFSET = 8015 Sets or obtains the caret position.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
Sets the position of the caret.
.value[0].i32: length from the start of the string to the position where the input cursor is located.
Format of the return value ArkUI_AttributeItem:
Returns the position information of the caret. If this API is called when the caret position is updated in the current frame, it will not take effect.
.value[0].i32: index of the caret position.
.value[1].f32: x-coordinate of the caret relative to the text box.
.value[2].f32: y-coordinate of the caret relative to the text box.
NODE_TEXT_AREA_CONTENT_RECT = 8016 Obtains the position of the edited text area relative to the component and its size.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: horizontal coordinate.
.value[1].f32: vertical coordinate.
.value[2].f32: content width.
.value[3].f32: content height.
NODE_TEXT_AREA_CONTENT_LINE_COUNT = 8017 Obtains the number of lines of the edited text.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: number of lines in the edited text.
NODE_TEXT_AREA_TEXT_SELECTION = 8018 Sets the text selection range and highlights the selected text when the component is focused. This API works only when the value of selectionStart is less than that of selectionEnd.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: start position of the text selection.
.value[1].i32: end position of the text selection.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: start position of the text selection.
.value[1].i32: end position of the text selection.
NODE_TEXT_AREA_ENABLE_AUTO_FILL = 8019 Sets whether to enable autofill.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable autofill. The default value is true.
true to enable; false otherwise.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether autofill is enabled.
NODE_TEXT_AREA_CONTENT_TYPE = 8020 Sets the autofill type.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: autofill type. The parameter type is ArkUI_TextInputContentType.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: autofill type. The parameter type is ArkUI_TextInputContentType.
NODE_TEXT_AREA_NUMBER_OF_LINES = 8022 Sets the number of lines in the TextArea component, which can be used to work out the height of the component.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: number of lines.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: number of lines.
NODE_TEXT_AREA_LETTER_SPACING = 8023 Sets the letter spacing of the TextArea component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: letter spacing. The default unit is fp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: letter spacing. The default unit is fp.
Since: 15
NODE_TEXT_AREA_ENABLE_PREVIEW_TEXT = 8024 Sets whether to enable preview text for the TextArea component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable preview text. true: Enable preview text. false: Disable preview text.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether preview text is enabled.
Since: 15
NODE_TEXT_AREA_HALF_LEADING = 8025 Sets whether to enable half leading.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable half leading. The default value is false.
Half leading is the leading split in half and applied equally to the top and bottom edges. The value true means to enable half leading, and false means the opposite.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether half leading is enabled.
Since: 18
NODE_TEXT_AREA_KEYBOARD_APPEARANCE = 8026 Sets the appearance of the keyboard when the text box is focused.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: appearance of the keyboard. The parameter type is ArkUI_KeyboardAppearance.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: appearance of the keyboard. The parameter type is ArkUI_KeyboardAppearance.
Since: 15
NODE_TEXT_AREA_MAX_LINES = 8027 Sets the maximum number of lines that can be displayed with the inline style in the editing state. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: maximum number of lines that can be displayed with the inline style in the editing state. With the inline style, the default value is 3.
With the non-inline style, the default value is +∞, indicating that there is no limit on the maximum number of lines. If this parameter is set to undefined, the maximum number of lines is 5.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: maximum number of lines.
Since: 20
NODE_TEXT_AREA_LINE_SPACING = 8028 Sets the letter spacing of text in the text box. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: numeric value for the letter spacing. The default value is 0, in fp. If this parameter is set to undefined, the letter spacing is 5.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: numeric value for the letter spacing, in fp.
Since: 20
NODE_TEXT_AREA_MIN_LINES = 8029 Sets the minimum number of lines for the node. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: minimum number of lines.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: minimum number of lines.
Since: 20
NODE_TEXT_AREA_MAX_LINES_WITH_SCROLL = 8030 Sets the maximum number of lines for the node when scrolling is enabled. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: maximum number of lines when scrolling is enabled.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: maximum number of lines when scrolling is enabled.
Since: 20
NODE_TEXT_AREA_SHOW_KEYBOARD_ON_FOCUS = 8021 Sets whether to show the keyboard when the text box obtains focus. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to show the keyboard when the text box obtains focus. The default value is true.
true: Show the keyboard when the text box obtains focus. false: Do not show the keyboard when the text box obtains focus.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the keyboard is shown when the text box obtains focus.
NODE_TEXT_AREA_LINE_HEIGHT = 8031 Sets the line height of text in the text box. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: numeric value for the text line height. Default value: adaptive to the font size. The unit is fp. If this parameter is set to undefined, the text line height is 5.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: numeric value for the text line height, in fp.
Since: 20
NODE_TEXT_AREA_BAR_STATE = 8032 Defines the scrollbar status of the text input box. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: scrollbar status of the text input box. The parameter type is ArkUI_BarState. The default value is ARKUI_BAR_STATE_AUTO.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: scrollbar status of the text input box. The parameter type is ArkUI_BarState.
Since: 22
NODE_TEXT_AREA_ENABLE_SELECTED_DATA_DETECTOR = 8033 Defines whether to enable entity recognition for selected text.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable entity recognition for selected text. true indicates to enable; false otherwise. Default value: true.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether entity recognition for selected text is enabled.
Since: 22
NODE_TEXT_AREA_SCROLL_BAR_COLOR = 8035 Defines the scrollbar color of the text box. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: color value of the scrollbar, in 0xARGB format. Default value: 0x66182431, which indicates gray.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color value of the scrollbar.
Since: 22
NODE_TEXT_AREA_CUSTOM_KEYBOARD = 8036 Defines the custom keyboard of the text box. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: custom keyboard. The parameter type is ArkUI_NodeHandle.
.value[0]?.i32: whether the custom keyboard supports avoidance.
true: The custom keyboard supports avoidance. false: The custom keyboard does not support avoidance.
Default value: false.
Format of the return value ArkUI_AttributeItem:
.object: custom keyboard. The parameter type is ArkUI_NodeHandle.
.value[0].i32: whether the custom keyboard supports avoidance.
Since: 22
NODE_TEXT_AREA_TEXT_CONTENT_CONTROLLER_BASE = 8037 Sets or obtains the text area controller.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: basic controller of the text content. The parameter type is ArkUI_TextContentBaseController.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: basic controller of the text content. The parameter type is ArkUI_TextContentBaseController.
Since: 23
NODE_TEXT_AREA_ELLIPSIS_MODE = 8038 Sets the text ellipsis position of the multi-line text box. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: ellipsis position. The parameter type is ArkUI_EllipsisMode. The default value is ARKUI_ELLIPSIS_MODE_END.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: ellipsis position. The parameter type is ArkUI_EllipsisMode.
Since: 24
NODE_TEXT_AREA_COMPRESS_LEADING_PUNCTUATION = 8040 Defines whether to enable the function of compressing punctuations at the beginning of a text line. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the function of compressing punctuations at the beginning of a text line.
true to enable; false otherwise. The default value is false.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the function of compressing punctuations is enabled at the beginning of a text line.
Since: 23
NODE_TEXT_AREA_INCLUDE_FONT_PADDING = 8041 Defines whether to add spacing to the first and last lines of text in a multi-line text box to avoid text truncation.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to add spacing to the first and last lines of text in a text box to avoid text truncation. true to add; false otherwise. The default value is false.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether spacing is added to the first and last lines of text in a text box. true indicates the spacing is added; false otherwise.
Since: 23
NODE_TEXT_AREA_FALLBACK_LINE_SPACING = 8042 Defines whether the line height can be automatically adjusted based on the actual text height for multi-line text overlay. This attribute takes effect only when the line height is smaller than the actual text height.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the line height can be automatically adjusted based on the actual text height. true to be adjusted; false otherwise. The default value is false.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the function of automatically adjusting the line height is enabled based on the actual text height. true means enabled; false otherwise.
Since: 23
NODE_TEXT_AREA_DIRECTION = 8044 Defines the text layout direction of a multi-line text box.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: text layout direction. The value is an enumerated value of ArkUI_TextDirection. The default value is ARKUI_TEXT_DIRECTION_DEFAULT.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: text layout direction. For details about the values and meanings, see the enumerated values of ArkUI_TextDirection.
Since: 23
NODE_TEXT_AREA_SELECTED_DRAG_PREVIEW_STYLE = 8045 Defines the drag preview style when the text in the multi-line text box is selected.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: drag preview style when the text is selected. The parameter type is ArkUI_SelectedDragPreviewStyle.
Format of the return value ArkUI_AttributeItem:
.object: drag preview style when the text is selected. The parameter type is ArkUI_SelectedDragPreviewStyle.
Since: 23
NODE_TEXT_AREA_TEXT_OVERFLOW = 8046 Defines the display mode when the text is too long in a multi-line text box. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: display mode when the text is too long, specified using ArkUI_TextOverflow. The default value is ARKUI_TEXT_OVERFLOW_CLIP.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: display mode when the text is too long, specified using ArkUI_TextOverflow.
Since: 24
NODE_BUTTON_LABEL = MAX_NODE_SCOPE_NUM * ARKUI_NODE_BUTTON = 9000 Defines the button text content. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: default text.
Format of the return value ArkUI_AttributeItem:
.string: default text.
NODE_BUTTON_TYPE = 9001 Sets the button type. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: button style. The parameter type is ArkUI_ButtonType. The default value is ARKUI_BUTTON_TYPE_CAPSULE.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: button style. The parameter type is ArkUI_ButtonType. The default value is ARKUI_BUTTON_TYPE_CAPSULE.
NODE_BUTTON_MIN_FONT_SCALE = 9002 Defines the minimum font scale factor for the button. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: minimum font scale factor. The default unit is fp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: minimum font scale factor. The default unit is fp.
Since: 18
NODE_BUTTON_MAX_FONT_SCALE = 9003 Defines the maximum font scale factor for the button. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: maximum font scale factor. The default unit is fp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: maximum font scale factor. The default unit is fp.
Since: 18
NODE_PROGRESS_VALUE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_PROGRESS = 10000 Defines the current value of the progress indicator. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: current value of the progress indicator.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: current value of the progress indicator.
NODE_PROGRESS_TOTAL = 10001 Defines the total value of the progress indicator. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: total value of the progress indicator.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: total value of the progress indicator.
NODE_PROGRESS_COLOR = 10002 Defines the color for the progress value on the progress indicator. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color value, in 0xARGB format.
NODE_PROGRESS_TYPE = 10003 Defines the type of the progress indicator. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: type of the progress indicator, specified using the ArkUI_ProgressType enum. The default value is ARKUI_PROGRESS_TYPE_LINEAR.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: type of the progress indicator, specified using the ArkUI_ProgressType enum.
NODE_PROGRESS_LINEAR_STYLE = 10004 Defines the linear progress indicator style. This attribute can be set, reset, and obtained as required through APIs. Note that the settings are effective only if the progress indicator type is linear.
.object: ArkUI_ProgressLinearStyleOption object that defines the component style.
Format of the return value ArkUI_AttributeItem:
.object: ArkUI_ProgressLinearStyleOption object that defines the component style.
Since: 15
NODE_CHECKBOX_SELECT = MAX_NODE_SCOPE_NUM * ARKUI_NODE_CHECKBOX = 11000 Defines whether the CheckBox component is selected. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the component is selected. The value 1 means that the component is selected, and 0 means the opposite.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the component is selected. The value 1 means that the component is selected, and 0 means the opposite.
NODE_CHECKBOX_SELECT_COLOR = 11001 Defines the color of the CheckBox component when it is selected. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: color of the check box when it is selected, in 0xARGB format, for example, 0xFF1122FF.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color of the check box when it is selected, in 0xARGB format, for example, 0xFF1122FF.
NODE_CHECKBOX_UNSELECT_COLOR = 11002 Defines the border color of the CheckBox component when it is not selected. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: border color, in 0xARGB format, for example, 0xFF1122FF.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: border color, in 0xARGB format, for example, 0xFF1122FF.
NODE_CHECKBOX_MARK = 11003 Defines the internal icon style of the CheckBox component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: border color, in 0xARGB format, for example, 0xFF1122FF.
.value[1]?.f32: size of the internal mark, in vp. Optional.
.value[2]?.f32: stroke width of the internal mark, in vp. Optional. The default value is 2.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: border color, in 0xARGB format, for example, 0xFF1122FF.
.value[1].f32: size of the internal mark, in vp.
.value[2].f32: stroke width of the internal mark, in vp. The default value is 2.
NODE_CHECKBOX_SHAPE = 11004 Defines the shape of the CheckBox component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: component shape. The parameter type is ArkUI_CheckboxShape.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: component shape. The parameter type is ArkUI_CheckboxShape.
NODE_CHECKBOX_NAME = 11005 Defines the name of the CheckBox component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: component name.
Format of the return value ArkUI_AttributeItem:
.string: component name.
Since: 15
NODE_CHECKBOX_GROUP = 11006 Defines the name of the CheckboxGroup component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: component name.
Format of the return value ArkUI_AttributeItem:
.string: component name.
Since: 15
NODE_XCOMPONENT_ID = MAX_NODE_SCOPE_NUM * ARKUI_NODE_XCOMPONENT = 12000 Defines the ID of the XComponent component. This attribute can be set and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: component ID.
Format of the return value ArkUI_AttributeItem:
.string: component ID.
NODE_XCOMPONENT_TYPE = 12001 Specifies the type of the XComponent component. This attribute is read-only.
The type of the XComponent component must be explicitly set during creation using ARKUI_NODE_XCOMPONENT or ARKUI_NODE_XCOMPONENT_TEXTURE in ArkUI_NodeType, and cannot be modified afterward.
Attempting to change the type through setAttribute will cause rendering exceptions.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: font style ArkUI_XComponentType.
NODE_XCOMPONENT_SURFACE_SIZE = 12002 Specifies the size of the XComponent component. This attribute is read-only.
Attempting to modify the size through setAttribute will have no effect.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: width, in px.
.value[1].u32: height, in px.
NODE_XCOMPONENT_SURFACE_RECT = 12003 Sets the display area of the surface held by the XComponent component.This attribute can be set and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: x-coordinate of the surface display area relative to the upper left corner of the XComponent component, in px.
.value[1].i32: y-coordinate of the surface display area relative to the upper left corner of the XComponent component, in px.
.value[2].i32: width of the surface display area, in px.
.value[3].i32: height of the surface display area, in px.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: x-coordinate of the surface display area relative to the upper left corner of the XComponent component, in px.
.value[1].i32: y-coordinate of the surface display area relative to the upper left corner of the XComponent component, in px.
.value[2].i32: width of the surface display area, in px.
.value[3].i32: height of the surface display area, in px.
Since: 18
NODE_XCOMPONENT_ENABLE_ANALYZER = 12004 Sets whether to enable the AI analyzer for the XComponent component. This attribute can be set and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the image analyzer. 1: enable the image analyzer. 0: disable the image analyzer. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the image analyzer is enabled. 1: The image analyzer is enabled. 0: The image analyzer is disabled. The default value is 0.
Since: 18
NODE_DATE_PICKER_LUNAR = MAX_NODE_SCOPE_NUM * ARKUI_NODE_DATE_PICKER = 13000 Defines whether to display the lunar calendar in the date picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to display the lunar calendar in the date picker. The default value is false. true: Display the lunar calendar. false: Do not display the lunar calendar.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the lunar calendar is displayed in the date picker.
NODE_DATE_PICKER_START = 13001 Defines the start date of the date picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: date. The default value is "1970-1-1".
Format of the return value ArkUI_AttributeItem:
.string: date.
NODE_DATE_PICKER_END = 13002 Defines the end date of the date picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: date. The default value is "2100-12-31".
Format of the return value ArkUI_AttributeItem:
.string: date.
NODE_DATE_PICKER_SELECTED = 13003 Defines the selected date of the date picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: date. The default value is "2024-01-22".
Format of the return value ArkUI_AttributeItem:
.string: date.
NODE_DATE_PICKER_DISAPPEAR_TEXT_STYLE = 13004 Defines the text color, font size, and font weight for the top and bottom items in the date picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: five parameters of the string type, separated by semicolons (😉.
Parameter 1: text color, in #ARGB format.
Parameter 2: font size, in fp. The value is a number.
Parameter 3: font weight. Available options are enumerated values: "bold", "normal", "bolder", "lighter", "medium", "regular".
Parameter 4: fonts, separated by commas (,).
Parameter 5: font style. Available options are "normal" and "italic".
Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
Format of the return value ArkUI_AttributeItem:
.string: five parameters of the string type, separated by semicolons (😉.
Parameter 1: text color, in #ARGB format.
Parameter 2: font size, in fp. The value is a number.
Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
Parameter 4: fonts, separated by commas (,).
Parameter 5: font style. Available options are ("normal", "italic").
Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
NODE_DATE_PICKER_TEXT_STYLE = 13005 Defines the text color, font size, and font weight of all items except the top, bottom, and selected items in the date picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: five parameters of the string type, separated by semicolons (😉.
Parameter 1: text color, in #ARGB format.
Parameter 2: font size, in fp. The value is a number.
Parameter 3: font weight. Available options are enumerated values: "bold", "normal", "bolder", "lighter", "medium", "regular".
Parameter 4: fonts, separated by commas (,).
Parameter 5: font style. Available options are "normal" and "italic".
Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
Format of the return value ArkUI_AttributeItem:
.string: five parameters of the string type, separated by semicolons (😉.
Parameter 1: text color, in #ARGB format.
Parameter 2: font size, in fp. The value is a number.
Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
Parameter 4: fonts, separated by commas (,).
Parameter 5: font style. Available options are ("normal", "italic").
Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
NODE_DATE_PICKER_SELECTED_TEXT_STYLE = 13006 Defines the text color, font size, and font weight of the selected item in the date picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: five parameters of the string type, separated by semicolons (😉.
Parameter 1: text color, in #ARGB format.
Parameter 2: font size, in fp. The value is a number.
Parameter 3: font weight. Available options are enumerated values: "bold", "normal", "bolder", "lighter", "medium", "regular".
Parameter 4: fonts, separated by commas (,).
Parameter 5: font style. Available options are "normal" and "italic".
Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
Format of the return value ArkUI_AttributeItem:
.string: five parameters of the string type, separated by semicolons (😉.
Parameter 1: text color, in #ARGB format.
Parameter 2: font size, in fp. The value is a number.
Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
Parameter 4: fonts, separated by commas (,).
Parameter 5: font style. Available options are ("normal", "italic").
Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
NODE_DATE_PICKER_MODE = 13007 Sets the date columns to be displayed. This attribute can be set, reset, and obtained as required through APIs. DatePicker displays different styles of date columns.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: type of date column to be displayed. The parameter type is ArkUI_DatePickerMode.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: type of date column to be displayed. The parameter type is ArkUI_DatePickerMode.
Since: 18
NODE_DATE_PICKER_ENABLE_HAPTIC_FEEDBACK = 13008 Specifies whether to enable haptic feedback. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: whether to enable haptic feedback. The value true means to enable haptic feedback, and false means the opposite. The default value is true.
Format of the return value ArkUI_AttributeItem:
value[0].f32: whether haptic feedback is enabled.
Since: 18
NODE_DATE_PICKER_CAN_LOOP = 13009 Defines whether to enable looping for the picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable looping. The value true means to enable looping, and false means the opposite. Default value: true. If an invalid value is provided, the default value is used.
Format of the return value ArkUI_AttributeItem:
value[0].i32: The value 1 means that the looping is enabled, and 0 means the opposite.
Note: When looping is enabled, the year increments or decrements in linkage with the month's cycle, and the month increments or decrements in linkage with the day's cycle.
When looping is disabled, scrolling beyond the bounds of the year, month, or day columns is prevented, and cross-column value synchronization (between year, month, and day) is also disabled.
Since: 20
NODE_TIME_PICKER_USE_MILITARY_TIME = 14001 Defines whether the display time is in 24-hour format. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the display time is in 24-hour format. The default value is false. true: The display time is in 24-hour format. false: The display time is in 12-hour format.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the display time is in 24-hour format.
NODE_TIME_PICKER_DISAPPEAR_TEXT_STYLE = 14002 Defines the text color, font size, and font weight for the top and bottom items in the time picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: five parameters of the string type, separated by semicolons (😉.
Parameter 1: text color, in #ARGB format.
Parameter 2: font size, in fp. The value is a number.
Parameter 3: font weight. Available options are enumerated values: "bold", "normal", "bolder", "lighter", "medium", "regular".
Parameter 4: fonts, separated by commas (,).
Parameter 5: font style. Available options are "normal" and "italic".
Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
Format of the return value ArkUI_AttributeItem:
.string: five parameters of the string type, separated by semicolons (😉.
Parameter 1: text color, in #ARGB format.
Parameter 2: font size, in fp. The value is a number.
Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
Parameter 4: fonts, separated by commas (,).
Parameter 5: font style. Available options are ("normal", "italic").
Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
NODE_TIME_PICKER_TEXT_STYLE = 14003 Defines the text color, font size, and font weight of all items except the top, bottom, and selected items in the time picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: five parameters of the string type, separated by semicolons (😉.
Parameter 1: text color, in #ARGB format.
Parameter 2: font size, in fp. The value is a number.
Parameter 3: font weight. Available options are enumerated values: "bold", "normal", "bolder", "lighter", "medium", "regular".
Parameter 4: fonts, separated by commas (,).
Parameter 5: font style. Available options are "normal" and "italic".
Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
Format of the return value ArkUI_AttributeItem:
.string: five parameters of the string type, separated by semicolons (😉.
Parameter 1: text color, in #ARGB format.
Parameter 2: font size, in fp. The value is a number.
Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
Parameter 4: fonts, separated by commas (,).
Parameter 5: font style. Available options are ("normal", "italic").
Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
NODE_TIME_PICKER_SELECTED_TEXT_STYLE = 14004 Defines the text color, font size, and font weight of the selected item in the time picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: five parameters of the string type, separated by semicolons (😉.
Parameter 1: text color, in #ARGB format.
Parameter 2: font size, in fp. The value is a number.
Parameter 3: font weight. Available options are enumerated values: "bold", "normal", "bolder", "lighter", "medium", "regular".
Parameter 4: fonts, separated by commas (,).
Parameter 5: font style. Available options are "normal" and "italic".
Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
Format of the return value ArkUI_AttributeItem:
.string: five parameters of the string type, separated by semicolons (😉.
Parameter 1: text color, in #ARGB format.
Parameter 2: font size, in fp. The value is a number.
Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
Parameter 4: fonts, separated by commas (,).
Parameter 5: font style. Available options are ("normal", "italic").
Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
NODE_TIME_PICKER_SELECTED = MAX_NODE_SCOPE_NUM * ARKUI_NODE_TIME_PICKER = 14000 Sets the selected time for the timer picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: time. Default value: current system time. Format: only hours and minutes are supported (for example, 23:59/23-59).
Format of the return value ArkUI_AttributeItem:
.string: time. Default value: current system time. Format: hour, minute, and second (for example, 23,59,1).
NODE_TIME_PICKER_START = 14005 Sets the start time for the timer picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: time. Default value: "0:0:0". Format: only hours and minutes are supported (for example, 12:59/12-59).
Format of the return value ArkUI_AttributeItem:
.string: time. Default value: "0:0:0". Format: hour, minute, and second (for example, 12:59:0).
Since: 18
NODE_TIME_PICKER_END = 14006 Sets the end time for the timer picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: time. Default value: "23:59:59". Format: only hours and minutes are supported (for example, 23:59/23-59).
Format of the return value ArkUI_AttributeItem:
.string: time. Default value: "23:59:59". Format: hour, minute, and second (for example, 23:59:0).
Since: 18
NODE_TIME_PICKER_ENABLE_CASCADE = 14007 Sets whether the AM/PM indicator automatically switches based on the hour in 12-hour format. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the AM/PM indicator automatically switches based on the hour in 12-hour format. The default value is false. The value true means that the AM/PM indicator automatically switches based on the hour in 12-hour format, and false means the opposite.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the AM/PM indicator automatically switches based on the hour in 12-hour format.
Since: 18
NODE_TEXT_PICKER_OPTION_RANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_TEXT_PICKER = 15000 Defines the data selection range of the text picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: type of the text picker ArkUI_TextPickerRangeType. The default value is ARKUI_TEXTPICKER_RANGETYPE_SINGLE.
?.string: string input, whose format varies by picker type.
1: single-column picker. The input format is a group of strings separated by semicolons (😉.
2: multi-column picker. Multiple pairs of plain text strings are supported. The pairs are separated by semicolons (😉, and strings within each pair are separated by commas (,).
?.object: object input, whose format varies by picker type.
1: single-column picker with image support. The input struct is ARKUI_TextPickerRangeContentArray.
2: multi-column cascading picker. The input struct is ARKUI_TextCascadePickerRangeContentArray.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: type of the text picker ArkUI_TextPickerRangeType.
?.string: string output, whose format varies by picker type.
1: single-column picker. The output format is a group of strings separated by semicolons (😉.
2: multi-column picker. Multiple pairs of plain text strings are supported. The pairs are separated by semicolons (😉, and strings within each pair are separated by commas (,).
NODE_TEXT_PICKER_OPTION_SELECTED = 15001 Defines the index of the default selected item in the data selection range of the text picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: index. If there are multiple index values, add them one by one.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: index. If there are multiple index values, add them one by one.
NODE_TEXT_PICKER_OPTION_VALUE = 15002 Defines the value of the default selected item in the text picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: value of the selected item. If there are multiple values, add them one by one and separate them with semicolons (😉.
Format of the return value ArkUI_AttributeItem:
.string: value of the selected item. If there are multiple values, add them one by one and separate them with semicolons (😉.
NODE_TEXT_PICKER_DISAPPEAR_TEXT_STYLE = 15003 Defines the text color, font size, and font weight for the top and bottom items in the text picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: five parameters of the string type, separated by semicolons (😉.
Parameter 1: text color, in #ARGB format.
Parameter 2: font size, in fp. The value is a number.
Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
Parameter 4: fonts, separated by commas (,).
Parameter 5: font style. Available options are ("normal", "italic").
Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
Format of the return value ArkUI_AttributeItem:
.string: five parameters of the string type, separated by semicolons (😉.
Parameter 1: text color, in #ARGB format.
Parameter 2: font size, in fp. The value is a number.
Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
Parameter 4: fonts, separated by commas (,).
Parameter 5: font style. Available options are ("normal", "italic").
Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
NODE_TEXT_PICKER_TEXT_STYLE = 15004 Defines the text color, font size, and font weight for all items except the top, bottom, and selected items in the text picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: five parameters of the string type, separated by semicolons (😉.
Parameter 1: text color, in #ARGB format.
Parameter 2: font size, in fp. The value is a number.
Parameter 3: font weight. Available options are enumerated values: "bold", "normal", "bolder", "lighter", "medium", "regular".
Parameter 4: fonts, separated by commas (,).
Parameter 5: font style. Available options are "normal" and "italic".
Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
Format of the return value ArkUI_AttributeItem:
.string: five parameters of the string type, separated by semicolons (😉.
Parameter 1: text color, in #ARGB format.
Parameter 2: font size, in fp. The value is a number.
Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
Parameter 4: fonts, separated by commas (,).
Parameter 5: font style. Available options are ("normal", "italic").
Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
NODE_TEXT_PICKER_SELECTED_TEXT_STYLE = 15005 Defines the text color, font size, and font weight of the selected item in the text picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: five parameters of the string type, separated by semicolons (😉.
Parameter 1: text color, in #ARGB format.
Parameter 2: font size, in fp. The value is a number.
Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
Parameter 4: fonts, separated by commas (,).
Parameter 5: font style. Available options are ("normal", "italic").
Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
Format of the return value ArkUI_AttributeItem:
.string: five parameters of the string type, separated by semicolons (😉.
Parameter 1: text color, in #ARGB format.
Parameter 2: font size, in fp. The value is a number.
Parameter 3: font weight. Available options are ("bold", "normal", "bolder", "lighter", "medium", "regular").
Parameter 4: fonts, separated by commas (,).
Parameter 5: font style. Available options are ("normal", "italic").
Example: "#ff182431;14;normal;Arial,HarmonyOS Sans;normal".
NODE_TEXT_PICKER_SELECTED_INDEX = 15006 Defines the index of the default selected item in the data selection range of the text picker. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter:
.value[0...].i32: index of the default item in the data selection range.
NODE_TEXT_PICKER_CAN_LOOP = 15007 Defines whether to enable looping for the picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to support scroll looping. The value true means to support scroll looping, and false means the opposite.
Format of the return value ArkUI_AttributeItem:
value[0].i32: The value 1 means that the looping is enabled, and 0 means the opposite.
NODE_TEXT_PICKER_DEFAULT_PICKER_ITEM_HEIGHT = 15008 Defines the height of each item in the picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
value[0].f32: item height, in vp.
Format of the return value ArkUI_AttributeItem:
value[0].f32: item height, in vp.
NODE_TEXT_PICKER_ENABLE_HAPTIC_FEEDBACK = 15010 Specifies whether to enable haptic feedback. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: whether to enable haptic feedback. The value true means to enable haptic feedback, and false means the opposite. The default value is true.
Format of the return value ArkUI_AttributeItem:
value[0].f32: whether haptic feedback is enabled.
Since: 18
NODE_TEXT_PICKER_SELECTED_BACKGROUND_STYLE = 15011 Sets the background color and border radius of the selected item. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: background color, in 0xARGB format, for example, 0xFF1122FF.
1: .value[1].f32: unified radius for all four corners, in vp.
2: .value[1].f32: radius of the upper left corner, in vp.
.value[2].f32: radius of the upper right corner, in vp.
.value[3].f32: radius of the lower left corner, in vp.
.value[4].f32: radius of the lower right corner, in vp.
Default values: background color = 0x0C182431; border radius = 24.0.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: background color, in 0xARGB format, for example, 0xFF1122FF.
.value[1].f32: radius of the upper left corner, in vp.
.value[2].f32: radius of the upper right corner, in vp.
.value[3].f32: radius of the lower left corner, in vp.
.value[4].f32: radius of the lower right corner, in vp.
Since: 20
NODE_CALENDAR_PICKER_HINT_RADIUS = MAX_NODE_SCOPE_NUM * ARKUI_NODE_CALENDAR_PICKER = 16000 Defines the style of the background in the selected state of the calendar picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: corner radius for the background in the selected state of the calendar picker. The default value is 16.0, in vp, indicating that the background is a circle. If the value is 0.0, the background is a right-angled rectangle. If the value is in the (0.0, 16.0) range, the background is a rounded rectangle. If the value is a negative number or greater than 16.0, the default value 16.0 is used, which means the background is a circle.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: corner radius for the background in the selected state of the calendar picker. The default value is 16.0, in vp, indicating that the background is a circle. The value range is [0.0, 16.0]. If the value is 0.0, the background is a right-angled rectangle.
NODE_CALENDAR_PICKER_SELECTED_DATE = 16001 Defines the date of the selected item in the calendar picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: year of the selected date.
.value[1].u32: month of the selected date.
.value[2].u32: day of the selected date.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: year of the selected date.
.value[1].u32: month of the selected date.
.value[2].u32: day of the selected date.
NODE_CALENDAR_PICKER_EDGE_ALIGNMENT = 16002 Defines how the calendar picker is aligned with the entry component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: alignment mode. The parameter type is ArkUI_CalendarAlignment.
.value[1]?.f32: offset of the picker relative to the entry component along the x-axis after alignment based on the specified alignment mode.
.value[2]?.f32: offset of the picker relative to the entry component along the y-axis after alignment based on the specified alignment mode.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: alignment mode. The parameter type is ArkUI_CalendarAlignment.
.value[1].f32: offset of the picker relative to the entry component along the x-axis after alignment based on the specified alignment mode.
.value[2].f32: offset of the picker relative to the entry component along the y-axis after alignment based on the specified alignment mode.
NODE_CALENDAR_PICKER_TEXT_STYLE = 16003 Defines the text color, font size, and font weight in the entry area of the calendar picker.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0]?.u32: text color of the entry area.
.value[1]?.f32: font size of the entry area, in fp.
.value[2]?.i32: font weight of the entry area. The parameter type is ArkUI_FontWeight.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: text color of the entry area.
.value[1].f32: font size of the entry area, in fp.
.value[2].i32: font weight of the entry area. The parameter type is ArkUI_FontWeight.
NODE_CALENDAR_PICKER_START = 16004 Sets the start date for the calendar picker. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: date. The value format is "YYYY-M-D", for example, "1970-1-1".
Format of the return value ArkUI_AttributeItem:
.string: date.
Since: 18
NODE_CALENDAR_PICKER_END = 16005 Sets the end date for the calendar picker. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: date. The value format is "YYYY-M-D", for example, "2100-12-31".
Format of the return value ArkUI_AttributeItem:
.string: date.
Since: 18
NODE_CALENDAR_PICKER_DISABLED_DATE_RANGE = 16006 Sets the disabled date ranges for the calendar picker. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: string representing the disabled date ranges. The format is "start_date,end_date" for each range, with multiple ranges separated by commas (,).
Example: "1910-01-01,1910-12-31,2020-01-01,2020-12-31".
Format of the return value ArkUI_AttributeItem:
.string: string representing the disabled date ranges.
Since: 19
NODE_CALENDAR_PICKER_MARK_TODAY = 16007 Sets whether to highlight the current system date in the calendar picker. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
value[0].i32: whether to highlight the current system date in the calendar picker. The default value is false. The value true means to highlight the current system date in the calendar picker, and false means the opposite.
Format of the return value ArkUI_AttributeItem:
value[0].i32: whether the current system date is highlighted in the calendar picker.
Since: 19
NODE_SLIDER_BLOCK_COLOR = MAX_NODE_SCOPE_NUM * ARKUI_NODE_SLIDER = 17000 Defines the color of the slider thumb. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: color of the slider thumb, in 0xARGB format, for example, 0xFF1122FF.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color of the slider thumb, in 0xARGB format, for example, 0xFF1122FF.
NODE_SLIDER_TRACK_COLOR = 17001 Defines the background color of the slider. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: background color, in 0xARGB format, for example, 0xFF1122FF.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: background color, in 0xARGB format, for example, 0xFF1122FF.
NODE_SLIDER_SELECTED_COLOR = 17002 Defines the color of the selected part of the slider track. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: color of the selected part of the slider track, in 0xARGB format, for example, 0xFF1122FF.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color of the selected part of the slider track, in 0xARGB format, for example, 0xFF1122FF.
NODE_SLIDER_SHOW_STEPS = 17003 Sets whether to display the step scale value, which can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to display the step scale value. The value 1 means to display the step scale value, and 0 (default value) means the opposite.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the step scale value is displayed. The value 1 means that the step scale value is displayed, and 0 (default value) means the opposite.
NODE_SLIDER_BLOCK_STYLE = 17004 Defines the slider thumb shape, which can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: shape. The parameter type is ArkUI_SliderBlockStyle.
.string?: depends on the shape. Optional.
ARKUI_SLIDER_BLOCK_STYLE_IMAGE: image resource of the slider thumb. Example: /pages/common/icon.png.
ARKUI_SLIDER_BLOCK_STYLE_SHAPE: custom shape of the slider thumb. In this case, the width and height values in the defined shape do not represent the actual size of the thumb; they are scaled proportionally to ensure the thumb displays correctly.
There are five types:
1. Rectangle:
.value[1].i32: type of shape. The parameter type is ArkUI_ShapeType. The value is ARKUI_SHAPE_TYPE_RECTANGLE.
.value[2].f32: width of the rectangle.
.value[3].f32: height of the rectangle.
.value[4].f32: width of the rounded corner of the rectangle.
.value[5].f32: height of the rounded corner of the rectangle.
2. Circle:
.value[1].i32: type of shape. The parameter type is ArkUI_ShapeType. The value is ARKUI_SHAPE_TYPE_CIRCLE.
.value[2].f32: width of the circle.
.value[3].f32: height of the circle.
3. Ellipse:
.value[1].i32: type of shape. The parameter type is ArkUI_ShapeType. The value is ARKUI_SHAPE_TYPE_ELLIPSE.
.value[2].f32: width of the ellipse.
.value[3].f32: height of the ellipse.
4. Path:
.value[1].i32: type of shape. The parameter type is ArkUI_ShapeType. The value is ARKUI_SHAPE_TYPE_PATH.
.value[2].f32: width of the path.
.value[3].f32: height of the path.
.string: command for drawing the path.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: shape. The parameter type is ArkUI_SliderBlockStyle.
.string?: depends on the shape. Optional.
ARKUI_SLIDER_BLOCK_STYLE_IMAGE: image resource of the slider thumb. Example: /pages/common/icon.png.
ARKUI_SLIDER_BLOCK_STYLE_SHAPE: custom shape of the slider thumb.
There are five types:
1. Rectangle:
.value[1].i32: type of shape. The parameter type is ArkUI_ShapeType. The value is ARKUI_SHAPE_TYPE_RECTANGLE.
.value[2].f32: width of the rectangle.
.value[3].f32: height of the rectangle.
.value[4].f32: width of the rounded corner of the rectangle.
.value[5].f32: height of the rounded corner of the rectangle.
2. Circle:
.value[1].i32: type of shape. The parameter type is ArkUI_ShapeType. The value is ARKUI_SHAPE_TYPE_CIRCLE.
.value[2].f32: width of the circle.
.value[3].f32: height of the circle.
3. Ellipse:
.value[1].i32: type of shape. The parameter type is ArkUI_ShapeType. The value is ARKUI_SHAPE_TYPE_ELLIPSE.
.value[2].f32: width of the ellipse.
.value[3].f32: height of the ellipse.
4. Path:
.value[1].i32: type of shape. The parameter type is ArkUI_ShapeType. The value is ARKUI_SHAPE_TYPE_PATH.
.value[2].f32: width of the path.
.value[3].f32: height of the path.
.string: command for drawing the path.
NODE_SLIDER_VALUE = 17005 Defines the current value of the slider. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: current value.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: current value.
NODE_SLIDER_MIN_VALUE = 17006 Defines the minimum value of the slider. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: minimum value.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: minimum value.
NODE_SLIDER_MAX_VALUE = 17007 Defines the maximum value of the slider. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: maximum value.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: maximum value.
NODE_SLIDER_STEP = 17008 Defines the step of the slider. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: step. The value range is [0.01, 100].
Format of the return value ArkUI_AttributeItem:
.value[0].f32: step. The value range is [0.01, 100].
NODE_SLIDER_DIRECTION = 17009 Defines the slider direction. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: display style. The parameter type is ArkUI_SliderDirection.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: display style. The parameter type is ArkUI_SliderDirection.
NODE_SLIDER_REVERSE = 17010 Defines whether the slider values are reversed. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the slider values are reversed. The value 1 means that the slider values are reversed, and 0 means the opposite.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the slider values are reversed. The value 1 means that the slider values are reversed, and 0 means the opposite.
NODE_SLIDER_STYLE = 17011 Defines the style of the slider thumb and track. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: display style. The parameter type is ArkUI_SliderStyle.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: display style. The parameter type is ArkUI_SliderStyle.
NODE_SLIDER_TRACK_THICKNESS = 17012 Sets the track thickness of the slider. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: track thickness of the slider, in vp. The default value is 4.0 vp when NODE_SLIDER_STYLE is set to ARKUI_SLIDER_STYLE_OUT_SET and 20.0 vp when NODE_SLIDER_STYLE is set to ARKUI_SLIDER_STYLE_IN_SET.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: track thickness of the slider, in vp.
NODE_SLIDER_ENABLE_HAPTIC_FEEDBACK = 17013 Specifies whether to enable haptic feedback. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: whether to enable haptic feedback. The value true means to enable haptic feedback, and false means the opposite. The default value is true.
Format of the return value ArkUI_AttributeItem:
value[0].f32: whether haptic feedback is enabled.
To enable haptic feedback, you must add "name": "ohos.permission.VIBRATE" under requestPermissions in the module.json5 file of the project.
Since: 18
NODE_SLIDER_PREFIX = 17014 Sets a custom prefix component for the start edge of the slider. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: The parameter type is ArkUI_NodeHandle. The prefix component is typically placed on the left in LTR layouts.
Since: 20
NODE_SLIDER_SUFFIX = 17015 Sets a custom suffix component for the end edge of the slider. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: The parameter type is ArkUI_NodeHandle. The suffix component is typically placed on the right in LTR layouts.
Since: 20
NODE_SLIDER_BLOCK_LINEAR_GRADIENT_COLOR = 17016 Defines the color of the slider thumb. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: The parameter type is ArkUI_ColorStop. Array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.
- colors: colors of the color stops.
- stops: stop positions of the color stops.
- size: number of colors.
Format of the return value ArkUI_AttributeItem:
.object: The parameter type is ArkUI_ColorStop. Array of color stops, each of which consists of a color and its stop position.
- colors: colors of the color stops.
- stops: stop positions of the color stops.
- size: number of colors.
Since: 21
NODE_SLIDER_TRACK_LINEAR_GRADIENT_COLOR = 17017 Defines the background color of the slider. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: The parameter type is ArkUI_ColorStop. Array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.
- colors: colors of the color stops.
- stops: stop positions of the color stops.
- size: number of colors.
Format of the return value ArkUI_AttributeItem:
.object: The parameter type is ArkUI_ColorStop. Array of color stops, each of which consists of a color and its stop position.
- colors: colors of the color stops.
- stops: stop positions of the color stops.
- size: number of colors.
Since: 21
NODE_SLIDER_SELECTED_LINEAR_GRADIENT_COLOR = 17018 Defines the color of the selected part of the slider track. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: The parameter type is ArkUI_ColorStop. Array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.
- colors: colors of the color stops.
- stops: stop positions of the color stops.
- size: number of colors.
Format of the return value ArkUI_AttributeItem:
.object: The parameter type is ArkUI_ColorStop. Array of color stops, each of which consists of a color and its stop position.
- colors: colors of the color stops.
- stops: stop positions of the color stops.
- size: number of colors.
Since: 21
NODE_RADIO_CHECKED = MAX_NODE_SCOPE_NUM * ARKUI_NODE_RADIO = 18000 Sets whether the radio button is selected. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the radio button is selected. The default value is false. true: The radio button is selected. false: The radio button is not selected. Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the radio button is selected.
NODE_RADIO_STYLE = 18001 Sets the style of the radio button in selected or deselected state. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0]?.u32: color of the background when the radio button is selected, in 0xARGB format. The default value is 0xFF007DFF.
.value[1]?.u32: color of the border when the radio button is deselected, in 0xARGB format. The default value is 0xFF182431.
.value[2]?.u32: color of the indicator when the radio button is selected, in 0xARGB format. The default value is 0xFFFFFFFF.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color of the background when the radio button is selected, in 0xARGB format. The default value is 0xFF007DFF.
.value[1].u32: color of the border when the radio button is deselected, in 0xARGB format. The default value is 0xFF182431.
.value[2].u32: color of the indicator when the radio button is selected, in 0xARGB format. The default value is 0xFFFFFFF.
NODE_RADIO_VALUE = 18002 Sets the current value of the radio button. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: value of the radio button.
Format of the return value ArkUI_AttributeItem:
.string: value of the radio button.
NODE_RADIO_GROUP = 18003 Sets the name of the group to which the radio button belongs. Only one radio button in a given group can be selected at a time. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: name of the group to which the radio button belongs.
Format of the return value ArkUI_AttributeItem:
.string: name of the group to which the radio button belongs.
NODE_CHECKBOX_GROUP_NAME = MAX_NODE_SCOPE_NUM * ARKUI_NODE_CHECKBOX_GROUP = 21000 Defines the name of the CheckboxGroup component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: component name.
Format of the return value ArkUI_AttributeItem:
.string: component name.
Since: 15
NODE_CHECKBOX_GROUP_SELECT_ALL = 21001 Defines whether to select all check boxes in the CheckBoxGroup component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to select all check boxes in the CheckBoxGroup component. The value 1 means that all check boxes are selected, and 0 means the opposite.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether all check boxes are selected. The value 1 means that all check boxes are selected, and 0 means the opposite.
Since: 15
NODE_CHECKBOX_GROUP_SELECTED_COLOR = 21002 Defines the color for the selected state of the CheckBoxGroup component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: color of the selected state in 0xARGB format, for example, 0xFF1122FF.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color for the selected state of the CheckBoxGroup component, in 0xARGB format. for example, 0xFF1122FF.
Since: 15
NODE_CHECKBOX_GROUP_UNSELECTED_COLOR = 21003 Defines the border color for the unselected state of the CheckBoxGroup component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: border color in 0xARGB format, for example, 0xFF1122FF.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: border color in 0xARGB format, for example, 0xFF1122FF.
Since: 15
NODE_CHECKBOX_GROUP_MARK = 21004 Defines the internal icon style of the CheckBoxGroup component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: border color in 0xARGB format, for example, 0xFF1122FF.
.value[1]?.f32: size of the check mark, in vp.
.value[2]?.f32: stroke width of the check mark, in vp. Optional. The default value is 2.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: border color in 0xARGB format, for example, 0xFF1122FF.
.value[1]?.f32: size of the check mark, in vp.
.value[2]?.f32: stroke width of the check mark, in vp. Optional. The default value is 2.
Since: 15
NODE_TEXT_EDITOR_ENTER_KEY_TYPE Defines the type of the Enter key of the TextEditor component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: type of the Enter key. The parameter type is ArkUI_EnterKeyType. The default value is ARKUI_ENTER_KEY_TYPE_NEW_LINE.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: type of the Enter key. The parameter type is ArkUI_EnterKeyType.
Since: 24
NODE_TEXT_EDITOR_CARET_COLOR Defines the cursor color of the TextEditor component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: cursor color, in 0xARGB format. For example, 0xFFFF0000 indicates red.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: cursor color, in 0xARGB format.
Since: 24
NODE_TEXT_EDITOR_SCROLL_BAR_COLOR Defines the scroll bar color of the TextEditor component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.data[0].u32: scroll bar color, in 0xARGB format.
Format of the return value ArkUI_AttributeItem:
.data[0].u32: scroll bar color, in 0xARGB format.
Since: 24
NODE_TEXT_EDITOR_BAR_STATE Defines the scroll bar display mode of the TextEditor component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: scroll bar display mode of the text area. The parameter type is ArkUI_BarState. The default value is ARKUI_BAR_STATE_AUTO.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: scroll bar display mode of the text area. The parameter type is ArkUI_BarState.
Since: 24
NODE_TEXT_EDITOR_ENABLE_DATA_DETECTOR Defines whether to enable text entity recognition for the TextEditor component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable text entity recognition. The value 0 means to disable text entity recognition, and the value 1 means to enable text entity recognition. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether text entity recognition is enabled.
Since: 24
NODE_TEXT_EDITOR_DATA_DETECTOR_CONFIG Defines the recognition configuration for the TextEditor component. This attribute can be set and reset as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: recognition configuration. The parameter type is ArkUI_TextDataDetectorConfig.
Since: 24
NODE_TEXT_EDITOR_EDIT_MENU_OPTIONS Defines the extended menu options for the TextEditor component. This attribute can be set and reset as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: extended menu options. The parameter type is ArkUI_TextEditMenuOptions.
Since: 24
NODE_TEXT_EDITOR_PLACEHOLDER Defines the prompt text options when no input is available for the TextEditor component. This attribute can be set and reset as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: prompt text options when no input is available. The parameter type is ArkUI_TextEditorPlaceholderOptions.
Since: 24
NODE_TEXT_EDITOR_STYLED_STRING_CONTROLLER Defines the attribute string controller of the TextEditor component. This attribute can be set as required through the API. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: attribute string controller. The parameter type is ArkUI_TextEditorStyledStringController.
Since: 24
NODE_TEXT_EDITOR_ENABLE_PREVIEW_TEXT Defines whether to enable preview text for the TextEditor component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable preview text. The value 0 means to disable preview text, and 1 means to enable preview text. The default value is 1.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether preview text is enabled. The value 0 indicates preview text is disabled, and 1 indicates preview text is enabled.
Since: 24
NODE_TEXT_EDITOR_LAYOUT_MANAGER Obtains TextLayoutManager of the TextEditor component. This attribute can be obtained as required through the API. Format of the return value ArkUI_AttributeItem:
.object: layout manager. The parameter type is ArkUI_TextLayoutManager.
Since: 24
NODE_TEXT_EDITOR_ENABLE_SELECTED_DATA_DETECTOR Defines whether to enable the AI menu for text selection and recognition of the TextEditor component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the AI menu for text selection and recognition. The value 0 means to disable the AI menu, and the value 1 means to enable the AI menu . The default value is 1.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the AI menu is enabled for text selection and recognition.
Since: 24
NODE_TEXT_EDITOR_SELECTED_BACKGROUND_COLOR Defines the background color of the selected content in the TextEditor component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.data[0].u32: background color of the selected content, in 0xARGB format.
Format of the return value ArkUI_AttributeItem:
.data[0].u32: background color of the selected content, in 0xARGB format.
Since: 24
NODE_TEXT_EDITOR_ENABLE_KEYBOARD_ON_FOCUS Defines whether to enable the input method when the focus is obtained in a way other than by clicking in the TextEditor component. The attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the input method when the focus is obtained in a way other than clicking. The value 0 means to disable the input method, and 1 means to enable the input method. The default value is 1.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the input method is enabled when the focus is obtained in a way other than clicking. The value 0 indicates the input method is disabled, and 1 indicates the input method is enabled.
Since: 24
NODE_TEXT_EDITOR_MAX_LENGTH Defines the maximum number of characters in the TextEditor component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: maximum number of characters.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: maximum number of characters.
Since: 24
NODE_TEXT_EDITOR_MAX_LINES Defines the maximum number of lines in the TextEditor component. The attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: maximum number of lines in the text editor.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: maximum number of lines in the text editor.
Since: 24
NODE_TEXT_EDITOR_ENABLE_HAPTIC_FEEDBACK Defines whether to enable haptic feedback of the TextEditor component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable haptic feedback in the text editor. The value 0 means to disable haptic feedback, and 1 means to enable haptic feedback. The default value is 1.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether haptic feedback is enabled. The value 0 indicates haptic feedback is disabled, and 1 indicates haptic feedback is enabled.
Since: 24
NODE_TEXT_EDITOR_COPY_OPTIONS Defines the copy options of the TextEditor component, which can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: copy options. The parameter type is ArkUI_CopyOptions type. The default value is ARKUI_COPY_OPTIONS_LOCAL_DEVICE.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: copy options. The parameter type is ArkUI_CopyOptions type.
Since: 24
NODE_TEXT_EDITOR_KEYBOARD_APPEARANCE Defines the keyboard appearance of the TextEditor component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: appearance of the keyboard. The parameter type is ArkUI_KeyboardAppearance. The default value is ARKUI_KEYBOARD_APPEARANCE_NONE_IMMERSIVE.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: appearance of the keyboard. The parameter type is ArkUI_KeyboardAppearance.
Since: 24
NODE_TEXT_EDITOR_STOP_BACK_PRESS Defines whether the TextEditor component blocks the propagation of return events. The attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to block the propagation of return events. The value 0 indicates no, and the value 1 indicates yes. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the propagation of return events is blocked. The value 0 indicates no, and the value 1 indicates yes.
Since: 24
NODE_TEXT_EDITOR_ENABLE_AUTO_SPACING Defines whether to enable automatic spacing for Chinese and Western characters in the TextEditor component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable automatic spacing. The value 0 means to disable, and the value of 1 means to enable. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether automatic spacing is enabled. The value 0 indicates automatic spacing is disabled, and the value of 1 indicates automatic spacing is enabled.
Since: 24
NODE_TEXT_EDITOR_CUSTOM_KEYBOARD Defines the custom keyboard of the TextEditor component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: custom keyboard. The parameter type is ArkUI_NodeHandle.
.value[0]?.i32: whether the custom keyboard supports avoidance. The value 0 indicates no, and the value 1 indicates yes. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.object: custom keyboard. The parameter type is ArkUI_NodeHandle.
.value[0].i32: whether the custom keyboard supports avoidance. The value 0 indicates no, and the value 1 indicates yes.
Since: 24
NODE_TEXT_EDITOR_BIND_SELECTION_MENU Binds the text selection menu of the TextEditor component. This attribute can be set and reset as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: text selection menu. The parameter type is ArkUI_TextEditorSelectionMenuOptions.
Since: 24
NODE_TEXT_EDITOR_INCLUDE_FONT_PADDING Defines whether to add spacing to the first and last lines of the TextEditor component to prevent text truncation. The attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to add spacing. The value 0 means not to add spacing, and 1 means to add spacing. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: spacing is added. The value 0 means no, and 1 means yes.
Since: 24
NODE_TEXT_EDITOR_FALLBACK_LINE_SPACING Defines whether to enable line height adaptation of the TextEditor component. The attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable line height adaptation. The value 0 means to disable, and the value 1 means to enable. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether line height adaptation is enabled. The value 0 indicates line height adaptation is disabled, and the value 1 indicates line height adaptation is enabled.
Since: 24
NODE_TEXT_EDITOR_COMPRESS_LEADING_PUNCTUATION Defines whether to enable punctuation compression for the beginning of a line in the TextEditor component. The attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable punctuation compression. The value 0 means to disable, and the value 1 means to enable. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether punctuation compression is enabled. The value 0 indicates punctuation compression is disabled, and the value 1 indicates punctuation compression is enabled.
Since: 24
NODE_TEXT_EDITOR_SELECTED_DRAG_PREVIEW_STYLE Defines the selected drag preview style of the TextEditor component. The attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: selected drag preview style. The parameter type is ArkUI_SelectedDragPreviewStyle.
Format of the return value ArkUI_AttributeItem:
.object: selected drag preview style. The parameter type is ArkUI_SelectedDragPreviewStyle.
Since: 24
NODE_TEXT_EDITOR_SINGLE_LINE Defines whether to enable the single-line mode of the TextEditor component. The attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the single-line mode. The value 0 means to disable, and the value 1 means to enable. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the single-line mode is enabled. The value 0 indicates the single-line mode is disabled, and the value 1 indicates the single-line mode is enabled.
Since: 24
NODE_CHECKBOX_GROUP_SHAPE = 21005 Defines the shape of the CheckBoxGroup component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: component shape. The parameter type is ArkUI_CheckboxShape.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: component shape. The parameter type is ArkUI_CheckboxShape.
Since: 15
NODE_STACK_ALIGN_CONTENT = MAX_NODE_SCOPE_NUM * ARKUI_NODE_STACK = 1000000 Defines the alignment mode of the child components in the container. This attribute can be set, reset, and obtained as required through APIs. If this attribute and the universal attribute NODE_ALIGNMENT are both set, whichever is set later takes effect.

Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: alignment mode. The parameter type is ArkUI_Alignment. The default value is ARKUI_ALIGNMENT_CENTER.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: alignment mode. The parameter type is ArkUI_Alignment.
NODE_SCROLL_BAR_DISPLAY_MODE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_SCROLL = 1002000 Defines the scrollbar display mode. This attribute can be set, reset, and obtained as required through APIs. List, Scroll, and WaterFlow are supported since API version 12, and Grid is supported since API version 22.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: scrollbar display mode. The parameter type is ArkUI_ScrollBarDisplayMode. Default value: ARKUI_SCROLL_BAR_DISPLAY_MODE_AUTO for the List, Grid, and Scroll components; ARKUI_SCROLL_BAR_DISPLAY_MODE_OFF for the WaterFlow component.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: scrollbar display mode. The parameter type is ArkUI_ScrollBarDisplayMode.
NODE_SCROLL_BAR_WIDTH = 1002001 Defines the width of the scrollbar. This attribute can be set, reset, and obtained as required through APIs. List, Scroll, and WaterFlow are supported since API version 12, and Grid is supported since API version 22.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: width of the scrollbar, in vp. The default value is 4.
Values less than 0 are treated as the default value. The value 0 means not to show the scrollbar.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: width of the scrollbar, in vp.
NODE_SCROLL_BAR_COLOR = 1002002 Defines the color of the scrollbar. This attribute can be set, reset, and obtained as required through APIs. List, Scroll, and WaterFlow are supported since API version 12, and Grid is supported since API version 22.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.data[0].u32: color of the scrollbar, in 0xARGB format. Default value: 0x66182431.
Format of the return value ArkUI_AttributeItem:
.data[0].u32: color of the scrollbar, in 0xARGB format.
NODE_SCROLL_SCROLL_DIRECTION = 1002003 Defines the scroll direction. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: scroll direction. The parameter type is ArkUI_ScrollDirection. The default value is ARKUI_SCROLL_DIRECTION_VERTICAL.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: scroll direction. The parameter type is ArkUI_ScrollDirection.
NODE_SCROLL_EDGE_EFFECT = 1002004 Defines the effect used at the edges of the component when the boundary of the scrollable content is reached. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: effect used at the edges of the component when the boundary of the scrollable content is reached. The parameter type is ArkUI_EdgeEffect. Default value: ARKUI_EDGE_EFFECT_NONE for the Grid, Scroll, and WaterFlow components; ARKUI_EDGE_EFFECT_SPRING for the List component.
.value[1]?.i32: whether to enable the scroll effect when the component content size is smaller than the component itself. The value 1 means to enable the scroll effect, and 0 means the opposite. Default value: 0 for the List, Grid, and WaterFlow components; 1 for the Scroll component.
.value[2]?.i32: direction where the edge effect takes effect. The parameter type is ArkUI_EffectEdge. The default value is ARKUI_EFFECT_EDGE_START.
NODE_SCROLL_ENABLE_SCROLL_INTERACTION = 1002005 Sets whether to support scroll gestures. When this attribute is set to 0, scrolling by finger or mouse is not supported, but the scrolling controller API is not affected.
The List, Scroll, and WaterFlow components are supported since API version 12, and the Grid component is supported since API version 22.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to support scroll gestures. The default value is 1. 1: Scroll gestures are supported. 0: Scroll gestures are not supported.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether scroll gestures are supported.
NODE_SCROLL_FRICTION = 1002006 Sets the friction coefficient. It applies only to gestures in the scrolling area, and it affects only indirectly the scroll chaining during the inertial scrolling process.
The List, Scroll, and WaterFlow components are supported since API version 12, and the Grid component is supported since API version 22.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: friction coefficient. The default value is 0.6 for non-wearable devices and 0.9 for wearable devices. Value range: (0, +∞). If this parameter is set to a value less than or equal to 0, the default value is used.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: friction coefficient.
NODE_SCROLL_SNAP = 1002007 Defines the scroll snapping mode of the Scroll component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: scroll snapping mode. The parameter type is ArkUI_ScrollSnapAlign. The default value is ARKUI_SCROLL_SNAP_ALIGN_NONE.
.value[1].i32: whether to enable the snap to start feature. When scroll snapping is defined for the Scroll component, setting this attribute to false enables the component to scroll between the start edge and the first snap point. The default value is true. It is valid only when there are multiple snap points.
.value[2].i32: whether to enable the snap to end feature. When scroll snapping is defined for the Scroll component, setting this attribute to false enables the component to scroll between the end edge and the last snap point. The default value is true. It is valid only when there are multiple snap points.
.value[3...].f32: snap points for the Scroll component. Each snap point defines the offset from an edge to which the Scroll component can scroll. One or more snap points are supported.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: scroll snapping mode. The parameter type is ArkUI_ScrollSnapAlign.
.value[1].i32: whether the snap is enabled to start feature. When scroll snapping is defined for the Scroll component, setting this attribute to false enables the component to scroll between the start edge and the first snap point.
.value[2].i32: whether the snap is enabled to end feature. When scroll snapping is defined for the Scroll component, setting this attribute to false enables the component to scroll between the end edge and the last snap point.
.value[3...].f32: snap points for the Scroll component. Each snap point defines the offset from an edge to which the Scroll component can scroll.
NODE_SCROLL_NESTED_SCROLL = 1002008 Defines nested scrolling attribute, which can be set, reset, and obtained as required through APIs. The List, Scroll, and WaterFlow components are supported since API version 12, and the Grid component is supported since API version 22.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: nested scrolling behavior when the scrollable component scrolls toward the end edge. The parameter type is ArkUI_ScrollNestedMode.
.value[1].i32: nested scrolling behavior when the scrollable component scrolls toward the start edge. The parameter type is ArkUI_ScrollNestedMode.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: nested scrolling behavior when the scrollable component scrolls toward the end edge. The parameter type is ArkUI_ScrollNestedMode.
.value[1].i32: nested scrolling behavior when the scrollable component scrolls toward the start edge. The parameter type is ArkUI_ScrollNestedMode.
NODE_SCROLL_OFFSET = 1002009 Defines the specified position to scroll to. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: horizontal scrolling offset, in vp. Value range: If the value is less than 0, the offset will be 0 for non-animated scrolling. A value greater than 0 triggers an animated scroll to the specified offset. By default, the scroll stops at the target offset. The .value[5]?.i32 parameter can be set to enable a bounce effect when the scroll exceeds the content bounds.
.value[1].f32: vertical scrolling offset, in vp. Value range: If the value is less than 0, the offset will be 0 for non-animated scrolling. A value greater than 0 triggers an animated scroll to the specified offset. By default, the scroll stops at the target offset. The .value[5]?.i32 parameter can be set to enable a bounce effect when the scroll exceeds the content bounds.
.value[2]?.i32: scrolling duration, in ms. The default value is 1000.
.value[3]?.i32: scrolling curve. The parameter type is ArkUI_AnimationCurve. The default value is ARKUI_CURVE_EASE.
.value[4]?.i32: whether to enable the default spring animation. Optional. The default value 0 means not to enable the default spring animation.
.value[5]?.i32: whether to convert the scroll animation to an overshoot animation when the boundary is reached. The default value is 0, meaning not to convert the scroll animation to an overshoot animation when the boundary is reached.
.value[6]?.i32: whether the component can stop at an overscrolled position. The default value is 0, meaning the component cannot stop at an overscrolled position. This parameter is supported since API version 20.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: horizontal scrolling offset, in vp.
.value[1].f32: vertical scrolling offset, in vp.
NODE_SCROLL_EDGE = 1002010 Defines the edge position to scroll to. This attribute can be set and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: edge position to scroll to. The parameter type is ArkUI_ScrollEdge.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the container is at the edge. The value -1 indicates that the container is not at the edge. If the container is at the edge, the parameter type is ArkUI_ScrollEdge.
NODE_SCROLL_ENABLE_PAGING = 1002011 Defines whether to enable the swipe-to-turn-pages feature. This attribute can be set, reset, and obtained as required through APIs. If both enablePaging and scrollSnap are set, scrollSnap takes effect, but enablePaging does not.

Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the swipe-to-turn-pages feature. The default value is 0. 0: disable; 1: enable.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the swipe-to-turn-pages feature is enabled.
NODE_SCROLL_PAGE = 1002012 Scrolls to the next or previous page.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to scroll to the next page. The value 0 means to scroll to the next page, and 1 means to scroll to the previous page.
.value[1]?.i32: whether to enable the page turning animation. The value 1 means to enable the page turning animation, and 0 means the opposite. Default value: 0.
NODE_SCROLL_BY = 1002013 Defines the scrolling distance.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: horizontal scrolling distance, in vp by default.
.value[1].f32: vertical scrolling distance, in vp by default.
NODE_SCROLL_FLING = 1002014 Performs inertial scrolling based on the initial velocity passed in.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: initial velocity of inertial scrolling. The default unit is vp/s. If the value specified is 0, it is considered as invalid, and the scrolling for this instance will not take effect. If the value is positive, the scroll will move downward; if the value is negative, the scroll will move upward.
Since: 13
NODE_SCROLL_FADING_EDGE = 1002015 Sets the edge fade effect for the scrollable component.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the edge fade effect. 0: Disable the edge fade effect. 1: Enable the edge fade effect. The default value is 0.
.value[1]?.f32: length of the edge fade effect, in vp. The default value is 32.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the edge fade effect is enabled. 0: The edge fade effect is disabled. 1: The edge fade effect is enabled.
.value[1].f32: length of the edge fade effect, in vp.
Since: 14
NODE_SCROLL_SIZE = 1002016 Obtains the total size of all child components when fully expanded in the scrollable component. Format of the return value ArkUI_AttributeItem:
.value[0].f32: total width of all child components when fully expanded in the scrollable component. The default unit is vp.
.value[1].f32: total height of all child components when fully expanded in the scrollable component. The default unit is vp.
When NODE_PADDING, NODE_MARGIN, NODE_BORDER_WIDTH is set, the values are rounded to the nearest pixel when being converted from vp to px. The return values are calculated based on these rounded pixel values.
Since: 14
NODE_SCROLL_CONTENT_START_OFFSET = 1002017 Sets the offset from the start of the content of this scrollable component. The List component is supported since API version 15, and the Grid, Scroll, and WaterFlow components are supported since API version 22.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: offset from the start of the content, in vp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: offset from the start of the content, in vp.
Since: 15
NODE_SCROLL_CONTENT_END_OFFSET = 1002018 Sets the offset from the end of the content of this scrollable component. The List component is supported since API version 15, and the Grid, Scroll, and WaterFlow components are supported since API version 22.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: offset from the end of the content, in vp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: offset from the end of the content, in vp.
Since: 15
NODE_SCROLL_FLING_SPEED_LIMIT = 1002019 Sets the maximum initial velocity at the start of the fling animation that occurs after gesture-driven scrolling ends. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: maximum initial velocity at the start of the fling animation, in vp/s.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: maximum initial velocity at the start of the fling animation.
Since: 18
NODE_SCROLL_CLIP_CONTENT = 1002020 Sets the content clipping area for this scrollable component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: content clipping mode. The parameter type is ArkUI_ContentClipMode. Default value: ARKUI_CONTENT_CLIP_MODE_BOUNDARY for the Grid and Scroll components; ARKUI_CONTENT_CLIP_MODE_CONTENT_ONLY for the List and WaterFlow components.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: content clipping mode. The parameter type is ArkUI_ContentClipMode.
Since: 18
NODE_SCROLL_BACK_TO_TOP = 1002021 Sets whether to scroll back to the top when the status bar is clicked. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to scroll back to the top. The value 1 means to scroll back to the top, and 0 means to stay at the current position. Default value:
API versions earlier than 18: 0. API version 18 and later: 0 for the horizontal scroll direction, and 1 for the vertical scroll direction.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether scrolling back to the top is supported.
Since: 15
NODE_SCROLL_BAR_MARGIN = 1002022 Defines the margin of the scrollbar. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: start margin of the scrollbar, in vp. The default value is 0.
.value[1].f32: end margin of the scrollbar, in vp. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: start margin of the scrollbar, in vp.
.value[1].f32: end margin of the scrollbar, in vp.
Since: 20
NODE_SCROLL_MAX_ZOOM_SCALE = 1002023 Sets the maximum zoom scale for scrollable content.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: maximum zoom scale to set. Default value: 1.
Value range: (0, +∞). If the value is less than or equal to 0, the default value is used.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: current maximum zoom scale.
Since: 20
NODE_SCROLL_MIN_ZOOM_SCALE = 1002024 Sets the minimum zoom scale for scrollable content.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: minimum zoom scale for scrollable content. The default value is 1.
Value range: (0, NODE_SCROLL_MAX_ZOOM_SCALE]. If the value is less than or equal to 0, the default value 1 is used. If the value is greater than NODE_SCROLL_MAX_ZOOM_SCALE, NODE_SCROLL_MAX_ZOOM_SCALE is used.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: current minimum zoom scale.
Since: 20
NODE_SCROLL_ZOOM_SCALE = 1002025 Sets the zoom scale for scrollable content.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: zoom scale for scrollable content. The default value is 1.
Value range: (0, +∞). If the value is less than or equal to 0, the default value is used.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: current zoom scale.
Since: 20
NODE_SCROLL_ENABLE_BOUNCES_ZOOM = 1002026 Sets whether to enable the zoom bounce effect when the scaling exceeds the limits.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the zoom bounce effect when the scaling exceeds the limits. The value 1 means to enable the effect, and 0 means the opposite. Default value: 1.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the zoom bounce effect is enabled when the scaling exceeds the limits. The value 1 means that the effect is enabled, and 0 means the opposite.
Since: 20
NODE_LIST_DIRECTION = MAX_NODE_SCOPE_NUM * ARKUI_NODE_LIST = 1003000 Sets the direction in which the list items are arranged. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: direction in which the list items are arranged. The parameter type is ArkUI_Axis. The default value is ARKUI_AXIS_VERTICAL.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: direction in which the list items are arranged. The parameter type is ArkUI_Axis.
NODE_LIST_STICKY = 1003001 Defines whether to pin the header to the top or the footer to the bottom in the ListItemGroup component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to pin the header to the top or the footer to the bottom in the ListItemGroup component. It is used together with the ListItemGroup component. The parameter type is ArkUI_StickyStyle. The default value is ARKUI_STICKY_STYLE_NONE.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the header is pinned to the top or the footer to the bottom in the ListItemGroup component. It is used together with the ListItemGroup component. The parameter type is ArkUI_StickyStyle.
NODE_LIST_SPACE = 1003002 Defines the spacing between list items. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: spacing between list items along the main axis. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: spacing between list items along the main axis.
NODE_LIST_NODE_ADAPTER = 1003003 Defines the adapter of the List component. The attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: ArkUI_NodeAdapter object used as the adapter.
Format of the return value ArkUI_AttributeItem:
.object: ArkUI_NodeAdapter object.
NODE_LIST_CACHED_COUNT = 1003004 Sets the number of cached items in the adapter of the List component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: used together with Adapter of the List component to set the number of cached items in the adapter.
.value[1]?.i32: whether to show cached items. The value 0 means to hide cached items, and 1 means to show cached items. The default value is 0. This parameter is supported since API version 15.
.value[2]?.i32: maximum number of cached items in the List component. The default value is the same as that of the first parameter. This parameter is supported since API version 22.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: number of cached items in the list adapter.
.value[1].i32: whether cached items are shown. The value 0 means that cached items are hidden, and 1 means that cached items are shown. This parameter is supported since API version 15.
.value[2]?.i32: maximum number of cached items in the List component. This parameter is supported since API version 22.
NODE_LIST_SCROLL_TO_INDEX = 1003005 Scrolls to the item with the specified index. When smooth is set to true, all passed items are loaded and counted in layout calculation. This may result in performance issues if a large number of items are involved.

Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: index of the item to be scrolled to in the container.
.value[1]?.i32: whether to enable the smooth animation for scrolling to the item with the specified index. The value 1 means to enable the animation, and 0 means the opposite. The default value is 0.
.value[2]?.i32: how the item to scroll to is aligned with the container. The parameter type is ArkUI_ScrollAlignment. The default value is ARKUI_SCROLL_ALIGNMENT_START.
.value[3]?.f32: extra offset, in vp. The default value is 0. This parameter is supported since API version 15.
NODE_LIST_ALIGN_LIST_ITEM = 1003006 Sets the alignment mode of list items along the cross axis when the cross-axis width of the list is greater than the cross-axis width of list items multiplied by the value of lanes. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: alignment mode of list items along the cross axis. The parameter type is ArkUI_ListItemAlign. Default value: ARKUI_LIST_ITEM_ALIGNMENT_START.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: alignment mode of list items along the cross axis. The parameter type is ArkUI_ListItemAlign.
NODE_LIST_CHILDREN_MAIN_SIZE = 1003007 Sets the default main axis size of the child components in this list.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
object: ArkUI_ListChildrenMainSize object.
Format of the return value ArkUI_AttributeItem:
.object: ArkUI_ListChildrenMainSize object.
NODE_LIST_INITIAL_INDEX = 1003008 Sets the item displayed at the beginning of the viewport when the current list is loaded for the first time. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: item displayed at the beginning of the viewport when the current list is loaded for the first time. Default value: 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: item displayed at the beginning of the viewport when the current list is loaded for the first time.
NODE_LIST_DIVIDER = 1003009 Defines the style of the divider for the list items. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: color of the divider, in 0xARGB format. The default value is 0x08000000.
.value[1].f32: stroke width of the divider, in vp. The default value is 0.
.value[2].f32: distance between the divider and the start of the list, in vp. The default value is 0.
.value[3].f32: distance between the divider and the end of the list, in vp. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color of the divider, in 0xARGB format.
.value[1].f32: stroke width of the divider.
.value[2].f32: distance between the divider and the start of the list, in vp.
.value[3].f32: distance between the divider and the end of the list, in vp.
NODE_LIST_SCROLL_TO_INDEX_IN_GROUP = 1003010 Scrolls to the item with the specified index in the specified list item group. When smooth is set to true, all passed items are loaded and counted in layout calculation. This may result in performance issues if a large number of items are involved.

Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: index of the target list item group in the current list.
.value[1].i32: index of the target list item in the list item group.
.value[2]?.i32: whether to enable the smooth animation for scrolling to the item with the specified index. The value 1 means to enable the animation, and 0 means the opposite. The default value is 0.
.value[3]?.i32: how the item to scroll to is aligned with the container. The parameter type is ArkUI_ScrollAlignment. The default value is ARKUI_SCROLL_ALIGNMENT_START.
Since: 15
NODE_LIST_LANES = 1003011 Sets the number of lanes in a list. (The number of columns is used when the list is scrolled vertically, and the number of rows is used when the list is scrolled horizontally.) This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: number of lanes in the list. If the maximum and minimum lane widths are set, setting the number of lanes will not take effect. The default value is 1. The value range is [1, +∞). If an abnormal value is set, the default value is used.
.value[1]?.f32: minimum lane width, in vp.
.value[2]?.f32: maximum column width, in vp.
.value[3]?.f32: lane spacing, in vp. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: number of lanes in the list.
.value[1].f32: minimum lane width, in vp.
.value[2].f32: maximum lane width, in vp.
.value[3].f32: lane spacing, in vp.
Since: 15
NODE_LIST_SCROLL_SNAP_ALIGN = 1003012 Sets the scroll snap alignment mode for the List component.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: scroll snapping mode. The parameter type is ArkUI_ScrollSnapAlign. The default value is ARKUI_SCROLL_SNAP_ALIGN_NONE.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: scroll snapping mode. The parameter type is ArkUI_ScrollSnapAlign.
Since: 15
NODE_LIST_MAINTAIN_VISIBLE_CONTENT_POSITION = 1003013 Sets whether to maintain the visible content's position when data is inserted or deleted outside the display area of the List component.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to maintain the visible content's position when data is inserted or deleted outside the display area of the List component. The value 0 means not to maintain the visible content's position, and 1 means the opposite. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the visible content's position is maintained when data is inserted or deleted outside the display area of the List component. The value 0 means that the visible content's position is not maintained, and 1 means the opposite. The default value is 0.
Since: 15
NODE_LIST_STACK_FROM_END = 1003014 Sets whether the List component starts layout from the end.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the List component starts layout from the end. The value 0 means layout starts from the top, and 1 means layout starts from the end. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the List component starts layout from the end. The value 0 means layout starts from the top, and 1 means layout starts from the end. The default value is 0.
Since: 19
NODE_LIST_FOCUS_WRAP_MODE = 1003015 Defines the focus wrap mode for the List component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: focus wrap mode of the List component. The parameter type is ArkUI_FocusWrapMode. The default value is ARKUI_FOCUS_WRAP_MODE_DEFAULT.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: focus wrap mode of the List component. The parameter type is ArkUI_FocusWrapMode.
Since: 20
NODE_LIST_SYNC_LOAD = 1003016 Defines whether the List component loads child nodes synchronously. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the List component synchronously loads child nodes. 0: frame-by-frame loading. 1: synchronous loading. Default value: 1.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the List component synchronously loads child nodes. 0: frame-by-frame loading. 1: synchronous loading.
Since: 20
NODE_LIST_SCROLL_SNAP_ANIMATION_SPEED = 1003017 Defines the scroll snap animation speed for the List component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: scroll snap animation speed for the List component. The parameter type is ArkUI_ScrollSnapAnimationSpeed. Default value: ARKUI_SCROLL_SNAP_ANIMATION_NORMAL.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: scroll snap animation speed for the List component. The parameter type is ArkUI_ScrollSnapAnimationSpeed.
Since: 22
NODE_LIST_LANES_ITEMFILLPOLICY = 1003018 Defines the responsive column layout policy of the List component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: number of columns at different breakpoint specifications. The parameter type is ArkUI_ItemFillPolicy.
.value[1]?.f32: column spacing, in vp. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: number of columns at different breakpoint specifications. The parameter type is ArkUI_ItemFillPolicy.
.value[1].f32: column spacing, in vp.
Since: 22
NODE_LIST_SUPPORT_EMPTY_BRANCH_IN_LAZY_LOADING = 1003019 Defines whether the List component supports the generation of empty branch nodes that do not contain any child components using the if/else rendering control syntax in LazyForEach or Repeat.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the List component supports empty branches. 0: no; 1: yes. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the List component supports empty branches. 0: no; 1: yes.
Since: 23
NODE_SWIPER_LOOP = MAX_NODE_SCOPE_NUM * ARKUI_NODE_SWIPER = 1001000 Defines whether to enable loop playback for the swiper. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable loop playback. The value 1 means to enable loop playback, and 0 means the opposite. The default value is 1.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether loop playback is enabled. The value 1 means that loop playback is enabled, and 0 means the opposite. The default value is 1.
NODE_SWIPER_AUTO_PLAY = 1001001 Defines whether to enable automatic playback for child component switching in the swiper. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable automatic playback for child component switching. The value 1 means to enable automatic playback, and 0 means the opposite. The default value is 0.
.value[1]?.i32: whether to stop automatic playback when the user touches the screen. The value 0 means to stop automatic playback, and 1 means the opposite. The default value is 0. This parameter is supported since API version 16.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether automatic playback is enabled for child component switching. The value 1 means that automatic playback is enabled, and 0 means the opposite. The default value is 0.
.value[1].i32: whether automatic playback is stopped when the user touches the screen. The value 0 means that automatic playback is stopped, and 1 means the opposite. This parameter is supported since API version 16.
NODE_SWIPER_SHOW_INDICATOR = 1001002 Defines whether to enable the navigation indicator for the swiper. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the navigation indicator. The value 1 means to enable the navigation indicator, and 0 means the opposite. The default value is 1.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the navigation indicator is enabled. The value 1 means that the navigation indicator is enabled, and 0 means the opposite. The default value is 1.
NODE_SWIPER_INTERVAL = 1001003 Defines the interval for automatic playback. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: interval for automatic playback, in ms.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: interval for automatic playback, in ms.
NODE_SWIPER_VERTICAL = 1001004 Defines whether vertical swiping is used for the swiper. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether vertical swiping is used. The value 1 means that vertical swiping is used, and 0 means the opposite. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether vertical swiping is used. The value 1 means that vertical swiping is used, and 0 means the opposite. The default value is 0.
NODE_SWIPER_DURATION = 1001005 Defines the duration of the animation for switching child components. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: duration of the animation for switching child components, in ms. The default value is 400.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: duration of the animation for switching child components, in ms. The default value is 400.
NODE_SWIPER_CURVE = 1001006 Defines the animation curve for the swiper. This attribute can be set, reset, and obtained as required through APIs. If this attribute is not set or reset, the animation curve is interpolatingSpring(-1, 1, 328, 34). If an exception occurs when setting this attribute, the default value ARKUI_CURVE_LINEAR is used.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: animation curve. The parameter type is ArkUI_AnimationCurve. The default value is ARKUI_CURVE_LINEAR.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: animation curve. The parameter type is ArkUI_AnimationCurve. The default value is ARKUI_CURVE_LINEAR.
NODE_SWIPER_ITEM_SPACE = 1001007 Defines the spacing between child components in the swiper. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: spacing between child components.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: spacing between child components.
NODE_SWIPER_INDEX = 1001008 Defines the index of the child component currently displayed in the swiper. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: number of elements to display per page.
.value[1]?.i32: switching animation mode. The parameter type is ArkUI_SwiperAnimationMode. The setting is only effective for the current call.
This parameter is supported since API version 15.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: number of elements to display per page.
NODE_SWIPER_DISPLAY_COUNT = 1001009 Defines the number of elements to display per page. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: number of elements to display within the viewport.
.value[1]?.i32: whether to paginate by group. The value 0 means to paginate by individual child elements, and 1 means to paginate by groups of child elements displayed within the viewport. The default value is 0.
.string?: whether to enable auto-adaptation. This parameter accepts only the value "auto". When this parameter is set to "auto", the value[] parameters are ignored.
This parameter is supported since API version 19.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: number of elements to display within the viewport.
.value[1].i32: whether pagination by group is enabled. This parameter is supported since API version 19.
NODE_SWIPER_DISABLE_SWIPE = 1001010 Sets whether to disable the swipe-to-switch feature of the Swiper component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to disable the swipe-to-switch feature. The value 1 means to disable the feature, and 0 means the opposite. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the swipe-to-switch feature is disabled. The value 1 means that the feature is disabled, and 0 means the opposite. The default value is 0.
NODE_SWIPER_SHOW_DISPLAY_ARROW = 1001011 Defines whether to show the arrow when the mouse pointer hovers over the navigation indicator. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to show the arrow when the mouse pointer hovers over the navigation indicator. The parameter type is ArkUI_SwiperArrow. The default value is ARKUI_SWIPER_ARROW_HIDE.
.?object: style of the arrow displayed when the mouse pointer hovers over the navigation indicator. The parameter type is ArkUI_SwiperArrowStyle. This parameter is supported since API version 19.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the arrow is shown when the mouse pointer hovers over the navigation indicator. The parameter type is ArkUI_SwiperArrow.
.object: style of the arrow displayed when the mouse pointer hovers over the navigation indicator. The parameter type is ArkUI_SwiperArrowStyle. This parameter is supported since API version 19.
NODE_SWIPER_EDGE_EFFECT_MODE = 1001012 Defines the effect used at the edges of the swiper when the boundary of the scrollable content is reached. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: effect used at the edges of the component when the boundary of the scrollable content is reached. The parameter type is ArkUI_EdgeEffect.
The default value is ARKUI_EDGE_EFFECT_SPRING.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: effect used at the edges of the component when the boundary of the scrollable content is reached. The parameter type is ArkUI_EdgeEffect.
NODE_SWIPER_NODE_ADAPTER = 1001013 Defines the swiper adapter. The attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: ArkUI_NodeAdapter object used as the adapter.
Format of the return value ArkUI_AttributeItem:
.object: ArkUI_NodeAdapter object.
NODE_SWIPER_CACHED_COUNT = 1001014 Sets the number of cached items in the swiper adapter. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: number of cached items in the swiper adapter.
.value[1]?.i32: whether to show cached items. The value 0 means to hide cached items, and 1 means to show cached items. The default value is 0. This parameter is supported since API version 19.
.value[2]?.i32: whether to calculate the number of cached items by group. That is, the number of preloaded child components is calculated by group. 1: The actual number of cached items is used. 0: When NODE_SWIPER_DISPLAY_COUNT is set to page switching by group, the number of cached items is calculated by group. If NODE_SWIPER_DISPLAY_COUNT is not set, the actual number of cached items is used. Default value: 0. This parameter is supported since API version 24.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: number of cached items in the list adapter.
.value[1].i32: whether cached items are shown. The value 0 means that cached items are hidden, and 1 means that cached items are shown. This parameter is supported since API version 19.
.value[2].i32: whether the number of cached items is calculated by group. This parameter is supported since API version 24. \n
NODE_SWIPER_PREV_MARGIN = 1001015 Sets the leading margin of the swiper. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: leading margin, in vp. The default value is 0.
.value[1]?.i32: whether to ignore blank areas. The value 1 means to ignore blank areas, and 0 means the opposite.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: leading margin, in vp.
.value[1].i32: whether blank areas are ignored. The value 1 means that blank areas are ignored, and 0 means the opposite.
NODE_SWIPER_NEXT_MARGIN = 1001016 Sets the trailing margin of the swiper. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: trailing margin, in vp. The default value is 0.
.value[1]?.i32: whether to ignore blank areas. The value 1 means to ignore blank areas, and 0 means the opposite.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: trailing margin, in vp.
.value[1].i32: whether blank areas are ignored. The value 1 means that blank areas are ignored, and 0 means the opposite.
NODE_SWIPER_INDICATOR = 1001017 Sets the navigation indicator type of the Swiper component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: navigation indicator type. The parameter type is ArkUI_SwiperIndicatorType.
.object: additional configuration for the navigation indicator, depending on the type. For ARKUI_SWIPER_INDICATOR_TYPE_DOT, the parameter type is ArkUI_SwiperIndicator.
For ARKUI_SWIPER_INDICATOR_TYPE_DIGIT, the parameter type is ArkUI_SwiperDigitIndicator.
The ArkUI_SwiperDigitIndicator type is supported since API version 19. Format of the return value ArkUI_AttributeItem:
.value[0].i32: navigation indicator type. The parameter type is ArkUI_SwiperIndicatorType.
.object: additional configuration for the navigation indicator, depending on the type. For ARKUI_SWIPER_INDICATOR_TYPE_DOT, the parameter type is ArkUI_SwiperIndicator.
For ARKUI_SWIPER_INDICATOR_TYPE_DIGIT, the parameter type is ArkUI_SwiperDigitIndicator.
The ArkUI_SwiperDigitIndicator type is supported since API version 19.
NODE_SWIPER_NESTED_SCROLL = 1001018 Sets the nested scrolling mode of the Swiper component and its parent container.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: nested scrolling mode. The parameter type is ArkUI_SwiperNestedScrollMode.
The default value is ARKUI_SWIPER_NESTED_SRCOLL_SELF_ONLY.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: nested scrolling mode. The parameter type is ArkUI_SwiperNestedScrollMode.
NODE_SWIPER_SWIPE_TO_INDEX = 1001019 Sets the swiper to switch to the specified page.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: index of the target page in the swiper.
.value[1]?.i32: whether to use an animation for when the target page is reached. The value 1 indicates that the dynamic effect is enabled, and the value 0 indicates that the dynamic effect is disabled. The default value is 0.
NODE_SWIPER_INDICATOR_INTERACTIVE = 1001020 Sets whether the navigation indicator is interactive.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the navigation indicator is interactive. The default value true means that the navigation indicator is interactive, and false means the opposite.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the navigation indicator is interactive.
NODE_SWIPER_PAGE_FLIP_MODE = 1001021 Sets the page flipping mode using the mouse wheel.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: page flipping mode using the mouse wheel. The parameter type is ArkUI_PageFlipMode.
Format of the return value ArkUI_PageFlipMode:
.value[0].i32: page flipping mode using the mouse wheel.
Since: 15
NODE_SWIPER_AUTO_FILL = 1001022 Configures the Swiper component to automatically adjust the number of elements displayed per page based on the minimum width of the elements. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: minimum width of the elements to be displayed, in vp.
.value[1]?.i32: whether to paginate by group. The value 0 means to paginate by individual child elements, and 1 means to paginate by groups of child elements displayed within the viewport. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: minimum width of the elements to be displayed, in vp.
.value[1].i32: whether pagination by group is enabled.
Since: 19
NODE_SWIPER_MAINTAIN_VISIBLE_CONTENT_POSITION = 1001023 Sets whether to maintain the visible content's position when data is inserted or deleted outside the display area of the Swiper component.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to maintain the visible content's position when data is inserted or deleted outside the display area of the Swiper component. The value 0 means not to maintain the visible content's position, and 1 means the opposite. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the visible content's position is maintained when data is inserted or deleted outside the display area of the Swiper component. The value 0 means that the visible content's position is not maintained, and 1 means the opposite. The default value is 0.
Since: 20
NODE_SWIPER_ITEMFILLPOLICY = 1001024 Defines the responsive column layout policy of the Swiper component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: number of columns at different breakpoint specifications. The parameter type is ArkUI_ItemFillPolicy.
.value[1]?.i32: whether to paginate by group. The value 0 means to paginate by individual child elements, and 1 means to paginate by groups of child elements displayed within the viewport. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: number of columns at different breakpoint specifications. The parameter type is ArkUI_ItemFillPolicy.
.value[1].i32: whether pagination by group is enabled.
Since: 22
NODE_LIST_ITEM_SWIPE_ACTION = MAX_NODE_SCOPE_NUM * ARKUI_NODE_LIST_ITEM = 1004000 Sets the swipe action item displayed when the list item is swiped out from the screen edge. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: ArkUI_ListItemSwipeActionOption object.
Format of the return value ArkUI_AttributeItem:
.object: ArkUI_ListItemSwipeActionOption object.
NODE_LIST_ITEM_GROUP_SET_HEADER = MAX_NODE_SCOPE_NUM * ARKUI_NODE_LIST_ITEM_GROUP = 1005000 Defines the header of the list item group. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: ArkUI_NodeHandle object used as the header of the list item group.
Format of the return value ArkUI_AttributeItem:
.object: ArkUI_NodeHandle object used as the header of the list item group.
NODE_LIST_ITEM_GROUP_SET_FOOTER = 1005001 Defines the footer of the list item group. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: ArkUI_NodeHandle object used as the footer of the list item group.
Format of the return value ArkUI_AttributeItem:
.object: ArkUI_NodeHandle object used as the footer of the list item group.
NODE_LIST_ITEM_GROUP_SET_DIVIDER = 1005002 Defines the style of the divider for the list items. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: color of the divider, in 0xARGB format. The default value is 0x08000000.
.value[1].f32: stroke width of the divider, in vp. The default value is 0.
.value[2].f32: distance between the divider and the start of the list, in vp. The default value is 0.
.value[3].f32: distance between the divider and the end of the list, in vp. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: color of the divider, in 0xARGB format.
.value[1].f32: stroke width of the divider, in vp.
.value[2].f32: distance between the divider and the start of the list, in vp.
.value[3].f32: distance between the divider and the end of the list, in vp.
NODE_LIST_ITEM_GROUP_CHILDREN_MAIN_SIZE = 1005003 Sets the default main axis size of the ListItemGroup child components.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
object: ArkUI_ListChildrenMainSize object.
Format of the return value ArkUI_AttributeItem:
.object: ArkUI_ListChildrenMainSize object.
NODE_LIST_ITEM_GROUP_NODE_ADAPTER = 1005004 Defines the adapter of the ListItemGroup component. The attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: ArkUI_NodeAdapter object used as the adapter.
Format of the return value ArkUI_AttributeItem:
.object: ArkUI_NodeAdapter object.
Since: 15
NODE_COLUMN_ALIGN_ITEMS = MAX_NODE_SCOPE_NUM * ARKUI_NODE_COLUMN = 1006000 Defines the horizontal alignment mode of child components in the column. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: horizontal alignment mode of child components. The parameter type is ArkUI_HorizontalAlignment.
Default value: ARKUI_HORIZONTAL_ALIGNMENT_CENTER
Format of the return value ArkUI_AttributeItem:
.value[0].i32: horizontal alignment mode of child components. The parameter type is ArkUI_HorizontalAlignment.
NODE_COLUMN_JUSTIFY_CONTENT = 1006001 Defines the vertical alignment mode of child components in the Column component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: vertical alignment mode of child components. The parameter type is ArkUI_FlexAlignment.
Default value: ARKUI_FLEX_ALIGNMENT_START.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: vertical alignment mode of child components. The parameter type is ArkUI_FlexAlignment.
NODE_LINEAR_LAYOUT_SPACE = 1006002 Defines the spacing between the child component of Column or Row. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: spacing between child components, in vp. The default value is 0.
Value range: [0, +∞).
If an invalid value is set, the default value is used.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: spacing between child components, in vp.
Since: 23
NODE_LINEAR_LAYOUT_REVERSE = 1006003 Defines whether the child components along the main axis in Column or Row are arranged reversely. The attribute can be set, reset, and obtained through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the child components along the main axis are arranged reversely. The default value is false. If the value is true, the child components are arranged in reverse order in the vertical direction. If the value is false, the child components are arranged in normal order in the vertical direction.
If an invalid value is set, the default value is used.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the child components along the main axis are arranged reversely.
Since: 23
NODE_ROW_ALIGN_ITEMS = MAX_NODE_SCOPE_NUM * ARKUI_NODE_ROW = 1007000 Defines the vertical alignment mode of child components in the Row component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: vertical alignment mode of child components. The parameter type is ArkUI_VerticalAlignment.
Default value: ARKUI_VERTICAL_ALIGNMENT_CENTER.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: vertical alignment mode of child components. The parameter type is ArkUI_VerticalAlignment.
NODE_ROW_JUSTIFY_CONTENT = 1007001 Defines the horizontal alignment mode of child components in the Row component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: horizontal alignment mode of child components. The parameter type is ArkUI_FlexAlignment.
Default value: ARKUI_FLEX_ALIGNMENT_START.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: horizontal alignment mode of child components. The parameter type is ArkUI_FlexAlignment.
NODE_FLEX_OPTION = MAX_NODE_SCOPE_NUM * ARKUI_NODE_FLEX = 1008000 Sets Flex attributes, which can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0]?.i32: direction in which child components are arranged within the Flex container. The parameter type is ArkUI_FlexDirection. The default value is ARKUI_FLEX_DIRECTION_ROW.
.value[1]?.i32: wrapping rule ArkUI_FlexWrap. The default value is ARKUI_FLEX_WRAP_NO_WRAP.
.value[2]?.i32: alignment mode along the main axis. The parameter type is ArkUI_FlexAlignment. The default value is ARKUI_FLEX_ALIGNMENT_START.
.value[3]?.i32: alignment mode along the cross axis. The parameter type is ArkUI_ItemAlignment. The default value is ARKUI_ITEM_ALIGNMENT_START.
.value[4]?.i32: alignment mode for multi-line content when there is extra space in the cross axis. The parameter type is ArkUI_FlexAlignment. The default value is ARKUI_FLEX_ALIGNMENT_START.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: direction in which child components are arranged within the Flex container.
.value[1].i32: wrapping rule.
.value[2].i32: alignment mode along the main axis.
.value[3].i32: alignment mode along the cross axis.
.value[4].i32: alignment mode for multi-line content when there is extra space in the cross axis.
NODE_FLEX_SPACE = 1008001 Defines the spacing between the child components in the Flex container. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: spacing between the child components in the main axis of the Flex container, in vp. The default value is 0.
Value range: [0, +∞).
If an invalid value is set, the default value is used.
.value[1].f32: spacing between the child components in the cross axis of the Flex container, in vp. The default value is 0.
Value range: [0, +∞).
If an invalid value is set, the default value is used.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: spacing between the child components in the main axis of the Flex container, in vp.
.value[1].f32: spacing between the child components in the cross axis of the Flex container, in vp.
Since: 23
NODE_REFRESH_REFRESHING = MAX_NODE_SCOPE_NUM * ARKUI_NODE_REFRESH = 1009000 Sets whether the component is being refreshed. This attribute can be set and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the component is being refreshed. 1: being refreshed. 0: not being refreshed. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the component is being refreshed. 1: being refreshed. 0: not being refreshed.
NODE_REFRESH_CONTENT = 1009001 Sets the custom content in the pull-down area. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: The parameter type is ArkUI_NodeHandle.
NODE_REFRESH_PULL_DOWN_RATIO = 1009002 Sets the pull-down follow ratio. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: pull-down follow ratio. The value is in the range from 0 to 1.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: pull-down follow ratio. The value is in the range from 0 to 1.
NODE_REFRESH_OFFSET = 1009003 Sets the pull-down offset that triggers refresh. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: pull-down offset, in vp. The default value is 64 vp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: pull-down offset, in vp. The default value is 64 vp.
NODE_REFRESH_PULL_TO_REFRESH = 1009004 Sets whether to initiate a refresh when the pull-down distance exceeds the value of refreshOffset. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to trigger a refresh. 1: yes; 0: no. Default value: 1.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether a refresh is initiated. The value 1 means that a refresh is initiated, and 0 means the opposite.
NODE_REFRESH_MAX_PULL_DOWN_DISTANCE = 1009005 Sets the maximum pull-down distance for refreshing. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: maximum pull-down distance, in vp.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: maximum pull-down distance, in vp.
Since: 20
NODE_REFRESH_PULL_UP_TO_CANCEL_REFRESH = 1009006 Defines whether to enable the pull-up-to-cancel gesture for refreshing operations. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the pull-up-to-cancel gesture for refreshing operations. 0: disable; 1: enable. Default value: 1.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the pull-up-to-cancel gesture is enabled for refreshing operations. 0: disable; 1: enable.
Since: 23
NODE_WATER_FLOW_LAYOUT_DIRECTION = MAX_NODE_SCOPE_NUM * ARKUI_NODE_WATER_FLOW = 1010000 Defines the main axis direction of the WaterFlow component layout. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32 main axis direction. The parameter type is ArkUI_FlexDirection. Default value: ARKUI_FLEX_DIRECTION_COLUMN.
Format of the return value ArkUI_AttributeItem:
.value[0].i32 main axis direction. The parameter type is ArkUI_FlexDirection.
NODE_WATER_FLOW_COLUMN_TEMPLATE = 1010001 Sets the number of columns in the water flow layout. If this parameter is not set, one column is used by default. This attribute can be set, reset, and obtained as required through APIs. For example, '1fr 1fr 2fr' indicates three columns, with the first column taking up 1/4 of the parent component's full width, the second column 1/4, and the third column 2/4. You can use columnsTemplate('repeat(auto-fill,track-size)') to automatically calculate the number of rows based on the specified row height track-size. repeat and auto-fill are keywords. The units for track-size can be px, vp (default), %, or a valid number. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: number of columns in the layout. Default value: '1fr'.
Format of the return value ArkUI_AttributeItem:
.string: number of columns in the layout.
NODE_WATER_FLOW_ROW_TEMPLATE = 1010002 Sets the number of rows in the water flow layout. If this parameter is not set, one row is used by default. This attribute can be set, reset, and obtained as required through APIs. For example, '1fr 1fr 2fr' indicates three rows, with the first row taking up 1/4 of the parent component's full height, the second row 1/4, and the third row 2/4. You can use rowsTemplate('repeat(auto-fill,track-size)') to automatically calculate the number of rows based on the specified row height track-size. repeat and auto-fill are keywords. The units for track-size can be px, vp (default), %, or a valid number. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: number of rows in the layout. Default value: '1fr'.
Format of the return value ArkUI_AttributeItem:
.string: number of rows in the layout.
NODE_WATER_FLOW_COLUMN_GAP = 1010003 Sets the gap between columns. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: gap between columns, in vp. The default value is 0. Value range: [0, +∞).
Format of the return value ArkUI_AttributeItem:
.value[0].f32: gap between columns, in vp.
NODE_WATER_FLOW_ROW_GAP = 1010004 Sets the gap between rows. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: gap between rows, in vp. The default value is 0. Value range: [0, +∞).
Format of the return value ArkUI_AttributeItem:
.value[0].f32: gap between rows, in vp.
NODE_WATER_FLOW_SECTION_OPTION = 1010005 Defines the water flow section configuration. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: zero-based index of the water flow item section to update. The value is converted to an integer.
.object: ArkUI_WaterFlowSectionOption object.
Format of the return value ArkUI_AttributeItem:
.object: ArkUI_WaterFlowSectionOption object.
NODE_WATER_FLOW_NODE_ADAPTER = 1010006 Defines the WaterFlow component adapter. The attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: ArkUI_NodeAdapter object used as the adapter.
Format of the return value ArkUI_AttributeItem:
.object: ArkUI_NodeAdapter object.
NODE_WATER_FLOW_CACHED_COUNT = 1010007 Sets the number of cached items in the WaterFlow component adapter. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: number of cached items in the WaterFlow component adapter.
.value[1]?.i32: whether to show cached items. The value 0 means to hide cached items, and 1 means to show cached items. The default value is 0. This parameter is supported since API version 16.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: number of cached items in the list adapter.
.value[1].i32: whether cached items are shown. The value 0 means that cached items are hidden, and 1 means that cached items are shown. This parameter is supported since API version 16.
NODE_WATER_FLOW_FOOTER = 1010008 Sets the custom footer for the WaterFlow component. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: The parameter type is ArkUI_NodeHandle.
NODE_WATER_FLOW_SCROLL_TO_INDEX = 1010009 Scrolls to the item with the specified index. When smooth is set to true, all passed items are loaded and counted in layout calculation. This may result in performance issues if a large number of items are involved.

Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: index of the item to be scrolled to in the container.
.value[1]?.i32: whether to enable the smooth animation for scrolling to the item with the specified index. The value 1 means to enable the animation, and 0 means the opposite. Default value: 0.
.value[2]?.i32: how the item to scroll to is aligned with the container. The parameter type is ArkUI_ScrollAlignment. The default value is ARKUI_SCROLL_ALIGNMENT_START.
.value[3]?.f32: extra offset after the target element is scrolled, in vp. The default value is 0. A positive value offsets the scroll position downward (or toward the end); a negative value offsets it upward (or toward the start). This parameter is supported since API version 23.
NODE_WATER_FLOW_ITEM_CONSTRAINT_SIZE = 1010010 Defines the size constraints to apply to water flow items. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: minimum width. The value -1 indicates that the minimum width is not set.
.value[1].f32: maximum width. The value -1 indicates that the maximum width is not set.
.value[2].f32: minimum height. The value -1 indicates that the minimum height is not set.
.value[3].f32: maximum height. The value -1 indicates that the maximum height is not set.
Format of the return value ArkUI_AttributeItem:
.value[0].f32: minimum width. The value -1 indicates that the minimum width is not set.
.value[1].f32: maximum width. The value -1 indicates that the maximum width is not set.
.value[2].f32: minimum height. The value -1 indicates that the minimum height is not set.
.value[3].f32: maximum height. The value -1 indicates that the maximum height is not set.
NODE_WATER_FLOW_LAYOUT_MODE = 1010011 Sets the layout mode for this WaterFlow component. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: layout mode. The parameter type is ArkUI_WaterFlowLayoutMode. The default value is ARKUI_WATER_FLOW_LAYOUT_MODE_ALWAYS_TOP_DOWN.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: layout mode. The parameter type is ArkUI_WaterFlowLayoutMode.
Since: 18
NODE_WATER_FLOW_SYNC_LOAD = 1010012 Defines whether the WaterFlow component loads child nodes synchronously. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the WaterFlow component synchronously loads child nodes. 0: frame-by-frame loading. 1: synchronous loading. Default value: 1.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the WaterFlow component synchronously loads child nodes. 0: frame-by-frame loading. 1: synchronous loading.
Since: 20
NODE_WATER_FLOW_COLUMN_TEMPLATE_ITEMFILLPOLICY = 1010013 Sets the responsive column layout policy for the WaterFlow component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: number of columns at different breakpoint specifications. The data type is ArkUI_ItemFillPolicy.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: number of columns at different breakpoint specifications. The data type is ArkUI_ItemFillPolicy.
Since: 22
NODE_RELATIVE_CONTAINER_GUIDE_LINE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_RELATIVE_CONTAINER = 1012000 Sets the guideline in the RelativeContainer component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: guideline in the RelativeContainer component.
Format of the return value ArkUI_AttributeItem:
.object: guideline in the RelativeContainer component.
NODE_RELATIVE_CONTAINER_BARRIER = 1012001 Sets the barrier in the RelativeContainer component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: guideline in the RelativeContainer component.
Format of the return value ArkUI_AttributeItem:
.object: barrier in the RelativeContainer component.
NODE_GRID_COLUMN_TEMPLATE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_GRID = 1013000 Sets the number of columns in the Grid component. If this parameter is not set, one column is used by default. This attribute can be set, reset, and obtained as required through APIs. For example, '1fr 1fr 2fr' indicates three columns, with the first column taking up 1/4 of the parent component's full width, the second column 1/4, and the third column 2/4. You can use columnsTemplate('repeat(auto-fill,track-size)') to automatically calculate the number of rows based on the specified row height track-size. repeat and auto-fill are keywords. The units for track-size can be px, vp (default), %, or a valid number. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: number of columns in the layout.
Format of the return value ArkUI_AttributeItem:
.string: number of columns in the layout.
NODE_GRID_ROW_TEMPLATE = 1013001 Sets the number of rows or the minimum row height in the Grid component. If this parameter is not set, one row is used by default. This attribute can be set, reset, and obtained as required through APIs. For example, '1fr 1fr 2fr' indicates three rows, with the first row taking up 1/4 of the parent component's full height, the second row 1/4, and the third row 2/4. You can use rowsTemplate('repeat(auto-fill,track-size)') to automatically calculate the number of rows based on the specified row height track-size. repeat and auto-fill are keywords. The units for track-size can be px, vp (default), %, or a valid number. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.string: number of rows in the layout.
Format of the return value ArkUI_AttributeItem:
.string: number of rows in the layout.
NODE_GRID_COLUMN_GAP = 1013002 Sets the gap between columns. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: gap between columns, in vp. The default value is 0. Value range: [0, +∞).
Format of the return value ArkUI_AttributeItem:
.value[0].f32: gap between columns, in vp.
NODE_GRID_ROW_GAP = 1013003 Sets the gap between rows. This attribute can be set, reset, and obtained as required through APIs. Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: gap between rows, in vp. The default value is 0. Value range: [0, +∞).
Format of the return value ArkUI_AttributeItem:
.value[0].f32: gap between rows, in vp.
NODE_GRID_NODE_ADAPTER = 1013004 Defines the Grid component adapter. The attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: ArkUI_NodeAdapter object used as the adapter.
Format of the return value ArkUI_AttributeItem:
.object: ArkUI_NodeAdapter object.
NODE_GRID_CACHED_COUNT = 1013005 Sets the number of cached items in the Grid component adapter. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: number of cached items in the Grid component adapter.
NODE_GRID_FOCUS_WRAP_MODE = 1013006 Defines the focus wrap mode for the Grid component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: focus wrap mode of the Grid component. The parameter type is ArkUI_FocusWrapMode. The default value is FOCUS_WRAP_MODE_DEFAULT.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: focus wrap mode of the Grid component. The parameter type is ArkUI_FocusWrapMode.
Since: 20
NODE_GRID_SYNC_LOAD = 1013007 Defines whether the Grid component loads child nodes synchronously. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the Grid component synchronously loads child nodes. 0: frame-by-frame loading. 1: synchronous loading. Default value: 1.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the Grid component synchronously loads child nodes. 0: frame-by-frame loading. 1: synchronous loading.
Since: 20
NODE_GRID_ALIGN_ITEMS = 1013008 Defines the alignment mode of GridItem in Grid. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: alignment mode of GridItem in Grid. The parameter type is ArkUI_GridItemAlignment. The default value is GRID_ITEM_ALIGNMENT_DEFAULT.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: alignment mode of GridItem in Grid. The parameter type is ArkUI_GridItemAlignment.
Since: 22
NODE_GRID_LAYOUT_OPTIONS = 1013009 Defines the layout options of Grid. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: The parameter type is ArkUI_GridLayoutOptions.
Format of the return value ArkUI_AttributeItem:
.object: The return value type is ArkUI_GridLayoutOptions.
Since: 22
NODE_GRID_COLUMN_TEMPLATE_ITEMFILLPOLICY = 1013010 Defines the responsive column layout policy of the Grid component. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: number of columns at different breakpoint specifications. The data type is ArkUI_ItemFillPolicy.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: number of columns at different breakpoint specifications. The data type is ArkUI_ItemFillPolicy.
Since: 22
NODE_GRID_EDIT_MODE = 1013011 Defines whether the Grid component enters the editing mode. After the component enters the editing mode, you can drag GridItem by using the NODE_GRID_ON_ITEM_DRAG_START event. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the Grid component enters the editing mode. 0: The component does not enter the editing mode. 1: The component enters the editing mode. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the Grid component enters the editing mode. 0: The component does not enter the editing mode. 1: The component enters the editing mode.
Since: 23
NODE_GRID_DRAG_ANIMATION = 1013012 Defines whether to enable the drag animation for GridItem in the Grid component. This attribute can be set, reset, and obtained as required through APIs.
The animation is supported only when the scrolling mode is used (only one of NODE_GRID_ROW_TEMPLATE and NODE_GRID_COLUMN_TEMPLATE is set).
Drag animations are only supported in grids with fixed size rules; scenarios involving spanning across rows or columns are not supported.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable the drag animation for GridItem in the Grid component. 0: disable; 1: enable. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the drag animation is enabled for GridItem in the Grid component. 0: disabled; 1: enabled.
Since: 23
NODE_GRID_MULTI_SELECTABLE = 1013013 Defines whether to enable mouse-based multi-selection for the Grid component. This attribute can be set, reset, and obtained as required through APIs.
When enabled, mouse-based multi-selection within the Grid area triggers the NODE_GRID_ITEM_EVENT_ON_SELECT event on GridItem components.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable mouse-based multi-selection. 0: disable; 1: enable. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether mouse-based multi-selection is enabled. 0: disabled; 1: enabled.
Since: 23
NODE_GRID_SCROLL_TO_INDEX = 1013014 Scrolls to the item with the specified index.
When the animation is enabled, all passed child components are loaded and counted in layout calculation. This may result in performance issues if a large number of child components are involved.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: index of the item to be scrolled to in the container.
.value[1]?.i32: whether to enable the animation for scrolling to the target element. 1: enable; 0: disable. The default value is 0.
.value[2]?.i32: how the target element to scroll to is aligned with the container. The parameter type is ArkUI_ScrollAlignment. The default value is ARKUI_SCROLL_ALIGNMENT_AUTO.
.value[3]?.f32: extra offset after the target element is scrolled, in vp. The default value is 0. A positive value offsets the scroll position downward (or toward the end); a negative value offsets it upward (or toward the start).
Since: 23
NODE_GRID_SUPPORT_EMPTY_BRANCH_IN_LAZY_LOADING = 1013015 Defines whether the Grid component supports the generation of empty branch nodes that do not contain any child components using the if/else rendering control syntax in LazyForEach or Repeat.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the Grid component supports empty branches. 0: no; 1: yes. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the Grid component supports empty branches. 0: no; 1: yes.
Since: 23
NODE_GRID_ITEM_STYLE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_GRID_ITEM = 1014000 Defines the style for GridItem. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: style for GridItem. The parameter type is ArkUI_GridItemStyle. The default value is GRID_ITEM_STYLE_NONE.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: style for GridItem. The parameter type is ArkUI_GridItemStyle.
Since: 22
NODE_GRID_ITEM_SELECTABLE = 1014001 Defines whether GridItem can be selected using mouse-based multi-selection. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether GridItem can be selected using mouse-based multi-selection. 0: not selectable. 1: selectable. Default value: 1.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether GridItem can be selected using mouse-based multi-selection. 0: not selectable. 1: selectable.
Since: 23
NODE_GRID_ITEM_SELECTED = 1014002 Defines the selection status of GridItem. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: selection status of GridItem. 0: not selected. 1: selected. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: selection status of GridItem. 0: not selected. 1: selected.
Since: 23
NODE_TEXT_PICKER_COLUMN_WIDTHS = 15009 Sets the width of columns in the picker. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].f32: width of the first column, specified as a percentage of the total width. By default, all columns have equal widths.
.value[1]?.f32: width of the second column, specified as a percentage of the total width. By default, all columns have equal widths.
.value[2]?.f32: width of the third column, specified as a percentage of the total width. By default, all columns have equal widths.
...
.value[n]?.f32: width of the (n+1)-th column, specified as a percentage of the total width. By default, all columns have equal widths.
Format of the return value ArkUI_AttributeItem:
value[0].f32: width of the first column as a percentage of the total width.
value[1].f32: width of the second column as a percentage of the total width.
value[2].f32: width of the third column as a percentage of the total width.
...
value[n].f32: width of the (n+1)-th column as a percentage of the total width.
Since: 18
NODE_IMAGE_ANIMATOR_IMAGES = ARKUI_NODE_IMAGE_ANIMATOR * MAX_NODE_SCOPE_NUM = 19000 Sets the image frame information set of the frame animation component. Dynamic update is not supported. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.size: number of image frames.
.object: image frame array. The parameter type is ArkUI_ImageAnimatorFrameInfo.
Format of the return value ArkUI_AttributeItem:
.size: number of image frames.
.object: image frame array. The parameter type is ArkUI_ImageAnimatorFrameInfo.
NODE_IMAGE_ANIMATOR_STATE = 19001 Sets the playback status of the frame-by-frame animation. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: playback state of the frame-by-frame animation. The parameter type is ArkUI_AnimationStatus. The default state is initial.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: playback state of the frame-by-frame animation. The parameter type is ArkUI_AnimationStatus.
NODE_IMAGE_ANIMATOR_DURATION = 19002 Sets the playback duration of the frame-by-frame animation. This attribute does not take effect when a separate duration is set for any of the image frames. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: playback duration, in ms. The default value is 1000.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: playback duration, in ms. The default value is 1000.
NODE_IMAGE_ANIMATOR_REVERSE = 19003 Sets the playback direction of the frame-by-frame animation. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: playback direction. The value 0 indicates that images are played from the first one to the last one, and 1 indicates that images are played from the last one to the first one. The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: playback direction. The value 0 indicates that images are played from the first one to the last one, and 1 indicates that images are played from the last one to the first one.
NODE_IMAGE_ANIMATOR_FIXED_SIZE = 19004 Sets whether the image size is fixed at the component size. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether the image size is the fixed at the component size. The value 1 indicates that the image size is fixed at the component size. The value 0 indicates that the width, height, top, and left attributes of each image must be set separately. The default value is 1.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether the image size is the fixed at the component size. The value 1 indicates that the image size is fixed at the component size. The value 0 indicates that the width, height, top, and left attributes of each image must be set separately.
NODE_IMAGE_ANIMATOR_FILL_MODE = 19005 Sets the status before and after execution of the frame-by-frame animation in the current playback direction. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: status before and after execution of the frame-by-frame animation in the current playback direction. The parameter type is ArkUI_AnimationFillMode. The default value is ARKUI_ANIMATION_FILL_MODE_FORWARDS.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: status before and after execution of the frame-by-frame animation in the current playback direction. The parameter type is ArkUI_AnimationFillMode.
NODE_IMAGE_ANIMATOR_ITERATION = 19006 Sets the number of times that the frame-by-frame animation is played. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: number of times that the animation is played.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: number of times that the animation is played.
NODE_EMBEDDED_COMPONENT_WANT = MAX_NODE_SCOPE_NUM * ARKUI_NODE_EMBEDDED_COMPONENT = 1016000 Defines the want used to launch an EmbeddedAbility. This attribute can be set.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: want parameter for the EmbeddedComponent. The parameter type is AbilityBase_Want. The default value is nullptr.
Since: 20
NODE_EMBEDDED_COMPONENT_OPTION = 1016001 Defines the options of EmbeddedComponent. This attribute can be set.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: list of options for EmbeddedComponent. The parameter type is ArkUI_EmbeddedComponentOption.
Since: 20
NODE_PICKER_OPTION_SELECTED_INDEX = MAX_NODE_SCOPE_NUM * ARKUI_NODE_PICKER Index of the default selected item in the picker's selection range. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].u32: index value.
The default value is 0.
Format of the return value ArkUI_AttributeItem:
.value[0].u32: index value.
Since: 23
NODE_PICKER_ENABLE_HAPTIC_FEEDBACK = 1018001 Defines whether to enable haptic feedback. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to enable haptic feedback.
- true: Enable haptic feedback.
- false: Disable haptic feedback.
The default value is true. After this function is enabled, whether haptic feedback is available depends on the hardware support of the system.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether haptic feedback is enabled.
Since: 23
NODE_PICKER_CAN_LOOP = 1018002 Defines whether the picker supports looping. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.value[0].i32: whether to support looping.
- true: supported.
- false: not supported.
Default value: true.
If the number of child components is less than 8, looping will not occur regardless of whether the value is true or false.
Format of the return value ArkUI_AttributeItem:
.value[0].i32: whether looping is supported. true means that looping is supported; false otherwise.
Since: 23
NODE_PICKER_SELECTION_INDICATOR = 1018003 Defines the picker indicator style. This attribute can be set, reset, and obtained as required through APIs.
Format of the ArkUI_AttributeItem parameter for setting the attribute:
.object: The parameter type is ArkUI_PickerIndicatorStyle.
Format of the return value ArkUI_AttributeItem:
.object: The parameter type is ArkUI_PickerIndicatorStyle.
Since: 23

ArkUI_NodeEventType

enum ArkUI_NodeEventType

Description

Enumerates the event types supported by the NativeNode component.

Since: 12

Value Description
NODE_TOUCH_EVENT = 0 Gesture event type. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_UIInputEvent.
NODE_EVENT_ON_APPEAR = 1 Mount event. This event is triggered when the component is mounted and displayed.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
NODE_EVENT_ON_DISAPPEAR = 2 Unmount event. This event is triggered when the component is unmounted from the component tree and disappears.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
NODE_EVENT_ON_AREA_CHANGE = 3 Component area change event. This event is triggered when the component area changes.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: original width of the target element, in vp. The value type is number.
ArkUI_NodeComponentEvent.data[1].f32: original height of the target element, in vp. The value type is number.
ArkUI_NodeComponentEvent.data[2].f32: original x-coordinate of the target element's upper left corner relative to the parent element's, in vp. The value type is number.
ArkUI_NodeComponentEvent.data[3].f32: original y-coordinate of the target element's upper left corner relative to the parent element's, in vp. The value type is number.
ArkUI_NodeComponentEvent.data[4].f32: original x-coordinate of the target element's upper left corner relative to the page's, in vp. The value type is number.
ArkUI_NodeComponentEvent.data[5].f32: original y-coordinate of the target element's upper left corner relative to the page's, in vp. The value type is number.
ArkUI_NodeComponentEvent.data[6].f32: new width of the target element, in vp. The value type is number.
ArkUI_NodeComponentEvent.data[7].f32: new height of the target element, in vp. The value type is number.
ArkUI_NodeComponentEvent.data[8].f32: new x-coordinate of the target element's upper left corner relative to the parent element's, in vp. The value type is number.
ArkUI_NodeComponentEvent.data[9].f32: new y-coordinate of the target element's upper left corner relative to the parent element's, in vp. The value type is number.
ArkUI_NodeComponentEvent.data[10].f32: new x-coordinate of the target element's upper left corner relative to the page's, in vp. The value type is number.
ArkUI_NodeComponentEvent.data[11].f32: new y-coordinate of the target element's upper left corner relative to the page's, in vp. The value type is number.
NODE_ON_FOCUS = 4 Event of obtaining focus. This event is triggered when the component obtains the focus.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
NODE_ON_BLUR = 5 Event of losing focus. This event is triggered when the component loses the focus.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
NODE_ON_CLICK = 6 Click event. This event is triggered when the component is clicked.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: x-coordinate of the click relative to the upper left corner of the clicked component's original area, in vp.
ArkUI_NodeComponentEvent.data[1].f32: y-coordinate of the click relative to the upper left corner of the clicked component's original area, in vp.
ArkUI_NodeComponentEvent.data[2].f32: event timestamp. It is the interval between the time when the event is triggered and the time when the system starts, in microseconds.
ArkUI_NodeComponentEvent.data[3].i32: event input device. The value 1 indicates the mouse, 2 indicates the touchscreen, and 4 indicates the key.
ArkUI_NodeComponentEvent.data[4].f32: x-coordinate of the click relative to the upper left corner of the application window, in vp.
ArkUI_NodeComponentEvent.data[5].f32: y-coordinate of the click relative to the upper left corner of the application window, in vp.
ArkUI_NodeComponentEvent.data[6].f32: x-coordinate of the click relative to the upper left corner of the application screen, in vp.
ArkUI_NodeComponentEvent.data[7].f32: y-coordinate of the click relative to the upper left corner of the application screen, in vp.
NODE_ON_TOUCH_INTERCEPT = 7 Custom component event interception. This event is triggered when the component is touched.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_UIInputEvent.
NODE_EVENT_ON_VISIBLE_AREA_CHANGE = 8 Visible area change event. This event is triggered when the ratio of the component's visible area to its total area is greater than or less than the threshold. Before registering the event, you need to use NODE_VISIBLE_AREA_CHANGE_RATIO to configure the threshold.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: whether the component's visible area has increased or decreased relative to its total area since the last update. The value 1 indicates that the visible area has increased, and 0 indicates that the visible area has decreased.
ArkUI_NodeComponentEvent.data[1].f32: ratio of the component's visible area to its total area when this callback is invoked.
NODE_ON_HOVER = 9 Event triggered when the mouse pointer is moved over or away from the component.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: whether the mouse pointer is hovered over the component. The value 1 indicates that the mouse pointer is hovered over the component, and 0 indicates that the mouse pointer is moved away from the component.
NODE_ON_MOUSE = 10 Click event. This event is triggered when the component is clicked by a mouse device button or when the mouse pointer moves within the component.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_UIInputEvent.
NODE_EVENT_ON_ATTACH = 11 Attach event. This event is triggered when the component is attached to the component tree.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
NODE_EVENT_ON_DETACH = 12 Detach event. This event is triggered when the component is detached from the component tree.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
NODE_ON_ACCESSIBILITY_ACTIONS = 13 Accessibility-supported action event. This event is triggered when an accessibility action is performed after the corresponding accessibility action type is set.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].u32: action type that triggers the callback. The parameter type is ArkUI_AccessibilityActionType.
NODE_ON_PRE_DRAG = 14 Notifies the listener of the interaction state prior to a drop and drop operation. This event is triggered when a component is draggable and when a long press, lift, or drag initiation occurs.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: corresponds to ArkUI_PreDragStatus.
NODE_ON_DRAG_START = 15 Event triggered when the user starts to drag an item. A drag operation is recognized only when the dragged item is moved far enough.
When the event callback occurs, the ArkUI_DragEvent object can be obtained from the ArkUI_NodeEvent object.
NODE_ON_DRAG_ENTER = 16 Event triggered when a dragged item enters the boundaries of the current component. The current component refers to the component that listens for this event.
When the event callback occurs, the ArkUI_DragEvent object can be obtained from the ArkUI_NodeEvent object.
NODE_ON_DRAG_MOVE = 17 Event triggered when a dragged item moves in the current component. The current component refers to the component that listens for this event.
When the event callback occurs, the ArkUI_DragEvent object can be obtained from the ArkUI_NodeEvent object.
NODE_ON_DRAG_LEAVE = 18 Event triggered when a dragged item leaves the boundaries of the current component. The current component refers to the component that listens for this event.
When the event callback occurs, the ArkUI_DragEvent object can be obtained from the ArkUI_NodeEvent object.
NODE_ON_DROP = 19 Event triggered when a dragged item is dropped on the current component. The component can obtain the drag data for processing through the callback. The current component refers to the component that listens for this event.
When the event callback occurs, the ArkUI_DragEvent object can be obtained from the ArkUI_NodeEvent object.
NODE_ON_DRAG_END = 20 Event triggered when a drag operation ends. The drag source can obtain the drag result by registering this callback. A drag operation ends when the dragged item is released. When the event callback occurs, the ArkUI_DragEvent object can be obtained from the ArkUI_NodeEvent object.
NODE_ON_KEY_EVENT = 21 Event triggered when a key event occurs. The callback can be triggered during interactions with a focused window using an external keyboard or other input device.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
Since: 14
NODE_ON_KEY_PRE_IME = 22 Event triggered before the input method responds to the key action. If the return value of this callback is true, the key event is considered consumed, and subsequent event callbacks (keyboardShortcut, input method events, onKeyEvent) will be intercepted and no longer triggered. The callback can be triggered during interactions with a focused window using an external keyboard or other input device.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
Since: 14
NODE_ON_FOCUS_AXIS = 23 Event triggered when the bound component receives a focus axis event after gaining focus. The event callback is triggered by interactions with a joystick and a focused component.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_UIInputEvent.
Since: 15
NODE_DISPATCH_KEY_EVENT = 24 Component key event re-dispatch event. When a component node receives a key event, this callback is triggered instead of dispatching the event to its child nodes.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
Since: 15
NODE_ON_AXIS = 25 Event triggered when the bound component receives an axis event.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_UIInputEvent.
Since: 17
NODE_ON_HOVER_EVENT = 27 Event triggered when the mouse pointer moves over or away from the component.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_UIInputEvent.
Since: 17
NODE_ON_CLICK_EVENT = 26 Event triggered when the bound component is clicked.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_UIInputEvent.
Since: 18
NODE_VISIBLE_AREA_APPROXIMATE_CHANGE_EVENT = 28 NODE_EVENT_ON_VISIBLE_AREA_CHANGE event, which limits the callback interval. This event is triggered when the ratio of the component's visible area to its total area is greater than or less than the threshold. Before registering the event, you need to use NODE_VISIBLE_AREA_APPROXIMATE_CHANGE_RATIO to configure the threshold and update interval.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: whether the component's visible area has increased or decreased relative to its total area since the last update. The value 1 indicates that the visible area has increased, and 0 indicates that the visible area has decreased.
ArkUI_NodeComponentEvent.data[1].f32: ratio of the component's visible area to its total area when this callback is invoked.
Since: 17
NODE_ON_HOVER_MOVE = 29 Hover event. This event is triggered when the stylus pointer hovers over the component.
When the event callback occurs, the ArkUI_UIInputEvent object can be obtained from the ArkUI_NodeEvent object.
Since: 15
NODE_ON_SIZE_CHANGE = 30 Size change event. This event is triggered when the component size changes.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: width of the component before the size change.
ArkUI_NodeComponentEvent.data[1].f32: height of the component before the size change.
ArkUI_NodeComponentEvent.data[2].f32: width of the component after the size change.
ArkUI_NodeComponentEvent.data[3].f32: height of the component after the size change.
Since: 21
NODE_ON_COASTING_AXIS_EVENT = 31 Coasting axis event. When a user slides two fingers on the touchpad for a certain distance and quickly lifts the fingers, the system continuously constructs the event based on the speed at which the fingers are lifted and a certain attenuation curve. You can listen to this type of events to handle the fling effect after the normal scrolling axis event.
When the event callback occurs, you can obtain the ArkUI_UIInputEvent object from the ArkUI_NodeEvent object by calling OH_ArkUI_NodeEvent_GetInputEvent. Then, you can obtain the ArkUI_CoastingAxisEvent object from the ArkUI_UIInputEvent object by calling OH_ArkUI_UIInputEvent_GetCoastingAxisEvent. You can obtain more information from the object by calling the **OH_ArkUI_CoastingAxisEvent_**XXX series APIs.
Since: 22
NODE_ON_CHILD_TOUCH_TEST = 32 Pre-touch test event of a child component. This event is called to specify how to perform a touch test on the child component of the current component. This event is triggered when the component is touched.
When the event callback occurs, you can obtain the ArkUI_TouchTestInfo object from the ArkUI_NodeEvent object by calling OH_ArkUI_NodeEvent_GetTouchTestInfo. Then ,you can obtain the list of touch test items from the ArkUI_TouchTestInfo object by calling OH_ArkUI_TouchTestInfo_GetTouchTestInfoList. You can obtain more information by using the OH_ArkUI_TouchTestInfoItem_GetXXX series APIs. Use OH_ArkUI_TouchTestInfo_SetTouchResultStrategy to set the touch test policy. Use OH_ArkUI_TouchTestInfo_SetTouchResultId to set the child component to be affected during the hit test.
Since: 22
NODE_ON_DIGITAL_CROWN = 33 Crown event. This event is triggered when the crown is rotated.
When the event callback occurs, the ArkUI_UIInputEvent object can be obtained from the ArkUI_NodeEvent object.
Since: 24
NODE_ON_CUSTOM_OVERFLOW_SCROLL = 34 Content scroll event of the ARKUI_NODE_CUSTOM node. This event is triggered when the component content is scrolled.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: ID of the child component whose content is being scrolled.
ArkUI_NodeComponentEvent.data[1].f32: offset of the node content scrolling, in px.
Since: 24
NODE_ON_STACK_OVERFLOW_SCROLL = 35 Content scroll event of the ARKUI_NODE_STACK node. This event is triggered when the component content is scrolled.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: ID of the child component whose content is being scrolled.
ArkUI_NodeComponentEvent.data[1].f32: offset of the node content scrolling, in px.
Since: 24
NODE_ON_NEED_SOFTKEYBOARD = 36 Event for determining whether a keyboard is required. This event is triggered when a component gains focus.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
The system determines whether a keyboard is required based on the return value of the callback function.
You can use OH_ArkUI_NodeEvent_SetReturnNumberValue to set whether a keyboard is required.
value.i32 whose index is set to 0 in the return value indicates whether a keyboard is required.
The value 0 indicates that a keyboard is not required, and the value 1 indicates that a keyboard is required.
Since: 24
NODE_TEXT_ON_DETECT_RESULT_UPDATE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_TEXT = 1000 Event triggered when text recognition with the configured TextDataDetectorConfig settings succeeds.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_StringAsyncEvent.
ArkUI_StringAsyncEvent contains the following parameter:
ArkUI_StringAsyncEvent.pStr: text recognition result in JSON format.
NODE_TEXT_SPAN_ON_LONG_PRESS = 1001 Long-press event for the Span component. This callback is triggered when the component is long-pressed.
When the event callback occurs, the ArkUI_UIInputEvent object can be obtained from the ArkUI_NodeEvent object.
Since: 20
NODE_IMAGE_ON_COMPLETE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_IMAGE = 4000 Image loading success event. This event is triggered when an image is successfully loaded or decoded.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: loading status. The value 0 indicates that the image is loaded successfully, and 1 indicates that the image is decoded successfully.
ArkUI_NodeComponentEvent.data[1].f32: width of the image, in px.
ArkUI_NodeComponentEvent.data[2].f32: height of the image, in px.
ArkUI_NodeComponentEvent.data[3].f32: width of the component, in px.
ArkUI_NodeComponentEvent.data[4].f32: height of the component, in px.
ArkUI_NodeComponentEvent.data[5].f32: offset of the rendered content relative to the component on the x-axis, in px.
ArkUI_NodeComponentEvent.data[6].f32: offset of the rendered content relative to the component on the y-axis, in px.
ArkUI_NodeComponentEvent.data[7].f32: actual rendered width of the image, in px.
ArkUI_NodeComponentEvent.data[8].f32: actual rendered height of the image, in px.
NODE_IMAGE_ON_ERROR = 4001 Image loading failure event. This event is triggered when an error occurs during image loading.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: result code.
401: The image could not be obtained because the image path is invalid.
103101: The image format is not supported.
NODE_IMAGE_ON_SVG_PLAY_FINISH = 4002 SVG animation playback completion event. This event is triggered when the animation playback in the loaded SVG image is complete.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
NODE_IMAGE_ON_DOWNLOAD_PROGRESS = 4003 Event triggered during image download. This event is triggered when the page component downloads a web page image.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].u32: number of bytes that have been downloaded.
ArkUI_NodeComponentEvent.data[1].u32: total number of bytes of the image to be downloaded.
NODE_TOGGLE_ON_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_TOGGLE = 5000 Event triggered when the toggle status changes.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: toggle status. 1: on; 0: off.
NODE_TEXT_INPUT_ON_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_TEXT_INPUT = 7000 Event triggered when the text input content changes in the TextInput component.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_StringAsyncEvent.
ArkUI_StringAsyncEvent contains the following parameter:
ArkUI_StringAsyncEvent.pStr: text input.
NODE_TEXT_INPUT_ON_SUBMIT = 7001 Event triggered when the Enter key on the keyboard is pressed for the TextInput component.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: type of the Enter key.
NODE_TEXT_INPUT_ON_CUT = 7002 Event triggered when the cut button on the pasteboard, which displays when the text box is long pressed, is clicked.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_StringAsyncEvent.
ArkUI_StringAsyncEvent contains the following parameter:
ArkUI_StringAsyncEvent.pStr: text that is cut.
NODE_TEXT_INPUT_ON_PASTE = 7003 Event triggered when the paste button on the pasteboard, which displays when the text box is long pressed, is clicked.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_StringAsyncEvent.
ArkUI_StringAsyncEvent contains the following parameter:
ArkUI_StringAsyncEvent.pStr: text that is pasted.
NODE_TEXT_INPUT_ON_TEXT_SELECTION_CHANGE = 7004 Event triggered when the text selection position changes.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: start position of the text selection area.
ArkUI_NodeComponentEvent.data[1].i32: end position of the text selection area.
NODE_TEXT_INPUT_ON_EDIT_CHANGE = 7005 Called when the input state changes.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: true indicates that text input is in progress.
NODE_TEXT_INPUT_ON_INPUT_FILTER_ERROR = 7006 Event triggered when matching with the regular expression specified by NODE_TEXT_INPUT_INPUT_FILTER fails.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_StringAsyncEvent.
ArkUI_StringAsyncEvent contains the following parameter:
ArkUI_StringAsyncEvent.pStr: content that is filtered out when regular expression matching fails.
NODE_TEXT_INPUT_ON_CONTENT_SCROLL = 7007 Called when the text content is scrolled.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: offset in the x-coordinate of the text in the content area.
ArkUI_NodeComponentEvent.data[1].i32: offset in the y-coordinate of the text in the content area.
NODE_TEXT_INPUT_ON_CONTENT_SIZE_CHANGE = 7008 Event triggered when the text input content changes in the TextInput component.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: width of the text.
ArkUI_NodeComponentEvent.data[1].f32: height of the text.
NODE_TEXT_INPUT_ON_WILL_INSERT = 7009 Event triggered when text is about to be entered. When the event callback occurs, the event parameter is ArkUI_NodeEvent.
value.f32 at index 0: position of the text to be inserted; obtained using OH_ArkUI_NodeEvent_GetNumberValue.
buffer at index 0: text to be inserted; obtained using OH_ArkUI_NodeEvent_GetStringValue.
NODE_TEXT_INPUT_ON_DID_INSERT = 7010 Event triggered when input is completed. When the event callback occurs, the event parameter is ArkUI_NodeEvent.
value.f32 at index 0: position of the text inserted; obtained using OH_ArkUI_NodeEvent_GetNumberValue.
buffer at index 0: inserted text; obtained using OH_ArkUI_NodeEvent_GetStringValue.
NODE_TEXT_INPUT_ON_WILL_DELETE = 7011 Event triggered when text is about to be deleted. When the event callback occurs, the event parameter is ArkUI_NodeEvent.
value.f32 at index 0: position of the text to be deleted; obtained using OH_ArkUI_NodeEvent_GetNumberValue.
value.i32: direction for deleting the text, with the index of 1; obtained using OH_ArkUI_NodeEvent_GetNumberValue. The value 0 indicates backward-delete, and 1 indicates forward-delete.
buffer at index 0: text to be deleted; obtained using OH_ArkUI_NodeEvent_GetStringValue.
NODE_TEXT_INPUT_ON_DID_DELETE = 7012 Event triggered when deletion is completed. When the event callback occurs, the event parameter is ArkUI_NodeEvent.
value.f32 at index 0: position of the text deleted; obtained using OH_ArkUI_NodeEvent_GetNumberValue.
value.i32: direction for deleting the text, with the index of 1; obtained using OH_ArkUI_NodeEvent_GetNumberValue. The value 0 indicates backward-delete, and 1 indicates forward-delete.
buffer at index 0: deleted text; obtained using OH_ArkUI_NodeEvent_GetStringValue.
NODE_TEXT_INPUT_ON_CHANGE_WITH_PREVIEW_TEXT = 7013 Event triggered when content (including preview text) changes in the TextInput component. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_TextChangeEvent.
ArkUI_TextChangeEvent contains the following parameters:
ArkUI_TextChangeEvent.pStr: content in the TextInput component.
ArkUI_TextChangeEvent.pExtendStr: content of the preview text in the TextInput component.
ArkUI_TextChangeEvent.number: start position of the preview text in the TextInput component.
Since: 15
NODE_TEXT_INPUT_ON_WILL_CHANGE = 7014 Event triggered when content (including preview text) is about to change in the TextInput component. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_TextChangeEvent.
ArkUI_TextChangeEvent contains the following parameters:
ArkUI_TextChangeEvent.pStr: content in the TextInput component.
ArkUI_TextChangeEvent.pExtendStr: content of the preview text in the TextInput component.
ArkUI_TextChangeEvent.number: start position of the preview text in the TextInput component.
Since: 20
NODE_TEXT_AREA_ON_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_TEXT_AREA = 8000 Called when the input in the text box changes.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_StringAsyncEvent.
ArkUI_StringAsyncEvent contains the following parameter:
ArkUI_StringAsyncEvent.pStr: current text input.
NODE_TEXT_AREA_ON_PASTE = 8001 Event triggered when the paste button on the pasteboard, which displays when the text box is long pressed, is clicked.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_StringAsyncEvent.
ArkUI_StringAsyncEvent contains the following parameter:
ArkUI_StringAsyncEvent.pStr: text that is pasted.
NODE_TEXT_AREA_ON_TEXT_SELECTION_CHANGE = 8002 Event triggered when the text selection position changes.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: start position of the text selection area.
ArkUI_NodeComponentEvent.data[1].i32: end position of the text selection area.
NODE_TEXT_AREA_ON_EDIT_CHANGE = 8003 Called when the input state changes.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: true indicates that text input is in progress.
NODE_TEXT_AREA_ON_SUBMIT = 8004 Event triggered when the Enter key on the keyboard is pressed for the TextArea component. It is not triggered when keyType is ARKUI_ENTER_KEY_TYPE_NEW_LINE.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: type of the Enter key.
NODE_TEXT_AREA_ON_INPUT_FILTER_ERROR = 8005 Event triggered when matching with the regular expression specified by NODE_TEXT_AREA_INPUT_FILTER fails.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_StringAsyncEvent.
ArkUI_StringAsyncEvent contains the following parameter:
ArkUI_StringAsyncEvent.pStr: content that is filtered out when regular expression matching fails.
NODE_TEXT_AREA_ON_CONTENT_SCROLL = 8006 Called when the text content is scrolled.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: offset in the x-coordinate of the text in the content area.
ArkUI_NodeComponentEvent.data[1].i32: offset in the y-coordinate of the text in the content area.
NODE_TEXT_AREA_ON_CONTENT_SIZE_CHANGE = 8007 Event triggered when the text input content changes in the TextArea component.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: width of the text.
ArkUI_NodeComponentEvent.data[1].f32: height of the text.
NODE_TEXT_AREA_ON_WILL_INSERT = 8008 Event triggered when text is about to be entered. When the event callback occurs, the event parameter is ArkUI_NodeEvent.
value.f32: position of the text, with the index of 0; obtained using OH_ArkUI_NodeEvent_GetNumberValue
buffer: string value of the text, with the index of 0; obtained using OH_ArkUI_NodeEvent_GetStringValue.
NODE_TEXT_AREA_ON_DID_INSERT = 8009 Event triggered when input is completed. When the event callback occurs, the event parameter is ArkUI_NodeEvent.
value.f32: position of the text, with the index of 0; obtained using OH_ArkUI_NodeEvent_GetNumberValue
buffer: string value of the text, with the index of 0; obtained using OH_ArkUI_NodeEvent_GetStringValue.
NODE_TEXT_AREA_ON_WILL_DELETE = 8010 Event triggered when text is about to be deleted. When the event callback occurs, the event parameter is ArkUI_NodeEvent.
value.f32: position of the text deleted, with the index of 0; obtained using OH_ArkUI_NodeEvent_GetNumberValue.
value.i32: direction for deleting the text, with the index of 1; obtained using OH_ArkUI_NodeEvent_GetNumberValue. The value 0 indicates backward-delete, and 1 indicates forward-delete.
buffer: string value of the text, with the index of 0; obtained using OH_ArkUI_NodeEvent_GetStringValue.
NODE_TEXT_AREA_ON_DID_DELETE = 8011 Event triggered when deletion is completed. When the event callback occurs, the event parameter is ArkUI_NodeEvent.
value.f32: position of the text deleted, with the index of 0; obtained using OH_ArkUI_NodeEvent_GetNumberValue.
value.i32: direction for deleting the text, with the index of 1; obtained using OH_ArkUI_NodeEvent_GetNumberValue. The value 0 indicates backward-delete, and 1 indicates forward-delete.
buffer: string value of the text, with the index of 0; obtained using OH_ArkUI_NodeEvent_GetStringValue.
NODE_TEXT_AREA_ON_CHANGE_WITH_PREVIEW_TEXT = 8012 Event triggered when content (including preview text) changes in the TextArea component. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_TextChangeEvent.
ArkUI_TextChangeEvent contains the following parameters:
ArkUI_TextChangeEvent.pStr: content in the TextArea component.
ArkUI_TextChangeEvent.pExtendStr: content of the preview text in the TextArea component.
ArkUI_TextChangeEvent.number: start position of the preview text in the TextArea component.
Since: 15
NODE_TEXT_AREA_ON_WILL_CHANGE = 8013 Event triggered when content (including preview text) is about to change in the TextArea component. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_TextChangeEvent.
ArkUI_TextChangeEvent contains the following parameters:
ArkUI_TextChangeEvent.pStr: content in the TextArea component.
ArkUI_TextChangeEvent.pExtendStr: content of the preview text in the TextArea component.
ArkUI_TextChangeEvent.number: start position of the preview text in the TextArea component.
Since: 20
NODE_CHECKBOX_EVENT_ON_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_CHECKBOX = 11000 Event triggered when the selected status of the ARKUI_NODE_CHECKBOX component changes. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent.data[0].i32: 1: selected. 0: not selected.
NODE_DATE_PICKER_EVENT_ON_DATE_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_DATE_PICKER = 13000 Event triggered when a date is selected in the ARKUI_NODE_DATE_PICKER component.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: year of the selected date.
ArkUI_NodeComponentEvent.data[1].i32: month of the selected date. Value range: [0-11].
ArkUI_NodeComponentEvent.data[2].i32: day of the selected date.
NODE_TIME_PICKER_EVENT_ON_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_TIME_PICKER = 14000 Event triggered when time is selected in the ARKUI_NODE_TIME_PICKER component.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: hour of the selected time. Value range: [0-23].
ArkUI_NodeComponentEvent.data[1].i32: minute of the selected time. Value range: [0-59].
NODE_TEXT_PICKER_EVENT_ON_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_TEXT_PICKER = 15000 Event triggered when time is selected in the ARKUI_NODE_TEXT_PICKER component.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0...11].i32: value of the selected item.
NODE_TEXT_PICKER_EVENT_ON_SCROLL_STOP = 15001 Event triggered when text is selected in the ARKUI_NODE_TEXT_PICKER component. This event is triggered when the user stops sliding to select a text item.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0...11].i32: value of the selected item.
Since: 14
NODE_CALENDAR_PICKER_EVENT_ON_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_CALENDAR_PICKER = 16000 Event triggered when a date is selected in the NODE_CALENDAR_PICKER component. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponent.data[0].u32: year of the selected date.
ArkUI_NodeComponent.data[1].u32: month of the selected date.
ArkUI_NodeComponent.data[2].u32: day of the selected date.
NODE_SLIDER_EVENT_ON_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_SLIDER = 17000 Event triggered when the ARKUI_NODE_SLIDER component is dragged or clicked. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32 current slider value.
ArkUI_NodeComponentEvent.data[1].i32: state triggered by the event.
NODE_RADIO_EVENT_ON_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_RADIO = 18000 Event triggered when the ARKUI_NODE_RADIO component is dragged or clicked. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: status of the radio button.
NODE_IMAGE_ANIMATOR_EVENT_ON_START = MAX_NODE_SCOPE_NUM * ARKUI_NODE_IMAGE_ANIMATOR = 19000 Event triggered when the frame-by-frame animation starts to play.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
NODE_IMAGE_ANIMATOR_EVENT_ON_PAUSE = 19001 Event triggered when the frame-by-frame animation playback is paused.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
NODE_IMAGE_ANIMATOR_EVENT_ON_REPEAT = 19002 Event triggered when the frame-by-frame animation playback is repeated.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
NODE_IMAGE_ANIMATOR_EVENT_ON_CANCEL = 19003 Event triggered when the frame-by-frame animation playback returns to the initial state.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
NODE_IMAGE_ANIMATOR_EVENT_ON_FINISH = 19004 Event triggered when the frame-by-frame animation playback is complete or stopped.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
NODE_CHECKBOX_GROUP_EVENT_ON_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_CHECKBOX_GROUP = 21000 Event triggered when the selected state of ARKUI_NODE_CHECKBOX_GROUP or any check box within it changes. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_StringAsyncEvent.
ArkUI_StringAsyncEvent.pStr: Name: name of the selected check box; Status: 0: All check boxes in the group are selected. 1: Some check boxes in the group are selected. 2: No check box in the group is selected.
Since: 15
NODE_TEXT_EDITOR_ON_SELECTION_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_TEXT_EDITOR = 22000 Event triggered when the selection or cursor position in the TextEditor component changes.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: start index of the selection.
ArkUI_NodeComponentEvent.data[1].i32: end index of the selection.
Since: 24
NODE_TEXT_EDITOR_ON_READY = 22001 Event triggered when the TextEditor component is initialized for the first time.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
Since: 24
NODE_TEXT_EDITOR_ON_PASTE = 22002 Event triggered when the TextEditor component pastes content.
The system determines whether to intercept the default behavior of the component based on the return value of the callback function.
You can use OH_ArkUI_NodeEvent_SetReturnNumberValue to set the return value.
value.i32: whether to intercept the default behavior of the component, with the index of 0.
0: not intercept. 1: intercept.
Since: 24
NODE_TEXT_EDITOR_ON_EDITING_CHANGE = 22003 Event triggered when the editing status of the TextEditor component changes.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: editing state of the component.
Since: 24
NODE_TEXT_EDITOR_ON_SUBMIT = 22004 Event triggered when the Enter key on the keyboard is pressed for the TextEditor component.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: type of the Enter key (ArkUI_EnterKeyType).
Since: 24
NODE_TEXT_EDITOR_ON_CUT = 22005 Event triggered when the TextEditor component cuts content.
The system determines whether to intercept the default behavior of the component based on the return value of the callback function.
You can use OH_ArkUI_NodeEvent_SetReturnNumberValue to set the return value.
value.i32: whether to intercept the default behavior of the component, with the index of 0.
0: not intercept. 1: intercept.
Since: 24
NODE_TEXT_EDITOR_ON_COPY = 22006 Event triggered when the TextEditor component copies content.
The system determines whether to intercept the default behavior of the component based on the return value of the callback function.
You can use OH_ArkUI_NodeEvent_SetReturnNumberValue to set the return value.
value.i32: whether to intercept the default behavior of the component, with the index of 0.
0: not intercept. 1: intercept.
Since: 24
NODE_SWIPER_EVENT_ON_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_SWIPER = 1001000 Event triggered when the index of the currently displayed element of ARKUI_NODE_SWIPER changes. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: index of the currently displayed element.
NODE_SWIPER_EVENT_ON_ANIMATION_START = 1001001 Event triggered when the switching animation of ARKUI_NODE_SWIPER starts. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: index of the currently displayed element.
ArkUI_NodeComponentEvent.data[1].i32: index of the target element to switch to.
ArkUI_NodeComponentEvent.data[2].f32: offset of the currently displayed element relative to the start position of the swiper along the main axis.
ArkUI_NodeComponentEvent.data[3].f32: offset of the target element relative to the start position of the swiper along the main axis.
ArkUI_NodeComponentEvent.data[4].f32: hands-off velocity.
NODE_SWIPER_EVENT_ON_ANIMATION_END = 1001002 Event triggered when the switching animation of ARKUI_NODE_SWIPER ends. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: index of the currently displayed element.
ArkUI_NodeComponentEvent.data[1].f32: offset of the currently displayed element relative to the start position of the swiper along the main axis.
NODE_SWIPER_EVENT_ON_GESTURE_SWIPE = 1001003 Event triggered on a frame-by-frame basis when the page is turned by a swipe in ARKUI_NODE_SWIPER. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: index of the currently displayed element.
ArkUI_NodeComponentEvent.data[1].f32: offset of the currently displayed element relative to the start position of the swiper along the main axis.
NODE_SWIPER_EVENT_ON_CONTENT_DID_SCROLL = 1001004 Event triggered when the Swiper page scrolls, which is listened by ARKUI_NODE_SWIPER. Instructions:
1. This API does not work when NODE_SWIPER_DISPLAY_COUNT is set to 'auto'.
2. This API does not work when prevMargin and nextMargin are set in such a way that the Swiper frontend and backend display the same page during loop playback.
3. During page scrolling, the ContentDidScrollCallback callback is invoked for all pages in the viewport on a frame-by-frame basis.
For example, when there are two pages whose subscripts are 0 and 1 in the viewport, two callbacks whose indexes are 0 and 1 are invoked in each frame.
4. When the swipeByGroup parameter of the displayCount attribute is set to true, the callback is invoked
for all pages in a group if any page in the group is within the viewport.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: index of the Swiper component, which is the same as the index in the onChange event.
ArkUI_NodeComponentEvent.data[1].i32: index of a page in the viewport.
ArkUI_NodeComponentEvent.data[2].f32: position of the page relative to the start position of the Swiper component's main axis (start position of the page corresponding to selectedIndex).
ArkUI_NodeComponentEvent.data[3].f32: length of the page in the main axis direction.
NODE_SWIPER_EVENT_ON_SELECTED = 1001005 Event triggered when the selected element changes in the ARKUI_NODE_SWIPER component. This event is triggered in the following scenarios:
1. The page switching animation starts when the user lifts their finger after swiping, and the swipe meets the threshold for page turning.
2. The page is changed using either NODE_SWIPER_INDEX or NODE_SWIPER_SWIPE_TO_INDEX.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: index of the currently selected element.
Since: 18
NODE_SWIPER_EVENT_ON_UNSELECTED = 1001006 Event triggered when the page is switched in the ARKUI_NODE_SWIPER component. This event is triggered when any of the following occurs:
1. The page switching animation starts when the user lifts their finger after swiping, and the swipe meets the threshold for page turning.
2. When the page is changed using either NODE_SWIPER_INDEX or NODE_SWIPER_SWIPE_TO_INDEX.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: index of the element that is about to be hidden.
Since: 18
NODE_SWIPER_EVENT_ON_CONTENT_WILL_SCROLL = 1001007 Event for swipe behavior interception in the ARKUI_NODE_SWIPER component. Usage: The ContentWillScrollCallback callback is triggered before a swipe operation.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: index of the currently displayed element. The value of this parameter is used as the result of the interception event. The value 0 indicates that interception is performed; the value 1 indicates that interception is not performed.
ArkUI_NodeComponentEvent.data[1].i32: index of the target element to switch to.
ArkUI_NodeComponentEvent.data[2].f32: swipe offset per frame. A positive value indicates swiping backward (for example, from index=1 to index=0), and a negative value indicates swiping forward (for example, from index=0 to index=1).
Since: 15
NODE_SWIPER_EVENT_ON_SCROLL_STATE_CHANGED = 1001008 ARKUI_NODE_SWIPER scroll state change event. This event is triggered in the following scenarios:
The Swiper transitions between three scroll states: scrolling with the touch, animating after release, and stopped. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: current scroll state. The parameter type is ArkUI_ScrollState.
Since: 20
NODE_SCROLL_EVENT_ON_SCROLL = MAX_NODE_SCOPE_NUM * ARKUI_NODE_SCROLL = 1002000 Event triggered when scrolling occurs. This event is triggered in the following scenarios:
1. Scrolling is started by the scrollable component (supports keyboard, mouse, and other input methods that trigger scrolling).
2. Scrolling is initiated by calling the controller API.
3. The out-of-bounds bounce effect is active.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: horizontal scrolling offset.
ArkUI_NodeComponentEvent.data[1].f32: vertical scrolling offset.
NODE_SCROLL_EVENT_ON_SCROLL_FRAME_BEGIN = 1002001 Event triggered when each frame scrolling starts in the scrollable component. The List, Scroll, and WaterFlow components are supported since API version 12, and the Grid component is supported since API version 22.
This event is triggered in the following scenarios:
1. This event is triggered when scrolling is started by the scrollable component (supports keyboard, mouse, and other input methods that trigger scrolling).
2. This event is not triggered when the controller API is called.
3. This event does not support the out-of-bounds bounce effect.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: amount to scroll by.
ArkUI_NodeComponentEvent.data[1].i32: current scroll state.
::ArkUI_NodeComponentEvent contains one return value:
ArkUI_NodeComponentEvent.data[0].f32: The event handler can work out the amount by which the component needs to scroll based on the real-world situation and return the result in this parameter.
NODE_SCROLL_EVENT_ON_WILL_SCROLL = 1002002 Event triggered when the container is about to scroll. This event is triggered in the following scenarios:
1. Scrolling is started by the scrollable component (supports keyboard, mouse, and other input methods that trigger scrolling).
2. Scrolling is initiated by calling the controller API.
3. The out-of-bounds bounce effect is active.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: scroll offset of each frame, in vp. The offset is positive when the content is scrolled left and negative when the content is scrolled right.
ArkUI_NodeComponentEvent.data[1].f32: scroll offset of each frame, in vp. The offset is positive when the content is scrolled up and negative when the content is scrolled down.
ArkUI_NodeComponentEvent.data[2].i32: current scroll state. The parameter type is ArkUI_ScrollState.
ArkUI_NodeComponentEvent.data[3].i32: current scroll source. The parameter type is ArkUI_ScrollSource.
NODE_SCROLL_EVENT_ON_DID_SCROLL = 1002003 Event triggered when the container scrolls. This event is triggered in the following scenarios:
1. Scrolling is started by the scrollable component (supports keyboard, mouse, and other input methods that trigger scrolling).
2. Scrolling is initiated by calling the controller API.
3. The out-of-bounds bounce effect is active.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: scroll offset of each frame, in vp. The offset is positive when the content is scrolled left and negative when the content is scrolled right.
ArkUI_NodeComponentEvent.data[1].f32: scroll offset of each frame, in vp. The offset is positive when the content is scrolled up and negative when the content is scrolled down.
ArkUI_NodeComponentEvent.data[2].i32: current scroll state. The parameter type is ArkUI_ScrollState.
NODE_SCROLL_EVENT_ON_SCROLL_START = 1002004 Event triggered when the container starts scrolling. The List, Scroll, and WaterFlow components are supported since API version 12, and the Grid component is supported since API version 22.
This event is triggered in the following scenarios:
1. Scrolling is started by the scrollable component (supports keyboard, mouse, and other input methods that trigger scrolling).
2. The controller API is called to start the scrolling, accompanied by a transition animation.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
NODE_SCROLL_EVENT_ON_SCROLL_STOP = 1002005 Event triggered when the container stops scrolling. The List, Scroll, and WaterFlow components are supported since API version 12, and the Grid component is supported since API version 22.
This event is triggered in the following scenarios:
1. Scrolling is stopped by the scrollable component (supports keyboard, mouse, and other input methods that trigger scrolling).
2. The controller API is called to stop the scrolling, accompanied by a transition animation.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
NODE_SCROLL_EVENT_ON_SCROLL_EDGE = 1002006 Event triggered when the container reaches the scroll boundary. This event is triggered in the following scenarios:
1. Scrolling reaches the edge after being started by the scrollable component (supports keyboard, mouse, and other input methods that trigger scrolling).
2. Scrolling is initiated by calling the controller API.
3. The out-of-bounds bounce effect is active.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: edge (top, bottom, left, or right) that the scrolling reaches.
NODE_SCROLL_EVENT_ON_REACH_START = 1002007 Event triggered when the scrollable component reaches the start edge.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
NODE_SCROLL_EVENT_ON_REACH_END = 1002008 Event triggered when the scrollable component reaches the end edge.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
NODE_SCROLL_EVENT_ON_WILL_STOP_DRAGGING = 1002009 Event triggered when the user is about to release the drag on the scrollable component.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].f32: speed at which the user releases the drag, in vp/s.
Since: 20
NODE_SCROLL_EVENT_ON_DID_ZOOM = 1002010 Scroll component zoom event, triggered at the end of each frame during zooming.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].f32: current zoom scale.
Since: 20
NODE_SCROLL_EVENT_ON_ZOOM_START = 1002011 Scroll component's zoom start event, triggered when zooming begins.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
Since: 20
NODE_SCROLL_EVENT_ON_ZOOM_STOP = 1002012 Scroll component's zoom end event, triggered when zooming ends.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
Since: 20
NODE_SCROLL_EVENT_ON_WILL_START_DRAGGING = 1002013 Event triggered when the user is about to drag the scrollable component.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
Since: 21
NODE_SCROLL_EVENT_ON_DID_STOP_DRAGGING = 1002014 Event triggered when the user ends dragging the scrollable component.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: whether to trigger the sliding animation after the drag ends.
Since: 21
NODE_SCROLL_EVENT_ON_WILL_START_FLING = 1002015 Event triggered when the scrollable component's sliding animation is about to start.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
Since: 21
NODE_SCROLL_EVENT_ON_DID_STOP_FLING = 1002016 Event triggered when the scrollable component's sliding animation ends.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
Since: 21
NODE_LIST_ON_SCROLL_INDEX = MAX_NODE_SCOPE_NUM * ARKUI_NODE_LIST = 1003000 Event triggered when a child component of ARKUI_NODE_LIST enters or leaves the list display area. This event is triggered in the following scenarios:
This event is triggered once when the list is initialized and when the index of the first child component or the last child component in the list display area changes.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: index of the first child component in the list display area.
ArkUI_NodeComponentEvent.data[1].i32: index of the last child component in the list display area.
ArkUI_NodeComponentEvent.data[2].i32: index of the center child component in the list display area.
NODE_LIST_ON_WILL_SCROLL = 1003001 Event triggered when the ARKUI_NODE_LIST component is about to scroll. This event is triggered in the following scenarios:
1. Scrolling is started by the scrollable component (supports keyboard, mouse, and other input methods that trigger scrolling).
2. Scrolling is initiated by calling the controller API.
3. The out-of-bounds bounce effect is active.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: scroll offset of each frame. The offset is positive when the list is scrolled up and negative when the list is scrolled down.
ArkUI_NodeComponentEvent.data[1].i32: current scroll state. The parameter type is ArkUI_ScrollState.
ArkUI_NodeComponentEvent.data[2].i32: current scroll source. The parameter type is ArkUI_ScrollSource.
NODE_LIST_ON_DID_SCROLL = 1003002 Event triggered when the ARKUI_NODE_LIST component scrolls. This event is triggered in the following scenarios:
1. Scrolling is started by the scrollable component (supports keyboard, mouse, and other input methods that trigger scrolling).
2. Scrolling is initiated by calling the controller API.
3. The out-of-bounds bounce effect is active.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: scroll offset of each frame. The offset is positive when the list is scrolled up and negative when the list is scrolled down.
ArkUI_NodeComponentEvent.data[1].i32: current scroll state.
NODE_LIST_ON_SCROLL_VISIBLE_CONTENT_CHANGE = 1003003 Event triggered when the currently displayed content of the ARKUI_NODE_LIST component changes. This event is triggered in the following scenarios:
This event is triggered once when the list is initialized and when the index of the first child component or the last child component in the list display area changes. During trigger condition calculation, header or footer in each ListItem and ListItemGroup is considered as a child component.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: index of the first child component in the list display area.
ArkUI_NodeComponentEvent.data[1].i32: area in the list item group where the list display area starts. The type is ArkUI_ListItemGroupArea.
ArkUI_NodeComponentEvent.data[2].i32: index of the list item at the start of the list display area in the list item group. If the start of the list display area is not on a list item, the value is -1.
ArkUI_NodeComponentEvent.data[3].i32: index of the last child component in the list display area.
ArkUI_NodeComponentEvent.data[4].i32: area in the list item group where the list display area ends. The type is ArkUI_ListItemGroupArea.
ArkUI_NodeComponentEvent.data[5].i32: index of the list item at the end of the list display area in the list item group. If the end of the list display area is not on a list item, the value is -1.
Since: 15
NODE_REFRESH_STATE_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_REFRESH = 1009000 Event triggered when the refresh state of ARKUI_NODE_REFRESH changes. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: refresh state.
0 (Inactive): This is the default status, indicating that the user has not pulled down the list.
1 (Drag): The user is pulling down the list, and the distance between the current position and the top of the list is less than the refresh distance. If the user releases the list at this time, the component enters the Inactive state. If the user continues to pull down the list and the distance between the current position and the top of the list exceeds the refresh distance, the component enters the OverDrag state.
2 (OverDrag): The user is pulling down the list, and the distance between the current position and the top of the list exceeds the refresh distance. If the user releases the list at this time, the component enters the Refresh state. If the user swipes upward and the pull-down distance is less than the refresh distance, the component enters the Drag state.
3 (Refresh): The user has pulled down the list to the refresh distance, and the component enters the Refresh state.
4 (Done): The refresh is complete, and the component returns to the initial state (the top of the list).
NODE_REFRESH_ON_REFRESH = 1009001 Event triggered when ARKUI_NODE_REFRESH enters the refresh state. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent does not contain parameters.
NODE_REFRESH_ON_OFFSET_CHANGE = 1009002 Event triggered when the pull-down distance of ARKUI_NODE_REFRESH changes. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].f32: drop-down distance.
NODE_ON_WILL_SCROLL = MAX_NODE_SCOPE_NUM * ARKUI_NODE_WATER_FLOW = 1010000 Event triggered when the ARKUI_NODE_WATER_FLOW component is about to scroll. This event is triggered in the following scenarios:
1. Scrolling is started by the scrollable component (supports keyboard, mouse, and other input methods that trigger scrolling).
2. Scrolling is initiated by calling the controller API.
3. The out-of-bounds bounce effect is active.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: scroll offset of each frame. The offset is positive when the content is scrolled up and negative when the content is scrolled down.
ArkUI_NodeComponentEvent.data[1].i32: current scroll state. The parameter type is ArkUI_ScrollState.
ArkUI_NodeComponentEvent.data[2].i32: current scroll source. The parameter type is ArkUI_ScrollSource.
NODE_WATER_FLOW_ON_DID_SCROLL = 1010001 Event triggered when the ARKUI_NODE_WATER_FLOW component scrolls. This event is triggered in the following scenarios:
1. Scrolling is started by the scrollable component (supports keyboard, mouse, and other input methods that trigger scrolling).
2. Scrolling is initiated by calling the controller API.
3. The out-of-bounds bounce effect is active.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: scroll offset of each frame. The offset is positive when the content is scrolled up and negative when the content is scrolled down.
ArkUI_NodeComponentEvent.data[1].i32: current scroll state.
NODE_WATER_FLOW_ON_SCROLL_INDEX = 1010002 Event triggered when the first or last item displayed in the water flow container changes in ARKUI_NODE_WATER_FLOW. This event is triggered in the following scenario:
This event is triggered when the index value of the first or last item in the water flow container changes.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: index of the first item of the water flow container.
ArkUI_NodeComponentEvent.data[1].i32: index of the last item of the water flow container.
NODE_GRID_ON_SCROLL_INDEX = MAX_NODE_SCOPE_NUM * ARKUI_NODE_GRID = 1013000 Event triggered when a child component of ARKUI_NODE_GRID enters or leaves the grid display area. This event is triggered in the following scenarios:
This event is triggered once when the grid is initialized and when the index of the first or last child component in the grid display area changes.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].i32: index of the first child component in the grid display area.
ArkUI_NodeComponentEvent.data[1].i32: index of the last child component in the grid display area.
Since: 22
NODE_GRID_ON_WILL_SCROLL = 1013001 Event triggered when the ARKUI_NODE_GRID component is about to scroll. This event is triggered in the following scenarios:
1. Scrolling is started by the scrollable component (supports keyboard, mouse, and other input methods that trigger scrolling).
2. Scrolling is initiated by calling the controller API.
3. The out-of-bounds bounce effect is active.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: scroll offset of each frame. The offset is positive when the content is scrolled up in the grid and negative when the content is scrolled down.
ArkUI_NodeComponentEvent.data[1].i32: current scroll state. The parameter type is ArkUI_ScrollState.
ArkUI_NodeComponentEvent.data[2].i32: current scroll source. The parameter type is ArkUI_ScrollSource.
Since: 22
NODE_GRID_ON_DID_SCROLL = 1013002 Event triggered when the ARKUI_NODE_GRID component scrolls. This event is triggered in the following scenarios:
1. Scrolling is started by the scrollable component (supports keyboard, mouse, and other input methods that trigger scrolling).
2. Scrolling is initiated by calling the controller API.
3. The out-of-bounds bounce effect is active.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: scroll offset of each frame. The offset is positive when the content is scrolled up in the grid and negative when the content is scrolled down.
ArkUI_NodeComponentEvent.data[1].i32: current scroll state. The parameter type is ArkUI_ScrollState.
Since: 22
NODE_GRID_ON_SCROLL_BAR_UPDATE = 1013003 Event triggered at the end of each frame layout of the ARKUI_NODE_GRID component, which is used to set the position and length of the scrollbar.
When the event callback occurs, the event parameter is ArkUI_NodeEvent. value.i32 at index 0: index of the first item in the currently displayed grid; obtained using OH_ArkUI_NodeEvent_GetNumberValue.
value.f32 at index 1: offset of the item at the starting position of the currently displayed grid relative to the starting position of the grid display, in vp; obtained using OH_ArkUI_NodeEvent_GetNumberValue.
Since: 22
NODE_GRID_ON_ITEM_DRAG_START = 1013004 ARKUI_NODE_GRID component's child drag start event.
This event is triggered in the following scenarios:
1. NODE_GRID_EDIT_MODE is set to 1.
2. A user long-presses and drags a Grid child component with sufficient displacement.
When the event callback occurs, the event parameter is ArkUI_NodeEvent.
value.f32 at index 0: X coordinate of the current drag point relative to the Grid component, in vp; obtained by calling OH_ArkUI_NodeEvent_GetNumberValue.
value.f32 at index 1: Y coordinate of the current drag point relative to the Grid component, in vp; obtained by calling OH_ArkUI_NodeEvent_GetNumberValue.
value.i32 at index 2: index of the dragged child component in the Grid component; obtained by calling OH_ArkUI_NodeEvent_GetNumberValue.
You can set the return value using OH_ArkUI_NodeEvent_SetReturnNumberValue.
value.i32 at index 0 in the return value indicates whether dragging is allowed. 0: not allowed. 1: allowed.
Since: 23
NODE_GRID_ON_ITEM_DRAG_ENTER = 1013005 Event triggered when a dragged child component enters this Grid component's area.
This event is triggered in the following scenario:
This event is triggered when a child component is successfully dragged by NODE_GRID_ON_ITEM_DRAG_START into the current Grid component's area.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: X coordinate of the current drag point relative to the Grid component, in vp.
ArkUI_NodeComponentEvent.data[1].f32: Y coordinate of the current drag point relative to the Grid component, in vp.
Since: 23
NODE_GRID_ON_ITEM_DRAG_MOVE = 1013006 Event triggered when a dragged child component moves within this Grid component's area.
This event is triggered in the following scenario:
This event is triggered when a child component is successfully dragged by NODE_GRID_ON_ITEM_DRAG_START into the current Grid component's area.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: X coordinate of the current drag point relative to the Grid component, in vp.
ArkUI_NodeComponentEvent.data[1].f32: Y coordinate of the current drag point relative to the Grid component, in vp.
ArkUI_NodeComponentEvent.data[2].i32: index of the dragged child component in the source Grid component.
ArkUI_NodeComponentEvent.data[3].i32: index of the dragged child component in the current Grid component.
Since: 23
NODE_GRID_ON_ITEM_DRAG_LEAVE = 1013007 Event triggered when a dragged child component leaves this Grid component's area.
This event is triggered in the following scenario:
This event is triggered when a child component successfully dragged using NODE_GRID_ON_ITEM_DRAG_START leaves the current Grid component's area.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: X coordinate of the current drag point relative to the Grid component, in vp.
ArkUI_NodeComponentEvent.data[1].f32: Y coordinate of the current drag point relative to the Grid component, in vp.
ArkUI_NodeComponentEvent.data[2].i32: index of the dragged child component in the source Grid component.
Since: 23
NODE_GRID_ON_ITEM_DROP = 1013008 Event triggered when a dragged child component is released.
This event is triggered in the following scenario:
This event is triggered when a child component successfully dragged using NODE_GRID_ON_ITEM_DRAG_START is released.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameters:
ArkUI_NodeComponentEvent.data[0].f32: X coordinate of the current drag point relative to the Grid component, in vp.
ArkUI_NodeComponentEvent.data[1].f32: Y coordinate of the current drag point relative to the Grid component, in vp.
ArkUI_NodeComponentEvent.data[2].i32: index of the dragged child component in the source Grid component.
ArkUI_NodeComponentEvent.data[3].i32: index of the dragged child component in the current Grid component.
ArkUI_NodeComponentEvent.data[4].i32: whether the dragged child component is successfully released within the Grid component's area. 1: within the Grid component's area. 0: outside the Grid component's area.
Since: 23
NODE_GRID_ITEM_ON_SELECT = MAX_NODE_SCOPE_NUM * ARKUI_NODE_GRID_ITEM = 1014000 Selected state change event of the ARKUI_NODE_GRID_ITEM component.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: 0 (not selected) or 1 (selected).
Since: 23
NODE_PICKER_EVENT_ON_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_PICKER Event triggered when an item is selected in the Picker container.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: value of the selected item.
Since: 23
NODE_PICKER_EVENT_ON_SCROLL_STOP = 1018001 Event triggered when an item is selected in the Picker container and the scrolling stops.
When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.
ArkUI_NodeComponentEvent contains the following parameter:
ArkUI_NodeComponentEvent.data[0].i32: value of the selected item.
Since: 23

ArkUI_NodeDirtyFlag

enum ArkUI_NodeDirtyFlag

Description

Enumerates the flags passed to indicate the need to re-execute measurement, layout, or rendering when a custom component calls the ::markDirty API.

Since: 12

Value Description
NODE_NEED_MEASURE = 1 Remeasure. When this type of flag is specified, re-layout is triggered by default.
NODE_NEED_LAYOUT = 2 Re-layout.
NODE_NEED_RENDER = 3 Re-rendering.

ArkUI_NodeCustomEventType

enum ArkUI_NodeCustomEventType

Description

Enumerates the custom component event types.

Since: 12

Value Description
ARKUI_NODE_CUSTOM_EVENT_ON_MEASURE = 1 << 0 Custom measurement.
ARKUI_NODE_CUSTOM_EVENT_ON_LAYOUT = 1 << 1 Custom layout.
ARKUI_NODE_CUSTOM_EVENT_ON_DRAW = 1 << 2 Custom content layer drawing.
ARKUI_NODE_CUSTOM_EVENT_ON_FOREGROUND_DRAW = 1 << 3 Custom foreground drawing.
ARKUI_NODE_CUSTOM_EVENT_ON_OVERLAY_DRAW = 1 << 4 Custom overlay drawing.
ARKUI_NODE_CUSTOM_EVENT_ON_DRAW_FRONT = 1 << 5 Custom content layer foreground drawing.
Since: 20
ARKUI_NODE_CUSTOM_EVENT_ON_DRAW_BEHIND = 1 << 6 Custom content layer background drawing.
Since: 20

ArkUI_NodeAdapterEventType

enum ArkUI_NodeAdapterEventType

Description

Enumerates node adapter events.

Since: 12

Value Description
NODE_ADAPTER_EVENT_WILL_ATTACH_TO_NODE = 1 This event occurs when the component is attached to the adapter.
NODE_ADAPTER_EVENT_WILL_DETACH_FROM_NODE = 2 This event occurs when the component is detached from the adapter.
NODE_ADAPTER_EVENT_ON_GET_NODE_ID = 3 This event occurs when the adapter obtains the unique ID of the new element to add.
NODE_ADAPTER_EVENT_ON_ADD_NODE_TO_ADAPTER = 4 This event occurs when the adapter obtains the content of the new element to add.
NODE_ADAPTER_EVENT_ON_REMOVE_NODE_FROM_ADAPTER = 5 This event occurs when the adapter removes an element.

ArkUI_NodeContentEventType

enum ArkUI_NodeContentEventType

Description

Enumerates the event types for NodeContent.

Since: 12

Value Description
NODE_CONTENT_EVENT_ON_ATTACH_TO_WINDOW = 0 Attach event.
NODE_CONTENT_EVENT_ON_DETACH_FROM_WINDOW = 1 Detach event.

ArkUI_InspectorErrorCode

enum ArkUI_InspectorErrorCode

Description

Enumerates the inspector error codes.

Since: 15

Value Description
ARKUI_INSPECTOR_NATIVE_RESULT_SUCCESSFUL = 0 Operation successful.
ARKUI_INSPECTOR_NATIVE_RESULT_BAD_PARAMETER = -1 Parameter error.

Function Description

OH_ArkUI_NodeEvent_GetEventType()

ArkUI_NodeEventType OH_ArkUI_NodeEvent_GetEventType(ArkUI_NodeEvent* event)

Description

Obtains the type of a component event.

Since: 12

Parameters

Name Description
ArkUI_NodeEvent* event Pointer to the component event.

Return value

Type Description
ArkUI_NodeEventType Returns the type of the component event.

OH_ArkUI_NodeEvent_GetTargetId()

int32_t OH_ArkUI_NodeEvent_GetTargetId(ArkUI_NodeEvent* event)

Description

Obtains the custom ID of a component event. The event ID is passed in as a parameter when the registerNodeEvent function is called and can be applied to the dispatch logic of the same event entry point function registerNodeEventReceiver.

Since: 12

Parameters

Name Description
ArkUI_NodeEvent* event Pointer to the component event.

Return value

Type Description
int32_t Custom ID of the component event.

OH_ArkUI_NodeEvent_GetNodeHandle()

ArkUI_NodeHandle OH_ArkUI_NodeEvent_GetNodeHandle(ArkUI_NodeEvent* event)

Description

Obtains the component object that triggers an event.

Since: 12

Parameters

Name Description
ArkUI_NodeEvent* event Pointer to the component event.

Return value

Type Description
ArkUI_NodeHandle Component object that triggers the event.

OH_ArkUI_NodeEvent_GetInputEvent()

ArkUI_UIInputEvent* OH_ArkUI_NodeEvent_GetInputEvent(ArkUI_NodeEvent* event)

Description

Obtains input event (for example, touch event) data for a component event.

Since: 12

Parameters

Name Description
ArkUI_NodeEvent* event Pointer to the component event.

Return value

Type Description
ArkUI_UIInputEvent* Pointer to the input event data.

OH_ArkUI_NodeEvent_GetNodeComponentEvent()

ArkUI_NodeComponentEvent* OH_ArkUI_NodeEvent_GetNodeComponentEvent(ArkUI_NodeEvent* event)

Description

Obtains the numerical data in a component event.

Since: 12

Parameters

Name Description
ArkUI_NodeEvent* event Pointer to the component event.

Return value

Type Description
ArkUI_NodeComponentEvent* Pointer to the numerical data.

OH_ArkUI_NodeEvent_GetStringAsyncEvent()

ArkUI_StringAsyncEvent* OH_ArkUI_NodeEvent_GetStringAsyncEvent(ArkUI_NodeEvent* event)

Description

Obtains the string data in a component event.

Since: 12

Parameters

Name Description
ArkUI_NodeEvent* event Pointer to the component event.

Return value

Type Description
ArkUI_StringAsyncEvent* Pointer to the string data.

OH_ArkUI_NodeEvent_GetTextChangeEvent()

ArkUI_TextChangeEvent* OH_ArkUI_NodeEvent_GetTextChangeEvent(ArkUI_NodeEvent* event)

Description

Obtains the ArkUI_TextChangeEvent data from the specified component event.

Since: 15

Parameters

Name Description
ArkUI_NodeEvent* event Pointer to a component event. It cannot be null.

Return value

Type Description
ArkUI_TextChangeEvent* Pointer to the ArkUI_TextChangeEvent object.

OH_ArkUI_NodeEvent_GetUserData()

void* OH_ArkUI_NodeEvent_GetUserData(ArkUI_NodeEvent* event)

Description

Obtains the custom data in a component event. This parameter is passed in registerNodeEvent and can be applied to the service logic when the event is triggered.

Since: 12

Parameters

Name Description
ArkUI_NodeEvent* event Pointer to the component event.

Return value

Type Description
void* Pointer to user data.

OH_ArkUI_NodeEvent_GetNumberValue()

int32_t OH_ArkUI_NodeEvent_GetNumberValue(ArkUI_NodeEvent* event, int32_t index, ArkUI_NumberValue* value)

Description

Obtains the numeric-type parameter of a component event.

Since: 12

Parameters

Name Description
ArkUI_NodeEvent* event Pointer to the component event.
int32_t index Return value index.
ArkUI_NumberValue* value Return value.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INDEX_OUT_OF_RANGE if the parameter length in the parameter event exceeds the limit.
Returns ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INVALID if the data does not exist in the component event.

OH_ArkUI_NodeEvent_GetStringValue()

int32_t OH_ArkUI_NodeEvent_GetStringValue(ArkUI_NodeEvent* event, int32_t index, char** string, int32_t* stringSize)

Description

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.

Since: 12

Parameters

Name Description
ArkUI_NodeEvent* event Pointer to the component event.
int32_t index Return value index.
char** string Pointer to the string array.
int32_t* stringSize Length of the string array.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INDEX_OUT_OF_RANGE if the parameter length in the parameter event exceeds the limit.
Returns ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INVALID if the data does not exist in the component event.

OH_ArkUI_NodeEvent_SetReturnNumberValue()

int32_t OH_ArkUI_NodeEvent_SetReturnNumberValue(ArkUI_NodeEvent* event, ArkUI_NumberValue* value, int32_t size)

Description

Sets the return value for a component event.

Since: 12

Parameters

Name Description
ArkUI_NodeEvent* event Pointer to the component event.
ArkUI_NumberValue* value Event numeric type array.
int32_t size Length of the array.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INVALID if the data does not exist in the component event.

OH_ArkUI_NodeAdapter_Create()

ArkUI_NodeAdapterHandle OH_ArkUI_NodeAdapter_Create()

Description

Creates a component adapter.

Since: 12

Return value

Type Description
ArkUI_NodeAdapterHandle Component adapter object.

OH_ArkUI_NodeAdapter_Dispose()

void OH_ArkUI_NodeAdapter_Dispose(ArkUI_NodeAdapterHandle handle)

Description

Disposes of a component adapter.

Since: 12

Parameters

Name Description
ArkUI_NodeAdapterHandle handle Component adapter object.

OH_ArkUI_NodeAdapter_SetTotalNodeCount()

int32_t OH_ArkUI_NodeAdapter_SetTotalNodeCount(ArkUI_NodeAdapterHandle handle, uint32_t size)

Description

Sets the total number of elements in the specified adapter.

Since: 12

Parameters

Name Description
ArkUI_NodeAdapterHandle handle Component adapter object.
uint32_t size Number of elements.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeAdapter_GetTotalNodeCount()

uint32_t OH_ArkUI_NodeAdapter_GetTotalNodeCount(ArkUI_NodeAdapterHandle handle)

Description

Obtains the total number of elements in the specified adapter.

Since: 12

Parameters

Name Description
ArkUI_NodeAdapterHandle handle Component adapter object.

Return value

Type Description
uint32_t Total number of elements in the adapter.

OH_ArkUI_NodeAdapter_RegisterEventReceiver()

int32_t OH_ArkUI_NodeAdapter_RegisterEventReceiver(
ArkUI_NodeAdapterHandle handle, void* userData, void (*receiver)(ArkUI_NodeAdapterEvent* event))

Description

Registers an event callback for the specified adapter. After the callback event is no longer needed, you need to call OH_ArkUI_NodeAdapter_UnregisterEventReceiver to deregister the callback event.

Since: 12

Parameters

Name Description
ArkUI_NodeAdapterHandle handle Component adapter object.
void* userData Custom data.
receiver Event receiving callback.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeAdapter_UnregisterEventReceiver()

void OH_ArkUI_NodeAdapter_UnregisterEventReceiver(ArkUI_NodeAdapterHandle handle)

Description

Unregisters an event callback for the specified adapter.

Since: 12

Parameters

Name Description
ArkUI_NodeAdapterHandle handle Component adapter object.

OH_ArkUI_NodeAdapter_ReloadAllItems()

int32_t OH_ArkUI_NodeAdapter_ReloadAllItems(ArkUI_NodeAdapterHandle handle)

Description

Instructs the specified adapter to reload all elements.

Since: 12

Parameters

Name Description
ArkUI_NodeAdapterHandle handle Component adapter object.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeAdapter_ReloadItem()

int32_t OH_ArkUI_NodeAdapter_ReloadItem(
ArkUI_NodeAdapterHandle handle, uint32_t startPosition, uint32_t itemCount)

Description

Instructs the specified adapter to reload certain elements.

Since: 12

Parameters

Name Description
ArkUI_NodeAdapterHandle handle Component adapter object.
uint32_t startPosition Start position of an element change.
uint32_t itemCount Number of changed elements.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ERROR_CODE_NATIVE_IMPL_NODE_ADAPTER_NO_LISTENER_ERROR if the NodeAdapter requires a listener to be added.

OH_ArkUI_NodeAdapter_RemoveItem()

int32_t OH_ArkUI_NodeAdapter_RemoveItem(
ArkUI_NodeAdapterHandle handle, uint32_t startPosition, uint32_t itemCount)

Description

Instructs the specified adapter to remove certain elements.

Since: 12

Parameters

Name Description
ArkUI_NodeAdapterHandle handle Component adapter object.
uint32_t startPosition Start position for deleting an element.
uint32_t itemCount Number of deleted elements.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ERROR_CODE_NATIVE_IMPL_NODE_ADAPTER_NO_LISTENER_ERROR if the NodeAdapter requires a listener to be added.

OH_ArkUI_NodeAdapter_InsertItem()

int32_t OH_ArkUI_NodeAdapter_InsertItem(
ArkUI_NodeAdapterHandle handle, uint32_t startPosition, uint32_t itemCount)

Description

Instructs the specified adapter to insert certain elements.

Since: 12

Parameters

Name Description
ArkUI_NodeAdapterHandle handle Component adapter object.
uint32_t startPosition Start position for inserting an element.
uint32_t itemCount Number of inserted elements.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ERROR_CODE_NATIVE_IMPL_NODE_ADAPTER_NO_LISTENER_ERROR if the NodeAdapter requires a listener to be added.

OH_ArkUI_NodeAdapter_MoveItem()

int32_t OH_ArkUI_NodeAdapter_MoveItem(ArkUI_NodeAdapterHandle handle, uint32_t from, uint32_t to)

Description

Instructs the specified adapter to move certain elements.

Since: 12

Parameters

Name Description
ArkUI_NodeAdapterHandle handle Component adapter object.
uint32_t from Start position of the element shift.
uint32_t to End position of the element shift.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ERROR_CODE_NATIVE_IMPL_NODE_ADAPTER_NO_LISTENER_ERROR if the NodeAdapter requires a listener to be added.

OH_ArkUI_NodeAdapter_GetAllItems()

int32_t OH_ArkUI_NodeAdapter_GetAllItems(ArkUI_NodeAdapterHandle handle, ArkUI_NodeHandle** items, uint32_t* size)

Description

Obtains all elements stored in the specified adapter. When the API is called, the array object pointer of the element is returned. You must release the memory data to which the pointer points.

Since: 12

Parameters

Name Description
ArkUI_NodeAdapterHandle handle Component adapter object.
ArkUI_NodeHandle** items Array of nodes in the adapter.
uint32_t* size Number of elements.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ERROR_CODE_NATIVE_IMPL_NODE_ADAPTER_NO_LISTENER_ERROR if the NodeAdapter requires a listener to be added.

OH_ArkUI_NodeAdapterEvent_GetUserData()

void* OH_ArkUI_NodeAdapterEvent_GetUserData(ArkUI_NodeAdapterEvent* event)

Description

Obtains the custom data passed in during registration of the specified event.

Since: 12

Parameters

Name Description
ArkUI_NodeAdapterEvent* event Adapter event object.

Return value

Type Description
void* Pointer to custom data.

OH_ArkUI_NodeAdapterEvent_GetType()

ArkUI_NodeAdapterEventType OH_ArkUI_NodeAdapterEvent_GetType(ArkUI_NodeAdapterEvent* event)

Description

Obtains the event type.

Since: 12

Parameters

Name Description
ArkUI_NodeAdapterEvent* event Adapter event object.

Return value

Type Description
ArkUI_NodeAdapterEventType Event type.

OH_ArkUI_NodeAdapterEvent_GetRemovedNode()

ArkUI_NodeHandle OH_ArkUI_NodeAdapterEvent_GetRemovedNode(ArkUI_NodeAdapterEvent* event)

Description

Obtains the element to be removed for the event to be destroyed.

Since: 12

Parameters

Name Description
ArkUI_NodeAdapterEvent* event Adapter event object.

Return value

Type Description
ArkUI_NodeHandle Element to be destroyed.

OH_ArkUI_NodeAdapterEvent_GetItemIndex()

uint32_t OH_ArkUI_NodeAdapterEvent_GetItemIndex(ArkUI_NodeAdapterEvent* event)

Description

Obtains the index of the element to be operated for the specified adapter event.

Since: 12

Parameters

Name Description
ArkUI_NodeAdapterEvent* event Adapter event object.

Return value

Type Description
uint32_t Sequence number of an element.

OH_ArkUI_NodeAdapterEvent_GetHostNode()

ArkUI_NodeHandle OH_ArkUI_NodeAdapterEvent_GetHostNode(ArkUI_NodeAdapterEvent* event)

Description

Obtains the scrollable container node that uses the specified adapter.

Since: 12

Parameters

Name Description
ArkUI_NodeAdapterEvent* event Adapter event object.

Return value

Type Description
ArkUI_NodeHandle Returns the scrollable container node that uses the specified adapter.

OH_ArkUI_NodeAdapterEvent_SetItem()

int32_t OH_ArkUI_NodeAdapterEvent_SetItem(ArkUI_NodeAdapterEvent* event, ArkUI_NodeHandle node)

Description

Sets the component to be added to the specified adapter.

Since: 12

Parameters

Name Description
ArkUI_NodeAdapterEvent* event Adapter event object.
ArkUI_NodeHandle node Component to be added.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeAdapterEvent_SetNodeId()

int32_t OH_ArkUI_NodeAdapterEvent_SetNodeId(ArkUI_NodeAdapterEvent* event, int32_t id)

Description

Sets the component ID to be generated.

Since: 12

Parameters

Name Description
ArkUI_NodeAdapterEvent* event Adapter event object.
int32_t id Returned component ID.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeCustomEvent_GetLayoutConstraintInMeasure()

ArkUI_LayoutConstraint* OH_ArkUI_NodeCustomEvent_GetLayoutConstraintInMeasure(ArkUI_NodeCustomEvent* event)

Description

Obtains the size constraint for measurement through a custom component event.

Since: 12

Parameters

Name Description
ArkUI_NodeCustomEvent* event Pointer to the custom component event.

Return value

Type Description
ArkUI_LayoutConstraint* Pointer to the constraint size.

OH_ArkUI_NodeCustomEvent_GetPositionInLayout()

ArkUI_IntOffset OH_ArkUI_NodeCustomEvent_GetPositionInLayout(ArkUI_NodeCustomEvent* event)

Description

Obtains the expected position of a component relative to its parent component in the layout phase through a custom component event.

Since: 12

Parameters

Name Description
ArkUI_NodeCustomEvent* event Pointer to the custom component event.

Return value

Type Description
ArkUI_IntOffset Expected position relative to the parent component.

OH_ArkUI_NodeCustomEvent_GetDrawContextInDraw()

ArkUI_DrawContext* OH_ArkUI_NodeCustomEvent_GetDrawContextInDraw(ArkUI_NodeCustomEvent* event)

Description

Obtains the drawing context through a custom component event.

Since: 12

Parameters

Name Description
ArkUI_NodeCustomEvent* event Pointer to the custom component event.

Return value

Type Description
ArkUI_DrawContext* Drawing context.

OH_ArkUI_NodeCustomEvent_GetEventTargetId()

int32_t OH_ArkUI_NodeCustomEvent_GetEventTargetId(ArkUI_NodeCustomEvent* event)

Description

Obtains the ID of a custom component event.

Since: 12

Parameters

Name Description
ArkUI_NodeCustomEvent* event Pointer to the custom component event.

Return value

Type Description
int32_t Returns the custom event ID.

OH_ArkUI_NodeCustomEvent_GetUserData()

void* OH_ArkUI_NodeCustomEvent_GetUserData(ArkUI_NodeCustomEvent* event)

Description

Obtains custom event parameters through a custom component event.

Since: 12

Parameters

Name Description
ArkUI_NodeCustomEvent* event Pointer to the custom component event.

Return value

Type Description
void* Custom event.

OH_ArkUI_NodeCustomEvent_GetNodeHandle()

ArkUI_NodeHandle OH_ArkUI_NodeCustomEvent_GetNodeHandle(ArkUI_NodeCustomEvent* event)

Description

Obtains a component object through a custom component event.

Since: 12

Parameters

Name Description
ArkUI_NodeCustomEvent* event Pointer to the custom component event.

Return value

Type Description
ArkUI_NodeHandle Returns the obtained component object.

OH_ArkUI_NodeCustomEvent_GetEventType()

ArkUI_NodeCustomEventType OH_ArkUI_NodeCustomEvent_GetEventType(ArkUI_NodeCustomEvent* event)

Description

Obtains the event type through a custom component event.

Since: 12

Parameters

Name Description
ArkUI_NodeCustomEvent* event Pointer to the custom component event.

Return value

Type Description
ArkUI_NodeCustomEventType Returns the type of the custom component event.

OH_ArkUI_NodeCustomEvent_GetCustomSpanMeasureInfo()

int32_t OH_ArkUI_NodeCustomEvent_GetCustomSpanMeasureInfo(ArkUI_NodeCustomEvent* event, ArkUI_CustomSpanMeasureInfo* info)

Description

Obtains the measurement information of a custom span through a custom component event.

Since: 12

Parameters

Name Description
ArkUI_NodeCustomEvent* event Pointer to the custom component event.
ArkUI_CustomSpanMeasureInfo* info Measurement information to obtain.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
A possible cause is that mandatory parameters are left unspecified.

OH_ArkUI_NodeCustomEvent_SetCustomSpanMetrics()

int32_t OH_ArkUI_NodeCustomEvent_SetCustomSpanMetrics(ArkUI_NodeCustomEvent* event, ArkUI_CustomSpanMetrics* metrics)

Description

Sets the measurement metrics of a custom span through a custom component event.

Since: 12

Parameters

Name Description
ArkUI_NodeCustomEvent* event Pointer to the custom component event.
ArkUI_CustomSpanMetrics* metrics Measurement metrics to obtain.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
A possible cause is that mandatory parameters are left unspecified.

OH_ArkUI_NodeCustomEvent_GetCustomSpanDrawInfo()

int32_t OH_ArkUI_NodeCustomEvent_GetCustomSpanDrawInfo(ArkUI_NodeCustomEvent* event, ArkUI_CustomSpanDrawInfo* info)

Description

Obtains the drawing information of a custom span through a custom component event.

Since: 12

Parameters

Name Description
ArkUI_NodeCustomEvent* event Pointer to the custom component event.
ArkUI_CustomSpanDrawInfo* info Drawing information to obtain.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
A possible cause is that mandatory parameters are left unspecified.

ArkUI_NodeContentCallback()

typedef void (*ArkUI_NodeContentCallback)(ArkUI_NodeContentEvent* event)

Description

Defines a callback for the NodeContent event.

Since: 12

Parameters

Name Description
ArkUI_NodeContentEvent* event Pointer to the NodeContent event.

OH_ArkUI_NodeContent_RegisterCallback()

int32_t OH_ArkUI_NodeContent_RegisterCallback(ArkUI_NodeContentHandle content, ArkUI_NodeContentCallback callback)

Description

Registers an event callback for the NodeContent.

Since: 12

Parameters

Name Description
ArkUI_NodeContentHandle content NodeContent object for which an event needs to be registered.
ArkUI_NodeContentCallback callback Callback to be executed when the event is triggered.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeContentEvent_GetEventType()

ArkUI_NodeContentEventType OH_ArkUI_NodeContentEvent_GetEventType(ArkUI_NodeContentEvent* event)

Description

Obtains the type of the specified NodeContent event.

Since: 12

Parameters

Name Description
ArkUI_NodeContentEvent* event Pointer to the NodeContent event.

Return value

Type Description
ArkUI_NodeContentEventType NodeContent event type.

OH_ArkUI_NodeContentEvent_GetNodeContentHandle()

ArkUI_NodeContentHandle OH_ArkUI_NodeContentEvent_GetNodeContentHandle(ArkUI_NodeContentEvent* event)

Description

Obtains the object that triggers the specified NodeContent event.

Since: 12

Parameters

Name Description
ArkUI_NodeContentEvent* event Pointer to the NodeContent event.

Return value

Type Description
ArkUI_NodeContentHandle NodeContent object that triggers the event.

OH_ArkUI_NodeContent_SetUserData()

int32_t OH_ArkUI_NodeContent_SetUserData(ArkUI_NodeContentHandle content, void* userData)

Description

Saves custom data to the specified NodeContent object.

Since: 12

Parameters

Name Description
ArkUI_NodeContentHandle content NodeContent object whose user-defined data needs to be saved.
void* userData User-defined data to be saved.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeContent_GetUserData()

void* OH_ArkUI_NodeContent_GetUserData(ArkUI_NodeContentHandle content)

Description

Obtains the custom data saved on the specified NodeContent object.

Since: 12

Parameters

Name Description
ArkUI_NodeContentHandle content NodeContent object whose user-defined data needs to be saved.

Return value

Type Description
void* Custom data.

OH_ArkUI_NodeContent_AddNode()

int32_t OH_ArkUI_NodeContent_AddNode(ArkUI_NodeContentHandle content, ArkUI_NodeHandle node)

Description

Adds an ArkUI component node to the specified NodeContent object.

Since: 12

Parameters

Name Description
ArkUI_NodeContentHandle content NodeContent object to which a node is to be added.
ArkUI_NodeHandle node Node to be added.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_NODE_IS_ADOPTED if a child node has been accepted. This specification is supported since API version 22.

OH_ArkUI_NodeContent_RemoveNode()

int32_t OH_ArkUI_NodeContent_RemoveNode(ArkUI_NodeContentHandle content, ArkUI_NodeHandle node)

Description

Removes an ArkUI component node from the specified NodeContent object.

Since: 12

Parameters

Name Description
ArkUI_NodeContentHandle content NodeContent object of the node to be deleted.
ArkUI_NodeHandle node Node to be deleted.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeContent_InsertNode()

int32_t OH_ArkUI_NodeContent_InsertNode(ArkUI_NodeContentHandle content, ArkUI_NodeHandle node, int32_t position)

Description

Inserts an ArkUI component node into a specific position of the specified NodeContent object.

Since: 12

Parameters

Name Description
ArkUI_NodeContentHandle content NodeContent object of the node to be inserted.
ArkUI_NodeHandle node Node to be inserted.
int32_t position Start time for an asset to be inserted,

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_NODE_IS_ADOPTED if a child node has been accepted. This specification is supported since API version 22.

OH_ArkUI_NodeUtils_GetLayoutSize()

int32_t OH_ArkUI_NodeUtils_GetLayoutSize(ArkUI_NodeHandle node, ArkUI_IntSize* size)

Description

Obtains the layout area size of the component. The size does not count in transformation attributes, such as scale.

Since: 12

Parameters

Name Description
ArkUI_NodeHandle node Pointer to ArkUI_NodeHandle.
ArkUI_IntSize* size Size of the layout area, in px.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeUtils_GetLayoutPosition()

int32_t OH_ArkUI_NodeUtils_GetLayoutPosition(ArkUI_NodeHandle node, ArkUI_IntOffset* localOffset)

Description

Obtains the position of the component's layout area relative to its parent component. The relative position does not count in transformation attributes, such as translate.

Since: 12

Parameters

Name Description
ArkUI_NodeHandle node Pointer to ArkUI_NodeHandle.
ArkUI_IntOffset* localOffset Offset of the component handle relative to the parent component, in px.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeUtils_GetLayoutPositionInWindow()

int32_t OH_ArkUI_NodeUtils_GetLayoutPositionInWindow(ArkUI_NodeHandle node, ArkUI_IntOffset* globalOffset)

Description

Obtains the position of the component's layout area relative to the window. The relative position does not count in transformation attributes, such as translate.

Since: 12

Parameters

Name Description
ArkUI_NodeHandle node Pointer to ArkUI_NodeHandle.
ArkUI_IntOffset* globalOffset Offset of the component handle relative to the window, in px.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeUtils_GetLayoutPositionInScreen()

int32_t OH_ArkUI_NodeUtils_GetLayoutPositionInScreen(ArkUI_NodeHandle node, ArkUI_IntOffset* screenOffset)

Description

Obtains the position of the component's layout area relative to the screen. The relative position does not count in transformation attributes, such as translate.

Since: 12

Parameters

Name Description
ArkUI_NodeHandle node Pointer to ArkUI_NodeHandle.
ArkUI_IntOffset* screenOffset Offset of the component handle relative to the screen, in px.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeUtils_GetLayoutPositionInGlobalDisplay()

int32_t OH_ArkUI_NodeUtils_GetLayoutPositionInGlobalDisplay(ArkUI_NodeHandle node, ArkUI_IntOffset* offset)

Description

Obtains the offset of the specified component relative to the global display. The relative position does not count in transformation attributes, such as translate.

Since: 20

Parameters

Name Description
ArkUI_NodeHandle node Pointer to ArkUI_NodeHandle.
ArkUI_IntOffset* offset Offset of the component handle relative to the screen, in px.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeUtils_GetPositionWithTranslateInWindow()

int32_t OH_ArkUI_NodeUtils_GetPositionWithTranslateInWindow(ArkUI_NodeHandle node, ArkUI_IntOffset* translateOffset)

Description

Obtains the position of the component in the window, including the translation attribute.

Since: 12

Parameters

Name Description
ArkUI_NodeHandle node Pointer to ArkUI_NodeHandle.
ArkUI_IntOffset* translateOffset Accumulated offset of the component, its parent component, and its ancestor node, in px.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeUtils_GetPositionWithTranslateInScreen()

int32_t OH_ArkUI_NodeUtils_GetPositionWithTranslateInScreen(ArkUI_NodeHandle node, ArkUI_IntOffset* translateOffset)

Description

Obtains the position of the component on the screen, including the translation attribute.

Since: 12

Parameters

Name Description
ArkUI_NodeHandle node Pointer to ArkUI_NodeHandle.
ArkUI_IntOffset* translateOffset Accumulated offset of the component, its parent component, and its ancestor node, in px.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeUtils_AddCustomProperty()

void OH_ArkUI_NodeUtils_AddCustomProperty(ArkUI_NodeHandle node, const char* name, const char* value)

Description

Sets a custom property for a component. This API takes effect only in the main thread.

Since: 13

Parameters

Name Description
ArkUI_NodeHandle node Pointer to ArkUI_NodeHandle.
const char* name Name of the custom property. A null pointer is not allowed.
const char* value Value of the custom property. A null pointer is not allowed.

OH_ArkUI_NodeUtils_RemoveCustomProperty()

void OH_ArkUI_NodeUtils_RemoveCustomProperty(ArkUI_NodeHandle node, const char* name)

Description

Removes a custom property that has been set for the specified component.

Since: 13

Parameters

Name Description
ArkUI_NodeHandle node Pointer to ArkUI_NodeHandle.
const char* name Name of the custom property.

OH_ArkUI_NodeUtils_GetCustomProperty()

int32_t OH_ArkUI_NodeUtils_GetCustomProperty(ArkUI_NodeHandle node, const char* name, ArkUI_CustomProperty** handle)

Description

Obtains the value of a custom property of the specified component.

Since: 14

Parameters

Name Description
ArkUI_NodeHandle node Pointer to ArkUI_NodeHandle.
const char* name Name of the custom property.
ArkUI_CustomProperty** handle Pointer to the struct that receives the custom property corresponding to the key parameter name.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeUtils_GetParentInPageTree()

ArkUI_NodeHandle OH_ArkUI_NodeUtils_GetParentInPageTree(ArkUI_NodeHandle node)

Description

Obtains the parent node, which can be a component node created with ArkTS.

Since: 14

Parameters

Name Description
ArkUI_NodeHandle node Target node.

Return value

Type Description
ArkUI_NodeHandle Pointer to the component if the component exists; returns NULL otherwise.

OH_ArkUI_NodeUtils_GetActiveChildrenInfo()

int32_t OH_ArkUI_NodeUtils_GetActiveChildrenInfo(ArkUI_NodeHandle head, ArkUI_ActiveChildrenInfo** handle)

Description

Obtains all active child nodes of the specified node. Spans are not counted as child nodes. In LazyForEach scenarios, you are advised to use the OH_ArkUI_NodeUtils_GetChildWithExpandMode API for traversal.

Since: 14

Parameters

Name Description
ArkUI_NodeHandle head Node for which to obtain the child nodes.
ArkUI_ActiveChildrenInfo** handle Pointer to the struct containing information about the child nodes of the head node.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeUtils_GetCurrentPageRootNode()

ArkUI_NodeHandle OH_ArkUI_NodeUtils_GetCurrentPageRootNode(ArkUI_NodeHandle node)

Description

Obtains the root node of the current page.

Since: 14

Parameters

Name Description
ArkUI_NodeHandle node Target node.

Return value

Type Description
ArkUI_NodeHandle Returns the pointer to the root node if the node exists; returns NULL otherwise.

OH_ArkUI_NodeUtils_IsCreatedByNDK()

bool OH_ArkUI_NodeUtils_IsCreatedByNDK(ArkUI_NodeHandle node)

Description

Checks whether the specified component is created with C APIs.

Since: 14

Parameters

Name Description
ArkUI_NodeHandle node Target node.

Return value

Type Description
bool Returns whether the node is created with the C API. The value true means that the node is created with the C API, and false means the opposite.

OH_ArkUI_NodeUtils_GetNodeType()

int32_t OH_ArkUI_NodeUtils_GetNodeType(ArkUI_NodeHandle node)

Description

Obtains the type of the specified node.

Since: 14

Parameters

Name Description
ArkUI_NodeHandle node Target node.

Return value

Type Description
int32_t Returns the type of the node. Returns -1 if the type is not supported yet. For details about the available types, see ArkUI_NodeType.

OH_ArkUI_NodeUtils_GetWindowInfo()

int32_t OH_ArkUI_NodeUtils_GetWindowInfo(ArkUI_NodeHandle node, ArkUI_HostWindowInfo** info)

Description

Obtains the information about the window to which a node belongs.

Since: 15

Parameters

Name Description
ArkUI_NodeHandle node Target node.
ArkUI_HostWindowInfo** info Pointer to the window information object. The memory allocated for this object must be released using OH_ArkUI_HostWindowInfo_Destroy.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_NODE_NOT_ON_MAIN_TREE if the node is not mounted on the main component tree.

OH_ArkUI_NodeUtils_MoveTo()

int32_t OH_ArkUI_NodeUtils_MoveTo(ArkUI_NodeHandle node, ArkUI_NodeHandle target_parent, int32_t index)

Description

Moves a node to a target parent node as a child.

Since: 18

Parameters

Name Description
ArkUI_NodeHandle node Node to be moved.
ArkUI_NodeHandle target_parent Pointer to the target parent node.
int32_t index Index of the node after the movement. If the index is invalid, the node will be added to the end of the target parent node.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_NODE_IS_ADOPTED if a child node has been accepted. This specification is supported since API version 22.

OH_ArkUI_NativeModule_InvalidateAttributes()

int32_t OH_ArkUI_NativeModule_InvalidateAttributes(ArkUI_NodeHandle node)

Description

Triggers the node attribute update in this frame.

If the attributes of the current node are modified after the build phase, these changes do not take effect immediately but are deferred for batch processing in the next frame.

This API forces immediate node updates within the current frame, ensuring that rendering effects are applied synchronously.

Since: 21

Parameters

Name Description
ArkUI_NodeHandle node Node whose attributes are to be updated.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_List_CloseAllSwipeActions()

int32_t OH_ArkUI_List_CloseAllSwipeActions(ArkUI_NodeHandle node, void* userData, void (*onFinish)(void* userData))

Description

Collapses the list items in the expanded state.

Since: 12

Parameters

Name Description
ArkUI_NodeHandle node Node object for which an event needs to be registered.
void* userData Custom event parameter, which is passed in the callback when the event is triggered.
onFinish Callback triggered after the collapse animation is complete.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED if the event is not supported.

OH_ArkUI_GetContextByNode()

ArkUI_ContextHandle OH_ArkUI_GetContextByNode(ArkUI_NodeHandle node)

Description

Obtains the pointer to the UI context object of the specified node.

Since: 12

Parameters

Name Description
ArkUI_NodeHandle node Specified node.

Return value

Type Description
ArkUI_ContextHandle Pointer to the UI context object.

OH_ArkUI_RegisterSystemColorModeChangeEvent()

int32_t OH_ArkUI_RegisterSystemColorModeChangeEvent(ArkUI_NodeHandle node,void* userData, void (*onColorModeChange)(ArkUI_SystemColorMode colorMode, void* userData))

Description

Registers an event listener for system color mode changes. A single component can only register one callback for system color mode changes. For implementation examples, see Listening for Component Events.

Since: 12

Parameters

Name Description
ArkUI_NodeHandle node Specified node.
void* userData Custom event parameter, which is passed in the callback when the event is triggered.
onColorModeChange Callback to be executed when the event is triggered. ArkUI_SystemColorMode defines the system color mode (light/dark).

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_UnregisterSystemColorModeChangeEvent()

void OH_ArkUI_UnregisterSystemColorModeChangeEvent(ArkUI_NodeHandle node)

Description

Unregisters the event listener for system color mode changes.

Since: 12

Parameters

Name Description
ArkUI_NodeHandle node Specified node.

OH_ArkUI_RegisterSystemFontStyleChangeEvent()

int32_t OH_ArkUI_RegisterSystemFontStyleChangeEvent(ArkUI_NodeHandle node,void* userData, void (*onFontStyleChange)(ArkUI_SystemFontStyleEvent* event, void* userData))

Description

Registers an event listener for system font style changes. A single component can only register one callback for system font style changes.

Since: 12

Parameters

Name Description
ArkUI_NodeHandle node Specified node.
void* userData Custom event parameter, which is passed in the callback when the event is triggered.
onFontStyleChange Callback to be executed when the event is triggered.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_UnregisterSystemFontStyleChangeEvent()

void OH_ArkUI_UnregisterSystemFontStyleChangeEvent(ArkUI_NodeHandle node)

Description

Unregisters the event listener for system font style changes.

Since: 12

Parameters

Name Description
ArkUI_NodeHandle node Specified node.

OH_ArkUI_SystemFontStyleEvent_GetFontSizeScale()

float OH_ArkUI_SystemFontStyleEvent_GetFontSizeScale(const ArkUI_SystemFontStyleEvent* event)

Description

Obtains the font size from the system font style change event.

Since: 12

Parameters

Name Description
const ArkUI_SystemFontStyleEvent* event Pointer to the current system font style change event.

Return value

Type Description
float Returns the font size scale after the change. Default value: 1.0.

OH_ArkUI_SystemFontStyleEvent_GetFontWeightScale()

float OH_ArkUI_SystemFontStyleEvent_GetFontWeightScale(const ArkUI_SystemFontStyleEvent* event)

Description

Obtains the font weight from the system font style change event.

Since: 12

Parameters

Name Description
const ArkUI_SystemFontStyleEvent* event Pointer to the current system font style change event.

Return value

Type Description
float Returns the font weight scale after the change. Default value: 1.0.

OH_ArkUI_RegisterLayoutCallbackOnNodeHandle()

int32_t OH_ArkUI_RegisterLayoutCallbackOnNodeHandle(ArkUI_NodeHandle node,void* userData, void (*onLayoutCompleted)(void* userData))

Description

Registers a layout completion callback function for a specific node.

Since: 15

Parameters

Name Description
ArkUI_NodeHandle node Target node for which the callback function is to be registered.
void* userData Custom parameter passed to the callback function when it is invoked.
onLayoutCompleted Callback function to be invoked when layout is completed.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_RegisterDrawCallbackOnNodeHandle()

int32_t OH_ArkUI_RegisterDrawCallbackOnNodeHandle(ArkUI_NodeHandle node,void* userData, void (*onDrawCompleted)(void* userData))

Description

Registers a drawing completion callback function for a specific node.

Since: 15

Parameters

Name Description
ArkUI_NodeHandle node Target node for which the callback function is to be registered.
void* userData Custom parameter passed to the callback function when it is invoked.
onDrawCompleted Callback function to be invoked when drawing is completed.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_UnregisterLayoutCallbackOnNodeHandle()

int32_t OH_ArkUI_UnregisterLayoutCallbackOnNodeHandle(ArkUI_NodeHandle node)

Description

Unregisters the layout completion callback function for a specific node.

Since: 15

Parameters

Name Description
ArkUI_NodeHandle node Target node for which the callback function is to be unregistered.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_UnregisterDrawCallbackOnNodeHandle()

int32_t OH_ArkUI_UnregisterDrawCallbackOnNodeHandle(ArkUI_NodeHandle node)

Description

Unregisters the drawing completion callback function for a specific node.

Since: 15

Parameters

Name Description
ArkUI_NodeHandle node Target node for which the callback function is to be unregistered.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_GetNodeSnapshot()

int32_t OH_ArkUI_GetNodeSnapshot(ArkUI_NodeHandle node, ArkUI_SnapshotOptions* snapshotOptions,OH_PixelmapNative** pixelmap)

Description

Obtains a snapshot of a given component. If the node is not in the component tree or has not been rendered, the snapshot operation will fail. When the pixelmap is no longer used, you should call OH_PixelmapNative_Release to release it.

Since: 15

Parameters

Name Description
ArkUI_NodeHandle node Target node to capture a snapshot.
ArkUI_SnapshotOptions* snapshotOptions Snapshot settings. If the value is null, the default settings are used.
The screenshot configuration includes the scaling attribute, color space, and dynamic range mode. The color space and dynamic range mode are supported since API version 23.
The scaling attribute value is a floating point number greater than 0. The default value is 1.0.
The color space value can be 3 (RGB color gamut is of the Display P3 type), 4 (RGB color gamut is of the SRGB type), or 27 (RGB color gamut is of the Display BT2020 type). The default value is 4.
The dynamic range mode can be ArkUI_DynamicRangeMode. The default value is ARKUI_DYNAMIC_RANGE_MODE_STANDARD.
OH_PixelmapNative** pixelmap Pointer to the Pixelmap created by the system.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_INTERNAL_ERROR if the snapshot fails, returning a null pointer.
Returns ARKUI_ERROR_CODE_COMPONENT_SNAPSHOT_TIMEOUT if the snapshot operation times out.
Returns ARKUI_ERROR_CODE_COMPONENT_SNAPSHOT_MODE_NOT_SUPPORTED if the color space or dynamic range mode is not supported in the screenshot configuration.
Returns ARKUI_ERROR_CODE_COMPONENT_SNAPSHOT_AUTO_NOT_SUPPORTED if the isAuto parameter of the color space or dynamic range mode cannot be set to true for the offscreen node snapshot.

OH_ArkUI_NodeUtils_GetAttachedNodeHandleById()

int32_t OH_ArkUI_NodeUtils_GetAttachedNodeHandleById(const char* id, ArkUI_NodeHandle* node)

Description

Obtains the target node based on the provided user ID.

Since: 15

Parameters

Name Description
const char* id ID of the target node.
ArkUI_NodeHandle* node Pointer to the target node.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeUtils_GetNodeHandleByUniqueId()

int32_t OH_ArkUI_NodeUtils_GetNodeHandleByUniqueId(const uint32_t uniqueId, ArkUI_NodeHandle* node)

Description

Obtain a node by its unique ID.

Since: 20

Parameters

Name Description
const uint32_t uniqueId Unique ID of the target node.
ArkUI_NodeHandle* node Pointer to the target node.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_NodeUtils_GetNodeUniqueId()

int32_t OH_ArkUI_NodeUtils_GetNodeUniqueId(ArkUI_NodeHandle node, int32_t* uniqueId)

Description

Obtains the unique ID of the target node.

Since: 20

Parameters

Name Description
ArkUI_NodeHandle node ArkUI node pointer.
int32_t* uniqueId Unique ID of the target node. The component ID is read-only and unique in the process. If the node exists, the unique ID of the node is returned. Otherwise, -1 is returned.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_NativeModule_AdoptChild()

int32_t OH_ArkUI_NativeModule_AdoptChild(ArkUI_NodeHandle node, ArkUI_NodeHandle child)

Description

Adopts the target node as an affiliated node. The adopted node must not have an existing parent. This API is not used to add a node as a child node. Instead, it only allows the node to receive lifecycle callbacks of the corresponding child node.

Since: 22

Parameters

Name Description
ArkUI_NodeHandle node Pointer to an ArkUI_NodeHandle, which specifies the parent node of the node to be adopted.
ArkUI_NodeHandle child Pointer to ArkUI_NodeHandle, which specifies the child node to be adopted.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_NODE_HAS_PARENT if the adopted node already has a parent node.
Returns ARKUI_ERROR_CODE_NODE_CAN_NOT_BE_ADOPTED if the node cannot be adopted as an affiliated node.
Returns ARKUI_ERROR_CODE_NODE_CAN_NOT_ADOPT_TO if the node cannot adopt other affiliated nodes.

OH_ArkUI_NativeModule_RemoveAdoptedChild()

int32_t OH_ArkUI_NativeModule_RemoveAdoptedChild(ArkUI_NodeHandle node, ArkUI_NodeHandle child)

Description

Removes a previously-adopted affiliated node.

Since: 22

Parameters

Name Description
ArkUI_NodeHandle node Pointer to ArkUI_NodeHandle, which specifies the parent node.
ArkUI_NodeHandle child Pointer to ArkUI_NodeHandle, which specifies the node to be removed.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_NODE_IS_NOT_IN_ADOPTED_CHILDREN if the node is not an affiliated node adopted by the target node.

OH_ArkUI_NativeModule_IsInRenderState()

int32_t OH_ArkUI_NativeModule_IsInRenderState(ArkUI_NodeHandle node, bool* isInRenderState)

Description

Obtains whether a node is in the render state. If RenderNode of a node is in the render tree, the node is in the render state.

Since: 23

Parameters

Name Description
ArkUI_NodeHandle node ArkUI node pointer.
bool* isInRenderState Whether the node is in render state. true: The node is in the render state. false: The node is not in the render state.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if the API parameter is abnormal.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.

OH_ArkUI_NodeUtils_SetCrossLanguageOption()

int32_t OH_ArkUI_NodeUtils_SetCrossLanguageOption(ArkUI_NodeHandle node, ArkUI_CrossLanguageOption* option)

Description

Sets the cross-language options for the target node.

Since: 15

Parameters

Name Description
ArkUI_NodeHandle node Pointer to the target node.
ArkUI_CrossLanguageOption* option Cross-language configuration option ArkUI_CrossLanguageOption.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeUtils_GetCrossLanguageOption()

int32_t OH_ArkUI_NodeUtils_GetCrossLanguageOption(ArkUI_NodeHandle node, ArkUI_CrossLanguageOption* option)

Description

Obtains the cross-language options for the target node.

Since: 15

Parameters

Name Description
ArkUI_NodeHandle node Pointer to the target node.
ArkUI_CrossLanguageOption* option Cross-language configuration option ArkUI_CrossLanguageOption.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeUtils_GetFirstChildIndexWithoutExpand()

int32_t OH_ArkUI_NodeUtils_GetFirstChildIndexWithoutExpand(ArkUI_NodeHandle node, uint32_t* index)

Description

Obtains the index of the first child node of the target node in the tree without expanding any nodes.

Since: 15

Parameters

Name Description
ArkUI_NodeHandle node Pointer to the target node.
uint32_t* index Pointer to a variable where the index of the first child node is stored.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeUtils_GetLastChildIndexWithoutExpand()

int32_t OH_ArkUI_NodeUtils_GetLastChildIndexWithoutExpand(ArkUI_NodeHandle node, uint32_t* index)

Description

Obtains the index of the last child node of the target node in the tree without expanding any nodes.

Since: 15

Parameters

Name Description
ArkUI_NodeHandle node Pointer to the target node.
uint32_t* index Pointer to a variable where the index of the first child node is stored.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeUtils_GetChildWithExpandMode()

int32_t OH_ArkUI_NodeUtils_GetChildWithExpandMode(ArkUI_NodeHandle node, int32_t position,ArkUI_NodeHandle* subnode, uint32_t expandMode)

Description

Obtains a child node at the specified index using different expansion modes.

Since: 15

Parameters

Name Description
ArkUI_NodeHandle node Pointer to the target node.
int32_t position Index of the child node to obtain.
ArkUI_NodeHandle* subnode Pointer to the obtained child node.
uint32_t expandMode Expansion mode for node traversal. For details, see ArkUI_ExpandMode.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NodeUtils_GetPositionToParent()

int32_t OH_ArkUI_NodeUtils_GetPositionToParent(ArkUI_NodeHandle node, ArkUI_IntOffset* globalOffset)

Description

Obtains the offset of the target node relative to its parent node, in px.

Since: 15

Parameters

Name Description
ArkUI_NodeHandle node Target node.
ArkUI_IntOffset* globalOffset Offset of the target node relative to its parent node, in px.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_AddSupportedUIStates()

ArkUI_ErrorCode OH_ArkUI_AddSupportedUIStates(ArkUI_NodeHandle node, int32_t uiStates,void (statesChangeHandler)(int32_t currentStates, void* userData), bool excludeInner, void* userData)

Description

Adds the polymorphic style states supported by the component. To handle states efficiently, specify the states of interest and their corresponding handlers. When a state of interest occurs, the handler will be executed. You can adjust the UI style based on the current state within the callback. If this API is called multiple times on the same node, the last set of states and handlers will take precedence. Some component types have default system handling for certain states. For example, the Button component has a default style effect for the PRESSED state. When custom state handling is implemented on such components, the default style effect will be applied first, followed by the custom style changes, resulting in a combined effect. To disable the default style effects, set excludeInner to true, if this is allowed by the system implementation. When this API is called, the provided handler function will be executed immediately. There is no need to explicitly register a listener for the NORMAL state. Once a non-NORMAL state is registered, the system will automatically notify your application when the state changes back to NORMAL.

Since: 20

Parameters

Name Description
ArkUI_NodeHandle node Target node.
int32_t uiStates Target UI states to be handled on the node. The combined result of all target UI states can be calculated using the | operator. Example: targetUIStates = ArkUI_UIState::PRESSED | ArkUI_UIState::FOCUSED.
void (statesChangeHandler)(int32_t currentStates, void* userData) Handler for UI state changes. It returns the current UI status. The value is the result of combining all current state enum values using the | operator. You can determine the state using the & operator. Example: if (currentStates & ArkUI_UIState::PRESSED == ArkUI_UIState::PRESSED). However, for checking the normal state, use the equality operator directly. Example: if (currentStates == ArkUI_UIState::NORMAL).
bool excludeInner Whether to disable the default state styles. true: Disable the default state styles. false: Do not disable the default state styles.
void* userData Custom data used in the onDrawCompleted callback.

Return value

Type Description
ArkUI_ErrorCode Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_RemoveSupportedUIStates()

ArkUI_ErrorCode OH_ArkUI_RemoveSupportedUIStates(ArkUI_NodeHandle node, int32_t uiStates)

Description

Removes registered UI states. When all states registered using OH_ArkUI_AddSupportedUIStates are removed, the registered stateChangeHandler will no longer be executed.

Since: 20

Parameters

Name Description
ArkUI_NodeHandle node Target node.
int32_t uiStates Target UI states to be removed.

Return value

Type Description
ArkUI_ErrorCode Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_RunTaskInScope()

int32_t OH_ArkUI_RunTaskInScope(ArkUI_ContextHandle uiContext, void* userData, void(*callback)(void* userData))

Description

Executes the specified callback in the target UI context. For the implementation example, see Ensuring Multi-Instance Functionality in the NDK.

Since: 20

Parameters

Name Description
ArkUI_ContextHandle uiContext Pointer to the target UI context.
void* userData User-defined data pointer for processing custom data within the callback function. You are responsible for ensuring the validity of the data when the custom function is executed.
void(*callback)(void* userData) User-defined callback function.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_UI_CONTEXT_INVALID if the UIContext object is invalid.
Returns ARKUI_ERROR_CODE_CALLBACK_INVALID if the callback function is invalid.

OH_ArkUI_PostAsyncUITask()

int32_t OH_ArkUI_PostAsyncUITask(ArkUI_ContextHandle context, void* asyncUITaskData,
    void (*asyncUITask)(void* asyncUITaskData), void (*onFinish)(void* asyncUITaskData))

Description

Submits the asyncUITask function to a non-UI thread provided by the ArkUI framework for execution. After asyncUITask finishes execution, the onFinish function is called in the UI thread.

This is suitable for scenarios involving multi-threaded UI component creation. You can use this API to create UI components in non-UI threads and then mount the created components to the main tree in the UI thread.

Since: 22

Parameters

Name Description
ArkUI_ContextHandle context Pointer to the UI instance object.
void* asyncUITaskData Pointer to the user-defined data, which is passed as the input parameter of asyncUITask and onFinish. A null pointer is allowed.
asyncUITask Function executed in the non-UI thread.
onFinish Function executed on the UI thread after asyncUITask is completed. A null pointer is allowed.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if the context object is invalid, or asyncUITask is a null pointer.

OH_ArkUI_PostUITask()

int32_t OH_ArkUI_PostUITask(ArkUI_ContextHandle context, void* taskData, void (*task)(void* taskData))

Description

Submits the task function to the UI thread for execution.

This is suitable for scenarios involving multi-threaded UI component creation. When you create UI components in a self-built thread, you can use this API to mount the created components to the main tree on the UI thread.

Since: 22

Parameters

Name Description
ArkUI_ContextHandle context Pointer to the UI instance object.
void* taskData Pointer to the user-defined data, which is passed as the input parameter of task. A null pointer is allowed.
task Function executed in the UI thread.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if the context object is invalid, or task is a null pointer.

OH_ArkUI_PostUITaskAndWait()

int32_t OH_ArkUI_PostUITaskAndWait(ArkUI_ContextHandle context, void* taskData, void (*task)(void* taskData))

Description

Submits the task function to the UI thread for execution. The thread calling this API will block until the task function completes execution. Calling this API from the UI thread is equivalent to synchronously calling the task function.

This is suitable for scenarios involving multi-threaded UI component creation. When you need to call functions that are only supported on the UI thread during the multi-threaded component creation process, you can use this API to return to the UI thread to call the function and then resume multi-threaded component creation after the call completes.

When the UI thread is under high load, non-UI threads calling this API may block for extended periods, affecting the performance of multi-threaded UI component creation. Frequent use is not recommended.

Since: 22

Parameters

Name Description
ArkUI_ContextHandle context Pointer to the UI instance object.
void* taskData Pointer to the user-defined data, which is passed as the input parameter of task. A null pointer is allowed.
task Function executed in the UI thread.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if the context object is invalid, or task is a null pointer.

OH_ArkUI_NativeModule_RegisterCommonEvent()

int32_t OH_ArkUI_NativeModule_RegisterCommonEvent(ArkUI_NodeHandle node, ArkUI_NodeEventType eventType, void* userData, void (*callback)(ArkUI_NodeEvent* event))

Description

Registers a basic event callback for the target node.

Currently, the following event types are supported: NODE_ON_CLICK_EVENT, NODE_TOUCH_EVENT, NODE_EVENT_ON_APPEAR, NODE_EVENT_ON_DISAPPEAR, NODE_ON_KEY_EVENT, NODE_ON_FOCUS, NODE_ON_BLUR, NODE_ON_HOVER, NODE_ON_MOUSE, and NODE_ON_SIZE_CHANGE. For details, see ArkUI_NodeEventType.

Since: 21

Parameters

Name Description
ArkUI_NodeHandle node Target node.
ArkUI_NodeEventType eventType Event type.
void* userData User-defined data pointer for processing custom data within the callback function. You are responsible for ensuring the validity of the data when the custom function is executed.
callback User-defined callback function.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_NODE_UNSUPPORTED_EVENT_TYPE if the event type is not supported.

OH_ArkUI_NativeModule_UnregisterCommonEvent()

int32_t OH_ArkUI_NativeModule_UnregisterCommonEvent(ArkUI_NodeHandle node, ArkUI_NodeEventType eventType)

Description

Unregisters the basic event callback for the target node.

For details about the supported event types, see OH_ArkUI_NativeModule_RegisterCommonEvent.

Since: 21

Parameters

Name Description
ArkUI_NodeHandle node Target node.
ArkUI_NodeEventType eventType Event type.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_NODE_UNSUPPORTED_EVENT_TYPE if the event type is not supported.

OH_ArkUI_NativeModule_RegisterCommonVisibleAreaApproximateChangeEvent()

int32_t OH_ArkUI_NativeModule_RegisterCommonVisibleAreaApproximateChangeEvent(ArkUI_NodeHandle node, float* ratios, int32_t size, float expectedUpdateInterval, void* userData, void (*callback)(ArkUI_NodeEvent* event))

Description

Registers a basic event callback for visible area changes with a constrained callback interval.

Since: 21

Parameters

Name Description
ArkUI_NodeHandle node Target node.
float* ratios Array of threshold ratios, representing the visible area of the component.
int32_t size Size of the array of threshold ratios.
float expectedUpdateInterval Expected calculation interval.
void* userData User-defined data pointer for processing custom data within the callback function. You are responsible for ensuring the validity of the data when the custom function is executed.
callback User-defined callback function.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NativeModule_UnregisterCommonVisibleAreaApproximateChangeEvent()

int32_t OH_ArkUI_NativeModule_UnregisterCommonVisibleAreaApproximateChangeEvent(ArkUI_NodeHandle node)

Description

Unregisters the basic event callback for visible area changes with a constrained callback interval.

Since: 21

Parameters

Name Description
ArkUI_NodeHandle node Target node.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Swiper_FinishAnimation()

int32_t OH_ArkUI_Swiper_FinishAnimation(ArkUI_NodeHandle node)

Description

Stops the page flip animation that is being executed on the specified Swiper node.

Since: 22

Parameters

Name Description
ArkUI_NodeHandle node Specified node.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_SetForceDarkConfig()

int32_t OH_ArkUI_SetForceDarkConfig(ArkUI_ContextHandle uiContext, bool forceDark, ArkUI_NodeType nodeType, uint32_t (*colorInvertFunc)(uint32_t color))

Description

Sets the color inversion algorithm for components and instances. For details, see Using Color Inversion for Quick Dark Mode Adaptation.

Since: 20

Parameters

Name Description
ArkUI_ContextHandle uiContext Pointer to the UI instance object.
If the value is null, this function applies to the entire application process.
bool forceDark Whether to use the color inversion capability. true to use; false otherwise.
ArkUI_NodeType nodeType Component scope where the color inversion capability takes effect.
ARKUI_NODE_UNDEFINED indicates that the setting takes effect for all component types.
colorInvertFunc Custom color inversion algorithm function.
If the value is nullptr, the default color inversion algorithm is used for the component, that is, the three primary colors are inverted.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_FORCE_DARK_CONFIG_INVALID if the input parameter of the color inversion capability is incorrect.

OH_ArkUI_NodeEvent_GetTouchTestInfo()

ArkUI_TouchTestInfo* OH_ArkUI_NodeEvent_GetTouchTestInfo(ArkUI_NodeEvent* nodeEvent)

Description

Obtains the touch test information in a component event.

Since: 22

Parameters

Name Description
ArkUI_NodeEvent* nodeEvent Pointer to the component event.

Return value

Type Description
ArkUI_TouchTestInfo* Pointer to the ArkUI_TouchTestInfo object. If the input parameter is invalid or is not touch test information, null is returned.

OH_ArkUI_NativeModule_ConvertPositionToWindow()

int32_t OH_ArkUI_NativeModule_ConvertPositionToWindow(ArkUI_NodeHandle currentNode, ArkUI_IntOffset localPosition, ArkUI_IntOffset* windowPosition)

Description

Converts the coordinates of a point from the coordinate system of a specified node to that of the current window. For a coordinate system of a node, transformation of the node is considered. For example, if node A is translated leftward by 100, the coordinates of the points in its coordinate system will also be translated leftward by 100.

As shown in the preceding figure, the coordinates (x0, y0) in the coordinate system of the specified node are converted to the coordinates (x1, y1) in the coordinate system of the window.

Since: 23

Parameters

Name Description
ArkUI_NodeHandle currentNode Specified node.
ArkUI_IntOffset localPosition Coordinates of the point in the coordinate system of the specified node, in px.
ArkUI_IntOffset* windowPosition Pointer to the converted coordinates (in the current window coordinate system, in px).

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_NODE_NOT_ON_MAIN_TREE if the node is not mounted on the main component tree.

OH_ArkUI_NativeModule_ConvertPositionFromWindow()

int32_t OH_ArkUI_NativeModule_ConvertPositionFromWindow(ArkUI_NodeHandle targetNode, ArkUI_IntOffset windowPosition, ArkUI_IntOffset* localPosition)

Description

Converts the coordinates of a point from the current window's coordinate system to the target node's coordinate system. For a coordinate system of a node, transformation of the node is considered. For example, if node A is translated leftward by 100, the coordinates of the points in its coordinate system will also be translated leftward by 100.

As shown in the preceding figure, the coordinates (x1, y1) in the window coordinate system are converted to the coordinates (x0, y0) in the coordinate system of the target node.

Since: 23

Parameters

Name Description
ArkUI_NodeHandle targetNode Target node.
ArkUI_IntOffset windowPosition Coordinates of the point in the current window coordinate system, in px.
ArkUI_IntOffset* localPosition Pointer to the converted coordinates (in the coordinate system of the target node, in px).

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_NODE_NOT_ON_MAIN_TREE if the node is not mounted on the main component tree.

OH_ArkUI_Swiper_StartFakeDrag()

int32_t OH_ArkUI_Swiper_StartFakeDrag(ArkUI_NodeHandle node, bool* isSuccessful)

Description

Starts a simulated drag on a Swiper node. OH_ArkUI_Swiper_FakeDragBy can be used to simulate a drag action. OH_ArkUI_Swiper_StopFakeDrag can be used to stop the drag simulation.
A simulated drag can be interrupted by a real drag. To ignore a drag event from a user during the simulated drag, use NODE_SWIPER_DISABLE_SWIPE.

Since: 23

Parameters

Name Description
ArkUI_NodeHandle node Specified node.
bool* isSuccessful Whether the simulated drag is successfully started. true is returned if the simulated drag is successfully started.
false is returned if Swiper is not ready to start the simulated drag or a real drag or simulated drag is in progress.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Swiper_FakeDragBy()

int32_t OH_ArkUI_Swiper_FakeDragBy(ArkUI_NodeHandle node, float offset, bool* isConsumedOffset)

Description

Simulates the drag effect by setting the offset of a Swiper node. Before calling this API, you must call OH_ArkUI_Swiper_StartFakeDrag to start the drag simulation.

Since: 23

Parameters

Name Description
ArkUI_NodeHandle node Specified node.
float offset Offset to be dragged, in vp.
bool* isConsumedOffset Whether to consume the offset to trigger dragging. true is returned if the offset is consumed to trigger dragging.
false is returned if the dragging is not in progress or no offset is consumed.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Swiper_StopFakeDrag()

int32_t OH_ArkUI_Swiper_StopFakeDrag(ArkUI_NodeHandle node, bool* isSuccessful)

Description

Stops the drag simulation on a Swiper node.

Since: 23

Parameters

Name Description
ArkUI_NodeHandle node Specified node.
bool* isSuccessful Whether the simulated drag is successfully stopped. true is returned if the simulated drag is successfully stopped.
false is returned if Swiper is not ready to stop the simulated drag or no simulated drag is in progress.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Swiper_IsFakeDragging()

int32_t OH_ArkUI_Swiper_IsFakeDragging(ArkUI_NodeHandle node, bool* isFakeDragging)

Description

Obtains the drag simulation status on a Swiper node.

Since: 23

Parameters

Name Description
ArkUI_NodeHandle node Specified node.
bool* isFakeDragging Whether the simulated drag is in progress. true is returned if the simulated drag is in progress; false otherwise.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Swiper_ShowPrevious()

int32_t OH_ArkUI_Swiper_ShowPrevious(ArkUI_NodeHandle node)

Description

Displays the previous page of a Swiper node.

Since: 23

Parameters

Name Description
ArkUI_NodeHandle node Specified node.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Swiper_ShowNext()

int32_t OH_ArkUI_Swiper_ShowNext(ArkUI_NodeHandle node)

Description

Displays the next page of a Swiper node.

Since: 23

Parameters

Name Description
ArkUI_NodeHandle node Specified node.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_NativeModule_GetPageRootNodeHandleByContext()

 int32_t OH_ArkUI_NativeModule_GetPageRootNodeHandleByContext(ArkUI_ContextHandle context, ArkUI_NodeHandle* rootNode)

Description

Obtains the root node of the page of a specified instance.

Since: 24

Parameters

Name Description
ArkUI_ContextHandle context Pointer to the UI instance object.
ArkUI_NodeHandle* rootNode Handle to the target root node. If the page corresponding to the context does not have a root node, this parameter is set to null.

Return value

Type Description
int32_t Result code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_CAPI_INIT_ERROR if C API initialization failed.
Returns ARKUI_ERROR_CODE_UI_CONTEXT_INVALID if an instance error occurs.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.