ArkUI_NodeEventType

Struct ArkUI_NodeEventType 

Source
#[repr(transparent)]
pub struct ArkUI_NodeEventType(pub c_uint);
Available on crate feature api-12 only.
Expand description

Enumerates the event types supported by the NativeNode component.

Available since API-level: 12

Tuple Fields§

§0: c_uint

Implementations§

Source§

impl ArkUI_NodeEventType

Source

pub const NODE_TOUCH_EVENT: ArkUI_NodeEventType

Defines the gesture event type.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_UIInputEvent.

Source

pub const NODE_EVENT_ON_APPEAR: ArkUI_NodeEventType

Defines the 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.

Source

pub const NODE_EVENT_ON_DISAPPEAR: ArkUI_NodeEventType

Defines the unmount event.

This event is triggered when the component is unmounted and hidden.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent does not contain parameters.

Source

pub const NODE_EVENT_ON_AREA_CHANGE: ArkUI_NodeEventType

Defines the area change event.

This event is triggered when the component’s size, position, or any other attribute that may affect its display area changes.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains 12 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 is a number.

ArkUI_NodeComponentEvent.data[7].f32: new height of the target element, in vp. The value is a 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.

Source

pub const NODE_ON_FOCUS: ArkUI_NodeEventType

Defines the focus event.

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.

Source

pub const NODE_ON_BLUR: ArkUI_NodeEventType

Defines the blur event.

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.

Source

pub const NODE_ON_CLICK: ArkUI_NodeEventType

Defines the 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 12 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.

Source

pub const NODE_ON_TOUCH_INTERCEPT: ArkUI_NodeEventType

Defines 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.

Source

pub const NODE_EVENT_ON_VISIBLE_AREA_CHANGE: ArkUI_NodeEventType

Defines the 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 this event, you must set NODE_VISIBLE_AREA_CHANGE_RATIO.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains two parameters:

ArkUI_NodeComponentEvent.data[0].i32: how the ratio of the component’s visible area to its total area changes compared to the previous one. The value 1 indicates an increase, and 0 indicates a decrease.

ArkUI_NodeComponentEvent.data[1].f32: ratio of the component’s visible area to its total area when this callback is invoked.

Source

pub const NODE_ON_HOVER: ArkUI_NodeEventType

Defines the 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 one 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.

Source

pub const NODE_ON_MOUSE: ArkUI_NodeEventType

Defines the 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.

Source

pub const NODE_EVENT_ON_ATTACH: ArkUI_NodeEventType

Defines the attach event.

This event is triggered when the component is attached.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent does not contain parameters.

Source

pub const NODE_EVENT_ON_DETACH: ArkUI_NodeEventType

Defines the detach event.

This event is triggered when the component is detached.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent does not contain parameters.

Source

pub const NODE_ON_ACCESSIBILITY_ACTIONS: ArkUI_NodeEventType

Defines the accessibility action event.

This event is triggered when The accessibility operation type has been set and corresponding operations have been carried out.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains one parameters:

ArkUI_NodeComponentEvent.data[0].u32: accessibility action type,the union type is ArkUI_AccessibilityActionType

Source

pub const NODE_ON_PRE_DRAG: ArkUI_NodeEventType

Notifies the listener of the interaction state prior to a drop and drop operation.

This event is triggered when a drag operation is about to start on a draggable item.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains one parameter:

ArkUI_NodeComponentEvent.data[0].i32: corresponds to [ArkUI_PreDragStatus].

Source

pub const NODE_ON_DRAG_START: ArkUI_NodeEventType

Called when the user starts to drag an ite

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.

Source

pub const NODE_ON_DRAG_ENTER: ArkUI_NodeEventType

Called 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.

Source

pub const NODE_ON_DRAG_MOVE: ArkUI_NodeEventType

Called 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.

Source

pub const NODE_ON_DRAG_LEAVE: ArkUI_NodeEventType

Called 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.

Source

pub const NODE_ON_DROP: ArkUI_NodeEventType

Called 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.

Source

pub const NODE_ON_DRAG_END: ArkUI_NodeEventType

Called 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.

Source

pub const NODE_ON_KEY_EVENT: ArkUI_NodeEventType

Available on crate feature api-14 only.

Defines the 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.

Available since API-level: 14

Source

pub const NODE_ON_KEY_PRE_IME: ArkUI_NodeEventType

Available on crate feature api-14 only.

Defines the event triggered before the input method responds to the key action.

If the return value of this callback is true, it is considered that the key event has been 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.

Available since API-level: 14

Source

pub const NODE_ON_FOCUS_AXIS: ArkUI_NodeEventType

Available on crate feature api-15 only.

Defines the 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.

Available since API-level: 15

Source

pub const NODE_DISPATCH_KEY_EVENT: ArkUI_NodeEventType

Available on crate feature api-15 only.

Dispatch key event on the component node.

When the component node receives a key event, this callback will be triggered instead of dispatching event to its children.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

Available since API-level: 15

Source

pub const NODE_ON_AXIS: ArkUI_NodeEventType

