These functions output commands to the terminal that change the terminal's attributes.
If the terminfo database indicates that the terminal in use can display characters in the rendition specified by attr, then vidattr() outputs
one or more commands to request that the terminal display subsequent characters in that rendition. The function outputs by calling putchar(3C). The vidattr() function neither relies on your updates the model which Curses maintains of the prior rendition mode.
The vidputs() function computes the terminal output string that vidattr() does, based on attr, but vidputs() outputs
by calling the user-supplied function putfunc. The vid_attr() and vid_puts() functions correspond to vidattr() and vidputs() respectively, but take a set of arguments, one of type attr_t for the attributes, one of type short for the color pair number, and a void
*, and thus support the attribute constants with the WA_ prefix.
The opts argument is reserved for definition in a future release. Currently, it is implemented as a null pointer.
The user-supplied function putfunc (which can be specified as an argument to either vidputs() or vid_puts()) is either putchar() or some other function with the same prototype. Both the vidputs() and vid_puts() functions ignore the return value of putfunc.
|