Raxol.UI.Components.Terminal.Emulator (Raxol v2.6.0)

View Source

Terminal emulator component wrapping the core emulator logic.

Summary

Functions

Cleans up resources when the component is destroyed.

Handles terminal resize events by delegating to State. This ensures that the terminal's internal buffers and state are correctly adjusted while preserving existing content and history where possible.

Initializes a new terminal emulator component state. Accepts an optional map of options, currently supporting :width and :height.

Processes input and updates terminal state by delegating to IOServer. Returns a tuple {updated_state, output_string}.

Renders the current terminal state.

Types

emulator_state()

@type emulator_state() :: %{state: Raxol.Terminal.Integration.State.t()}

Functions

cleanup(map)

Cleans up resources when the component is destroyed.

handle_resize(arg, state)

Handles terminal resize events by delegating to State. This ensures that the terminal's internal buffers and state are correctly adjusted while preserving existing content and history where possible.

init(opts \\ %{})

Initializes a new terminal emulator component state. Accepts an optional map of options, currently supporting :width and :height.

process_input(input, state)

Processes input and updates terminal state by delegating to IOServer. Returns a tuple {updated_state, output_string}.

render(state)

Renders the current terminal state.