


curs_attr(3X)                                       curs_attr(3X)


NNAAMMEE
       ccuurrss__aattttrr:  aattttrrooffff,  wwaattttrrooffff,  aattttrroonn, wwaattttrroonn, aattttrrsseett,
       wwaattttrrsseett,  ssttaannddeenndd,  wwssttaannddeenndd,  ssttaannddoouutt,  wwssttaannddoouutt   -
       ccuurrsseess character and window attribute control routines

SSYYNNOOPPSSIISS
       ##iinncclluuddee <<ccuurrsseess..hh>>
       iinntt aattttrrooffff((aattttrr__tt aattttrrss));;
       iinntt wwaattttrrooffff((WWIINNDDOOWW **wwiinn,, aattttrr__tt aattttrrss));;
       iinntt aattttrroonn((aattttrr__tt aattttrrss));;
       iinntt wwaattttrroonn((WWIINNDDOOWW **wwiinn,, aattttrr__tt aattttrrss));;
       iinntt aattttrrsseett((aattttrr__tt aattttrrss));;
       iinntt wwaattttrrsseett((WWIINNDDOOWW **wwiinn,, aattttrr__tt aattttrrss));;
       iinntt ssttaannddeenndd((vvooiidd));;
       iinntt wwssttaannddeenndd((WWIINNDDOOWW **wwiinn));;
       iinntt ssttaannddoouutt((vvooiidd));;
       iinntt wwssttaannddoouutt((WWIINNDDOOWW **wwiinn));;
       iinntt aattttrr__ggeett((vvooiidd));;
       iinntt aattttrr__ooffff((aattttrr__tt aattttrrss));;
       iinntt aattttrr__oonn((aattttrr__tt aattttrrss));;
       iinntt aattttrr__sseett((aattttrr__tt aattttrrss));;
       iinntt wwaattttrr__ggeett((WWIINNDDOOWW **));;
       iinntt wwaattttrr__ooffff((WWIINNDDOOWW **,, aattttrr__tt aattttrrss));;
       iinntt wwaattttrr__oonn((WWIINNDDOOWW **,, aattttrr__tt aattttrrss));;
       iinntt wwaattttrr__sseett((WWIINNDDOOWW **,, aattttrr__tt aattttrrss));;
       iinntt  cchhggaatt((iinntt  nn,,  aattttrr__tt  aattttrr,, sshhoorrtt ccoolloorr,, vvooiidd **ccoonnsstt
       ooppttss))
       iinntt mmvvcchhggaatt((iinntt yy,, iinntt xx,, iinntt nn,, aattttrr__tt aattttrr,,
             sshhoorrtt ccoolloorr,, vvooiidd **ccoonnsstt ooppttss))
       iinntt wwcchhggaatt((WWIINNDDOOWW **,, iinntt nn,, aattttrr__tt aattttrr,,
             sshhoorrtt ccoolloorr,, vvooiidd **ccoonnsstt ooppttss))
       iinntt mmvvwwcchhggaatt((WWIINNDDOOWW **,, iinntt yy,, iinntt xx,, iinntt nn,, aattttrr__tt aattttrr,,
             sshhoorrtt ccoolloorr,, vvooiidd **ccoonnsstt ooppttss))

DDEESSCCRRIIPPTTIIOONN
       These routines manipulate the current  attributes  of  the
       named window.  The current attributes of a window apply to
       all characters that are written into the window with  wwaadd--
       ddcchh,  wwaaddddssttrr  and  wwpprriinnttww.  Attributes are a property of
       the character, and move with  the  character  through  any
       scrolling and insert/delete line/character operations.  To
       the extent possible, they  are  displayed  as  appropriate
       modifications  to  the graphic rendition of characters put
       on the screen.

       The routine aattttrrsseett sets the  current  attributes  of  the
       given  window to _a_t_t_r_s.  The routine aattttrrooffff turns off the
       named attributes without turning any other  attributes  on
       or  off.  The routine aattttrroonn turns on the named attributes
       without affecting any others.  The routine ssttaannddoouutt is the
       same  as  aattttrroonn((AA__SSTTAANNDDOOUUTT)).  The routine ssttaannddeenndd is the
       same as aattttrrsseett((AA__NNOORRMMAALL)) or aattttrrsseett((00)), that is, it turns
       off all attributes.




                                                                1





