Raxol.Terminal.CharsetManager (Raxol v0.5.0)

View Source

Manages the terminal character sets.

Summary

Functions

Applies a single shift to the state.

Designates a charset for the given g-set.

Gets the current g-set.

Gets the designated charset for the given g-set.

Gets the current single shift.

Gets the current state.

Invokes the given g-set.

Resets the state to its initial values.

Updates the state.

Types

t()

@type t() :: %Raxol.Terminal.CharsetManager{
  designated_charsets: map(),
  g_set: atom(),
  state: map()
}

Functions

apply_single_shift(state, shift)

@spec apply_single_shift(t(), atom()) :: t()

Applies a single shift to the state.

designate_charset(state, g_set, charset)

@spec designate_charset(t(), atom(), atom()) :: t()

Designates a charset for the given g-set.

get_current_g_set(state)

@spec get_current_g_set(t()) :: atom()

Gets the current g-set.

get_designated_charset(state, g_set)

@spec get_designated_charset(t(), atom()) :: atom()

Gets the designated charset for the given g-set.

get_single_shift(state)

@spec get_single_shift(t()) :: atom()

Gets the current single shift.

get_state(state)

@spec get_state(t()) :: map()

Gets the current state.

invoke_g_set(state, g_set)

@spec invoke_g_set(t(), atom()) :: t()

Invokes the given g-set.

reset_state(state)

@spec reset_state(t()) :: t()

Resets the state to its initial values.

update_state(state, new_state)

@spec update_state(t(), map()) :: t()

Updates the state.