Skip to main content

Module event

Module event 

Source
Expand description

Shared event payload types bridging ArkUI native events into dioxus.

When an ArkUI event fires, the renderer wraps the payload in an ArkEventData and forwards it to Runtime::handle_event. The listener installed by impl_event! downcasts the Rc<dyn Any> back to ArkEventData and converts it into the specific event data type (e.g. ClickData, ChangeData).

§Payload carrying

Each typed data type (ChangeData, ScrollData, …) reads fields from ArkEventData::payload. Native payloads are populated at the ArkUI event boundary; None remains the explicit representation for payload-free events such as refresh and submit-fire.

Structs§

AccessibilityActionData
Action requested by an accessibility service.
AreaData
Data for an element-bound area/layout change event.
ArkEventData
Platform event payload carrying an ArkUI native event.
AxisData
AxisPayload
ChangeData
Data for a value-change event (checkbox/toggle/radio/slider/text input).
ClickData
Data for a click/press event.
FocusData
Data for native focus and blur events.
HoverData
Data for a hover event. is_hovering is true on pointer enter, false on exit.
KeyData
Data for a physical keyboard event.
KeyModifiers
Modifier snapshot attached to a physical key event.
KeyPayload
Raw and normalized keyboard values captured during the native callback.
KeyboardCapture
Declarative native key ownership. Unclaimed keys retain platform behavior.
LayoutPayload
Element layout frame in physical pixels, relative to the window.
MousePayload
Raw mouse values captured during the native callback.
PointerData
Data for a touch or pointer movement event. Drag lifecycle events currently carry None because ArkUI exposes ArkUI_DragEvent rather than an input event; use NodeBuilder’s raw drag callbacks when the native object is required.
PointerPayload
Pointer coordinates and target bounds carried by ArkUI input events.
ReachEndData
Data for a scroll-container reach-end event. No payload.
RefreshData
Data for a refresh event (refresh trigger). No payload.
ScrollData
Data for a scroll event (list/grid/water-flow/scroll).
ScrollIndexPayload
Scroll-index payload shared by list/grid/water-flow on_scroll events.
ScrollOffsetPayload
SubmitData
Data for a submit event (text input/area enter key). Carries the optional return code ArkUI passes to the submit callback.
SwiperChangeData
Data for a swiper change event. Carries the newly selected index.

Enums§

ArkEventKind
Semantic identity of an ArkUI event listener.
ArkEventPayload
Typed payload carried by an ArkEventData.
KeyAction
Native key lifecycle normalized across OpenHarmony keyboard sources.
KeyboardKey
Platform-neutral key identity used by desktop-capable components.
KeyboardNavigation
Directional-key policy for lists, tabs, and calendar grids.
MouseButton
Platform-neutral mouse button identity.
PointerAction
Platform-neutral pointer phase used by touch-capable components.
PointerSource

Functions§

classify_event_name
Classify an RSX listener name passed by Dioxus to a renderer.
keyboard_navigation_target

Type Aliases§

MouseData
Data for a native mouse event.