Raxol.Terminal.Buffer.Content (Raxol v0.5.0)
View SourceHandles content operations for the screen buffer. This module provides functions for writing and reading content from the buffer, including character and string operations.
Summary
Functions
Calculates the difference between the current buffer state and a list of changes.
Gets a cell at the specified position.
Gets a character at the specified position.
Gets the entire buffer content as a string.
Gets a line of cells from the buffer.
Updates a line in the buffer with new cells.
Updates the buffer with a list of changes.
Writes a character at the specified position with optional styling.
Writes a string starting at the specified position.
Functions
@spec diff( Raxol.Terminal.ScreenBuffer.t(), [{non_neg_integer(), non_neg_integer(), map()}] ) :: [{non_neg_integer(), non_neg_integer(), map()}]
Calculates the difference between the current buffer state and a list of changes.
@spec get_cell(Raxol.Terminal.ScreenBuffer.t(), non_neg_integer(), non_neg_integer()) :: Raxol.Terminal.Cell.t()
Gets a cell at the specified position.
@spec get_char(Raxol.Terminal.ScreenBuffer.t(), non_neg_integer(), non_neg_integer()) :: String.t()
Gets a character at the specified position.
@spec get_content(Raxol.Terminal.ScreenBuffer.t()) :: String.t()
Gets the entire buffer content as a string.
@spec get_line(Raxol.Terminal.ScreenBuffer.t(), non_neg_integer()) :: [ Raxol.Terminal.Cell.t() ]
Gets a line of cells from the buffer.
@spec put_line(Raxol.Terminal.ScreenBuffer.t(), non_neg_integer(), [ Raxol.Terminal.Cell.t() ]) :: Raxol.Terminal.ScreenBuffer.t()
Updates a line in the buffer with new cells.
@spec update( Raxol.Terminal.ScreenBuffer.t(), [{non_neg_integer(), non_neg_integer(), Raxol.Terminal.Cell.t() | map()}] ) :: Raxol.Terminal.ScreenBuffer.t()
Updates the buffer with a list of changes.
@spec write_char( Raxol.Terminal.ScreenBuffer.t(), non_neg_integer(), non_neg_integer(), String.t(), Raxol.Terminal.ANSI.TextFormatting.text_style() | nil ) :: Raxol.Terminal.ScreenBuffer.t()
Writes a character at the specified position with optional styling.
@spec write_string( Raxol.Terminal.ScreenBuffer.t(), non_neg_integer(), non_neg_integer(), String.t(), Raxol.Terminal.ANSI.TextFormatting.text_style() | nil ) :: Raxol.Terminal.ScreenBuffer.t()
Writes a string starting at the specified position.