Manual Pages for UNIX Darwin command on man chgat
MyWebUniversity

Manual Pages for UNIX Darwin command on man chgat

cursattr(3X) cursattr(3X)

NAME

aattttrrooffff, wwaattttrrooffff, aattttrroonn, wwaattttrroonn, aattttrrsseett, wwaattttrrsseett, ccoolloorrsseett, wwccoolloorrsseett, ssttaannddeenndd, wwssttaannddeenndd, ssttaannddoouutt, wwssttaannddoouutt, aattttrrggeett, wwaattttrrggeett, aattttrrooffff, wwaattttrrooffff, aattttrroonn, wwaattttrroonn, aattttrrsseett, wwaattttrrsseett,

cchhggaatt, wwcchhggaatt, mmvvcchhggaatt, mmvvwwcchhggaatt, PPAAIIRRNNUUMMBBEERR - ccuurrsseess character and

window attribute control routines

SYNOPSIS

##iinncclluuddee <>

iinntt aattttrrooffff((iinntt aattttrrss));; iinntt wwaattttrrooffff((WWIINNDDOOWW **wwiinn,, iinntt aattttrrss));; iinntt aattttrroonn((iinntt aattttrrss));; iinntt wwaattttrroonn((WWIINNDDOOWW **wwiinn,, iinntt aattttrrss));; iinntt aattttrrsseett((iinntt aattttrrss));; iinntt wwaattttrrsseett((WWIINNDDOOWW **wwiinn,, iinntt aattttrrss));; iinntt ccoolloorrsseett((sshhoorrtt ccoolloorrppaaiirrnnuummbbeerr,, vvooiidd** ooppttss));; iinntt wwccoolloorrsseett((WWIINNDDOOWW **wwiinn,, sshhoorrtt ccoolloorrppaaiirrnnuummbbeerr,, vvooiidd** ooppttss));; iinntt ssttaannddeenndd((vvooiidd));; iinntt wwssttaannddeenndd((WWIINNDDOOWW **wwiinn));; iinntt ssttaannddoouutt((vvooiidd));; iinntt wwssttaannddoouutt((WWIINNDDOOWW **wwiinn));; iinntt aattttrrggeett((aattttrrtt **aattttrrss,, sshhoorrtt **ppaaiirr,, vvooiidd **ooppttss));; iinntt wwaattttrrggeett((WWIINNDDOOWW **wwiinn,, aattttrrtt **aattttrrss,, sshhoorrtt **ppaaiirr,, vvooiidd **ooppttss));; iinntt aattttrrooffff((aattttrrtt aattttrrss,, vvooiidd **ooppttss));; iinntt wwaattttrrooffff((WWIINNDDOOWW **wwiinn,, aattttrrtt aattttrrss,, vvooiidd **ooppttss));; iinntt aattttrroonn((aattttrrtt aattttrrss,, vvooiidd **ooppttss));; iinntt wwaattttrroonn((WWIINNDDOOWW **wwiinn,, aattttrrtt aattttrrss,, vvooiidd **ooppttss));; iinntt aattttrrsseett((aattttrrtt aattttrrss,, sshhoorrtt ppaaiirr,, vvooiidd **ooppttss));; iinntt wwaattttrrsseett((WWIINNDDOOWW **wwiinn,, aattttrrtt aattttrrss,, sshhoorrtt ppaaiirr,, vvooiidd **ooppttss));; iinntt cchhggaatt((iinntt nn,, aattttrrtt aattttrr,, sshhoorrtt ccoolloorr,, ccoonnsstt vvooiidd **ooppttss)) iinntt wwcchhggaatt((WWIINNDDOOWW **wwiinn,, iinntt nn,, aattttrrtt aattttrr,, sshhoorrtt ccoolloorr,, ccoonnsstt vvooiidd **ooppttss)) iinntt mmvvcchhggaatt((iinntt yy,, iinntt xx,, iinntt nn,, aattttrrtt aattttrr,, sshhoorrtt ccoolloorr,, ccoonnsstt vvooiidd **ooppttss)) iinntt mmvvwwcchhggaatt((WWIINNDDOOWW **wwiinn,, iinntt yy,, iinntt xx,, iinntt nn,, aattttrrtt aattttrr,, sshhoorrtt ccoolloorr,, ccoonnsstt vvooiidd **ooppttss))

DESCRIPTION

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 wwaaddddcchh, wwaaddddssttrr and wwpprriinnttww. Attributes are a property of the character, and move with the character through

any scrolling and insert/delete line/character operations. To the ex-

tent possible, they are displayed as appropriate modifications to the graphic rendition of characters put on the screen. The routine aattttrrsseett sets the current attributes of the given window to attrs. The routine aattttrrooffff turns off the named attributes without turning any other attributes on or off. The routine aattttrroonn turns on

the named attributes without affecting any others. The routine ssttaanndd-

oouutt is the same as aattttrroonn((AASSTTAANNDDOOUUTT)). The routine ssttaannddeenndd is the

same as aattttrrsseett((AANNOORRMMAALL)) or aattttrrsseett((00)), that is, it turns off all at-

tributes. The aattttrrsseett and related routines do not affect the attributes used when erasing portions of the window. See ccuurrssbbkkggdd(3X) for functions which modify the attributes used for erasing and clearing. The routine ccoolloorrsseett sets the current color of the given window to the foreground/background combination described by the colorpairnumber. The parameter opts is reserved for future use, applications must supply a null pointer. The routine wwaattttrrggeett returns the current attribute and color pair for the given window; aattttrrggeett returns the current attribute and color pair for ssttddssccrr. The remaining aattttrr* functions operate exactly like the corresponding aattttrr* functions, except that they take arguments of type aattttrrtt rather than iinntt.