Available on crate feature api-17 only.

Defines the 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.

Available since API-level: 17

Source

pub const NODE_ON_CLICK_EVENT: ArkUI_NodeEventType

Available on crate feature api-18 only.

Defines the event triggered when the bound component is clicked.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_UIInputEvent.

Available since API-level: 18

Source

pub const NODE_ON_HOVER_EVENT: ArkUI_NodeEventType

Available on crate feature api-17 only.

Defines the event triggered when the mouse pointer hovers over or moves away from a component.

This event is triggered when the mouse pointer enters or leaves the component’s bounding box.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_UIInputEvent.

Available since API-level: 17

Source

pub const NODE_VISIBLE_AREA_APPROXIMATE_CHANGE_EVENT: ArkUI_NodeEventType

Available on crate feature api-17 only.

Sets the callback for the NODE_EVENT_ON_VISIBLE_AREA_CHANGE event, which limits the callback interval.

The callback 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 callback, you must configure the threshold and update interval using NODE_VISIBLE_AREA_APPROXIMATE_CHANGE_RATIO.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains two parameters:

ArkUI_NodeComponentEvent.data[0].i32: how the ratio of the component’s visible area to its total area changes compared to the previous one. The value 1 indicates an increase, and 0 indicates a decrease.

ArkUI_NodeComponentEvent.data[1].f32: ratio of the component’s visible area to its total area when this callback is invoked.

Available since API-level: 17

Source

pub const NODE_ON_HOVER_MOVE: ArkUI_NodeEventType

Available on crate feature api-15 only.

Defines the hover event.

The event is triggered when the pointer is hovered by a pen device. within the component.

When the event callback occurs, the ArkUI_NodeEvent object can be obtained from the ArkUI_UIInputEvent object.

Available since API-level: 15

Source

pub const NODE_ON_SIZE_CHANGE: ArkUI_NodeEventType

Available on crate feature api-21 only.

Defines the size change event.

The event will be 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 four parameters: ArkUI_NodeComponentEvent.data[0].f32: the width of the old rectangle. ArkUI_NodeComponentEvent.data[1].f32: the height of the old rectangle. ArkUI_NodeComponentEvent.data[2].f32: the width of the new rectangle. ArkUI_NodeComponentEvent.data[3].f32: the height of the new rectangle.

Available since API-level: 21

Source

pub const NODE_TEXT_ON_DETECT_RESULT_UPDATE: ArkUI_NodeEventType

Triggers onDetectResultUpdate callback when the text is set to TextDataDetectorConfig and recognized successfully.

Trigger this event when TextDataDetectorConfig is set and recognized successfully.

When the event callback occurs, the event parameterArkUI_NodeEventThe union type in the object is ArkUI_StringAsyncEvent.

ArkUI_StringAsyncEventcontains 1 parameter

ArkUI_StringAsyncEvent.pStr:Indicates the result of text recognition, in Json format.

Source

pub const NODE_TEXT_SPAN_ON_LONG_PRESS: ArkUI_NodeEventType

Available on crate feature api-20 only.

Defines the long press event for span.

The event is triggered when the span is long pressed. When the event callback occurs, the ArkUI_NodeEvent object can be obtained from the ArkUI_UIInputEvent object.

Available since API-level: 20

Source

pub const NODE_IMAGE_ON_COMPLETE: ArkUI_NodeEventType

Defines the 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 nine parameters:

ArkUI_NodeComponentEvent.data[0].i32: loading status. The value 0 indicates that the image is loaded successfully, and the value 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.

Source

pub const NODE_IMAGE_ON_ERROR: ArkUI_NodeEventType

Defines the 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 one parameter:

ArkUI_NodeComponentEvent.data[0].i32error code:

401: The image could not be obtained because the image path is invalid.

103101: The image format is not supported.

Source

pub const NODE_IMAGE_ON_SVG_PLAY_FINISH: ArkUI_NodeEventType

Defines the 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.

Source

pub const NODE_IMAGE_ON_DOWNLOAD_PROGRESS: ArkUI_NodeEventType

Defines image download process event.

This event is triggered when downloading webpage images from page components.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains two parameter:

ArkUI_NodeComponentEvent.data[0].u32: the num of bytes downloaded.

ArkUI_NodeComponentEvent.data[1].u32: the total number of bytes to download.

Source

pub const NODE_TOGGLE_ON_CHANGE: ArkUI_NodeEventType

Defines the 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 one parameter:

ArkUI_NodeComponentEvent.data[0].i32: toggle status. 1: on; 0: off.

Source

pub const NODE_TEXT_INPUT_ON_CHANGE: ArkUI_NodeEventType

Defines the event triggered when the text input content changes.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_StringAsyncEvent.

ArkUI_StringAsyncEvent contains one parameter:

ArkUI_StringAsyncEvent.pStr: text input.

Source

pub const NODE_TEXT_INPUT_ON_SUBMIT: ArkUI_NodeEventType

Defines the event triggered when the Enter key of the text input method is pressed.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains one parameter:

