| 1 | .\" Copyright (c) 1985, 1991 The Regents of the University of California.
|
|---|
| 2 | .\" All rights reserved.
|
|---|
| 3 | .\"
|
|---|
| 4 | .\" Redistribution and use in source and binary forms, with or without
|
|---|
| 5 | .\" modification, are permitted provided that the following conditions
|
|---|
| 6 | .\" are met:
|
|---|
| 7 | .\" 1. Redistributions of source code must retain the above copyright
|
|---|
| 8 | .\" notice, this list of conditions and the following disclaimer.
|
|---|
| 9 | .\" 2. Redistributions in binary form must reproduce the above copyright
|
|---|
| 10 | .\" notice, this list of conditions and the following disclaimer in the
|
|---|
| 11 | .\" documentation and/or other materials provided with the distribution.
|
|---|
| 12 | .\" 3. All advertising materials mentioning features or use of this software
|
|---|
| 13 | .\" must display the following acknowledgement:
|
|---|
| 14 | .\" This product includes software developed by the University of
|
|---|
| 15 | .\" California, Berkeley and its contributors.
|
|---|
| 16 | .\" 4. Neither the name of the University nor the names of its contributors
|
|---|
| 17 | .\" may be used to endorse or promote products derived from this software
|
|---|
| 18 | .\" without specific prior written permission.
|
|---|
| 19 | .\"
|
|---|
| 20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|---|
| 21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|---|
| 22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|---|
| 23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|---|
| 24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|---|
| 25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|---|
| 26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|---|
| 27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|---|
| 28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|---|
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|---|
| 30 | .\" SUCH DAMAGE.
|
|---|
| 31 | .\"
|
|---|
| 32 | .\" @(#)curses.3 6.6 (Berkeley) 4/19/91
|
|---|
| 33 | .\"
|
|---|
| 34 | .Dd April 19, 1991
|
|---|
| 35 | .Dt CURSES 3
|
|---|
| 36 | .Os BSD 4
|
|---|
| 37 | .Sh NAME
|
|---|
| 38 | .Nm curses
|
|---|
| 39 | .Nd screen functions with ``optimal'' cursor motion
|
|---|
| 40 | .Sh SYNOPSIS
|
|---|
| 41 | .Nm cc
|
|---|
| 42 | .Op Ar flags
|
|---|
| 43 | .Ar files
|
|---|
| 44 | .Fl lcurses ltermcap
|
|---|
| 45 | .Op Ar libraries
|
|---|
| 46 | .Sh DESCRIPTION
|
|---|
| 47 | These routines give the user a method of updating screens with reasonable
|
|---|
| 48 | optimization. They keep an image of the current screen,
|
|---|
| 49 | and the user sets up an image of a new one. Then the
|
|---|
| 50 | .Fn refresh
|
|---|
| 51 | tells the routines to make the current screen look like the new one.
|
|---|
| 52 | In order to initialize the routines, the routine
|
|---|
| 53 | .Fn initscr
|
|---|
| 54 | must be called before any of the other routines that deal with windows and
|
|---|
| 55 | screens are used. The routine
|
|---|
| 56 | .Fn endwin
|
|---|
| 57 | should be called before exiting.
|
|---|
| 58 | .Sh SEE ALSO
|
|---|
| 59 | .Xr ioctl 2 ,
|
|---|
| 60 | .Xr getenv 3 ,
|
|---|
| 61 | .Xr tty 4 ,
|
|---|
| 62 | .Xr termcap 5
|
|---|
| 63 | .Rs
|
|---|
| 64 | .%T Screen Updating and Cursor Movement Optimization: A Library Package
|
|---|
| 65 | .%A Ken Arnold
|
|---|
| 66 | .Re
|
|---|
| 67 | .Sh AUTHOR
|
|---|
| 68 | .An Ken Arnold
|
|---|
| 69 | .Sh FUNCTIONS
|
|---|
| 70 | .Bl -column "subwin(win,lines,cols,begin_y,begin_x) "
|
|---|
| 71 | .It addch(ch) add a character to
|
|---|
| 72 | .Em stdscr
|
|---|
| 73 | .It addstr(str) add a string to
|
|---|
| 74 | .Em stdscr
|
|---|
| 75 | .It box(win,vert,hor) draw a box around a window
|
|---|
| 76 | .It cbreak() set cbreak mode
|
|---|
| 77 | .It clear() clear
|
|---|
| 78 | .Em stdscr
|
|---|
| 79 | .It clearok(scr,boolf) set clear flag for
|
|---|
| 80 | .Em scr
|
|---|
| 81 | .It clrtobot() clear to bottom on
|
|---|
| 82 | .Em stdscr
|
|---|
| 83 | .It clrtoeol() clear to end of line on
|
|---|
| 84 | .Em stdscr
|
|---|
| 85 | .It delch() delete a character
|
|---|
| 86 | .It deleteln() delete a line
|
|---|
| 87 | .It delwin(win) delete
|
|---|
| 88 | .Em stdscr
|
|---|
| 89 | .It echo() set echo mode
|
|---|
| 90 | .It endwin() end window modes
|
|---|
| 91 | .It erase() erase
|
|---|
| 92 | .Em stdscr
|
|---|
| 93 | .It flusok(win,boolf) set flush-on-refresh flag for
|
|---|
| 94 | .Em win
|
|---|
| 95 | .It getch() get a char through
|
|---|
| 96 | .Em stdscr
|
|---|
| 97 | .It getcap(name) get terminal capability
|
|---|
| 98 | .Em name
|
|---|
| 99 | .It getstr(str) get a string through
|
|---|
| 100 | .Em stdscr
|
|---|
| 101 | .It gettmode() get tty modes
|
|---|
| 102 | .It getyx(win,y,x) get (y,x) co-ordinates
|
|---|
| 103 | .It inch() get char at current (y,x) co-ordinates
|
|---|
| 104 | .It initscr() initialize screens
|
|---|
| 105 | .It insch(c) insert a char
|
|---|
| 106 | .It insertln() insert a line
|
|---|
| 107 | .It leaveok(win,boolf) set leave flag for
|
|---|
| 108 | .Em stdscr
|
|---|
| 109 | .It longname(termbuf,name) get long name from
|
|---|
| 110 | .Em termbuf
|
|---|
| 111 | .It move(y,x) move to (y,x) on
|
|---|
| 112 | .Em stdscr
|
|---|
| 113 | .It mvcur(lasty,lastx,newy,newx) actually move cursor
|
|---|
| 114 | .It newwin(lines,cols,begin_y,begin_x)\ create a new window
|
|---|
| 115 | .It nl() set newline mapping
|
|---|
| 116 | .It nocbreak() unset cbreak mode
|
|---|
| 117 | .It noecho() unset echo mode
|
|---|
| 118 | .It nonl() unset newline mapping
|
|---|
| 119 | .It noraw() unset raw mode
|
|---|
| 120 | .It overlay(win1,win2) overlay win1 on win2
|
|---|
| 121 | .It overwrite(win1,win2) overwrite win1 on top of win2
|
|---|
| 122 | .It printw(fmt,arg1,arg2,...) printf on
|
|---|
| 123 | .Em stdscr
|
|---|
| 124 | .It raw() set raw mode
|
|---|
| 125 | .It refresh() make current screen look like
|
|---|
| 126 | .Em stdscr
|
|---|
| 127 | .It resetty() reset tty flags to stored value
|
|---|
| 128 | .It savetty() stored current tty flags
|
|---|
| 129 | .It scanw(fmt,arg1,arg2,...) scanf through
|
|---|
| 130 | .Em stdscr
|
|---|
| 131 | .It scroll(win) scroll
|
|---|
| 132 | .Em win
|
|---|
| 133 | one line
|
|---|
| 134 | .It scrollok(win,boolf) set scroll flag
|
|---|
| 135 | .It setterm(name) set term variables for name
|
|---|
| 136 | .It standend() end standout mode
|
|---|
| 137 | .It standout() start standout mode
|
|---|
| 138 | .It subwin(win,lines,cols,begin_y,begin_x)\ create a subwindow
|
|---|
| 139 | .It touchline(win,y,sx,ex) mark line
|
|---|
| 140 | .Em y
|
|---|
| 141 | .Em sx
|
|---|
| 142 | through
|
|---|
| 143 | .Em sy
|
|---|
| 144 | as changed
|
|---|
| 145 | .It touchoverlap(win1,win2) mark overlap of
|
|---|
| 146 | .Em win1
|
|---|
| 147 | on
|
|---|
| 148 | .Em win2
|
|---|
| 149 | as changed
|
|---|
| 150 | .It touchwin(win) \*(lqchange\*(rq all of
|
|---|
| 151 | .Em win
|
|---|
| 152 | .It unctrl(ch) printable version of
|
|---|
| 153 | .Em ch
|
|---|
| 154 | .It waddch(win,ch) add char to
|
|---|
| 155 | .Em win
|
|---|
| 156 | .It waddstr(win,str) add string to
|
|---|
| 157 | .Em win
|
|---|
| 158 | .It wclear(win) clear
|
|---|
| 159 | .Em win
|
|---|
| 160 | .It wclrtobot(win) clear to bottom of
|
|---|
| 161 | .Em win
|
|---|
| 162 | .It wclrtoeol(win) clear to end of line on
|
|---|
| 163 | .Em win
|
|---|
| 164 | .It wdelch(win,c) delete char from
|
|---|
| 165 | .Em win
|
|---|
| 166 | .It wdeleteln(win) delete line from
|
|---|
| 167 | .Em win
|
|---|
| 168 | .It werase(win) erase
|
|---|
| 169 | .Em win
|
|---|
| 170 | .It wgetch(win) get a char through
|
|---|
| 171 | .Em win
|
|---|
| 172 | .It wgetstr(win,str) get a string through
|
|---|
| 173 | .Em win
|
|---|
| 174 | .It winch(win) get char at current (y,x) in
|
|---|
| 175 | .Em win
|
|---|
| 176 | .It winsch(win,c) insert char into
|
|---|
| 177 | .Em win
|
|---|
| 178 | .It winsertln(win) insert line into
|
|---|
| 179 | .Em win
|
|---|
| 180 | .It wmove(win,y,x) set current (y,x) co-ordinates on
|
|---|
| 181 | .Em win
|
|---|
| 182 | .It wprintw(win,fmt,arg1,arg2,...)\ printf on
|
|---|
| 183 | .Em win
|
|---|
| 184 | .It wrefresh(win) make screen look like
|
|---|
| 185 | .Em win
|
|---|
| 186 | .It wscanw(win,fmt,arg1,arg2,...)\ scanf through
|
|---|
| 187 | .Em win
|
|---|
| 188 | .It wstandend(win) end standout mode on
|
|---|
| 189 | .Em win
|
|---|
| 190 | .It wstandout(win) start standout mode on
|
|---|
| 191 | .Em win
|
|---|
| 192 | .El
|
|---|
| 193 | .Sh HISTORY
|
|---|
| 194 | The
|
|---|
| 195 | .Nm
|
|---|
| 196 | package appeared in
|
|---|
| 197 | .Bx 4.0 .
|
|---|