Raxol.Terminal.TerminalState.Manager (Raxol v0.5.0)

View Source

Manages terminal state operations for the terminal emulator. This module handles the state stack, saved states, and state transitions.

Summary

Functions

Clears all saved states.

Gets the current state.

Gets the number of saved states.

Gets the current state stack.

Checks if there are saved states.

Creates a new terminal state.

Restores the last saved state.

Saves the current state.

Updates the current state.

Functions

clear_saved_states(emulator)

@spec clear_saved_states(Raxol.Terminal.Emulator.t()) :: Raxol.Terminal.Emulator.t()

Clears all saved states.

get_current_state(emulator)

@spec get_current_state(Raxol.Terminal.Emulator.t()) :: map()

Gets the current state.

get_saved_states_count(emulator)

@spec get_saved_states_count(Raxol.Terminal.Emulator.t()) :: non_neg_integer()

Gets the number of saved states.

get_state_stack(emulator)

Gets the current state stack.

has_saved_states?(emulator)

@spec has_saved_states?(Raxol.Terminal.Emulator.t()) :: boolean()

Checks if there are saved states.

new()

Creates a new terminal state.

restore_state(emulator)

Restores the last saved state.

save_state(emulator)

Saves the current state.

update_current_state(emulator, state)

@spec update_current_state(Raxol.Terminal.Emulator.t(), map()) ::
  Raxol.Terminal.Emulator.t()

Updates the current state.

update_state_stack(emulator, state_stack)

Updates the state stack.