Raxol.Terminal.Emulator.Struct (Raxol v2.0.1)
View SourceProvides terminal emulator structure and related functionality.
Summary
Functions
Gets the cursor position from the emulator.
Gets the active buffer from the emulator.
Checks if scrolling is needed and performs it if necessary.
Moves the cursor to the specified position.
Moves the cursor down by the specified number of lines.
Moves the cursor left by the specified number of columns.
Moves the cursor right by the specified number of columns.
Moves the cursor to the specified position.
Moves the cursor to the specified column.
Moves the cursor to the start of the current line.
Moves the cursor up by the specified number of lines.
Creates a new terminal emulator with the given options.
Processes input for the emulator.
Resets a terminal mode.
Sets the character set for the emulator.
Sets a terminal mode.
Updates the active buffer in the emulator.
Types
@type t() :: %Raxol.Terminal.Emulator.Struct{ active_buffer: Raxol.Terminal.ScreenBuffer.t(), active_buffer_type: :main | :alternate, alternate_screen_buffer: Raxol.Terminal.ScreenBuffer.t(), buffer: term(), charset_state: %{ g0: atom(), g1: atom(), g2: atom(), g3: atom(), gl: atom(), gr: atom(), single_shift: atom() | nil }, client_options: map(), color_palette: map(), command: term(), command_history: [String.t()], config: term(), current_command_buffer: String.t(), current_hyperlink: term(), current_hyperlink_url: String.t() | nil, cursor: %{ position: {integer(), integer()}, style: atom(), visible: boolean(), blink_state: boolean() }, cursor_manager: term(), cursor_style: atom(), event: term(), height: non_neg_integer(), icon_name: String.t() | nil, last_col_exceeded: boolean(), last_key_event: term(), main_screen_buffer: Raxol.Terminal.ScreenBuffer.t(), max_command_history: non_neg_integer(), memory_limit: non_neg_integer(), mode_manager: term(), output_buffer: String.t(), parser_state: term(), plugin_manager: term(), saved_cursor: %{ position: {integer(), integer()}, style: atom(), visible: boolean(), blink_state: boolean() } | nil, scroll_region: {non_neg_integer(), non_neg_integer()} | nil, scrollback_buffer: [Raxol.Terminal.ScreenBuffer.t()], scrollback_limit: non_neg_integer(), session_id: String.t(), state: atom(), state_stack: list(), style: map(), tab_stops: [integer()], width: non_neg_integer(), window_manager: term(), window_title: String.t() | nil }
Functions
@spec get_cursor_position(t()) :: {non_neg_integer(), non_neg_integer()}
Gets the cursor position from the emulator.
@spec get_screen_buffer(t()) :: Raxol.Terminal.ScreenBuffer.t()
Gets the active buffer from the emulator.
Checks if scrolling is needed and performs it if necessary.
Moves the cursor to the specified position.
Moves the cursor down by the specified number of lines.
Moves the cursor left by the specified number of columns.
Moves the cursor right by the specified number of columns.
Moves the cursor to the specified position.
Moves the cursor to the specified column.
Moves the cursor to the start of the current line.
Moves the cursor up by the specified number of lines.
@spec new(non_neg_integer(), non_neg_integer(), keyword()) :: t()
Creates a new terminal emulator with the given options.
Processes input for the emulator.
Resets a terminal mode.
Sets the character set for the emulator.
Sets a terminal mode.
@spec update_active_buffer(t(), Raxol.Terminal.ScreenBuffer.t()) :: t()
Updates the active buffer in the emulator.