term_styled_ostream
classThe term_styled_ostream
class supports styled output to a file
descriptor that is connected to a terminal emulator or console. Its type
is ‘term_styled_ostream_t’. It is a subclass of
‘styled_ostream_t’.
It can be instantiated through this function:
Creates an output stream referring to the file descriptor fd
,
styled with the file css_filename
.
filename
is used only for error messages.
tty_control
specifies the amount of control to take over the
underlying tty.
Note: The resulting stream must be closed before fd
can be
closed.
Returns NULL
upon failure.
The following is a variant of this function. Upon failure, it does not
return NULL
; instead, it returns a styled fd_stream
on
which the styling operations exist but are no-ops.
Creates an output stream referring to the file descriptor fd
,
styled with the file css_filename
if possible.
filename
is used only for error messages.
tty_control
specifies the amount of control to take over the
underlying tty.
Note: The resulting stream must be closed before fd
can be
closed.