Manual Pages for UNIX Darwin command on man ncurses
MyWebUniversity

Manual Pages for UNIX Darwin command on man ncurses

ncurses(3X) ncurses(3X)

NAME

nnccuurrsseess - CRT screen handling and optimization package

SYNOPSIS

##iinncclluuddee <>

DESCRIPTION

The nnccuurrsseess library routines give the user a terminal-independent

method of updating character screens with reasonable optimization.

This implementation is ``new curses'' (ncurses) and is the approved

replacement for 4.4BSD classic curses, which has been discontinued. The nnccuurrsseess routines emulate the ccuurrsseess(3X) library of System V Release 4 UNIX, and the XPG4 curses standard (XSI curses) but the nnccuurrsseess library is freely redistributable in source form. Differences from the

SVr4 curses are summarized under the EXTENSIONS and PORTABILITY sec-

tions below and described in detail in the respective EXTENSIONS,

PORTABILITY and BUGS sections of individual man pages.

A program using these routines must be linked with the -llnnccuurrsseess

option, or (if it has been generated) with the debugging library

-llnnccuurrsseessgg. (Your system integrator may also have installed these

libraries under the names -llccuurrsseess and -llccuurrsseessgg.) The ncursesg

library generates trace logs (in a file called 'trace' in the current directory) that describe curses actions.

The nnccuurrsseess package supports: overall screen, window and pad manipula-

tion; output to windows and pads; reading terminal input; control over

terminal and ccuurrsseess input and output options; environment query rou-

tines; color manipulation; use of soft label keys; terminfo capabili-

ties; and access to low-level terminal-manipulation routines.

To initialize the routines, the routine iinniittssccrr or nneewwtteerrmm must be called before any of the other routines that deal with windows and screens are used. The routine eennddwwiinn must be called before exiting.

To get character-at-a-time input without echoing (most interactive,

screen oriented programs want this), the following sequence should be used: iinniittssccrr(());; ccbbrreeaakk(());; nnooeecchhoo(());; Most programs would additionally use the sequence: nnoonnll(());; iinnttrrfflluusshh((ssttddssccrr,, FFAALLSSEE));; kkeeyyppaadd((ssttddssccrr,, TTRRUUEE));; Before a ccuurrsseess program is run, the tab stops of the terminal should be set and its initialization strings, if defined, must be output. This

can be done by executing the ttppuutt iinniitt command after the shell environ-

ment variable TTEERRMM has been exported. ttsseett((11)) is usually responsible for doing this. [See tteerrmmiinnffoo(5) for further details.] The nnccuurrsseess library permits manipulation of data structures, called

windows, which can be thought of as two-dimensional arrays of charac-

ters representing all or part of a CRT screen. A default window called ssttddssccrr, which is the size of the terminal screen, is supplied. Others may be created with nneewwwwiinn. Note that ccuurrsseess does not handle overlapping windows, that's done by the ppaanneell(3X) library. This means that you can either use ssttddssccrr or

divide the screen into tiled windows and not using ssttddssccrr at all. Mix-

ing the two will result in unpredictable, and undesired, effects. Windows are referred to by variables declared as WWIINNDDOOWW **. These data structures are manipulated with routines described here and elsewhere in the nnccuurrsseess manual pages. Among which the most basic routines are mmoovvee and aaddddcchh. More general versions of these routines are included with names beginning with ww, allowing the user to specify a window. The routines not beginning with ww affect ssttddssccrr.) After using routines to manipulate a window, rreeffrreesshh is called, telling ccuurrsseess to make the user's CRT screen look like ssttddssccrr. The characters in a window are actually of type cchhttyyppee, (character and attribute data) so that other information about the character may also be stored with each character. Special windows called pads may also be manipulated. These are windows which are not constrained to the size of the screen and whose contents

need not be completely displayed. See ccuurrssppaadd(3X) for more informa-

tion. In addition to drawing characters on the screen, video attributes and colors may be supported, causing the characters to show up in such modes as underlined, in reverse video, or in color on terminals that support such display enhancements. Line drawing characters may be specified to be output. On input, ccuurrsseess is also able to translate

arrow and function keys that transmit escape sequences into single val-

ues. The video attributes, line drawing characters, and input values use names, defined in <>, such as AARREEVVEERRSSEE, AACCSSHHLLIINNEE, and KKEEYYLLEEFFTT.

If the environment variables LLIINNEESS and CCOOLLUUMMNNSS are set, or if the pro-

gram is executing in a window environment, line and column information in the environment will override information read by terminfo. This would effect a program running in an AT&T 630 layer, for example, where h sz o a cen s hnebe se ENVIRONMENT. If the environment variable TTEERRMMIINNFFOO is defined, any program using ccuurrsseess checks for a local terminal definition before checking in the

standard place. For example, if TTEERRMM is set to aatttt44442244, then the com-

piled terminal definition is found in //uussrr//sshhaarree//tteerrmmiinnffoo//aa//aatttt44442244. (The aa is copied from the first letter of aatttt44442244 to avoid creation of

huge directories.) However, if TTEERRMMIINNFFOO is set to $$HHOOMMEE//mmyytteerrmmss,

ccuurrsseess first checks

$$HHOOMMEE//mmyytteerrmmss//aa//aatttt44442244,