ArkUI_NodeComponentEvent.data[0].i32: Enter key type of the input method.

Source

pub const NODE_TEXT_INPUT_ON_CUT: ArkUI_NodeEventType

Defines the 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 one parameter:

ArkUI_StringAsyncEvent.pStr: text that is cut.

Source

pub const NODE_TEXT_INPUT_ON_PASTE: ArkUI_NodeEventType

Defines the 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 one parameter:

ArkUI_StringAsyncEvent.pStr: text that is pasted

Source

pub const NODE_TEXT_INPUT_ON_TEXT_SELECTION_CHANGE: ArkUI_NodeEventType

Defines the 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 two 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.

Source

pub const NODE_TEXT_INPUT_ON_EDIT_CHANGE: ArkUI_NodeEventType

Defines the event triggered when the input status changes.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains one parameter:

ArkUI_NodeComponentEvent.data[0].i32: true indicates that text input is in progress.

Source

pub const NODE_TEXT_INPUT_ON_CONTENT_SIZE_CHANGE: ArkUI_NodeEventType

textInput This event is triggered when the input content changes.

Conditions for triggering this event: When the input content changes.

When the event callback occurs, the union type in the event parameter ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains 2 parameters:

ArkUI_NodeComponentEvent.data[0].f32: Indicates the width of the text.

ArkUI_NodeComponentEvent.data[1].f32: Indicates the height of the text.

Source

pub const NODE_TEXT_INPUT_ON_INPUT_FILTER_ERROR: ArkUI_NodeEventType

Defines the 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 one parameter:

ArkUI_StringAsyncEvent.pStr: content that is filtered out when regular expression matching fails.

Source

pub const NODE_TEXT_INPUT_ON_CONTENT_SCROLL: ArkUI_NodeEventType

This callback is triggered 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 two parameters:

ArkUI_NodeComponentEvent.data[0].i32: Indicates the horizontal offset of the text in the content area.

ArkUI_NodeComponentEvent.data[1].i32: Indicates the vertical coordinate offset of

the text in the content area.

Source

pub const NODE_TEXT_INPUT_ON_WILL_INSERT: ArkUI_NodeEventType

Defines the event triggered when text is about to be entered.

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.

§Returns
  • Returns true if the text is entered; returns false otherwise. You can set the return value using OH_ArkUI_NodeEvent_SetReturnNumberValue.
Source

pub const NODE_TEXT_INPUT_ON_DID_INSERT: ArkUI_NodeEventType

Defines the event triggered when text is entered.

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.

Source

pub const NODE_TEXT_INPUT_ON_WILL_DELETE: ArkUI_NodeEventType

Defines the event triggered when text is about to be deleted.

The event parameter is ArkUI_NodeEvent.

value.f32: position of the text to delete, 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.

§Returns
  • Returns true if the text is deleted; returns false otherwise.

You can set the return value using OH_ArkUI_NodeEvent_SetReturnNumberValue.

Source

pub const NODE_TEXT_INPUT_ON_DID_DELETE: ArkUI_NodeEventType

Defines the event triggered when text is deleted.

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.

Source

pub const NODE_TEXT_INPUT_ON_CHANGE_WITH_PREVIEW_TEXT: ArkUI_NodeEventType

Available on crate feature api-15 only.

Defines the event triggered when content (including preview text) changes in the TextInput component.

When the event callback occurs, the union type ArkUI_NodeEvent 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.

Available since API-level: 15

Source

pub const NODE_TEXT_INPUT_ON_WILL_CHANGE: ArkUI_NodeEventType

Available on crate feature api-20 only.

Defines the event triggered before content changes

When the event callback occurs, the union type ArkUI_NodeEvent 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.

Available since API-level: 20

Source

pub const NODE_TEXT_AREA_ON_CHANGE: ArkUI_NodeEventType

Defines the event triggered 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 one parameter:

ArkUI_StringAsyncEvent.pStr: text entered.

Source

pub const NODE_TEXT_AREA_ON_PASTE: ArkUI_NodeEventType

Defines the 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 one parameter:

ArkUI_StringAsyncEvent.pStr: text that is pasted

Source

pub const NODE_TEXT_AREA_ON_TEXT_SELECTION_CHANGE: ArkUI_NodeEventType

Defines the 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 two 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.

Source

pub const NODE_TEXT_AREA_ON_INPUT_FILTER_ERROR: ArkUI_NodeEventType

Defines the 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 one parameter:

ArkUI_StringAsyncEvent.pStr: content that is filtered out when regular expression matching fails.

Source

pub const NODE_TEXT_AREA_ON_CONTENT_SCROLL: ArkUI_NodeEventType

This callback is triggered 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 two parameters:

ArkUI_NodeComponentEvent.data[0].i32: Indicates the horizontal offset of the text in the content area.

ArkUI_NodeComponentEvent.data[1].i32: Indicates the vertical coordinate offset of

the text in the content area.

Source

pub const NODE_TEXT_AREA_ON_EDIT_CHANGE: ArkUI_NodeEventType

