summaryrefslogtreecommitdiff
path: root/static/v10/man3/curses.3
blob: dcfd19476f88bc9d4696ead13df435fa71a3bec8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
.TH CURSES 3X
.CT 2 comm_term
.SH NAME
curses \(mi screen functions with `optimal' cursor motion
.SH DESCRIPTION
These routines give the user a method
of updating screens with reasonable optimization.
They keep an image of the current screen,
and the user sets up an image of a new one.
Then
.I refresh()
tells the routines to make the current screen look
like the new one.
The initialization routine
.I initscr()
must be called before any other routines
that deal with windows and screens.
The routine
.I endwin()
should be called before exiting.
.PP
To load the functions use the
.IR ld (1)
options
.BR \-lcurses\ \-ltermcap .
.SH SEE ALSO
.IR ioctl (2),
.IR termcap (5)
.br
Ken Arnold,
`Screen Updating and Cursor Movement Optimization: A Library Package',
.I UNIX Programmer's Manual,
Seventh Edition, Virtual VAX-11 Version, 1980
(Berkeley)
.SH FUNCTIONS
.nf
.ds w \fIwin\fR
.ds s \fIstdscr\fR
.ta 3.3i
\fLaddch(ch)\fP	add a character to \*s
\fLaddstr(str)\fP	add a string to \*s
\fLbox(win,vert,hor)\fP	draw a box around a window
\fLcrmode()\fP	set cbreak mode
\fLclear()\fP	clear \*s
\fLclearok(scr,boolf)\fP	set clear flag for \fIscr\fR
\fLclrtobot()\fP	clear to bottom on \*s
\fLclrtoeol()\fP	clear to end of line on \*s
\fLdelwin(win)\fP	delete \*w
\fLecho()\fP	set echo mode
\fLendwin()\fP	end window modes
\fLerase()\fP	erase \*s
\fLgetch()\fP	get a char through \*s
\fLgetstr(str)\fP	get a string through \*s
\fLgettmode()\fP	get tty modes
\fLgetyx(win,y,x)\fP	get (y,x) co-ordinates
\fLinch()\fP	get char at current (y,x) co-ordinates
\fLinitscr()\fP	initialize screens
\fLleaveok(win,boolf)\fP	set leave flag for \*w
\fLlongname(termbuf,name)\fP	get long name from \fItermbuf\fR
\fLmove(y,x)\fP	move to (y,x) on \*s
\fLmvcur(lasty,lastx,newy,newx)\fP	actually move cursor
\fLnewwin(lines,cols,begin_y,begin_x)\ \fP	create a new window
\fLnl()\fP	set newline mapping
\fLnocrmode()\fP	unset cbreak mode
\fLnoecho()\fP	unset echo mode
\fLnonl()\fP	unset newline mapping
\fLnoraw()\fP	unset raw mode
\fLoverlay(win1,win2)\fP	overlay win1 on win2
\fLoverwrite(win1,win2)\fP	overwrite win1 on top of win2
\fLprintw(fmt,arg1,arg2,...)\fP	printf on \*s
\fLraw()\fP	set raw mode
\fLrefresh()\fP	make current screen look like \*s
\fLresetty()\fP	reset tty flags to stored value
\fLsavetty()\fP	stored current tty flags
\fLscanw(fmt,arg1,arg2,...)\fP	scanf through \*s
\fLscroll(win)\fP	scroll \*w one line
\fLscrollok(win,boolf)\fP	set scroll flag
\fLsetterm(name)\fP	set term variables for name
\fLstandend()\fP	end standout mode
\fLstandout()\fP	start standout mode
\fLsubwin(win,lines,cols,begin_y,begin_x)\ \fP	create a subwindow
\fLtouchwin(win)\fP	`change' all of \*w
\fLunctrl(ch)\fP	printable version of \fIch\fR
\fLwaddch(win,ch)\fP	add char to \*w
\fLwaddstr(win,str)\fP	add string to \*w
\fLwclear(win)\fP	clear \*w
\fLwclrtobot(win)\fP	clear to bottom of \*w
\fLwclrtoeol(win)\fP	clear to end of line on \*w
\fLwerase(win)\fP	erase \*w
\fLwgetch(win)\fP	get a char through \*w
\fLwgetstr(win,str)\fP	get a string through \*w
\fLwinch(win)\fP	get char at current (y,x) in \*w
\fLwmove(win,y,x)\fP	set current (y,x) co-ordinates on \*w
\fLwprintw(win,fmt,arg1,arg2,...)\ \fP	printf on \*w
\fLwrefresh(win)\fP	make screen look like \*w
\fLwscanw(win,fmt,arg1,arg2,...)\ \fP	scanf through \*w
\fLwstandend(win)\fP	end standout mode on \*w
\fLwstandout(win)\fP	start standout mode on \*w