Raxol.Terminal.Emulator.EmulatorState (Raxol Terminal v2.6.0)

Copy Markdown View Source

Handles state management for the terminal emulator. Provides functions for managing terminal state, modes, and character sets.

Summary

Functions

Gets the current character set state. Returns the current charset state.

Gets the current state from the state stack. Returns the current state or nil if stack is empty.

Gets the current hyperlink URL. Returns the current hyperlink URL or nil.

Gets the current memory limit. Returns the memory limit.

Gets the value of a terminal mode. Returns the mode value or nil if not set.

Gets the current tab stops. Returns the current tab stops.

Pops a state from the state stack. Returns {:ok, updated_emulator} or {:error, reason}.

Pushes a new state onto the state stack. Returns {:ok, updated_emulator} or {:error, reason}.

Sets the character set state. Returns {:ok, updated_emulator} or {:error, reason}.

Sets the current hyperlink URL. Returns {:ok, updated_emulator}.

Sets the memory limit for the terminal. Returns {:ok, updated_emulator} or {:error, reason}.

Sets a terminal mode. Returns {:ok, updated_emulator} or {:error, reason}.

Sets the tab stops for the terminal. Returns {:ok, updated_emulator}.

Functions

get_charset_state(emulator)

Gets the current character set state. Returns the current charset state.

get_current_state(emulator)

Gets the current state from the state stack. Returns the current state or nil if stack is empty.

get_memory_limit(emulator)

Gets the current memory limit. Returns the memory limit.

get_mode(emulator, mode)

Gets the value of a terminal mode. Returns the mode value or nil if not set.

get_tab_stops(emulator)

Gets the current tab stops. Returns the current tab stops.

pop_state(emulator)

Pops a state from the state stack. Returns {:ok, updated_emulator} or {:error, reason}.

push_state(emulator)

Pushes a new state onto the state stack. Returns {:ok, updated_emulator} or {:error, reason}.

set_charset_state(emulator, charset_state)

Sets the character set state. Returns {:ok, updated_emulator} or {:error, reason}.

set_memory_limit(emulator, limit)

Sets the memory limit for the terminal. Returns {:ok, updated_emulator} or {:error, reason}.

set_mode(emulator, mode, value)

Sets a terminal mode. Returns {:ok, updated_emulator} or {:error, reason}.

set_tab_stops(emulator, tab_stops)

Sets the tab stops for the terminal. Returns {:ok, updated_emulator}.