Defines the event triggered when the input status changes.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is

ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains one parameter:

ArkUI_NodeComponentEvent.data[0].i32: true indicates that text input is in progress.

Source

pub const NODE_TEXT_AREA_ON_SUBMIT: ArkUI_NodeEventType

Defines the event triggered when the Enter key on the keyboard is pressed for the multi-line text box.

This event 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 one parameter:

ArkUI_NodeComponentEvent.data[0].i32: type of the Enter key.

Source

pub const NODE_TEXT_AREA_ON_CONTENT_SIZE_CHANGE: ArkUI_NodeEventType

textArea This event is triggered when the input content changes.

Conditions for triggering this event: When the input content changes.

When the event callback occurs, the union type in the event parameter ArkUI_NodeEvent object is

ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains 2 parameters:

ArkUI_NodeComponentEvent.data[0].f32: Indicates the width of the text.

ArkUI_NodeComponentEvent.data[1].f32: Indicates the height of the text.

Source

pub const NODE_TEXT_AREA_ON_WILL_INSERT: ArkUI_NodeEventType

Defines the event triggered when text is about to be entered.

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.

§Returns
  • Returns true if the text is entered; returns false otherwise. You can set the return value using OH_ArkUI_NodeEvent_SetReturnNumberValue.
Source

pub const NODE_TEXT_AREA_ON_DID_INSERT: ArkUI_NodeEventType

Defines the event triggered when text is entered.

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.

Source

pub const NODE_TEXT_AREA_ON_WILL_DELETE: ArkUI_NodeEventType

Defines the event triggered when text is about to be deleted.

The event parameter is ArkUI_NodeEvent.

value.f32: position of the text to delete, 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.

§Returns
  • Returns true if the text is deleted; returns false otherwise.

You can set the return value using OH_ArkUI_NodeEvent_SetReturnNumberValue.

Source

pub const NODE_TEXT_AREA_ON_DID_DELETE: ArkUI_NodeEventType

Defines the event triggered when text is deleted.

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.

Source

pub const NODE_TEXT_AREA_ON_CHANGE_WITH_PREVIEW_TEXT: ArkUI_NodeEventType

Available on crate feature api-15 only.

Defines the event triggered when content (including preview text) changes in the TextArea component.

When the event callback occurs, the union type ArkUI_NodeEvent 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.

Available since API-level: 15

Source

pub const NODE_TEXT_AREA_ON_WILL_CHANGE: ArkUI_NodeEventType

Available on crate feature api-20 only.

Defines the event triggered before content changes.

When the event callback occurs, the union type ArkUI_NodeEvent 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.

Available since API-level: 20

Source

pub const NODE_CHECKBOX_EVENT_ON_CHANGE: ArkUI_NodeEventType

Defines the 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].i321: selected; 0: not selected.

Source

pub const NODE_DATE_PICKER_EVENT_ON_DATE_CHANGE: ArkUI_NodeEventType

Defines the 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 three 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.

Source

pub const NODE_TIME_PICKER_EVENT_ON_CHANGE: ArkUI_NodeEventType

Defines the event triggered when a 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 two 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].

Source

pub const NODE_TEXT_PICKER_EVENT_ON_CHANGE: ArkUI_NodeEventType

Defines the event triggered when an item 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 one parameter:

ArkUI_NodeComponentEvent.data[0…11].i32: value of the selected item.

Source

pub const NODE_TEXT_PICKER_EVENT_ON_SCROLL_STOP: ArkUI_NodeEventType

Available on crate feature api-14 only.

Defines the event triggered when an item is selected and scrolling has stopped 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 one parameter:

ArkUI_NodeComponentEvent.data[0…11].i32: value of the selected item.

Available since API-level: 14

Source

pub const NODE_CALENDAR_PICKER_EVENT_ON_CHANGE: ArkUI_NodeEventType

Defines the event triggered when a date is selected in the NODE_CALENDAR_PICKER.

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.

Source

pub const NODE_SLIDER_EVENT_ON_CHANGE: ArkUI_NodeEventType

Defines the 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 two parameters:

ArkUI_NodeComponentEvent.data[0].f32: current slider value.

ArkUI_NodeComponentEvent.data[1].i32: state triggered by the event.

Source

pub const NODE_RADIO_EVENT_ON_CHANGE: ArkUI_NodeEventType

Defines the event callback function triggered when an object is dragged or clicked by ARKUI_NODE_RADIO. When the event callback occurs, the union type in the ArkUI_NodeEvent object is

ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains one parameter:

ArkUI_NodeComponentEvent.data[0].i32: option button status.

Source

pub const NODE_IMAGE_ANIMATOR_EVENT_ON_START: ArkUI_NodeEventType

Defines the event callback function triggered when the animation starts to play.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is

ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains no parameter:

Source

pub const NODE_IMAGE_ANIMATOR_EVENT_ON_PAUSE: ArkUI_NodeEventType

Defines the event callback function triggered when the animation playback is paused.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is

ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains no parameter:

Source