curs_attr(3X)                                       curs_attr(3X)


       The  routine  wwaattttrr__ggeett  returns the current attribute for
       the given window; aattttrr__ggeett returns the  current  attribute
       for   ssttddssccrr.   The  remaining  aattttrr__*  functions  operate
       exactly like the  corresponding  aattttrr*  functions,  except
       that they take arguments of type aattttrr__tt rather than iinntt.

       The routine cchhggaatt changes the attributes of a given number
       of characters starting at the current cursor  location  of
       ssttddssccrr.   It  does not update the cursor and does not per-
       form wrapping.  A character count of -1  or  greater  than
       the  remaining window width means to change attributes all
       the way to the end of the current line.  The wwcchhggaatt  func-
       tion generalizes this to any window; the mmvvwwcchhggaatt function
       does a cursor move before acting.  In these functions, the
       color  argument  is  a  color-pair  index (as in the first
       argument of  _i_n_i_t___p_a_i_r,  see  ccuurrss__ccoolloorr(3x)).   The  ooppttss
       argument  is  not  presently used, but is reserved for the
       future (leave it NNUULLLL).

   AAttttrriibbuutteess
       The following video attributes, defined in <<ccuurrsseess..hh>>, can
       be passed to the routines aattttrroonn, aattttrrooffff, and aattttrrsseett, or
       OR-ed with the characters passed to aaddddcchh.

       AA__NNOORRMMAALL       Normal display (no highlight)
       AA__SSTTAANNDDOOUUTT     Best highlighting mode of the terminal.
       AA__UUNNDDEERRLLIINNEE    Underlining
       AA__RREEVVEERRSSEE      Reverse video
       AA__BBLLIINNKK        Blinking
       AA__DDIIMM          Half bright
       AA__BBOOLLDD         Extra bright or bold
       AA__PPRROOTTEECCTT      Protected mode
       AA__IINNVVIISS        Invisible or blank mode
       AA__AALLTTCCHHAARRSSEETT   Alternate character set
       AA__PPCCCCHHAARRSSEETT    Enable PC ROM graphics 0-31 (PC clones only)
       AA__CCHHAARRTTEEXXTT     Bit-mask to extract a character
       CCOOLLOORR__PPAAIIRR((_n))  Color-pair number _n

       The following macro is the reverse of CCOOLLOORR__PPAAIIRR((_n)):

       PPAAIIRR__NNUUMMBBEERR((_a_t_t_r_s) Returns the pair number associated
                          with the CCOOLLOORR__PPAAIIRR((_n)) attribute.

       The return values of many of these routines are not  mean-
       ingful (they are implemented as macro-expanded assignments
       and simply return their argument).  The SVr4  manual  page
       claims (falsely) that these routines always return 11.


NNOOTTEESS
       Note  that  aattttrrooffff,  wwaattttrrooffff,  aattttrroonn, wwaattttrroonn, aattttrrsseett,
       wwaattttrrsseett, ssttaannddeenndd and ssttaannddoouutt may be macros.





                                                                2





curs_attr(3X)                                       curs_attr(3X)


EEXXTTEENNSSIIOONNSS
       The AA__PPCCCCHHAARRSSEETT highlight is available only on  PC  clones
       (and  is  not part of the XSI standard).  For portability,
       wrap any code that uses it in  #ifdef  A_PCCHARSET/#endif.
       See the EXTENSIONS sections of ccuurrss__aaddddcchh(3x) for details.

PPOORRTTAABBIILLIITTYY
       All these functions are supported in the XSI Curses  stan-
       dard,  Issue  4.   The standard defined the dedicated type
       for highlights, aattttrr__tt,  which  is  not  defined  in  SVr4
       curses. The functions taking aattttrr__tt arguments are not sup-
       ported under SVr4.

       The XSI Curses standard states  that  whether  the  tradi-
       tional  functions  aattttrroonn/aattttrrooffff/aattttrrsseett  can  manipulate
       attributes other than AA__BBLLIINNKK, AA__BBOOLLDD,  AA__DDIIMM,  AA__RREEVVEERRSSEE,
       AA__SSTTAANNDDOOUUTT,  or  AA__UUNNDDEERRLLIINNEE is "unspecified".  Under this
       implementation as well as  SVr4  curses,  these  functions
       correctly  manipulate  all other highlights (specifically,
       AA__AALLTTCCHHAARRSSEETT, AA__PPRROOTTEECCTT, and AA__IINNVVIISS).

       XSI Curses added the new entry points, aattttrr__ggeett,  aattttrr__oonn,
       aattttrr__ooffff,   aattttrr__ggeett,   wwaattttrr__oonn,   wwaattttrr__ooffff,  wwaattttrr__ggeett,
       wwaattttrr__ggeett.  These are intended to work with a  new  series
       of highlight macros prefixed with WWAA__.

       WWAA__NNOORRMMAALL       Normal display (no highlight)
       WWAA__SSTTAANNDDOOUUTT     Best highlighting mode of the terminal.
       WWAA__UUNNDDEERRLLIINNEE    Underlining
       WWAA__RREEVVEERRSSEE      Reverse video
       WWAA__BBLLIINNKK        Blinking
       WWAA__DDIIMM          Half bright
       WWAA__BBOOLLDD         Extra bright or bold
       WWAA__AALLTTCCHHAARRSSEETT   Alternate character set

       The XSI curses standard specifies that each pair of corre-
       sponding AA__ and WWAA__-using functions operates on  the  same
       current-highlight information.

       The  XSI  standard  does  not  support  AA__PPCCCCHHAARRSSEETT.   The
       extended   conformance   level   adds    new    highlights
       AA__HHOORRIIZZOONNTTAALL,  AA__LLEEFFTT,  AA__LLOOWW,  AA__RRIIGGHHTT, AA__TTOOPP, AA__VVEERRTTIICCAALL
       (and corresponding WWAA__ macros for each) which this  curses
       does not yet support.

SSEEEE AALLSSOO
       ccuurrsseess(3X),        ccuurrss__aaddddcchh(3X),        ccuurrss__aaddddssttrr(3X),
       ccuurrss__pprriinnttww(3X)









                                                                3


