Class

TermboxTerminal

Description

final class Termbox.Terminal : GObject.Object
{
  /* No available fields */
}

A process-global termbox terminal.

Termbox2 stores terminal state globally, so only one TbgTerminal may exist at a time. Constructors fail with TBG_ERROR_INIT_ALREADY if a terminal is already active; use tbg_terminal_get_default() to retrieve the existing terminal. The underlying termbox instance is shut down when the terminal is finalized.

termbox-glib does not add locking around termbox2’s process-global terminal state. Create, use, and destroy TbgTerminal from the main thread, and attach its event source to a main-thread GMainContext.

Hierarchy

hierarchy this TbgTerminal ancestor_0 GObject ancestor_0--this

Ancestors

Constructors

tbg_terminal_new

Initialize termbox and return the terminal singleton.

tbg_terminal_new_for_fd

Initialize termbox from an existing terminal file descriptor and return the terminal singleton.

tbg_terminal_new_for_fds

Initialize termbox from separate terminal file descriptors and return the terminal singleton.

tbg_terminal_new_for_path

Initialize termbox from a terminal device path and return the terminal singleton.

Functions

tbg_terminal_get_default

Return the current terminal singleton.

Instance methods

tbg_terminal_clear

Clear the internal back buffer.

tbg_terminal_create_event_source

Create a GSource that integrates termbox events with a GMainContext.

tbg_terminal_extend_cell

Append one Unicode code point to the cell at x, y.

tbg_terminal_get_cell

Return a snapshot copy of the cell at x, y.

tbg_terminal_get_height

Return the height of the internal back buffer.

tbg_terminal_get_input_mode

Return the current input mode.

tbg_terminal_get_output_mode

Return the current output mode.

tbg_terminal_get_width

Return the width of the internal back buffer.

tbg_terminal_hide_cursor

Hide the terminal cursor.

tbg_terminal_invalidate

Clear termbox’s internal front buffer so the next present forces a complete re-render of the back buffer.

tbg_terminal_present

Synchronize termbox’s internal back buffer with the terminal.

tbg_terminal_print

Print UTF-8 text into the internal back buffer.

tbg_terminal_print_ex

Print UTF-8 text into the internal back buffer and optionally return its display width.

tbg_terminal_printf

Format UTF-8 text and print it into the internal back buffer.

tbg_terminal_printf_ex

Format UTF-8 text, print it into the internal back buffer, and optionally return its display width.

tbg_terminal_send

Queue raw bytes to be written to the terminal.

tbg_terminal_send_bytes

Queue raw bytes to be written to the terminal.

tbg_terminal_set_cell

Set a cell in the internal back buffer.

tbg_terminal_set_cell_ex

Set a cell in the internal back buffer using one or more Unicode code points. This is the grapheme-cluster variant of tbg_terminal_set_cell().

tbg_terminal_set_clear_attrs

Set the attributes used by tbg_terminal_clear().

tbg_terminal_set_cursor

Set the cursor position. The upper-left cell is at position 0, 0.

tbg_terminal_set_input_mode

Set the input mode.

tbg_terminal_set_output_mode

Set the output mode.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

Termbox.Terminal:height

The height of the internal back buffer, in cells.

Termbox.Terminal:width

The width of the internal back buffer, in cells.

Signals

Termbox.Terminal::event

Emitted for every terminal event.

Termbox.Terminal::key

Emitted for key events.

Termbox.Terminal::mouse

Emitted for mouse events.

Termbox.Terminal::resize

Emitted for resize events.

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct TermboxTerminalClass {
  GObjectClass parent_class;
  
}

No description available.

Class members
parent_class: GObjectClass

No description available.