pub const NODE_IMAGE_ANIMATOR_EVENT_ON_REPEAT: ArkUI_NodeEventType

Defines the event callback function triggered when the animation playback is repeated.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is

ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains no parameter:

Source

pub const NODE_IMAGE_ANIMATOR_EVENT_ON_CANCEL: ArkUI_NodeEventType

Defines the event callback function when the 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 contains no parameter:

Source

pub const NODE_IMAGE_ANIMATOR_EVENT_ON_FINISH: ArkUI_NodeEventType

Defines the event callback function triggered when the animation playback is complete or stopped.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is

ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains no parameter:

Source

pub const NODE_CHECKBOX_GROUP_EVENT_ON_CHANGE: ArkUI_NodeEventType

Available on crate feature api-15 only.

Defines the callback triggered when the selected status of the ARKUI_NODE_CHECKBOX_GROOUP or checkbox changes.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_StringAsyncEvent.

ArkUI_StringAsyncEvent.pStr Name: The names of the selected checkboxes; Status: 0: All checkboxes are selected. 1: Some checkboxes are selected. 2: No checkboxes are selected.

Available since API-level: 15

Source

pub const NODE_SWIPER_EVENT_ON_CHANGE: ArkUI_NodeEventType

Defines the event triggered when the index of the currently displayed element of this ARKUI_NODE_SWIPER instance changes.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains one parameter:

ArkUI_NodeComponentEvent.data[0].i32: index of the currently displayed element.

Source

pub const NODE_SWIPER_EVENT_ON_ANIMATION_START: ArkUI_NodeEventType

Defines the event triggered when the switching animation of this ARKUI_NODE_SWIPER instance starts.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains five 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.

Source

pub const NODE_SWIPER_EVENT_ON_ANIMATION_END: ArkUI_NodeEventType

Defines the event triggered when the switching animation of this ARKUI_NODE_SWIPER instance ends.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains two 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.

Source

pub const NODE_SWIPER_EVENT_ON_GESTURE_SWIPE: ArkUI_NodeEventType

Defines the event triggered on a frame-by-frame basis when the page is turned by a swipe in this ARKUI_NODE_SWIPER instance.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains two 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.

Source

pub const NODE_SWIPER_EVENT_ON_CONTENT_DID_SCROLL: ArkUI_NodeEventType

Define the ARKUI_NODE_SWIPER to listen for Swiper page slide events. Instruction:

  1. If the [ArkUI_SwiperDisplayModeType] attribute is set to

ARKUI_SWIPER_DISPLAY_MODE_AUTO_LINEAR, the interface does not take effect.

2, circular scenario, set prevMargin and nextMargin attributes,

so that Swiper front and back end display the same page, the interface does not take effect.

  1. During page sliding, the ContentDidScrollCallback callback is

triggered frame-by-frame for all pages in the window.

For example, when there are two pages in the window with subscripts 0 and 1,

callbacks with index values 0 and 1 are triggered twice per frame.

4, set the swipeByGroup parameter of the displayCount property to

true if at least one page in the same group is in the window,

A callback is triggered for all pages in the group.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains four parameters:

ArkUI_NodeComponentEvent.data[0].i32 : indicates the index of the Swiper component,

which is consistent with the index change in the onChange event.

ArkUI_NodeComponentEvent.data[1].i32 : The index of a page in the window.

ArkUI_NodeComponentEvent.data[2].f32 : The proportion of page movement relative to

the start position of the Swiper spindle (selectedIndex corresponds to the start position of the page).

ArkUI_NodeComponentEvent.data[3].f32 : The length of the page in the axis direction.

Source

pub const NODE_SWIPER_EVENT_ON_CONTENT_WILL_SCROLL: ArkUI_NodeEventType

Available on crate feature api-15 only.

Defines the event triggered when content in the swiper component will scroll. Instructions: Before page scrolling, the ContentWillScrollCallback callback is invoked.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains three parameters:

ArkUI_NodeComponentEvent.data[0].i32: the index value of the current child page.

ArkUI_NodeComponentEvent.data[1].i32: the index value of the child page that will display.

ArkUI_NodeComponentEvent.data[2].f32: the sliding offset of each frame. Positive numbers indicating slide backward(e.g. from index=1 to index=0), negative numbers indicating slide forward(e.g. from index=0 to index=1).

Available since API-level: 15

Source

pub const NODE_SWIPER_EVENT_ON_SELECTED: ArkUI_NodeEventType

Available on crate feature api-18 only.

Defines the event triggered when the selected index of the ARKUI_NODE_SWIPER changed.

This event is triggered under the following scenarios:

  1. When the page switching animation starts after the user lifts their finger after swiping and the swipe meets the threshold for page turning.

  2. When the page is changed programmatically 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 one parameter:

ArkUI_NodeComponentEvent.data[0].i32: index of the currently selected element.

Available since API-level: 18

Source

pub const NODE_SWIPER_EVENT_ON_UNSELECTED: ArkUI_NodeEventType

Available on crate feature api-18 only.

Defines the event triggered when the selected index of the ARKUI_NODE_SWIPER changed.