and if that fails, it then checks //uussrr//sshhaarree//tteerrmmiinnffoo//aa//aatttt44442244. This is useful for developing experimental definitions or when write permission in //uussrr//sshhaarree//tteerrmmiinnffoo is not available. The integer variables LLIINNEESS and CCOOLLSS are defined in <> and will be filled in by iinniittssccrr with the size of the screen. The constants TTRRUUEE and FFAALLSSEE have the values 11 and 00, respectively. The ccuurrsseess routines also define the WWIINNDDOOWW ** variable ccuurrssccrr which is

used for certain low-level operations like clearing and redrawing a

screen containing garbage. The ccuurrssccrr can be used in only a few rou-

tines. RRoouuttiinnee aanndd AArrgguummeenntt NNaammeess Many ccuurrsseess routines have two or more versions. The routines prefixed with ww require a window argument. The routines prefixed with pp require a pad argument. Those without a prefix generally use ssttddssccrr. The routines prefixed with mmvv require a y and x coordinate to move to before performing the appropriate action. The mmvv routines imply a call to mmoovvee before the call to the other routine. The coordinate y always refers to the row (of the window), and x always refers to the column.

The upper left-hand corner is always (0,0), not (1,1).

The routines prefixed with mmvvww take both a window argument and x and y

coordinates. The window argument is always specified before the coor-

dinates. In each case, win is the window affected, and pad is the pad affected; win and pad are always pointers to type WWIINNDDOOWW. Option setting routines require a Boolean flag bf with the value TTRRUUEE or FFAALLSSEE; bf is always of type bbooooll. The variables ch and attrs below are always of type cchhttyyppee. The types WWIINNDDOOWW, SSCCRREEEENN, bbooooll, and cchhttyyppee are defined in <>. The type TTEERRMMIINNAALL is defined in <>. All other arguments are integers. RRoouuttiinnee NNaammee IInnddeexx

The following table lists each ccuurrsseess routine and the name of the man-

