Raxol.Terminal.OperationsBehaviour behaviour (Raxol v2.0.1)
View SourceDefines the behaviour for core terminal operations.
This behaviour consolidates all the essential terminal operations that were previously missing proper behaviour definitions. It includes operations for:
- Cursor management
- Screen manipulation
- Text input/output
- Selection handling
- Display control
Summary
Types
@type color() :: {non_neg_integer(), non_neg_integer(), non_neg_integer()}
@type dimensions() :: {non_neg_integer(), non_neg_integer()}
@type position() :: {non_neg_integer(), non_neg_integer()}
@type scroll_region() :: {non_neg_integer(), non_neg_integer()}
@type style() :: map() | nil
@type t() :: term()
Callbacks
@callback clear_line(t(), non_neg_integer()) :: t()
@callback delete_chars(t(), non_neg_integer()) :: t()
@callback delete_lines(t(), non_neg_integer()) :: t()
@callback erase_chars(t(), non_neg_integer()) :: t()
@callback get_cell_at(t(), non_neg_integer(), non_neg_integer()) :: Raxol.Terminal.Cell.t()
@callback get_content(t()) :: [[Raxol.Terminal.Cell.t()]]
@callback get_line(t(), non_neg_integer()) :: [Raxol.Terminal.Cell.t()]
@callback get_scroll_bottom(t()) :: non_neg_integer()
@callback get_scroll_region(t()) :: scroll_region()
@callback get_scroll_top(t()) :: non_neg_integer()
@callback get_text_in_region( t(), non_neg_integer(), non_neg_integer(), non_neg_integer(), non_neg_integer() ) :: String.t()
@callback in_selection?(t(), non_neg_integer(), non_neg_integer()) :: boolean()
@callback insert_chars(t(), non_neg_integer()) :: t()
@callback insert_lines(t(), non_neg_integer()) :: t()
@callback prepend_lines(t(), non_neg_integer()) :: t()
@callback set_blink_rate(t(), non_neg_integer()) :: t()
@callback set_cursor_position(t(), non_neg_integer(), non_neg_integer()) :: t()
@callback set_scroll_region(t(), scroll_region()) :: t()
@callback start_selection(t(), non_neg_integer(), non_neg_integer()) :: t()
@callback update_selection(t(), non_neg_integer(), non_neg_integer()) :: t()
@callback write_string( t(), non_neg_integer(), non_neg_integer(), String.t(), style() ) :: t()