This event is triggered under the following scenarios:

  1. When the page switching animation starts after the user lifts their finger after swiping and the swipe meets the threshold for page turning.

  2. When the page is changed programmatically 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 one parameter:

ArkUI_NodeComponentEvent.data[0].i32: the index of the element becomes unselected.

Available since API-level: 18

Source

pub const NODE_SWIPER_EVENT_ON_SCROLL_STATE_CHANGED: ArkUI_NodeEventType

Available on crate feature api-20 only.

Defines the ARKUI_NODE_SWIPER scroll state change event. This event is triggered when the scroll state of the Swiper component changes during user dragging, during the animation phase after the user lifts their finger, or upon stopping of scrolling. When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains one parameter:

ArkUI_NodeComponentEvent.data[0].i32: current scroll state. The parameter type is ArkUI_ScrollState.

Available since API-level: 20

Source

pub const NODE_SCROLL_EVENT_ON_SCROLL: ArkUI_NodeEventType

Defines the event triggered when the ARKUI_NODE_SCROLL component scrolls.

Notes for triggering the event:

  1. This event is triggered when scrolling is started by the ARKUI_NODE_SCROLL component or other input settings, such as keyboard and mouse operations.

  2. Scrolling can be initiated by calling the controller API.

  3. The out-of-bounds bounce effect is supported.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains two parameters:

ArkUI_NodeComponentEvent.data[0].f32: horizontal scrolling offset.

ArkUI_NodeComponentEvent.data[1].f32: vertical scrolling offset.

Source

pub const NODE_SCROLL_EVENT_ON_SCROLL_FRAME_BEGIN: ArkUI_NodeEventType

Defines the event triggered when each frame scrolling starts in the ARKUI_NODE_SCROLL component.

Notes for triggering the event:

  1. This event is triggered when scrolling is started by the ARKUI_NODE_SCROLL component or other input settings, such as keyboard and mouse operations.

  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 two parameters:

ArkUI_NodeComponentEvent.data[0].f32: amount to scroll by.

ArkUI_NodeComponentEvent.data[1].i32: current scrolling 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.

Source

pub const NODE_SCROLL_EVENT_ON_WILL_SCROLL: ArkUI_NodeEventType

Define the enumeration value of the pre sliding trigger event for the scrolling container component.

The conditions that trigger this event:

  1. When the scrolling component triggers scrolling, it supports input settings such as keyboard and mouse operations that trigger scrolling.

  2. Called through the rolling controller API interface.

  3. Cross boundary rebound.

When an event callback occurs, the union type in the event parameter ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains four parameters:

ArkUI_NodeComponentEvent.data[0].f32: The offset for each frame of scrolling is positive when scrolling to the left and negative when scrolling to the right, measured in vp.

ArkUI_NodeComponentEvent.data[1].f32: The offset of each frame scrolling, with a positive offset when scrolling up and a negative offset when scrolling down, measured in vp.

ArkUI_NodeComponentEvent.data[2].i32: Current sliding state,

parameter type is ArkUI_ScrollState.

ArkUI_NodeComponentEvent.data[3].i32: Current scroll source,

parameter type is ArkUI_ScrollSource.

§Returns
  • Does not return or returns a number that sets the actual scroll distance of the scroll component.
Source

pub const NODE_SCROLL_EVENT_ON_DID_SCROLL: ArkUI_NodeEventType

Define the event enumeration value triggered when sliding a scrolling container component.

The conditions that trigger this event:

  1. When the scrolling component triggers scrolling, it supports input settings such as keyboard and mouse operations that trigger scrolling.

  2. Called through the rolling controller API interface.

  3. Cross boundary rebound.

When an event callback occurs, the union type in the event parameter ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains three parameters:

ArkUI_NodeComponentEvent.data[0].f32: The offset for each frame of scrolling is positive when scrolling to the left and negative when scrolling to the right, measured in vp.

ArkUI_NodeComponentEvent.data[1].f32: The offset of each frame scrolling, with a positive offset when scrolling up and a negative offset when scrolling down, measured in vp.

ArkUI_NodeComponentEvent.data[2].i32: Current sliding state,

parameter type is ArkUI_ScrollState.

Source

pub const NODE_SCROLL_EVENT_ON_SCROLL_START: ArkUI_NodeEventType

Defines the event triggered when scrolling starts in the ARKUI_NODE_SCROLL component.

Notes for triggering the event:

  1. This event is triggered when scrolling is started, with support for other input settings, such as keyboard and mouse operations.

  2. This event is triggered when the controller API is called, 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.

Source

pub const NODE_SCROLL_EVENT_ON_SCROLL_STOP: ArkUI_NodeEventType

Defines the event triggered when scrolling of the ARKUI_NODE_SCROLL component stops.

Notes for triggering the event:

  1. This event is triggered when scrolling is stopped by the ARKUI_NODE_SCROLL component or other input settings, such as keyboard and mouse operations.

  2. This event is triggered when the controller API is called, 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.

Source

