Raxol.Terminal.Driver (Raxol v2.0.1)

View Source

Handles raw terminal input/output and event generation.

Responsibilities:

  • Setting terminal mode (raw, echo)
  • Reading input events via termbox2_nif NIF
  • Parsing input events into Raxol.Core.Events.Event structs
  • Detecting terminal resize events
  • Sending parsed events to the Dispatcher
  • Restoring terminal state on exit

Summary

Functions

Returns a specification to start this module under a supervisor.

Processes a terminal position change event.

Processes a terminal title change event.

Types

dispatcher_pid()

@type dispatcher_pid() :: pid() | nil

original_stty()

@type original_stty() :: String.t()

termbox_state()

@type termbox_state() :: :uninitialized | :initialized | :failed

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

handle_manager_call(request, from, state)

Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_call/3.

process_position_change(x, y, state)

Processes a terminal position change event.

process_title_change(title, state)

Processes a terminal title change event.

start_link(init_opts \\ [])