The routine cchhggaatt changes the attributes of a given number of charac-

ters starting at the current cursor location of ssttddssccrr. It does not update the cursor and does not perform wrapping. A character count of

-1 or greater than the remaining window width means to change at-

tributes all the way to the end of the current line. The wwcchhggaatt func-

tion generalizes this to any window; the mmvvwwcchhggaatt function does a cur-

sor move before acting. In these functions, the color argument is a

color-pair index (as in the first argument of initpair, see ccuurrssccooll-

oorr(3X)). The ooppttss argument is not presently used, but is reserved for the future (leave it NNUULLLL). Note that changing the attributes does not imply that a subsequent rreeffrreesshh will update the screen to match, since the character values are not modified. Use ttoouucchhwwiinn to force the screen to match the updated attributes. AAttttrriibbuutteess The following video attributes, defined in <>, can be passed to the routines aattttrroonn, aattttrrooffff, and aattttrrsseett, or OR'd with the characters passed to aaddddcchh. AANNOORRMMAALL Normal display (no highlight) AASSTTAANNDDOOUUTT Best highlighting mode of the terminal. AAUUNNDDEERRLLIINNEE Underlining AARREEVVEERRSSEE Reverse video AABBLLIINNKK Blinking AADDIIMM Half bright AABBOOLLDD Extra bright or bold AAPPRROOTTEECCTT Protected mode AAIINNVVIISS Invisible or blank mode AAAALLTTCCHHAARRSSEETT Alternate character set

AACCHHAARRTTEEXXTT Bit-mask to extract a character

CCOOLLOORRPPAAIIRR((n)) Color-pair number n

The following macro is the reverse of CCOOLLOORRPPAAIIRR((n)): PPAAIIRRNNUUMMBBEERR((attrs) Returns the pair number associated with the CCOOLLOORRPPAAIIRR((n)) attribute. The return values of many of these routines are not meaningful (they

are implemented as macro-expanded assignments and simply return their

argument). The SVr4 manual page claims (falsely) that these routines always return 11. NNOOTTEESS Note that aattttrrooffff, wwaattttrrooffff, aattttrroonn, wwaattttrroonn, aattttrrsseett, wwaattttrrsseett, ssttaannddeenndd and ssttaannddoouutt may be macros. CCOOLLOORRPPAAIIRR values can only be OR'd with attributes if the pair number is less than 256. The alternate functions such as ccoolloorrsseett can pass a color pair value directly. However, ncurses ABI 4 and 5 simply OR this value within the alternate functions. You must use ncurses ABI 6 to support more than 256 color pairs. PPOORRTTAABBIILLIITTYY These functions are supported in the XSI Curses standard, Issue 4. The standard defined the dedicated type for highlights, aattttrrtt, which is not defined in SVr4 curses. The functions taking aattttrrtt arguments are not supported under SVr4. The XSI Curses standard states that whether the traditional functions aattttrroonn/aattttrrooffff/aattttrrsseett can manipulate attributes other than AABBLLIINNKK, AABBOOLLDD, AADDIIMM, AARREEVVEERRSSEE, AASSTTAANNDDOOUUTT, or AAUUNNDDEERRLLIINNEE is "unspecified".

Under this implementation as well as SVr4 curses, these functions cor-

rectly manipulate all other highlights (specifically, AAAALLTTCCHHAARRSSEETT, AAPPRROOTTEECCTT, and AAIINNVVIISS).

XSI Curses added the new entry points, aattttrrggeett, aattttrroonn, aattttrrooffff, aatt-

ttrrsseett, wwaattttrroonn, wwaattttrrooffff, wwaattttrrggeett, wwaattttrrsseett. These are intended to work with a new series of highlight macros prefixed with WWAA. WWAANNOORRMMAALL Normal display (no highlight) WWAASSTTAANNDDOOUUTT Best highlighting mode of the terminal. WWAAUUNNDDEERRLLIINNEE Underlining WWAARREEVVEERRSSEE Reverse video WWAABBLLIINNKK Blinking WWAADDIIMM Half bright WWAABBOOLLDD Extra bright or bold WWAAAALLTTCCHHAARRSSEETT Alternate character set The XSI curses standard specifies that each pair of corresponding AA

and WWAA-using functions operates on the same current-highlight informa-

tion.

The XSI standard extended conformance level adds new highlights AAHHOORRII-

ZZOONNTTAALL, AALLEEFFTT, AALLOOWW, AARRIIGGHHTT, AATTOOPP, AAVVEERRTTIICCAALL (and corresponding WWAA macros for each) which this implementation does not yet support. RREETTUURRNN VVAALLUUEE All routines return the integer OOKK on success, or EERRRR on failure. X/Open does not define any error conditions. This implementation returns an error if the window pointer is null. The wwccoolloorrsseett function returns an error if the color pair parameter is

outside the range 0..COLORPAIRS-1.

SEE ALSO

ccuurrsseess(3X), ccuurrssaaddddcchh(3X), ccuurrssaaddddssttrr(3X), ccuurrssbbkkggdd(3X), ccuurrsspprriinnttww(3X) cursattr(3X)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™