pub const NODE_SCROLL_EVENT_ON_SCROLL_EDGE: ArkUI_NodeEventType

Defines the event triggered when scrolling of the ARKUI_NODE_SCROLL component reaches one of the edges.

Notes for triggering the event:

  1. This event is triggered when scrolling reaches the edge after being started by the ARKUI_NODE_SCROLL component or other input settings, such as keyboard and mouse operations.

  2. Scrolling can be initiated by calling the controller API.

  3. The out-of-bounds bounce effect is supported.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains one parameter.

ArkUI_NodeComponentEvent.data[0].i32: edge (top, bottom, left, or right) that the scrolling reaches.

Source

pub const NODE_SCROLL_EVENT_ON_REACH_START: ArkUI_NodeEventType

Define that a callback is triggered when the scrolling container component reaches the start position. Condition for triggering the event:

Triggered when the component reaches the start position.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains no parameters.

Source

pub const NODE_SCROLL_EVENT_ON_REACH_END: ArkUI_NodeEventType

Define that a callback is triggered when the scrolling container component ends.

Condition for triggering the event:

Triggered when the component reaches the end.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains no parameters.

Source

pub const NODE_SCROLL_EVENT_ON_WILL_STOP_DRAGGING: ArkUI_NodeEventType

Available on crate feature api-20 only.

Defines the callback for when the user is about to release the drag on the scrollable container component.

This event is triggered when the user is about to release the drag on the scrollable container component.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains one parameter:

ArkUI_NodeComponentEvent.data[0].f32: speed at which the user releases the drag, in vp.

Available since API-level: 20

Source

pub const NODE_SCROLL_EVENT_ON_DID_ZOOM: ArkUI_NodeEventType

Available on crate feature api-20 only.

Defines the callback for the Scroll component’s 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 one parameter:

ArkUI_NodeComponentEvent.data[0].f32: current zoom scale.

Available since API-level: 20

Source

pub const NODE_SCROLL_EVENT_ON_ZOOM_START: ArkUI_NodeEventType

Available on crate feature api-20 only.

Defines the callback for the 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.

Available since API-level: 20

Source

pub const NODE_SCROLL_EVENT_ON_ZOOM_STOP: ArkUI_NodeEventType

Available on crate feature api-20 only.

Defines the callback for the 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.

Available since API-level: 20

Source

pub const NODE_SCROLL_EVENT_ON_WILL_START_DRAGGING: ArkUI_NodeEventType

Available on crate feature api-21 only.

Defines the callback for when the scrollable will start dragging.

This event is triggered when the scrollable will start dragging.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains no parameters:

Available since API-level: 21

Source

pub const NODE_SCROLL_EVENT_ON_DID_STOP_DRAGGING: ArkUI_NodeEventType

Available on crate feature api-21 only.

Defines the callback for when the scrollable did end dragging.

This event is triggered when the scrollable did end dragging.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains one parameter:

ArkUI_NodeComponentEvent.data[0].i32: whether start fling animation.

Available since API-level: 21

Source

pub const NODE_SCROLL_EVENT_ON_WILL_START_FLING: ArkUI_NodeEventType

Available on crate feature api-21 only.

Defines the callback for when the scrollable will start fling.

This event is triggered when the scrollable will start fling.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains no parameters:

Available since API-level: 21

Source

pub const NODE_SCROLL_EVENT_ON_DID_STOP_FLING: ArkUI_NodeEventType

Available on crate feature api-21 only.

Defines the callback for when the scrollable did end fling.

This event is triggered when the scrollable did end fling.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains no parameters:

Available since API-level: 21

Source

pub const NODE_LIST_ON_SCROLL_INDEX: ArkUI_NodeEventType

Defines the enumerated values of the event triggered,

when a subcomponent of ARKUI_NODE_LIST is moved into or out of the list display area.

Condition for triggering the event:

This method is triggered once during list initialization.

It is triggered when the index value of the first or last subcomponent 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 three parameters:

ArkUI_NodeComponentEvent.data[0].i32: List Displays the index value of

the first child component in the region.

ArkUI_NodeComponentEvent.data[1].i32: List Displays the index value of

the last child component in the region.

ArkUI_NodeComponentEvent.data[2].i32: List Displays the index value of

the subcomponent in the middle of the area.

Source

pub const NODE_LIST_ON_WILL_SCROLL: ArkUI_NodeEventType

Defines the enumerated values of the event triggered before the sliding of the ARKUI_NODE_LIST component.

Condition for triggering the event:

This event is triggered when the scrolling component triggers scrolling.

Other inputs that trigger scrolling, such as keyboard and mouse operations, can be set.

Called through the scroll controller API.

Out-of-bounds rebound.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is

ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains three parameters:

ArkUI_NodeComponentEvent.data[0].f32: offset of each frame scrolling.

The offset is positive when the list content is scrolled up and

is negative when the list content is scrolled down.

ArkUI_NodeComponentEvent.data[1].i32: Current sliding state.

parameter type is ArkUI_ScrollState.

