pub fn newterm<S, O, I>(
term: Option<S>,
output: &O,
input: &I
) -> Result<SCREEN, NCurseswError> where
S: Into<String>,
O: AsRawFd + Write,
I: AsRawFd + Read,
Expand description
A program that outputs to more than one terminal should use the newterm()
routine for each terminal instead of initscr()
. A program that needs to
inspect capabilities, so it can continue to run in a line-oriented mode
if the terminal cannot support a screen-oriented program, would also use
newterm()
. The routine newterm()
should be called once for each terminal.
It returns a pointer of type SCREEN which should be saved as a reference
to that terminal. newterm’s arguments are:
- the type of the terminal to be used in place of $TERM,
- a file descriptor for output to the terminal, and…
- another file descriptor for input from the terminal
If the term_type
parameter is None
, $TERM will be used.