United States-English |
|
|
HP-UX Reference > Vvidattr(3X)ENHANCED CURSESHP-UX 11i Version 3: February 2007 |
|
NAMEvidattr, vid_attr, vidputs, vid_puts — output attributes to the terminal SYNOPSIS#include <curses.h> int vidattr(chtype attr); int vid_attr(attr_t attr, short color_pair_number, void *opt); int vidputs(chtype attr, int (*putfunc)(int)); int vid_puts(attr_t attr, short color_pair_number, void *opt, int (*putwfunc)(int)); DESCRIPTIONThese 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(). The vidattr() function neither relies on nor updates the model Curses maintains of the prior rendition mode. The vidputs() function computes the same terminal output string that vidattr() does, based on attr, but vidputs() outputs by calling the user-supplied function putfunc. The user-supplied function putfunc (specified as an argument to vidputs()) is either putchar() or some other function with the same prototype. The vidputs() function ignores the return value of 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 short for the color pair number and void * and thus support the attribute constants with the WA_ prefix. The opts argument is reserved for definition in a future edition of this document. Currently, the application must provide a null pointer as opts. The user-supplied function putwfunc (specified as an argument to vid_puts()) is either putwchar() or some other function with the same prototype. The vid_puts() function ignores the return value of putwfunc. APPLICATION USAGEAfter use of any of these functions, the model Curses maintains of the state of the terminal might not match the actual state of the terminal. The application should touch and refresh the window before resuming conventional use of Curses. Use of these functions requires that the application contain so much information about a particular class of terminal that it defeats the purpose of using Curses. On some terminals, a command to change rendition conceptually occupies space in the screen buffer (with or without width). Thus, a command to set the terminal to a new rendition would change the rendition of some characters already displayed. SEE ALSOdoupdate(3X), is_linetouched(3X), tigetflag(3X), putchar() (in the X/Open System Interfaces and Headers, Issue 4, Version 2 specification), putwchar() (in the X/Open System Interfaces and Headers, Issue 4, Version 2 specification), <curses.h>. |
Printable version | ||
|