Netzhaut
Web Browser Engine
ver.0.3.0.0
rev.0.15.61.18
nhterminal

Open terminals for TTY presentation. More...

Functions

nh_terminal_Terminalnh_terminal_openTerminal (nh_tty_TTY *TTY_p)
 Open a TTY based terminal. More...
 
NH_TERMINAL_RESULT nh_terminal_setViewport (nh_terminal_Terminal *Terminal_p, nh_gfx_Viewport *Viewport_p)
 Set the viewport of a terminal. More...
 
NH_TERMINAL_RESULT nh_terminal_setColor (nh_terminal_Terminal *Terminal_p, nh_Color Color, NH_BOOL foreground)
 Set foreground or background color of the terminal. More...
 

Detailed Description

Open terminals for TTY presentation.

This module allows the presentation of TTY logic created by the nhtty module without the use of proprietary terminals such as xterm or konsole.

Function Documentation

◆ nh_terminal_openTerminal()

nh_terminal_Terminal * nh_terminal_openTerminal ( nh_tty_TTY TTY_p)

Open a TTY based terminal.

The TTY parameter handles TTY logic while the resulting terminal handles the TTY presentation.

Parameters
TTY_pPointer to TTY. Must not be NULL.
Returns
NULL on failure. A pointer to a newly created terminal on success.

◆ nh_terminal_setColor()

NH_TERMINAL_RESULT nh_terminal_setColor ( nh_terminal_Terminal Terminal_p,
nh_Color  Color,
NH_BOOL  foreground 
)

Set foreground or background color of the terminal.

Parameters
Terminal_pPointer to terminal. Must not be NULL.
ColorThe new color.
foregroundIf NH_TRUE, the foreground aka text-color is set. If NH_FALSE the background color is set.
Returns
NH_TERMINAL_SUCCESS on success.

◆ nh_terminal_setViewport()

NH_TERMINAL_RESULT nh_terminal_setViewport ( nh_terminal_Terminal Terminal_p,
nh_gfx_Viewport Viewport_p 
)

Set the viewport of a terminal.

Without having a viewport to render into, the terminal won't know where to present the input received by the associated TTY logic.

Parameters
Terminal_pPointer to terminal. Must not be NULL.
Viewport_pPointer to viewport. Must not be NULL.
Returns
NH_TERMINAL_SUCCESS on success.