Raxol.Terminal.Driver.Dispatch (Raxol Terminal v2.6.1)

Copy Markdown View Source

Event dispatching helpers for Driver: sends events to the dispatcher and handles initial resize notification.

Summary

Functions

Parses test input data into an Event struct.

Sends an event to the dispatcher pid, using direct send in test mode.

Sends an initial resize event to the dispatcher based on current terminal size.

Queries the current terminal size and dispatches a %Event{type: :resize}.

Functions

parse_test_input(input_data)

Parses test input data into an Event struct.

send_event_to_dispatcher(dispatcher_pid, event)

Sends an event to the dispatcher pid, using direct send in test mode.

send_initial_resize_event(dispatcher_pid)

Sends an initial resize event to the dispatcher based on current terminal size.

send_resize_event(dispatcher_pid)

Queries the current terminal size and dispatches a %Event{type: :resize}.

Used both for the initial size notification at Driver startup and for subsequent SIGWINCH-driven window resizes.