:termbox2_nif (Raxol v2.0.1)

View Source

Termbox2 NIF for Elixir - A terminal UI library.

Summary

Functions

Clear the terminal.

Get the height of the terminal.

Hide the cursor. Returns 0 on success, -1 on error.

Initialize the termbox2 library. Returns 0 on success, -1 on error.

Present the changes to the terminal.

Print a string at the specified position. Returns 0 on success, -1 on error.

Set a cell in the terminal. Returns 0 on success, -1 on error.

Set the cursor position.

Set the input mode. Returns the previous mode.

Set the output mode. Returns the previous mode.

Set the terminal window position. Returns {:ok, "set"} on success, {:error, reason} on failure.

Set the terminal title. Returns {:ok, "set"} on success, {:error, reason} on failure.

Shutdown the termbox2 library.

Get the width of the terminal.

Functions

load_nif()

tb_clear()

Clear the terminal.

tb_height()

Get the height of the terminal.

tb_hide_cursor()

Hide the cursor. Returns 0 on success, -1 on error.

tb_init()

Initialize the termbox2 library. Returns 0 on success, -1 on error.

tb_present()

Present the changes to the terminal.

tb_print(x, y, fg, bg, str)

Print a string at the specified position. Returns 0 on success, -1 on error.

tb_set_cell(x, y, ch, fg, bg)

Set a cell in the terminal. Returns 0 on success, -1 on error.

tb_set_cursor(x, y)

Set the cursor position.

tb_set_input_mode(mode)

Set the input mode. Returns the previous mode.

tb_set_output_mode(mode)

Set the output mode. Returns the previous mode.

tb_set_position(x, y)

Set the terminal window position. Returns {:ok, "set"} on success, {:error, reason} on failure.

tb_set_title(title)

Set the terminal title. Returns {:ok, "set"} on success, {:error, reason} on failure.

tb_shutdown()

Shutdown the termbox2 library.

tb_width()

Get the width of the terminal.