Commit | Line | Data |
---|---|---|
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 | |
21 | curses \- 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 |
28 | These routines give the user a method of updating screens with reasonable |
29 | optimization. They keep an image of the current screen, | |
30 | and the user sets up an image of a new one. Then the | |
844471ae | 31 | .I refresh() |
eb74245b KM |
32 | tells the routines to make the current screen look like the new one. |
33 | In order to initialize the routines, the routine | |
844471ae | 34 | .I initscr() |
eb74245b KM |
35 | must be called before any of the other routines that deal with windows and |
36 | screens are used. The routine | |
844471ae | 37 | .I endwin() |
35ced0c0 | 38 | should be called before exiting. |
844471ae KM |
39 | .SH SEE ALSO |
40 | .I "Screen Updating and Cursor Movement Optimization: A Library Package," | |
41 | Ken Arnold, | |
42 | .br | |
eb74245b KM |
43 | ioctl(2), |
44 | getenv(3), | |
45 | tty(4), | |
844471ae KM |
46 | termcap(5) |
47 | .SH AUTHOR | |
48 | Ken Arnold | |
49 | .SH FUNCTIONS | |
50 | .nf | |
64f4641e KM |
51 | .ds w \fIwin\fP |
52 | .ds s \fIstdscr\fP | |
844471ae KM |
53 | .ta 3i |
54 | addch(ch) add a character to \*s | |
55 | addstr(str) add a string to \*s | |
56 | box(win,vert,hor) draw a box around a window | |
64f4641e | 57 | cbreak() set cbreak mode |
844471ae | 58 | clear() clear \*s |
64f4641e | 59 | clearok(scr,boolf) set clear flag for \fIscr\fP |
844471ae KM |
60 | clrtobot() clear to bottom on \*s |
61 | clrtoeol() clear to end of line on \*s | |
62 | delch() delete a character | |
63 | deleteln() delete a line | |
64 | delwin(win) delete \*w | |
65 | echo() set echo mode | |
66 | endwin() end window modes | |
67 | erase() erase \*s | |
35ced0c0 | 68 | flusok(win,boolf) set flush-on-refresh flag for \fIwin\fP |
844471ae | 69 | getch() get a char through \*s |
64f4641e | 70 | getcap(name) get terminal capability \fIname\fP |
844471ae KM |
71 | getstr(str) get a string through \*s |
72 | gettmode() get tty modes | |
35ced0c0 KM |
73 | getyx(win,y,x) get (y,x) co-ordinates |
74 | inch() get char at current (y,x) co-ordinates | |
844471ae KM |
75 | initscr() initialize screens |
76 | insch(c) insert a char | |
77 | insertln() insert a line | |
78 | leaveok(win,boolf) set leave flag for \*w | |
64f4641e | 79 | longname(termbuf,name) get long name from \fItermbuf\fP |
35ced0c0 | 80 | move(y,x) move to (y,x) on \*s |
844471ae KM |
81 | mvcur(lasty,lastx,newy,newx) actually move cursor |
82 | newwin(lines,cols,begin_y,begin_x)\ create a new window | |
83 | nl() set newline mapping | |
64f4641e | 84 | nocbreak() unset cbreak mode |
844471ae KM |
85 | noecho() unset echo mode |
86 | nonl() unset newline mapping | |
87 | noraw() unset raw mode | |
88 | overlay(win1,win2) overlay win1 on win2 | |
89 | overwrite(win1,win2) overwrite win1 on top of win2 | |
90 | printw(fmt,arg1,arg2,...) printf on \*s | |
91 | raw() set raw mode | |
92 | refresh() make current screen look like \*s | |
93 | resetty() reset tty flags to stored value | |
94 | savetty() stored current tty flags | |
95 | scanw(fmt,arg1,arg2,...) scanf through \*s | |
96 | scroll(win) scroll \*w one line | |
97 | scrollok(win,boolf) set scroll flag | |
98 | setterm(name) set term variables for name | |
99 | standend() end standout mode | |
100 | standout() start standout mode | |
101 | subwin(win,lines,cols,begin_y,begin_x)\ create a subwindow | |
64f4641e KM |
102 | touchline(win,y,sx,ex) mark line \fIy\fP \fIsx\fP through \fIsy\fP as changed |
103 | touchoverlap(win1,win2) mark overlap of \fIwin1\fP on \fIwin2\fP as changed | |
844471ae | 104 | touchwin(win) \*(lqchange\*(rq all of \*w |
64f4641e | 105 | unctrl(ch) printable version of \fIch\fP |
844471ae KM |
106 | waddch(win,ch) add char to \*w |
107 | waddstr(win,str) add string to \*w | |
108 | wclear(win) clear \*w | |
109 | wclrtobot(win) clear to bottom of \*w | |
110 | wclrtoeol(win) clear to end of line on \*w | |
111 | wdelch(win,c) delete char from \*w | |
112 | wdeleteln(win) delete line from \*w | |
113 | werase(win) erase \*w | |
114 | wgetch(win) get a char through \*w | |
115 | wgetstr(win,str) get a string through \*w | |
35ced0c0 | 116 | winch(win) get char at current (y,x) in \*w |
844471ae KM |
117 | winsch(win,c) insert char into \*w |
118 | winsertln(win) insert line into \*w | |
35ced0c0 | 119 | wmove(win,y,x) set current (y,x) co-ordinates on \*w |
844471ae KM |
120 | wprintw(win,fmt,arg1,arg2,...)\ printf on \*w |
121 | wrefresh(win) make screen look like \*w | |
122 | wscanw(win,fmt,arg1,arg2,...)\ scanf through \*w | |
123 | wstandend(win) end standout mode on \*w | |
124 | wstandout(win) start standout mode on \*w |