Orange.Terminal behaviour (orange v0.4.0)
Provides API to interact with the terminal.
Summary
Functions
Clear all terminal.
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
clear()
@callback clear() :: :ok
disable_raw_mode()
@callback disable_raw_mode() :: :ok
draw(buffer)
@callback draw(buffer :: Orange.Renderer.Buffer.t()) :: :ok
draw(buffer, previous_buffer)
@callback draw(
buffer :: Orange.Renderer.Buffer.t(),
previous_buffer :: Orange.Renderer.Buffer.t()
) :: :ok
enable_raw_mode()
@callback enable_raw_mode() :: :ok
enter_alternate_screen()
@callback enter_alternate_screen() :: :ok
hide_cursor()
@callback hide_cursor() :: :ok
leave_alternate_screen()
@callback leave_alternate_screen() :: :ok
poll_event()
@callback poll_event() :: [Orange.Terminal.KeyEvent.t()]
show_cursor()
@callback show_cursor() :: :ok
terminal_size()
@callback terminal_size() :: {non_neg_integer(), non_neg_integer()}
Functions
clear()
Clear all terminal.
disable_raw_mode()
Disable terminal raw mode.
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.
enable_raw_mode()
Enable terminal raw mode.
enter_alternate_screen()
Enter terminal alternate screen.
hide_cursor()
Hide terminal cursor.
leave_alternate_screen()
Leave terminal alternate screen.
poll_event()
Polls the terminal for events.
show_cursor()
Show terminal cursor.
terminal_size()
See Orange.Terminal.Binding.terminal_size/0
.