Raxol.Terminal.ANSI.CharacterSets.StateManager (Raxol v0.4.0)

View Source

Manages character set state and operations.

Summary

Functions

Converts a character set code to an atom.

Clears the single shift character set.

Gets the active character set.

Gets the active GR character set.

Gets the active G-set character set.

Gets the GL (left) character set.

Gets the GR (right) character set.

Gets a G-set character set.

Gets the single shift character set.

Converts a G-set index to an atom.

Creates a new character set state with default values.

Sets the active character set.

Sets the GL (left) character set.

Sets the GR (right) character set.

Sets a G-set character set.

Sets the single shift character set.

Types

charset()

@type charset() ::
  :us_ascii
  | :dec_special_graphics
  | :uk
  | :us
  | :finnish
  | :french
  | :french_canadian
  | :german
  | :italian
  | :norwegian_danish
  | :portuguese
  | :spanish
  | :swedish
  | :swiss

charset_state()

@type charset_state() :: %{
  active: charset(),
  single_shift: charset() | nil,
  g0: charset(),
  g1: charset(),
  g2: charset(),
  g3: charset(),
  gl: :g0 | :g1 | :g2 | :g3,
  gr: :g0 | :g1 | :g2 | :g3
}

Functions

charset_code_to_atom(code)

Converts a character set code to an atom.

clear_single_shift(state)

Clears the single shift character set.

get_active(state)

Gets the active character set.

get_active_gr(state)

Gets the active GR character set.

get_active_gset(state)

Gets the active G-set character set.

get_gl(state)

Gets the GL (left) character set.

get_gr(state)

Gets the GR (right) character set.

get_gset(state, gset)

Gets a G-set character set.

get_single_shift(state)

Gets the single shift character set.

index_to_gset(index)

Converts a G-set index to an atom.

new()

Creates a new character set state with default values.

set_active(state, set)

Sets the active character set.

set_gl(state, gset)

Sets the GL (left) character set.

set_gr(state, gset)

Sets the GR (right) character set.

set_gset(state, gset, set)

Sets a G-set character set.

set_single_shift(state, set)

Sets the single shift character set.