Orange.Terminal behaviour (orange v0.1.0)

Provides API to interact with the terminal.

Summary

Functions

Disable terminal raw mode.

Draws the buffer to the terminal. If a previous buffer is provided, it will only draw the diff between the two buffers.

Enable terminal raw mode.

Enter terminal alternate screen.

Hide terminal cursor.

Leave terminal alternate screen.

Polls the terminal for events.

Show terminal cursor.

See Orange.Terminal.Binding.terminal_size/0.

Callbacks

Link to this callback

disable_raw_mode()

@callback disable_raw_mode() :: :ok
@callback draw(buffer :: Orange.Renderer.Buffer.t()) :: :ok
Link to this callback

draw(buffer, previous_buffer)

@callback draw(
  buffer :: Orange.Renderer.Buffer.t(),
  previous_buffer :: Orange.Renderer.Buffer.t()
) :: :ok
Link to this callback

enable_raw_mode()

@callback enable_raw_mode() :: :ok
Link to this callback

enter_alternate_screen()

@callback enter_alternate_screen() :: :ok
@callback hide_cursor() :: :ok
Link to this callback

leave_alternate_screen()

@callback leave_alternate_screen() :: :ok
@callback poll_event() :: [Orange.Terminal.KeyEvent.t()]
@callback show_cursor() :: :ok
Link to this callback

terminal_size()

@callback terminal_size() :: {non_neg_integer(), non_neg_integer()}

Functions

Link to this function

disable_raw_mode()

Disable terminal raw mode.

Link to this function

draw(buffer, previous_buffer \\ nil)

Draws the buffer to the terminal. If a previous buffer is provided, it will only draw the diff between the two buffers.

Link to this function

enable_raw_mode()

Enable terminal raw mode.

Link to this function

enter_alternate_screen()

Enter terminal alternate screen.

Hide terminal cursor.

Link to this function

leave_alternate_screen()

Leave terminal alternate screen.

Polls the terminal for events.

Show terminal cursor.

Link to this function

terminal_size()

See Orange.Terminal.Binding.terminal_size/0.