HPlogo MPE/iX Developer's Kit Reference Manual Volume 2: HP 3000 MPE/iX Computer Systems > Chapter 4 CURSES

vidputs vidattr

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

The vidputs and vidattr routines are used to display a string with video attributes (interface to terminfo).

Syntax

   #include <curses.h>



   int vidputs (chtype attrs, int (*putc) (int));

   int vidattr (chtype attrs);

Parameters

attrs

The attributes of the foreground window.

putc

The output function.

Return Values

OK

Successful completion.

ERR

An error occurred.

Description

The vidputs() and vidattr() routines are low-level routines used outside of CURSES to deal directly with the terminfo database. The use of appropriate CURSES routines is recommended for most situations.

The vidputs() routine enables and disables attributes for the current terminal. The attributes shown in Table 4-8 “Constant Values for Highlighting Attributes” are defined in curses.h and can be combined with the bitwise OR operator.

Table 4-8 Constant Values for Highlighting Attributes

ConstantDescription
A_ALTCHARSETAlternate character set
A_ATTRIBUTESAttribute mask
A_BLINKBlinking
A_BOLDBold
A_CHARTEXTCharacter mask
A_COLORColor mask
A_DIMDim
A_INVISInvisible
A_NORMALDisable attributes
A_PROTECTNo display
A_REVERSEReverse video
A_STANDOUTHighlights specific to terminal
A_UNDERLINEUnderline
COLOR_PAIR(n)Color-pair number n
PAIR_NUMBER(a)Pair number for COLOR_PAIR(n)

 

The characters are passed one at a time to the putc routine, a routine similar to putchar().

The vidattr() routine is similar to vidputs() except characters are sent to stdout instead of a user-supplied output function.

Implementation Considerations

UNIX System V implementation

Portability

HP-UX, UNIX System V

Feedback to webmaster