Constructor

TermboxTerminalnew

Declaration

TbgTerminal*
tbg_terminal_new (
  GError** error
)

Description

Initialize termbox and return the terminal singleton.

If a terminal already exists, this fails with TBG_ERROR_INIT_ALREADY. Use tbg_terminal_get_default() to retrieve the existing terminal. Otherwise this calls tb_init() and creates a new TbgTerminal. The terminal calls tb_shutdown() when it is finalized.

Return value

Type: TbgTerminal

A TbgTerminal, or NULL on error.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.