ArkUI_NodeComponentEvent.data[2].i32: Current scroll source,

parameter type is ArkUI_ScrollSource.

§Returns
  • Does not return or returns a number that sets the actual scroll distance of the scroll component.
Source

pub const NODE_LIST_ON_DID_SCROLL: ArkUI_NodeEventType

Define the enumerated values of the event triggered when the ARKUI_NODE_LIST component is flicked. Condition for triggering the event:

This event is triggered when the scrolling component triggers scrolling.

Other inputs that trigger scrolling, such as keyboard and mouse operations, can be set.

Called through the scroll controller API.

Out-of-bounds rebound.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is

ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains two parameters:

ArkUI_NodeComponentEvent.data[0].f32: offset of each frame scrolling.

The offset is positive when the list content is scrolled up and

is negative when the list content is scrolled down.

ArkUI_NodeComponentEvent.data[1].i32: Current sliding state.

Source

pub const NODE_LIST_ON_SCROLL_VISIBLE_CONTENT_CHANGE: ArkUI_NodeEventType

Available on crate feature api-15 only.

Defines the event triggered when the currently displayed content of the ARKUI_NODE_LIST changes.

Notes for triggering the event:

This event is triggered once when the list is initialized and when the index of the first child component or the next child component in the list display area changes. During index calculation, the list item, header of the list item group, and footer of the list item group each are counted as a child component.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains three 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.

Available since API-level: 15

Source

pub const NODE_REFRESH_STATE_CHANGE: ArkUI_NodeEventType

Defines the event triggered when the refresh state of the ARKUI_NODE_REFRESH object changes.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains one parameter:

ArkUI_NodeComponentEvent.data[0].i32: refresh state.

Source

pub const NODE_REFRESH_ON_REFRESH: ArkUI_NodeEventType

Defines the event triggered when the ARKUI_NODE_REFRESH object 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:

Source

pub const NODE_REFRESH_ON_OFFSET_CHANGE: ArkUI_NodeEventType

Defines the event that is triggered when the ARKUI_NODE_REFRESH drop-down distance changes.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains one parameter:

ArkUI_NodeComponentEvent.data[0].f32: Pull-down distance.

Source

pub const NODE_ON_WILL_SCROLL: ArkUI_NodeEventType

Defines the event triggered when the ARKUI_NODE_SCROLL component is about to scroll.

Notes for triggering the event:

  1. This event is triggered when scrolling is started by the ARKUI_NODE_SCROLL component or other input settings, such as keyboard and mouse operations.

  2. Scrolling can be initiated by calling the controller API.

  3. The out-of-bounds bounce effect is supported.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains three parameters:

ArkUI_NodeComponentEvent.data[0].f32: offset of each frame scrolling.

The offset is positive when the list content is scrolled up and

is negative when the list content is scrolled down.

ArkUI_NodeComponentEvent.data[1].i32: Current sliding state.

parameter type is ArkUI_ScrollState.

ArkUI_NodeComponentEvent.data[2].i32: Current scroll source,

parameter type is ArkUI_ScrollSource.

§Returns
  • Does not return or returns a number that sets the actual scroll distance of the scroll component.
Source

pub const NODE_WATER_FLOW_ON_DID_SCROLL: ArkUI_NodeEventType

Define the enumerated values of the event triggered when the ARKUI_NODE_WATER_FLOW component slides. Condition for triggering the event:

This event is triggered when the scrolling component triggers scrolling. Other inputs that trigger scrolling, such as keyboard and mouse operations, can be set.

Called through the scroll controller API.

Out-of-bounds rebound.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is

ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains two parameters:

ArkUI_NodeComponentEvent.data[0].f32: offset of each frame scrolling.

The offset is positive when the content is scrolled up and is negative when the content is scrolled down.

ArkUI_NodeComponentEvent.data[1].i32: Current sliding state.

Source

pub const NODE_WATER_FLOW_ON_SCROLL_INDEX: ArkUI_NodeEventType

Defines the enumerated values of the event triggered, when the subcomponent of the start position or end position displayed in the current waterfall changes. Condition for triggering the event:

This event is triggered when the index value of the

first or last subcomponent in the waterfall display area changes.

When the event callback occurs, the union type in the ArkUI_NodeEvent object is

ArkUI_NodeComponentEvent.

ArkUI_NodeComponentEvent contains three parameters:

ArkUI_NodeComponentEvent.data[0].i32: The index value of the

start position of the currently displayed WaterFlow.

ArkUI_NodeComponentEvent.data[1].i32: The index value of

the end position of the currently displayed waterfall.

Trait Implementations§

Source§

impl Clone for ArkUI_NodeEventType

Source§

fn clone(&self) -> ArkUI_NodeEventType

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ArkUI_NodeEventType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for ArkUI_NodeEventType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ArkUI_NodeEventType

Source§

fn eq(&self, other: &ArkUI_NodeEventType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for ArkUI_NodeEventType

Source§

impl Eq for ArkUI_NodeEventType

Source§

impl StructuralPartialEq for ArkUI_NodeEventType

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.