Raxol.Terminal.Modes.Types.ModeTypes (Raxol v0.5.0)

View Source

Defines types and constants for terminal modes. Provides a centralized registry of all terminal modes and their properties.

Summary

Functions

Returns all registered modes.

Returns all modes of a specific category.

Looks up a DEC private mode code and returns the corresponding mode definition.

Looks up a standard mode code and returns the corresponding mode definition.

Types

mode()

@type mode() :: %{
  category: mode_category(),
  code: integer(),
  name: atom(),
  default_value: mode_value(),
  dependencies: [mode()],
  conflicts: [mode()]
}

mode_category()

@type mode_category() :: :dec_private | :standard | :mouse | :screen_buffer

mode_state()

@type mode_state() :: :enabled | :disabled | :unknown

mode_value()

@type mode_value() :: boolean() | atom() | integer()

Functions

get_all_modes()

@spec get_all_modes() :: %{required(integer()) => mode()}

Returns all registered modes.

get_modes_by_category(category)

@spec get_modes_by_category(mode_category()) :: [mode()]

Returns all modes of a specific category.

lookup_private(code)

@spec lookup_private(integer()) :: mode() | nil

Looks up a DEC private mode code and returns the corresponding mode definition.

lookup_standard(code)

@spec lookup_standard(integer()) :: mode() | nil

Looks up a standard mode code and returns the corresponding mode definition.