GATE
C/C++ Framework
Loading...
Searching...
No Matches
terminals.h File Reference

process terminal management library More...

Macros

#define GATE_TERMINAL_FLAG_ECHO   0x0001
#define GATE_TERMINAL_FLAG_GETCTRL   0x0002
#define GATE_TERMINAL_FLAG_VT100   0x8000

Functions

GATE_SYSTEM_API gate_terminal_tgate_terminal_console_get_current ()
 Returns a terminal interface object that covers the currently attached process terminal.
GATE_SYSTEM_API gate_terminal_tgate_terminal_console_open (gate_enumint_t flags)
 Opens a new terminal with specified settings and attaches it to the process.
GATE_SYSTEM_API gate_terminal_tgate_terminal_virtual_create (gate_uint16_t columns, gate_uint16_t rows, gate_enumint_t flags, gate_terminal_read_char_t read_callback, void *read_param, gate_terminal_write_char_t write_callback, void *write_param)
 Creates a virtual (in-memory) terminal independent from system or process.

Detailed Description

process terminal management library

Macro Definition Documentation

◆ GATE_TERMINAL_FLAG_ECHO

#define GATE_TERMINAL_FLAG_ECHO   0x0001

entered keys are written on output device

◆ GATE_TERMINAL_FLAG_GETCTRL

#define GATE_TERMINAL_FLAG_GETCTRL   0x0002

CTRL+key (like CTRL+C) are handled as keyboard input (and are not processed by system)

◆ GATE_TERMINAL_FLAG_VT100

#define GATE_TERMINAL_FLAG_VT100   0x8000

enables VT100 terminal features

Function Documentation

◆ gate_terminal_console_get_current()

GATE_SYSTEM_API gate_terminal_t * gate_terminal_console_get_current ( )

Returns a terminal interface object that covers the currently attached process terminal.

Returns
Pointer to terminal interface or NULL on error

◆ gate_terminal_console_open()

GATE_SYSTEM_API gate_terminal_t * gate_terminal_console_open ( gate_enumint_t flags)

Opens a new terminal with specified settings and attaches it to the process.

Parameters
[in]flagscombination of GATE_TERMINAL_FLAG_* values

◆ gate_terminal_virtual_create()

GATE_SYSTEM_API gate_terminal_t * gate_terminal_virtual_create ( gate_uint16_t columns,
gate_uint16_t rows,
gate_enumint_t flags,
gate_terminal_read_char_t read_callback,
void * read_param,
gate_terminal_write_char_t write_callback,
void * write_param )

Creates a virtual (in-memory) terminal independent from system or process.

Parameters
[in]columnsamount of cell columns in the new terminal
[in]rowsamount of cell rows in the new terminal
[in]flagscombination of GATE_TERMINAL_FLAG_* values
[in]read_callbackcallback function to be invoked when a read operation is performed
[in]read_paramuser parameter attached to each read_callback call
[in]write_callbackcallback function to be invoked when a write operation is performed
[in]write_paramuser parameter attached to each write_callback call