1CURSES(3X) CURSES(3X)
2
3
4
6 curses - screen functions with ``optimal'' cursor motion
7
9 cc [ flags ] files -lcurses -ltermcap [ libraries ]
10
12 These routines give the user a method of updating screens with reason‐
13 able optimization. They keep an image of the current screen, and the
14 user sets up an image of a new one. Then the refresh() tells the rou‐
15 tines to make the current screen look like the new one. In order to
16 initialize the routines, the routine initscr() must be called before
17 any of the other routines that deal with windows and screens are used.
18 The routine endwin() should be called before exiting.
19
21 Screen Updating and Cursor Movement Optimization: A Library Package,
22 Ken Arnold,
23 ioctl(2), getenv(3), tty(4), termcap(5)
24
26 Ken Arnold
27
29 addch(ch) add a character to stdscr
30 addstr(str) add a string to stdscr
31 box(win,vert,hor) draw a box around a window
32 cbreak() set cbreak mode
33 clear() clear stdscr
34 clearok(scr,boolf) set clear flag for scr
35 clrtobot() clear to bottom on stdscr
36 clrtoeol() clear to end of line on stdscr
37 delch() delete a character
38 deleteln() delete a line
39 delwin(win) delete win
40 echo() set echo mode
41 endwin() end window modes
42 erase() erase stdscr
43 flusok(win,boolf) set flush-on-refresh flag for win
44 getch() get a char through stdscr
45 getcap(name) get terminal capability name
46 getstr(str) get a string through stdscr
47 gettmode() get tty modes
48 getyx(win,y,x) get (y,x) co-ordinates
49 inch() get char at current (y,x) co-ordinates
50 initscr() initialize screens
51 insch(c) insert a char
52 insertln() insert a line
53 leaveok(win,boolf) set leave flag for win
54 longname(termbuf,name) get long name from termbuf
55 move(y,x) move to (y,x) on stdscr
56 mvcur(lasty,lastx,newy,newx) actually move cursor
57 newwin(lines,cols,begin_y,begin_x) create a new window
58 nl() set newline mapping
59 nocbreak() unset cbreak mode
60 noecho() unset echo mode
61 nonl() unset newline mapping
62 noraw() unset raw mode
63 overlay(win1,win2) overlay win1 on win2
64 overwrite(win1,win2) overwrite win1 on top of win2
65 printw(fmt,arg1,arg2,...) printf on stdscr
66 raw() set raw mode
67 refresh() make current screen look like stdscr
68 resetty() reset tty flags to stored value
69 savetty() stored current tty flags
70 scanw(fmt,arg1,arg2,...) scanf through stdscr
71 scroll(win) scroll win one line
72 scrollok(win,boolf) set scroll flag
73 setterm(name) set term variables for name
74 standend() end standout mode
75 standout() start standout mode
76 subwin(win,lines,cols,begin_y,begin_x) create a subwindow
77 touchline(win,y,sx,ex) mark line y sx through sy as changed
78 touchoverlap(win1,win2) mark overlap of win1 on win2 as changed
79 touchwin(win) “change” all of win
80 unctrl(ch) printable version of ch
81 waddch(win,ch) add char to win
82 waddstr(win,str) add string to win
83 wclear(win) clear win
84 wclrtobot(win) clear to bottom of win
85 wclrtoeol(win) clear to end of line on win
86 wdelch(win,c) delete char from win
87 wdeleteln(win) delete line from win
88 werase(win) erase win
89 wgetch(win) get a char through win
90 wgetstr(win,str) get a string through win
91 winch(win) get char at current (y,x) in win
92 winsch(win,c) insert char into win
93 winsertln(win) insert line into win
94 wmove(win,y,x) set current (y,x) co-ordinates on win
95 wprintw(win,fmt,arg1,arg2,...) printf on win
96 wrefresh(win) make screen look like win
97 wscanw(win,fmt,arg1,arg2,...) scanf through win
98 wstandend(win) end standout mode on win
99 wstandout(win) start standout mode on win
100
1024th Berkeley Distribution April 23, 1986 CURSES(3X)