ual page on which it is described. Routines flagged with `*' are

ncurses-specific, not described by XPG4 or present in SVr4.

ccuurrsseess Routine Name Manual Page Name

----------------------

COLORPAIR ccuurrssccoolloorr(3X) PAIRNUMBER ccuurrssaattttrr(3X) nctracebits ccuurrssttrraaccee(3X)* traceattr ccuurrssttrraaccee(3X)* traceattr2 ccuurrssttrraaccee(3X)* tracechar ccuurrssttrraaccee(3X)* tracechtype ccuurrssttrraaccee(3X)* tracechtype2 ccuurrssttrraaccee(3X)* tracedump ccuurrssttrraaccee(3X)* tracef ccuurrssttrraaccee(3X)* tracemouse ccuurrssttrraaccee(3X)* addwch ccuurrssaaddddwwcchh(3X) addwchnstr ccuurrssaaddddwwcchhssttrr(3X) addwchstr ccuurrssaaddddwwcchhssttrr(3X) addch ccuurrssaaddddcchh(3X) addchnstr ccuurrssaaddddcchhssttrr(3X) addchstr ccuurrssaaddddcchhssttrr(3X) addnstr ccuurrssaaddddssttrr(3X) addnwstr ccuurrssaaddddwwssttrr(3X) addstr ccuurrssaaddddssttrr(3X) addwstr ccuurrssaaddddwwssttrr(3X) assumedefaultcolors ddeeffaauullttccoolloorrss(3X)* attrget ccuurrssaattttrr(3X) attroff ccuurrssaattttrr(3X) attron ccuurrssaattttrr(3X) attrset ccuurrssaattttrr(3X) attroff ccuurrssaattttrr(3X) attron ccuurrssaattttrr(3X) attrset ccuurrssaattttrr(3X) baudrate ccuurrsstteerrmmaattttrrss(3X) beep ccuurrssbbeeeepp(3X) bkgd ccuurrssbbkkggdd(3X) bkgdset ccuurrssbbkkggdd(3X) bkgrnd ccuurrssbbkkggrrnndd(3X) bkgrndset ccuurrssbbkkggrrnndd(3X) border ccuurrssbboorrddeerr(3X) borderset ccuurrssbboorrddeerrsseett(3X) box ccuurrssbboorrddeerr(3X) boxset ccuurrssbboorrddeerrsseett(3X) canchangecolor ccuurrssccoolloorr(3X) cbreak ccuurrssiinnooppttss(3X) chgat ccuurrssaattttrr(3X) clear ccuurrsscclleeaarr(3X) clearok ccuurrssoouuttooppttss(3X) clrtobot ccuurrsscclleeaarr(3X) clrtoeol ccuurrsscclleeaarr(3X) colorcontent ccuurrssccoolloorr(3X) colorset ccuurrssaattttrr(3X) copywin ccuurrssoovveerrllaayy(3X) cursset ccuurrsskkeerrnneell(3X) cursesversion ccuurrsseexxtteenndd(3X)* defprogmode ccuurrsskkeerrnneell(3X) defshellmode ccuurrsskkeerrnneell(3X) definekey ddeeffiinneekkeeyy(3X)* delcurterm ccuurrsstteerrmmiinnffoo(3X) delayoutput ccuurrssuuttiill(3X) delch ccuurrssddeellcchh(3X) deleteln ccuurrssddeelleetteellnn(3X) delscreen ccuurrssiinniittssccrr(3X) delwin ccuurrsswwiinnddooww(3X) derwin ccuurrsswwiinnddooww(3X) doupdate ccuurrssrreeffrreesshh(3X) dupwin ccuurrsswwiinnddooww(3X) echo ccuurrssiinnooppttss(3X) echowchar ccuurrssaaddddwwcchh(3X) echochar ccuurrssaaddddcchh(3X) endwin ccuurrssiinniittssccrr(3X) erase ccuurrsscclleeaarr(3X) erasechar ccuurrsstteerrmmaattttrrss(3X) erasewchar ccuurrsstteerrmmaattttrrss(3X) filter ccuurrssuuttiill(3X) flash ccuurrssbbeeeepp(3X) flushinp ccuurrssuuttiill(3X) getwch ccuurrssggeettwwcchh(3X) getwstr ccuurrssggeettwwssttrr(3X) getbegyx ccuurrssggeettyyxx(3X) getbkgd ccuurrssbbkkggdd(3X) getbkgrnd ccuurrssbbkkggrrnndd(3X) getcchar ccuurrssggeettcccchhaarr(3X) getch ccuurrssggeettcchh(3X) getmaxyx ccuurrssggeettyyxx(3X) getmouse ccuurrssmmoouussee(3X)* getnwstr ccuurrssggeettwwssttrr(3X) getnstr ccuurrssggeettssttrr(3X) getparyx ccuurrssggeettyyxx(3X) getstr ccuurrssggeettssttrr(3X) getsyx ccuurrsskkeerrnneell(3X) getwin ccuurrssuuttiill(3X) getyx ccuurrssggeettyyxx(3X) halfdelay ccuurrssiinnooppttss(3X) hascolors ccuurrssccoolloorr(3X) hasic ccuurrsstteerrmmaattttrrss(3X) hasil ccuurrsstteerrmmaattttrrss(3X) haskey ccuurrssggeettcchh(3X)* hline ccuurrssbboorrddeerr(3X) hlineset ccuurrssbboorrddeerrsseett(3X) idcok ccuurrssoouuttooppttss(3X) idlok ccuurrssoouuttooppttss(3X) immedok ccuurrssoouuttooppttss(3X) inwch ccuurrssiinnwwcchh(3X) inwchnstr ccuurrssiinnwwcchhssttrr(3X) inwchstr ccuurrssiinnwwcchhssttrr(3X) inch ccuurrssiinncchh(3X) inchnstr ccuurrssiinncchhssttrr(3X) inchstr ccuurrssiinncchhssttrr(3X) initcolor ccuurrssccoolloorr(3X) initpair ccuurrssccoolloorr(3X) initscr ccuurrssiinniittssccrr(3X) innstr ccuurrssiinnssttrr(3X) innwstr ccuurrssiinnwwssttrr(3X) insnwstr ccuurrssiinnsswwssttrr(3X) inswch ccuurrssiinnsswwcchh(3X) inswstr ccuurrssiinnsswwssttrr(3X) insch ccuurrssiinnsscchh(3X) insdelln ccuurrssddeelleetteellnn(3X) insertln ccuurrssddeelleetteellnn(3X) insnstr ccuurrssiinnssssttrr(3X) insstr ccuurrssiinnssssttrr(3X) instr ccuurrssiinnssttrr(3X) intrflush ccuurrssiinnooppttss(3X) inwstr ccuurrssiinnwwssttrr(3X) islinetouched ccuurrssttoouucchh(3X) iswintouched ccuurrssttoouucchh(3X) isendwin ccuurrssiinniittssccrr(3X) keydefined kkeeyyddeeffiinneedd(3X)* keyname ccuurrssuuttiill(3X) keybound kkeeyybboouunndd(3X)* keyname ccuurrssuuttiill(3X) keyok kkeeyyookk(3X)* keypad ccuurrssiinnooppttss(3X) killchar ccuurrsstteerrmmaattttrrss(3X) killwchar ccuurrsstteerrmmaattttrrss(3X) leaveok ccuurrssoouuttooppttss(3X) longname ccuurrsstteerrmmaattttrrss(3X) mcprint ccuurrsspprriinntt(3X)* meta ccuurrssiinnooppttss(3X) mousetrafo ccuurrssmmoouussee(3X)* mouseinterval ccuurrssmmoouussee(3X)* mousemask ccuurrssmmoouussee(3X)* move ccuurrssmmoovvee(3X) mvaddwch ccuurrssaaddddwwcchh(3X) mvaddwchnstr ccuurrssaaddddwwcchhssttrr(3X) mvaddwchstr ccuurrssaaddddwwcchhssttrr(3X) mvaddch ccuurrssaaddddcchh(3X) mvaddchnstr ccuurrssaaddddcchhssttrr(3X) mvaddchstr ccuurrssaaddddcchhssttrr(3X) mvaddnstr ccuurrssaaddddssttrr(3X) mvaddnwstr ccuurrssaaddddwwssttrr(3X) mvaddstr ccuurrssaaddddssttrr(3X) mvaddwstr ccuurrssaaddddwwssttrr(3X) mvchgat ccuurrssaattttrr(3X) mvcur ccuurrsstteerrmmiinnffoo(3X) mvdelch ccuurrssddeellcchh(3X) mvderwin ccuurrsswwiinnddooww(3X) mvgetwch ccuurrssggeettwwcchh(3X) mvgetwstr ccuurrssggeettwwssttrr(3X) mvgetch ccuurrssggeettcchh(3X) mvgetnwstr ccuurrssggeettwwssttrr(3X) mvgetnstr ccuurrssggeettssttrr(3X) mvgetstr ccuurrssggeettssttrr(3X) mvhline ccuurrssbboorrddeerr(3X) mvhlineset ccuurrssbboorrddeerrsseett(3X) mvinwch ccuurrssiinnwwcchh(3X) mvinwchnstr ccuurrssiinnwwcchhssttrr(3X) mvinwchstr ccuurrssiinnwwcchhssttrr(3X) mvinch ccuurrssiinncchh(3X) mvinchnstr ccuurrssiinncchhssttrr(3X) mvinchstr ccuurrssiinncchhssttrr(3X) mvinnstr ccuurrssiinnssttrr(3X) mvinnwstr ccuurrssiinnwwssttrr(3X) mvinsnwstr ccuurrssiinnsswwssttrr(3X) mvinswch ccuurrssiinnsswwcchh(3X) mvinswstr ccuurrssiinnsswwssttrr(3X) mvinsch ccuurrssiinnsscchh(3X) mvinsnstr ccuurrssiinnssssttrr(3X) mvinsstr ccuurrssiinnssssttrr(3X) mvinstr ccuurrssiinnssttrr(3X) mvinwstr ccuurrssiinnwwssttrr(3X) mvprintw ccuurrsspprriinnttww(3X) mvscanw ccuurrssssccaannww(3X) mvvline ccuurrssbboorrddeerr(3X) mvvlineset ccuurrssbboorrddeerrsseett(3X) mvwaddwch ccuurrssaaddddwwcchh(3X) mvwaddwchnstr ccuurrssaaddddwwcchhssttrr(3X) mvwaddwchstr ccuurrssaaddddwwcchhssttrr(3X) mvwaddch ccuurrssaaddddcchh(3X) mvwaddchnstr ccuurrssaaddddcchhssttrr(3X) mvwaddchstr ccuurrssaaddddcchhssttrr(3X) mvwaddnstr ccuurrssaaddddssttrr(3X) mvwaddnwstr ccuurrssaaddddwwssttrr(3X) mvwaddstr ccuurrssaaddddssttrr(3X) mvwaddwstr ccuurrssaaddddwwssttrr(3X) mvwchgat ccuurrssaattttrr(3X) mvwdelch ccuurrssddeellcchh(3X) mvwgetwch ccuurrssggeettwwcchh(3X) mvwgetwstr ccuurrssggeettwwssttrr(3X) mvwgetch ccuurrssggeettcchh(3X) mvwgetnwstr ccuurrssggeettwwssttrr(3X) mvwgetnstr ccuurrssggeettssttrr(3X) mvwgetstr ccuurrssggeettssttrr(3X) mvwhline ccuurrssbboorrddeerr(3X) mvwhlineset ccuurrssbboorrddeerrsseett(3X) mvwin ccuurrsswwiinnddooww(3X) mvwinwch ccuurrssiinnwwcchh(3X) mvwinwchnstr ccuurrssiinnwwcchhssttrr(3X) mvwinwchstr ccuurrssiinnwwcchhssttrr(3X) mvwinch ccuurrssiinncchh(3X) mvwinchnstr ccuurrssiinncchhssttrr(3X) mvwinchstr ccuurrssiinncchhssttrr(3X) mvwinnstr ccuurrssiinnssttrr(3X) mvwinnwstr ccuurrssiinnwwssttrr(3X) mvwinsnwstr ccuurrssiinnsswwssttrr(3X) mvwinswch ccuurrssiinnsswwcchh(3X) mvwinswstr ccuurrssiinnsswwssttrr(3X) mvwinsch ccuurrssiinnsscchh(3X) mvwinsnstr ccuurrssiinnssssttrr(3X) mvwinsstr ccuurrssiinnssssttrr(3X) mvwinstr ccuurrssiinnssttrr(3X) mvwinwstr ccuurrssiinnwwssttrr(3X) mvwprintw ccuurrsspprriinnttww(3X) mvwscanw ccuurrssssccaannww(3X) mvwvline ccuurrssbboorrddeerr(3X) mvwvlineset ccuurrssbboorrddeerrsseett(3X) napms ccuurrsskkeerrnneell(3X) newpad ccuurrssppaadd(3X) newterm ccuurrssiinniittssccrr(3X) newwin ccuurrsswwiinnddooww(3X) nl ccuurrssoouuttooppttss(3X) nocbreak ccuurrssiinnooppttss(3X) nodelay ccuurrssiinnooppttss(3X) noecho ccuurrssiinnooppttss(3X) nonl ccuurrssoouuttooppttss(3X) noqiflush ccuurrssiinnooppttss(3X) noraw ccuurrssiinnooppttss(3X) notimeout ccuurrssiinnooppttss(3X) overlay ccuurrssoovveerrllaayy(3X) overwrite ccuurrssoovveerrllaayy(3X) paircontent ccuurrssccoolloorr(3X) pechochar ccuurrssppaadd(3X) pnoutrefresh ccuurrssppaadd(3X) prefresh ccuurrssppaadd(3X) printw ccuurrsspprriinnttww(3X) putp ccuurrsstteerrmmiinnffoo(3X) putwin ccuurrssuuttiill(3X) qiflush ccuurrssiinnooppttss(3X) raw ccuurrssiinnooppttss(3X) redrawwin ccuurrssrreeffrreesshh(3X) refresh ccuurrssrreeffrreesshh(3X) resetprogmode ccuurrsskkeerrnneell(3X) resetshellmode ccuurrsskkeerrnneell(3X) resetty ccuurrsskkeerrnneell(3X) resizeterm rreessiizzeetteerrmm(3X)* restartterm ccuurrsstteerrmmiinnffoo(3X) ripoffline ccuurrsskkeerrnneell(3X) savetty ccuurrsskkeerrnneell(3X) scanw ccuurrssssccaannww(3X) scrdump ccuurrssssccrrdduummpp(3X) scrinit ccuurrssssccrrdduummpp(3X) scrrestore ccuurrssssccrrdduummpp(3X) scrset ccuurrssssccrrdduummpp(3X) scrl ccuurrssssccrroollll(3X) scroll ccuurrssssccrroollll(3X) scrollok ccuurrssoouuttooppttss(3X) setcurterm ccuurrsstteerrmmiinnffoo(3X) setterm ccuurrssiinniittssccrr(3X) setcchar ccuurrssggeettcccchhaarr(3X) setscrreg ccuurrssoouuttooppttss(3X) setsyx ccuurrsskkeerrnneell(3X) setterm ccuurrsstteerrmmiinnffoo(3X) setupterm ccuurrsstteerrmmiinnffoo(3X) slkattr ccuurrssssllkk(3X)* slkattroff ccuurrssssllkk(3X) slkattron ccuurrssssllkk(3X) slkattrset ccuurrssssllkk(3X) slkattroff ccuurrssssllkk(3X) slkattron ccuurrssssllkk(3X) slkattrset ccuurrssssllkk(3X) slkclear ccuurrssssllkk(3X) slkcolor ccuurrssssllkk(3X) slkinit ccuurrssssllkk(3X) slklabel ccuurrssssllkk(3X) slknoutrefresh ccuurrssssllkk(3X) slkrefresh ccuurrssssllkk(3X) slkrestore ccuurrssssllkk(3X) slkset ccuurrssssllkk(3X) slktouch ccuurrssssllkk(3X) standend ccuurrssaattttrr(3X) standout ccuurrssaattttrr(3X) startcolor ccuurrssccoolloorr(3X) subpad ccuurrssppaadd(3X) subwin ccuurrsswwiinnddooww(3X) syncok ccuurrsswwiinnddooww(3X) termattrs ccuurrsstteerrmmaattttrrss(3X) termattrs ccuurrsstteerrmmaattttrrss(3X) termname ccuurrsstteerrmmaattttrrss(3X) tgetent ccuurrsstteerrmmccaapp(3X) tgetflag ccuurrsstteerrmmccaapp(3X) tgetnum ccuurrsstteerrmmccaapp(3X) tgetstr ccuurrsstteerrmmccaapp(3X) tgoto ccuurrsstteerrmmccaapp(3X) tigetflag ccuurrsstteerrmmiinnffoo(3X) tigetnum ccuurrsstteerrmmiinnffoo(3X) tigetstr ccuurrsstteerrmmiinnffoo(3X) timeout ccuurrssiinnooppttss(3X) touchline ccuurrssttoouucchh(3X) touchwin ccuurrssttoouucchh(3X) tparm ccuurrsstteerrmmiinnffoo(3X) tputs ccuurrsstteerrmmccaapp(3X) tputs ccuurrsstteerrmmiinnffoo(3X) trace ccuurrssttrraaccee(3X)* typeahead ccuurrssiinnooppttss(3X) unctrl ccuurrssuuttiill(3X) ungetwch ccuurrssggeettwwcchh(3X) ungetch ccuurrssggeettcchh(3X) ungetmouse ccuurrssmmoouussee(3X)* untouchwin ccuurrssttoouucchh(3X) usedefaultcolors ddeeffaauullttccoolloorrss(3X)* useenv ccuurrssuuttiill(3X) useextendednames ccuurrsseexxtteenndd(3X)* vidattr ccuurrsstteerrmmiinnffoo(3X) vidputs ccuurrsstteerrmmiinnffoo(3X) vidattr ccuurrsstteerrmmiinnffoo(3X) vidputs ccuurrsstteerrmmiinnffoo(3X) vline ccuurrssbboorrddeerr(3X) vlineset ccuurrssbboorrddeerrsseett(3X) vwprintw ccuurrsspprriinnttww(3X) vwscanw ccuurrssssccaannww(3X) vwprintw ccuurrsspprriinnttww(3X) vwscanw ccuurrssssccaannww(3X) waddwch ccuurrssaaddddwwcchh(3X) waddwchnstr ccuurrssaaddddwwcchhssttrr(3X) waddwchstr ccuurrssaaddddwwcchhssttrr(3X) waddch ccuurrssaaddddcchh(3X) waddchnstr ccuurrssaaddddcchhssttrr(3X) waddchstr ccuurrssaaddddcchhssttrr(3X) waddnstr ccuurrssaaddddssttrr(3X) waddnwstr ccuurrssaaddddwwssttrr(3X) waddstr ccuurrssaaddddssttrr(3X) waddwstr ccuurrssaaddddwwssttrr(3X) wattrget ccuurrssaattttrr(3X) wattroff ccuurrssaattttrr(3X) wattron ccuurrssaattttrr(3X) wattrset ccuurrssaattttrr(3X) wattroff ccuurrssaattttrr(3X) wattron ccuurrssaattttrr(3X) wattrset ccuurrssaattttrr(3X) wbkgd ccuurrssbbkkggdd(3X) wbkgdset ccuurrssbbkkggdd(3X) wbkgrnd ccuurrssbbkkggrrnndd(3X) wbkgrndset ccuurrssbbkkggrrnndd(3X) wborder ccuurrssbboorrddeerr(3X) wborderset ccuurrssbboorrddeerrsseett(3X) wchgat ccuurrssaattttrr(3X) wclear ccuurrsscclleeaarr(3X) wclrtobot ccuurrsscclleeaarr(3X) wclrtoeol ccuurrsscclleeaarr(3X) wcolorset ccuurrssaattttrr(3X) wcursyncup ccuurrsswwiinnddooww(3X) wdelch ccuurrssddeellcchh(3X) wdeleteln ccuurrssddeelleetteellnn(3X) wechowchar ccuurrssaaddddwwcchh(3X) wechochar ccuurrssaaddddcchh(3X) wenclose ccuurrssmmoouussee(3X)* werase ccuurrsscclleeaarr(3X) wgetwch ccuurrssggeettwwcchh(3X) wgetwstr ccuurrssggeettwwssttrr(3X) wgetbkgrnd ccuurrssbbkkggrrnndd(3X) wgetch ccuurrssggeettcchh(3X) wgetnwstr ccuurrssggeettwwssttrr(3X) wgetnstr ccuurrssggeettssttrr(3X) wgetstr ccuurrssggeettssttrr(3X) whline ccuurrssbboorrddeerr(3X) whlineset ccuurrssbboorrddeerrsseett(3X) winwch ccuurrssiinnwwcchh(3X) winwchnstr ccuurrssiinnwwcchhssttrr(3X) winwchstr ccuurrssiinnwwcchhssttrr(3X) winch ccuurrssiinncchh(3X) winchnstr ccuurrssiinncchhssttrr(3X) winchstr ccuurrssiinncchhssttrr(3X) winnstr ccuurrssiinnssttrr(3X) winnwstr ccuurrssiinnwwssttrr(3X) winsnwstr ccuurrssiinnsswwssttrr(3X) winswch ccuurrssiinnsswwcchh(3X) winswstr ccuurrssiinnsswwssttrr(3X) winsch ccuurrssiinnsscchh(3X) winsdelln ccuurrssddeelleetteellnn(3X) winsertln ccuurrssddeelleetteellnn(3X) winsnstr ccuurrssiinnssssttrr(3X) winsstr ccuurrssiinnssssttrr(3X) winstr ccuurrssiinnssttrr(3X) winwstr ccuurrssiinnwwssttrr(3X) wmousetrafo ccuurrssmmoouussee(3X)* wmove ccuurrssmmoovvee(3X) wnoutrefresh ccuurrssrreeffrreesshh(3X) wprintw ccuurrsspprriinnttww(3X) wredrawln ccuurrssrreeffrreesshh(3X) wrefresh ccuurrssrreeffrreesshh(3X) wresize wwrreessiizzee(3X)* wscanw ccuurrssssccaannww(3X) wscrl ccuurrssssccrroollll(3X) wsetscrreg ccuurrssoouuttooppttss(3X) wstandend ccuurrssaattttrr(3X) wstandout ccuurrssaattttrr(3X) wsyncdown ccuurrsswwiinnddooww(3X) wsyncup ccuurrsswwiinnddooww(3X) wtimeout ccuurrssiinnooppttss(3X) wtouchln ccuurrssttoouucchh(3X) wunctrl ccuurrssuuttiill(3X) wvline ccuurrssbboorrddeerr(3X) wvlineset ccuurrssbboorrddeerrsseett(3X) RREETTUURRNN VVAALLUUEE Routines that return an integer return EERRRR upon failure and an integer value other than EERRRR upon successful completion, unless otherwise noted in the routine descriptions. All macros return the value of the ww version, except sseettssccrrrreegg, wwsseettssccrrrreegg, ggeettyyxx, ggeettbbeeggyyxx, and ggeettmmaaxxyyxx. The return values of sseettssccrrrreegg, wwsseettssccrrrreegg, ggeettyyxx, ggeettbbeeggyyxx, and ggeettmmaaxxyyxx are undefined

(i.e., these should not be used as the right-hand side of assignment

statements). Routines that return pointers return NNUULLLL on error. ENVIRONMENT

The following environment symbols are useful for customizing the run-

time behavior of the nnccuurrsseess library. The most important ones have been already discussed in detail. BAUDRATE The debugging library checks this environment symbol when the application has redirected output to a file. The symbol's numeric value is used for the baudrate. If no value is found, nnccuurrsseess

uses 9600. This allows testers to construct repeatable test-cases

that take into account costs that depend on baudrate. CC When set, change occurrences of the commandcharacter (i.e., the ccmmddcchh capability) of the loaded terminfo entries to the value of this symbol. Very few terminfo entries provide this feature. COLUMNS

Specify the width of the screen in characters. Applications run-

ning in a windowing environment usually are able to obtain the width of the window in which they are executing. If neither the CCOOLLUUMMNNSS value nor the terminal's screen size is available, nnccuurrsseess uses the size which may be specified in the terminfo database (i.e., the ccoollss capability). It is important that your application use a correct size for the screen. This is not always possible because your application may be running on a host which does not honor NAWS (Negotiations About Window Size), or because you are temporarily running as another user. However, setting CCOOLLUUMMNNSS and/or LLIINNEESS overrides the

library's use of the screen size obtained from the operating sys-

tem. Either CCOOLLUUMMNNSS or LLIINNEESS symbols may be specified independently. This is mainly useful to circumvent legacy misfeatures of terminal descriptions, e.g., xterm which commonly specifies a 65 line screen. For best results, lliinneess and ccoollss should not be specified

in a terminal description for terminals which are run as emula-

tions.

Use the uusseeeennvv function to disable all use of external environ-

ment (including system calls) to determine the screen size. ESCDELAY

Specifies the total time, in milliseconds, for which ncurses will

await a character sequence, e.g., a function key. The default value, 1000 milliseconds, is enough for most uses. However, it is made a variable to accommodate unusual applications. The most common instance where you may wish to change this value is to work with slow hosts, e.g., running on a network. If the host cannot read characters rapidly enough, it will have the same effect as if the terminal did not send characters rapidly enough. The library will still see a timeout. Note that xterm mouse events are built up from character sequences received from the xterm. If your application makes heavy use of

multiple-clicking, you may wish to lengthen this default value

because the timeout applies to the composed multi-click event as

well as the individual clicks.

In addition to the environment variable, this implementation pro-

vides a global variable with the same name. Portable applications should not rely upon the presence of ESCDELAY in either form, but setting the environment variable rather than the global variable does not create problems when compiling an application. HOME Tells nnccuurrsseess where your home directory is. That is where it may read and write auxiliary terminal descriptions:

$HOME/.termcap

$HOME/.terminfo

LINES Like COLUMNS, specify the height of the screen in characters. See COLUMNS for a detailed description. MOUSEBUTTONS123 This applies only to the OS/2 EMX port. It specifies the order of

buttons on the mouse. OS/2 numbers a 3-button mouse inconsis-

tently from other platforms: 1 = left 2 = right 3 = middle. This symbol lets you customize the mouse. The symbol must be

three numeric digits 1-3 in any order, e.g., 123 or 321. If it is

not specified, nnccuurrsseess uses 132. NCURSESASSUMEDCOLORS

Override the compiled-in assumption that the terminal's default

colors are white-on-black (see aassssuummeeddeeffaauullttccoolloorrss(3X)). You

may set the foreground and background color values with this envi-

ronment variable by proving a 2-element list: foreground,back-

ground. For example, to tell ncurses to not assume anything about

the colors, set this to "-1,-1". To make it green-on-black, set

it to "2,0". Any positive value from zero to the terminfo mmaaxxccoolloorrss value is allowed. NCURSESNOPADDING Most of the terminal descriptions in the terminfo database are written for real "hardware" terminals. Many people use terminal

emulators which run in a windowing environment and use curses-

based applications. Terminal emulators can duplicate all of the important aspects of a hardware terminal, but they do not have the same limitations. The chief limitation of a hardware terminal from the standpoint of your application is the management of dataflow, i.e., timing. Unless a hardware terminal is interfaced into a terminal concentrator (which does flow control), it (or your application) must manage dataflow, preventing overruns. The cheapest solution (no hardware cost) is for your program to do this by pausing after operations that the terminal does slowly, such as clearing the display. As a result, many terminal descriptions (including the vt100) have delay times embedded. You may wish to use these descriptions, but not want to pay the performance penalty. Set the NCURSESNOPADDING symbol to disable all but mandatory padding. Mandatory padding is used as a part of special control sequences such as flash. NCURSESNOSETBUF

Normally nnccuurrsseess enables buffered output during terminal initial-

ization. This is done (as in SVr4 curses) for performance rea-

sons. For testing purposes, both of nnccuurrsseess and certain applica-

tions, this feature is made optional. Setting the NCURSESNOSET-

BUF variable disables output buffering, leaving the output in the original (usually line buffered) mode. NCURSESNOUTF8ACS During initialization, the nnccuurrsseess library checks for special

cases where VT100 line-drawing (and the corresponding alternate

character set capabilities) described in the terminfo are known to

be missing. Specifically, when running in a UTF-8 locale, the

Linux console emulator and the GNU screen program ignore these. Ncurses checks the TERM environment variable for these. For other special cases, you should set this environment variable. Doing

this tells ncurses to use Unicode values which correspond to the

VT100 line-drawing glyphs. That works for the special cases

cited, and is likely to work for terminal emulators. When setting this variable, you should set it to a nonzero value. Setting it to zero (or to a nonnumber) disables the special check for Linux and screen. NCURSESTRACE During initialization, the nnccuurrsseess debugging library checks the NCURSESTRACE symbol. If it is defined, to a numeric value,

nnccuurrsseess calls the ttrraaccee function, using that value as the argu-

ment.

The argument values, which are defined in ccuurrsseess..hh, provide sev-

eral types of information. When running with traces enabled, your application will write the file ttrraaccee to the current directory. TERM Denotes your terminal type. Each terminal type is distinct, though many are similar. TERMCAP If the nnccuurrsseess library has been configured with termcap support, nnccuurrsseess will check for a terminal's description in termcap form if it is not available in the terminfo database. The TERMCAP symbol contains either a terminal description (with

newlines stripped out), or a file name telling where the informa-

tion denoted by the TERM symbol exists. In either case, setting it directs nnccuurrsseess to ignore the usual place for this information, e.g., /etc/termcap. TERMINFO

Overrides the directory in which nnccuurrsseess searches for your termi-

nal description. This is the simplest, but not the only way to change the list of directories. The complete list of directories in order follows:

- the last directory to which nnccuurrsseess wrote, if any, is searched

first

- the directory specified by the TERMINFO symbol

- $HOME/.terminfo

- directories listed in the TERMINFODIRS symbol

- one or more directories whose names are configured and compiled

into the ncurses library, e.g., /usr/share/terminfo

TERMINFODIRS

Specifies a list of directories to search for terminal descrip-

tions. The list is separated by colons (i.e., ":") on Unix, semi-

colons on OS/2 EMX. All of the terminal descriptions are in ter-

minfo form, which makes a subdirectory named for the first letter of the terminal names therein. TERMPATH If TERMCAP does not hold a file name then nnccuurrsseess checks the TERMPATH symbol. This is a list of filenames separated by spaces or colons (i.e., ":") on Unix, semicolons on OS/2 EMX. If the

TERMPATH symbol is not set, nnccuurrsseess looks in the files /etc/term-

cap, /usr/share/misc/termcap and $HOME/.termcap, in that order.

The library may be configured to disregard the following variables when the current user is the superuser (root), or if the application uses

setuid or setgid permissions: $TERMINFO, $TERMINFODIRS, $TERMPATH, as

well as $HOME.

FILES /usr/share/tabset

directory containing initialization files for the terminal capa-

bility database /usr/share/terminfo terminal capability database

SEE ALSO

tteerrmmiinnffoo(5) and related pages whose names begin "curs" for detailed routine descriptions. EEXXTTEENNSSIIOONNSS

The nnccuurrsseess library can be compiled with an option (-DDUUSSEEGGEETTCCAAPP) that

falls back to the old-style /etc/termcap file if the terminal setup

code cannot find a terminfo entry corresponding to TTEERRMM. Use of this

feature is not recommended, as it essentially includes an entire term-

cap compiler in the nnccuurrsseess startup code, at significant cost in core and startup cycles. The nnccuurrsseess library includes facilities for capturing mouse events on certain terminals (including xterm). See the ccuurrssmmoouussee(3X) manual page for details.

The nnccuurrsseess library includes facilities for responding to window resiz-

ing events, e.g., when running in an xterm. See the rreessiizzeetteerrmm(3X) and wwrreessiizzee(3X) manual pages for details. In addition, the library may be configured with a SIGWINCH handler. The nnccuurrsseess library extends the fixed set of function key capabilities of terminals by allowing the application designer to define additional key sequences at runtime. See the ddeeffiinneekkeeyy(3X) kkeeyyddeeffiinneedd(3X), and kkeeyyookk(3X) manual pages for details. The nnccuurrsseess library can exploit the capabilities of terminals which

implement the ISO-6429 SGR 39 and SGR 49 controls, which allow an

application to reset the terminal to its original foreground and back-

ground colors. From the users' perspective, the application is able to draw colored text on a background whose color is set independently,

providing better control over color contrasts. See the ddeeffaauullttccooll-

oorrss(3X) manual page for details.

The nnccuurrsseess library includes a function for directing application out-

put to a printer attached to the terminal device. See the ccuurrsspprriinntt(3X) manual page for details. PPOORRTTAABBIILLIITTYY

The nnccuurrsseess library is intended to be BASE-level conformant with the

XSI Curses standard. The EXTENDED XSI Curses functionality (including color support) is supported. A small number of local differences (that is, individual differences between the XSI Curses and nnccuurrsseess calls) are described in PPOORRTTAABBIILLIITTYY sections of the library man pages. The routine hhaasskkeeyy is not part of XPG4, nor is it present in SVr4. See the ccuurrssggeettcchh(3X) manual page for details. The routine ssllkkaattttrr is not part of XPG4, nor is it present in SVr4. See the ccuurrssssllkk(3X) manual page for details.

The routines ggeettmmoouussee, mmoouusseemmaasskk, uunnggeettmmoouussee, mmoouusseeiinntteerrvvaall, and wweenn-

cclloossee relating to mouse interfacing are not part of XPG4, nor are they present in SVr4. See the ccuurrssmmoouussee(3X) manual page for details.

The routine mmccpprriinntt was not present in any previous curses implementa-

tion. See the ccuurrsspprriinntt(3X) manual page for details. The routine wwrreessiizzee is not part of XPG4, nor is it present in SVr4. See the wwrreessiizzee(3X) manual page for details. In historic curses versions, delays embedded in the capabilities ccrr, iinndd, ccuubb11, ffff and ttaabb activated corresponding delay bits in the UNIX tty driver. In this implementation, all padding is done by NUL sends. This method is slightly more expensive, but narrows the interface to the UNIX kernel significantly and increases the package's portability correspondingly. NNOOTTEESS The header file <> automatically includes the header files <> and <>.

If standard output from a nnccuurrsseess program is re-directed to something

which is not a tty, screen updates will be directed to standard error. This was an undocumented feature of AT&T System V Release 3 curses. AUTHORS

Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey. Based on pcurses

by Pavel Curtis.

ncurses(3X)




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