pub enum Event {
Show 32 variants
Pointer(PointerEvent),
PointerCancel(PointerCancelEvent),
Timer {
token: TimerToken,
},
Ime(ImeEvent),
ExternalDrag(ExternalDragEvent),
ExternalDropData(ExternalDropDataEvent),
InternalDrag(InternalDragEvent),
KeyDown {
key: KeyCode,
modifiers: Modifiers,
repeat: bool,
},
KeyUp {
key: KeyCode,
modifiers: Modifiers,
},
TextInput(String),
SetTextSelection {
anchor: u32,
focus: u32,
},
ClipboardWriteCompleted {
token: ClipboardToken,
outcome: ClipboardWriteOutcome,
},
ClipboardReadText {
token: ClipboardToken,
text: String,
},
ClipboardReadFailed {
token: ClipboardToken,
error: ClipboardAccessError,
},
ShareSheetCompleted {
token: ShareSheetToken,
outcome: ShareSheetOutcome,
},
PrimarySelectionText {
token: ClipboardToken,
text: String,
},
PrimarySelectionTextUnavailable {
token: ClipboardToken,
},
FileDialogSelection(FileDialogSelection),
FileDialogData(FileDialogDataEvent),
FileDialogCanceled,
IncomingOpenRequest {
token: IncomingOpenToken,
items: Vec<IncomingOpenItem>,
},
IncomingOpenData(IncomingOpenDataEvent),
IncomingOpenUnavailable {
token: IncomingOpenToken,
},
ImageRegistered {
token: ImageUploadToken,
image: ImageId,
width: u32,
height: u32,
},
ImageRegisterFailed {
token: ImageUploadToken,
message: String,
},
ImageUpdateApplied {
token: ImageUpdateToken,
image: ImageId,
},
ImageUpdateDropped {
token: ImageUpdateToken,
image: ImageId,
reason: ImageUpdateDropReason,
},
WindowCloseRequested,
WindowFocusChanged(bool),
WindowScaleFactorChanged(f32),
WindowMoved(WindowLogicalPosition),
WindowResized {
width: Px,
height: Px,
},
}Variants§
Pointer(PointerEvent)
PointerCancel(PointerCancelEvent)
Timer
Fields
token: TimerTokenIme(ImeEvent)
ExternalDrag(ExternalDragEvent)
ExternalDropData(ExternalDropDataEvent)
InternalDrag(InternalDragEvent)
KeyDown
KeyUp
TextInput(String)
SetTextSelection
Sets the current selection (or caret when anchor == focus) in UTF-8 byte offsets
within the focused widget’s text buffer (ADR 0071).
This event is primarily intended for accessibility and automation backends.
ClipboardWriteCompleted
Clipboard write request completed.
ClipboardReadText
Clipboard text payload delivered to the focused widget (typically as the result of a paste request).
ClipboardReadFailed
Clipboard read completed without a text payload (clipboard empty/unavailable/error).
Share sheet request completed.
PrimarySelectionText
Linux primary selection text payload delivered to the focused widget.
This typically originates from middle-click paste when primary selection is enabled.
Primary selection read completed without a text payload (unavailable/empty/error).
FileDialogSelection(FileDialogSelection)
File dialog selection metadata (token + names). Bytes must be requested via effects.
FileDialogData(FileDialogDataEvent)
File dialog data payload, typically produced by Effect::FileDialogReadAll.
FileDialogCanceled
A file dialog request completed without a selection (user canceled).
IncomingOpenRequest
Incoming-open request originating from the OS (open-in / share-target).
Apps must treat the token as ephemeral; privileged platform references remain runner-owned.
IncomingOpenData(IncomingOpenDataEvent)
Incoming-open data payload, typically produced by Effect::IncomingOpenReadAll.
Incoming-open token became unavailable (denied/revoked/expired).
ImageRegistered
Image resource registration completed and produced an ImageId.
ImageRegisterFailed
Image resource registration failed (e.g. invalid bytes, backend error).
ImageUpdateApplied
Optional acknowledgement that a streaming image update was applied.
This is intended for debugging/telemetry surfaces and must be capability-gated by the runner to avoid flooding the event loop during video playback (ADR 0124).
ImageUpdateDropped
Optional acknowledgement that a streaming image update was dropped.
See ImageUpdateApplied for rationale (ADR 0124).
WindowCloseRequested
Window close button / OS close request was triggered.
The runner must not close the window immediately; the app/driver may intercept the request
(e.g. unsaved-changes confirmation) and decide whether to emit WindowRequest::Close.
WindowFocusChanged(bool)
Window focus state changed (focused vs blurred).