Raxol.Terminal.ScreenBuffer.Core (Raxol v2.0.1)
View SourceCore functionality for screen buffer creation, initialization, and basic queries. Consolidates: Initializer, Common, Helpers, and basic state management.
Summary
Functions
Clears the entire buffer.
Gets a cell at the specified coordinates.
Gets the character at the specified coordinates.
Gets the buffer dimensions.
Gets the buffer height.
Gets a line of cells.
Gets the buffer width.
Creates a new screen buffer with the specified dimensions.
Resizes the buffer to new dimensions.
Converts buffer to legacy cell grid format for backward compatibility.
Checks if coordinates are within buffer bounds.
Types
@type t() :: %Raxol.Terminal.ScreenBuffer.Core{ alternate_screen: boolean(), cells: [[Raxol.Terminal.Cell.t()]], cursor_blink: boolean(), cursor_position: {non_neg_integer(), non_neg_integer()}, cursor_style: atom(), cursor_visible: boolean(), damage_regions: [tuple()], default_style: map(), height: non_neg_integer(), scroll_position: non_neg_integer(), scroll_region: nil | {non_neg_integer(), non_neg_integer()}, scrollback: [[Raxol.Terminal.Cell.t()]], scrollback_limit: non_neg_integer(), selection: nil | map(), width: non_neg_integer() }
Functions
Clears the entire buffer.
@spec get_cell(t(), non_neg_integer(), non_neg_integer()) :: Raxol.Terminal.Cell.t() | nil
Gets a cell at the specified coordinates.
@spec get_char(t(), non_neg_integer(), non_neg_integer()) :: String.t()
Gets the character at the specified coordinates.
@spec get_dimensions(t()) :: {non_neg_integer(), non_neg_integer()}
Gets the buffer dimensions.
@spec get_height(t()) :: non_neg_integer()
Gets the buffer height.
@spec get_line(t(), non_neg_integer()) :: [Raxol.Terminal.Cell.t()]
Gets a line of cells.
@spec get_width(t()) :: non_neg_integer()
Gets the buffer width.
@spec new(non_neg_integer(), non_neg_integer(), non_neg_integer()) :: t()
Creates a new screen buffer with the specified dimensions.
@spec resize(t(), non_neg_integer(), non_neg_integer()) :: t()
Resizes the buffer to new dimensions.
@spec to_cell_grid(t()) :: [[Raxol.Terminal.Cell.t()]]
Converts buffer to legacy cell grid format for backward compatibility.
Checks if coordinates are within buffer bounds.