CURSES(3X) UNIX Programmer's Manual CURSES(3X) NAME curses - screen functions with ``optimal'' cursor motion SYNOPSIS cc [ flags ] files -lcurses -ltermcap [ libraries ] 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 the _r_e_f_r_e_s_h() tells the routines to make the current screen look like the new one. In order to initialize the routines, the routine _i_n_i_t_s_c_r() must be called before any of the other routines that deal with windows and screens are used. The routine _e_n_d_w_i_n() should be called before exiting. SEE ALSO _S_c_r_e_e_n _U_p_d_a_t_i_n_g _a_n_d _C_u_r_s_o_r _M_o_v_e_m_e_n_t _O_p_t_i_m_i_z_a_t_i_o_n: _A _L_i_b_r_a_r_y _P_a_c_k_a_g_e, Ken Arnold, ioctl(2), getenv(3), tty(4), termcap(5) AUTHOR Ken Arnold FUNCTIONS addch(ch) add a character to _s_t_d_s_c_r addstr(str) add a string to _s_t_d_s_c_r box(win,vert,hor) draw a box around a window cbreak() set cbreak mode clear() clear _s_t_d_s_c_r clearok(scr,boolf) set clear flag for _s_c_r clrtobot() clear to bottom on _s_t_d_s_c_r clrtoeol() clear to end of line on _s_t_d_s_c_r delch() delete a character deleteln() delete a line delwin(win) delete _w_i_n echo() set echo mode endwin() end window modes erase() erase _s_t_d_s_c_r flusok(win,boolf) set flush-on-refresh flag for _w_i_n getch() get a char through _s_t_d_s_c_r getcap(name) get terminal capability _n_a_m_e getstr(str) get a string through _s_t_d_s_c_r gettmode() get tty modes getyx(win,y,x) get (y,x) co-ordinates inch() get char at current (y,x) co-ordinates initscr() initialize screens insch(c) insert a char insertln() insert a line leaveok(win,boolf) set leave flag for _w_i_n longname(termbuf,name) get long name from _t_e_r_m_b_u_f move(y,x) move to (y,x) on _s_t_d_s_c_r Printed 11/26/99 April 23, 1986 1 CURSES(3X) UNIX Programmer's Manual CURSES(3X) mvcur(lasty,lastx,newy,newx) actually move cursor newwin(lines,cols,begin_y,begin_x) create a new window nl() set newline mapping nocbreak() unset cbreak mode noecho() unset echo mode nonl() unset newline mapping noraw() unset raw mode overlay(win1,win2) overlay win1 on win2 overwrite(win1,win2) overwrite win1 on top of win2 printw(fmt,arg1,arg2,...) printf on _s_t_d_s_c_r raw() set raw mode refresh() make current screen look like _s_t_d_s_c_r resetty() reset tty flags to stored value savetty() stored current tty flags scanw(fmt,arg1,arg2,...) scanf through _s_t_d_s_c_r scroll(win) scroll _w_i_n one line scrollok(win,boolf) set scroll flag setterm(name) set term variables for name standend() end standout mode standout() start standout mode subwin(win,lines,cols,begin_y,begin_x) create a subwindow touchline(win,y,sx,ex) mark line _y _s_x through _s_y as changed touchoverlap(win1,win2) mark overlap of _w_i_n_1 on _w_i_n_2 as changed touchwin(win) "change" all of _w_i_n unctrl(ch) printable version of _c_h waddch(win,ch) add char to _w_i_n waddstr(win,str) add string to _w_i_n wclear(win) clear _w_i_n wclrtobot(win) clear to bottom of _w_i_n wclrtoeol(win) clear to end of line on _w_i_n wdelch(win,c) delete char from _w_i_n wdeleteln(win) delete line from _w_i_n werase(win) erase _w_i_n wgetch(win) get a char through _w_i_n wgetstr(win,str) get a string through _w_i_n winch(win) get char at current (y,x) in _w_i_n winsch(win,c) insert char into _w_i_n winsertln(win) insert line into _w_i_n wmove(win,y,x) set current (y,x) co-ordinates on _w_i_n wprintw(win,fmt,arg1,arg2,...) printf on _w_i_n wrefresh(win) make screen look like _w_i_n wscanw(win,fmt,arg1,arg2,...) scanf through _w_i_n wstandend(win) end standout mode on _w_i_n wstandout(win) start standout mode on _w_i_n BUGS Printed 11/26/99 April 23, 1986 2