date and time created 88/12/22 13:04:38 by sam
[unix-history] / usr / src / lib / libcurses / curses.3
CommitLineData
adbf199c
KB
1.\" Copyright (c) 1985 The Regents of the University of California.
2.\" All rights reserved.
844471ae 3.\"
adbf199c
KB
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
844471ae 15.\"
adbf199c
KB
16.\" @(#)curses.3 6.4 (Berkeley) %G%
17.\"
18.TH CURSES 3 ""
844471ae
KM
19.UC 4
20.SH NAME
21curses \- screen functions with ``optimal'' cursor motion
22.SH SYNOPSIS
23.B cc
35ced0c0 24[ flags ] files
844471ae 25.B \-lcurses \-ltermcap
35ced0c0 26[ libraries ]
844471ae 27.SH DESCRIPTION
eb74245b
KM
28These routines give the user a method of updating screens with reasonable
29optimization. They keep an image of the current screen,
30and the user sets up an image of a new one. Then the
844471ae 31.I refresh()
eb74245b
KM
32tells the routines to make the current screen look like the new one.
33In order to initialize the routines, the routine
844471ae 34.I initscr()
eb74245b
KM
35must be called before any of the other routines that deal with windows and
36screens are used. The routine
844471ae 37.I endwin()
35ced0c0 38should be called before exiting.
844471ae
KM
39.SH SEE ALSO
40.I "Screen Updating and Cursor Movement Optimization: A Library Package,"
41Ken Arnold,
42.br
eb74245b
KM
43ioctl(2),
44getenv(3),
45tty(4),
844471ae
KM
46termcap(5)
47.SH AUTHOR
48Ken Arnold
49.SH FUNCTIONS
50.nf
64f4641e
KM
51.ds w \fIwin\fP
52.ds s \fIstdscr\fP
844471ae
KM
53.ta 3i
54addch(ch) add a character to \*s
55addstr(str) add a string to \*s
56box(win,vert,hor) draw a box around a window
64f4641e 57cbreak() set cbreak mode
844471ae 58clear() clear \*s
64f4641e 59clearok(scr,boolf) set clear flag for \fIscr\fP
844471ae
KM
60clrtobot() clear to bottom on \*s
61clrtoeol() clear to end of line on \*s
62delch() delete a character
63deleteln() delete a line
64delwin(win) delete \*w
65echo() set echo mode
66endwin() end window modes
67erase() erase \*s
35ced0c0 68flusok(win,boolf) set flush-on-refresh flag for \fIwin\fP
844471ae 69getch() get a char through \*s
64f4641e 70getcap(name) get terminal capability \fIname\fP
844471ae
KM
71getstr(str) get a string through \*s
72gettmode() get tty modes
35ced0c0
KM
73getyx(win,y,x) get (y,x) co-ordinates
74inch() get char at current (y,x) co-ordinates
844471ae
KM
75initscr() initialize screens
76insch(c) insert a char
77insertln() insert a line
78leaveok(win,boolf) set leave flag for \*w
64f4641e 79longname(termbuf,name) get long name from \fItermbuf\fP
35ced0c0 80move(y,x) move to (y,x) on \*s
844471ae
KM
81mvcur(lasty,lastx,newy,newx) actually move cursor
82newwin(lines,cols,begin_y,begin_x)\ create a new window
83nl() set newline mapping
64f4641e 84nocbreak() unset cbreak mode
844471ae
KM
85noecho() unset echo mode
86nonl() unset newline mapping
87noraw() unset raw mode
88overlay(win1,win2) overlay win1 on win2
89overwrite(win1,win2) overwrite win1 on top of win2
90printw(fmt,arg1,arg2,...) printf on \*s
91raw() set raw mode
92refresh() make current screen look like \*s
93resetty() reset tty flags to stored value
94savetty() stored current tty flags
95scanw(fmt,arg1,arg2,...) scanf through \*s
96scroll(win) scroll \*w one line
97scrollok(win,boolf) set scroll flag
98setterm(name) set term variables for name
99standend() end standout mode
100standout() start standout mode
101subwin(win,lines,cols,begin_y,begin_x)\ create a subwindow
64f4641e
KM
102touchline(win,y,sx,ex) mark line \fIy\fP \fIsx\fP through \fIsy\fP as changed
103touchoverlap(win1,win2) mark overlap of \fIwin1\fP on \fIwin2\fP as changed
844471ae 104touchwin(win) \*(lqchange\*(rq all of \*w
64f4641e 105unctrl(ch) printable version of \fIch\fP
844471ae
KM
106waddch(win,ch) add char to \*w
107waddstr(win,str) add string to \*w
108wclear(win) clear \*w
109wclrtobot(win) clear to bottom of \*w
110wclrtoeol(win) clear to end of line on \*w
111wdelch(win,c) delete char from \*w
112wdeleteln(win) delete line from \*w
113werase(win) erase \*w
114wgetch(win) get a char through \*w
115wgetstr(win,str) get a string through \*w
35ced0c0 116winch(win) get char at current (y,x) in \*w
844471ae
KM
117winsch(win,c) insert char into \*w
118winsertln(win) insert line into \*w
35ced0c0 119wmove(win,y,x) set current (y,x) co-ordinates on \*w
844471ae
KM
120wprintw(win,fmt,arg1,arg2,...)\ printf on \*w
121wrefresh(win) make screen look like \*w
122wscanw(win,fmt,arg1,arg2,...)\ scanf through \*w
123wstandend(win) end standout mode on \*w
124wstandout(win) start standout mode on \*w