Expand description
Protocol helpers for scripting messages.
Both the daemon and headless modes handle Query/Interact/Reset/TreeHash messages from stdin. The logic is identical; only the surrounding event loop differs. This module contains the canonical implementations so the two modes stay in sync.
Event construction functions (parse_iced_key, parse_iced_modifiers,
make_key_pressed, make_key_released, interaction_to_iced_events) also
live here. Both the daemon renderer and headless mode use them to translate
scripting protocol interactions into iced events.
Enums§
- Selector
- A selector that identifies a widget in the UI tree.
Constants§
- MAX_
SELECTOR_ SEARCH_ DEPTH - Maximum recursion depth for selector tree traversal.
Functions§
- build_
interact_ response - Build an InteractResponse without writing it anywhere.
- build_
query_ response - Build a QueryResponse without writing it anywhere.
- build_
reset_ response - Reset core to a blank state and return the response.
- build_
tree_ hash_ response - Build a TreeHashResponse without writing it anywhere.
- emit_
wire - Write a serialized response using the given codec.
- find_
by_ selector - Find a node in the core tree using any Selector.
- find_
focused_ node - find_
id_ by_ label - find_
id_ by_ role - find_
id_ by_ text - find_
id_ focused - find_
node_ by_ id - find_
node_ by_ label - find_
node_ by_ role - find_
node_ by_ text - handle_
interact - Build and emit an InteractResponse to stdout.
- handle_
query - Build and emit a QueryResponse to stdout.
- handle_
reset - Reset core and emit the response to stdout.
- handle_
tree_ hash - Build and emit a TreeHashResponse to stdout.
- interaction_
to_ iced_ events - Convert a scripting protocol interaction into a sequence of iced events.
- make_
key_ pressed - Build a KeyPressed iced event.
- make_
key_ released - Build a KeyReleased iced event.
- parse_
iced_ key - Convert a key name string to an iced
keyboard::Key. - parse_
iced_ modifiers - Build iced
Modifiersfrom parsed scripting protocol modifiers JSON. - parse_
key_ and_ modifiers - Parse key and modifiers from an interact payload.
- parse_
selector - Parse a selector from wire protocol JSON.
- resolve_
widget_ id - Resolve a selector to a widget ID without emitting anything.