Skip to main content

Module text_events

Module text_events 

Source
Expand description

W3.2: text-editing message bus.

Every text mutation flows through TextEditRequest. The single [lumen_text_edit::text_apply_edits] system drains the bus and is the only system that mutates crate::text_model::TextBuffer.

Producers (route_ime_events, type_into_focused, pointer drag, script set_text(id, ...), paste) emit TextEditRequest; consumers react to the post-mutation TextEditApplied event.

Structs§

ImeSurroundingRequested
Backend -> core: the OS IME asked for surrounding text (W3.5). text_update_surrounding_response replies with ImeSurroundingResponse.
ImeSurroundingResponse
Core -> backend: surrounding-text reply. Backend forwards to the OS IME (Wayland text-input-v3 / IBus).
TextEditApplied
Emitted by [lumen_text_edit::text_apply_edits] after every successful mutation. Replaces ad-hoc Changed<TextContent> snooping so signal binding / validators / undo coalescing react only to real edits.
TextEditRejected
Emitted when [lumen_text_edit::text_apply_edits] drops a request.

Enums§

Anchor
Symbolic anchor inside an edit request. Resolved against the live crate::text_model::TextCursor / crate::text_model::TextBuffer inside the mutator.
AppliedKind
Classification of an applied edit for downstream observers (binding push, validators, undo coalescing).
CursorMotion
Single-axis cursor motion (mirrors QTextCursor::movePosition + GTK GtkMovementStep).
MoveMode
Selection modifier for CursorMotion requests.
RejectReason
Reasons an edit might be rejected by validators / single-line guards.
TextEditRequest
One text-editing request addressed to entity’s crate::text_model::TextBuffer.
TextEditSet
Cross-crate SystemSet labels for the text-editing pipeline.