Raxol.Terminal.Emulator.Output (Raxol v0.4.0)
View SourceHandles output processing for the terminal emulator. Provides functions for output buffering, processing, and formatting.
Summary
Functions
Clears the output buffer. Returns {:ok, updated_emulator}.
Flushes the output buffer. Returns {:ok, updated_emulator, commands} or {:error, reason}.
Gets the current output buffer. Returns the current output buffer.
Processes output data. Returns {:ok, updated_emulator, commands} or {:error, reason}.
Writes data to the output buffer. Returns {:ok, updated_emulator}.
Writes a control character to the output buffer. Returns {:ok, updated_emulator}.
Writes an escape sequence to the output buffer. Returns {:ok, updated_emulator}.
Writes a line to the output buffer. Returns {:ok, updated_emulator}.
Functions
@spec clear_output_buffer(Raxol.Terminal.Emulator.t()) :: {:ok, Raxol.Terminal.Emulator.t()}
Clears the output buffer. Returns {:ok, updated_emulator}.
@spec flush_output_buffer(Raxol.Terminal.Emulator.t()) :: {:ok, Raxol.Terminal.Emulator.t(), list()} | {:error, String.t()}
Flushes the output buffer. Returns {:ok, updated_emulator, commands} or {:error, reason}.
@spec get_output_buffer(Raxol.Terminal.Emulator.t()) :: String.t()
Gets the current output buffer. Returns the current output buffer.
@spec process_output(Raxol.Terminal.Emulator.t(), String.t()) :: {:ok, Raxol.Terminal.Emulator.t(), list()} | {:error, String.t()}
Processes output data. Returns {:ok, updated_emulator, commands} or {:error, reason}.
@spec write(Raxol.Terminal.Emulator.t(), String.t()) :: {:ok, Raxol.Terminal.Emulator.t()}
Writes data to the output buffer. Returns {:ok, updated_emulator}.
@spec write_control(Raxol.Terminal.Emulator.t(), char()) :: {:ok, Raxol.Terminal.Emulator.t()}
Writes a control character to the output buffer. Returns {:ok, updated_emulator}.
@spec write_escape(Raxol.Terminal.Emulator.t(), String.t()) :: {:ok, Raxol.Terminal.Emulator.t()}
Writes an escape sequence to the output buffer. Returns {:ok, updated_emulator}.
@spec write_line(Raxol.Terminal.Emulator.t(), String.t()) :: {:ok, Raxol.Terminal.Emulator.t()}
Writes a line to the output buffer. Returns {:ok, updated_emulator}.