目录

ArkUI_NodeAttributeType (Others)

enum ArkUI_NodeAttributeType

Overview

Enumerates the attribute types that can be set by ArkUI on the native side, including component interaction, focus obtaining, off-screen rendering, and tap distance.

Since: 12

Related module: ArkUI_NativeModule

Header file: native_node.h

NODE_ENABLED

NODE_ENABLED = 6

Whether the component can interact with users. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Whether the component can interact with users. The value 1 indicates that the component can interact with users, and 0 indicates the opposite.

Returns

Type Description
.value[0].i32 Whether the component can interact with users. The value 1 indicates that the component can interact with users, and 0 indicates the opposite.

NODE_FOCUSABLE

NODE_FOCUSABLE = 39

Whether the component is focusable. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Whether the component is focusable. The value 1 indicates that the component is focusable, and 0 indicates the opposite. The default value is 0.

Returns

Type Description
.value[0].i32 Whether the component is focusable. The value 1 indicates that the component is focusable, and 0 indicates the opposite.

NODE_RENDER_GROUP

NODE_RENDER_GROUP = 80

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.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.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.

Returns

Type Description
.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_CLICK_DISTANCE

NODE_CLICK_DISTANCE = 97

Moving distance limit for the component-bound click gesture. This attribute can be set as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute is as follows.

Since: 12

Parameters

Name Description
.value[0].f32 Distance threshold within which the finger is allowed to move when a click gesture is recognized, in vp. The value range is [0, +∞).

NODE_ALLOW_FORCE_DARK

NODE_ALLOW_FORCE_DARK = 108

Whether to enable color inversion of a component. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute is as follows.

Since: 21

Parameters

Name Description
.value[0].i32 Whether to enable color inversion. The value 1 indicates to enable color inversion, and 0 indicates the opposite.