Home | History | Annotate | Line # | Download | only in libcurses
curses.h revision 1.30
      1 /*	$NetBSD: curses.h,v 1.30 2000/04/11 13:57:09 blymn Exp $	*/
      2 
      3 /*
      4  * Copyright (c) 1981, 1993, 1994
      5  *	The Regents of the University of California.  All rights reserved.
      6  *
      7  * Redistribution and use in source and binary forms, with or without
      8  * modification, are permitted provided that the following conditions
      9  * are met:
     10  * 1. Redistributions of source code must retain the above copyright
     11  *    notice, this list of conditions and the following disclaimer.
     12  * 2. Redistributions in binary form must reproduce the above copyright
     13  *    notice, this list of conditions and the following disclaimer in the
     14  *    documentation and/or other materials provided with the distribution.
     15  * 3. All advertising materials mentioning features or use of this software
     16  *    must display the following acknowledgement:
     17  *	This product includes software developed by the University of
     18  *	California, Berkeley and its contributors.
     19  * 4. Neither the name of the University nor the names of its contributors
     20  *    may be used to endorse or promote products derived from this software
     21  *    without specific prior written permission.
     22  *
     23  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     24  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     26  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     27  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     29  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     32  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     33  * SUCH DAMAGE.
     34  *
     35  *	@(#)curses.h	8.5 (Berkeley) 4/29/95
     36  */
     37 
     38 #ifndef _CURSES_H_
     39 #define	_CURSES_H_
     40 
     41 #include <sys/types.h>
     42 #include <sys/cdefs.h>
     43 #include <wchar.h>
     44 
     45 #include <stdio.h>
     46 #include <termcap.h>
     47 
     48 /*
     49  * attr_t must be the same type as wchar_t (see <wchar.h>) to avoid padding
     50  * in __LDATA
     51  */
     52 typedef wchar_t	chtype;
     53 typedef wchar_t	attr_t;
     54 typedef	char	bool;
     55 
     56 #ifndef TRUE
     57 #define	TRUE	(/*CONSTCOND*/1)
     58 #endif
     59 #ifndef FALSE
     60 #define	FALSE	(/*CONSTCOND*/0)
     61 #endif
     62 
     63 /*
     64  * The following #defines and #includes are present for backward
     65  * compatibility only.  They should not be used in future code.
     66  *
     67  * START BACKWARD COMPATIBILITY ONLY.
     68  */
     69 #ifndef _CURSES_PRIVATE
     70 
     71 #define	_puts(s)	tputs(s, 0, __cputchar)
     72 #define	_putchar(c)	__cputchar(c)
     73 
     74 /* Old-style terminal modes access. */
     75 #define	baudrate()	(cfgetospeed(&__baset))
     76 #define	crmode()	cbreak()
     77 #define	erasechar()	(__baset.c_cc[VERASE])
     78 #define	killchar()	(__baset.c_cc[VKILL])
     79 #define	nocrmode()	nocbreak()
     80 #define	ospeed		(cfgetospeed(&__baset))
     81 #endif /* _CURSES_PRIVATE */
     82 
     83 extern char	 GT;			/* Gtty indicates tabs. */
     84 extern char	 NONL;			/* Term can't hack LF doing a CR. */
     85 extern char	 UPPERCASE;		/* Terminal is uppercase only. */
     86 
     87 extern int	 My_term;		/* Use Def_term regardless. */
     88 extern char	*Def_term;		/* Default terminal type. */
     89 
     90 /* Termcap capabilities. */
     91 extern char	AM, BS, CA, DA, EO, HC, IN, MI, MS, NC, NS, OS,
     92 		PC, UL, XB, XN, XT, XS, XX;
     93 extern char	*AC, *AE, *AL, *AS, *BC, *BL, *BT, *CD, *CE, *CL, *CM,
     94 		*CR, *CS, *DC, *DL, *DM, *DO, *Ea, *ED, *EI, *K0, *K1,
     95 		*K2, *K3, *K4, *K5, *K6, *K7, *K8, *K9, *HO, *IC, *IM,
     96 		*IP, *KD, *KE, *KH, *KL, *KR, *KS, *KU, *LL, *MA, *MB,
     97 		*MD, *ME, *MH, *MK, *MP, *MR, *ND, *NL, *RC, *SC, *SE,
     98 		*SF, *SO, *SR, *TA, *TE, *TI, *UC, *UE, *UP, *US, *VB,
     99 		*VS, *VE, *al, *dl, *sf, *sr, *AL_PARM, *DL_PARM, *UP_PARM,
    100 		*DOWN_PARM, *LEFT_PARM, *RIGHT_PARM;
    101 
    102 /* END BACKWARD COMPATIBILITY ONLY. */
    103 
    104 /* symbols for values returned by getch in keypad mode */
    105 #define    KEY_MIN        0x101    /* minimum extended key value */
    106 #define    KEY_BREAK      0x101    /* break key */
    107 #define    KEY_DOWN       0x102    /* down arrow */
    108 #define    KEY_UP         0x103    /* up arrow */
    109 #define    KEY_LEFT       0x104    /* left arrow */
    110 #define    KEY_RIGHT      0x105    /* right arrow*/
    111 #define    KEY_HOME       0x106    /* home key */
    112 #define    KEY_BACKSPACE  0x107    /* Backspace */
    113 
    114 /* First function key (block of 64 follow) */
    115 #define    KEY_F0         0x108
    116 /* Function defining other function key values*/
    117 #define    KEY_F(n)       (KEY_F0+(n))
    118 
    119 #define    KEY_DL         0x148    /* Delete Line */
    120 #define    KEY_IL         0x149    /* Insert Line*/
    121 #define    KEY_DC         0x14A    /* Delete Character */
    122 #define    KEY_IC         0x14B    /* Insert Character */
    123 #define    KEY_EIC        0x14C    /* Exit Insert Char mode */
    124 #define    KEY_CLEAR      0x14D    /* Clear screen */
    125 #define    KEY_EOS        0x14E    /* Clear to end of screen */
    126 #define    KEY_EOL        0x14F    /* Clear to end of line */
    127 #define    KEY_SF         0x150    /* Scroll one line forward */
    128 #define    KEY_SR         0x151    /* Scroll one line back */
    129 #define    KEY_NPAGE      0x152    /* Next Page */
    130 #define    KEY_PPAGE      0x153    /* Prev Page */
    131 #define    KEY_STAB       0x154    /* Set Tab */
    132 #define    KEY_CTAB       0x155    /* Clear Tab */
    133 #define    KEY_CATAB      0x156    /* Clear All Tabs */
    134 #define    KEY_ENTER      0x157    /* Enter or Send */
    135 #define    KEY_SRESET     0x158    /* Soft Reset */
    136 #define    KEY_RESET      0x159    /* Hard Reset */
    137 #define    KEY_PRINT      0x15A    /* Print */
    138 #define    KEY_LL         0x15B    /* Home Down */
    139 
    140 /*
    141  * "Keypad" keys arranged like this:
    142  *
    143  *  A1   up  A3
    144  * left  B2 right
    145  *  C1  down C3
    146  *
    147  */
    148 #define    KEY_A1         0x15C    /* Keypad upper left */
    149 #define    KEY_A3         0x15D    /* Keypad upper right */
    150 #define    KEY_B2         0x15E    /* Keypad centre key */
    151 #define    KEY_C1         0x15F    /* Keypad lower left */
    152 #define    KEY_C3         0x160    /* Keypad lower right */
    153 
    154 #define    KEY_BTAB       0x161    /* Back Tab */
    155 #define    KEY_BEG        0x162    /* Begin key */
    156 #define    KEY_CANCEL     0x163    /* Cancel key */
    157 #define    KEY_CLOSE      0x164    /* Close Key */
    158 #define    KEY_COMMAND    0x165    /* Command Key */
    159 #define    KEY_COPY       0x166    /* Copy key */
    160 #define    KEY_CREATE     0x167    /* Create key */
    161 #define    KEY_END        0x168    /* End key */
    162 #define    KEY_EXIT       0x169    /* Exit key */
    163 #define    KEY_FIND       0x16A    /* Find key */
    164 #define    KEY_HELP       0x16B    /* Help key */
    165 #define    KEY_MARK       0x16C    /* Mark key */
    166 #define    KEY_MESSAGE    0x16D    /* Message key */
    167 #define    KEY_MOVE       0x16E    /* Move key */
    168 #define    KEY_NEXT       0x16F    /* Next Object key */
    169 #define    KEY_OPEN       0x170    /* Open key */
    170 #define    KEY_OPTIONS    0x171    /* Options key */
    171 #define    KEY_PREVIOUS   0x172    /* Previous Object key */
    172 #define    KEY_REDO       0x173    /* Redo key */
    173 #define    KEY_REFERENCE  0x174    /* Ref Key */
    174 #define    KEY_REFRESH    0x175    /* Refresh key */
    175 #define    KEY_REPLACE    0x176    /* Replace key */
    176 #define    KEY_RESTART    0x177    /* Restart key */
    177 #define    KEY_RESUME     0x178    /* Resume key */
    178 #define    KEY_SAVE       0x179    /* Save key */
    179 #define    KEY_SBEG       0x17A    /* Shift begin key */
    180 #define    KEY_SCANCEL    0x17B    /* Shift Cancel key */
    181 #define    KEY_SCOMMAND   0x17C    /* Shift Command key */
    182 #define    KEY_SCOPY      0x17D    /* Shift Copy key */
    183 #define    KEY_SCREATE    0x17E    /* Shift Create key */
    184 #define    KEY_SDC        0x17F    /* Shift Delete Character */
    185 #define    KEY_SDL        0x180    /* Shift Delete Line */
    186 #define    KEY_SELECT     0x181    /* Select key */
    187 #define    KEY_SEND       0x182    /* Send key */
    188 #define    KEY_SEOL       0x183    /* Shift Clear Line key */
    189 #define    KEY_SEXIT      0x184    /* Shift Exit key */
    190 #define    KEY_SFIND      0x185    /* Shift Find key */
    191 #define    KEY_SHELP      0x186    /* Shift Help key */
    192 #define    KEY_SHOME      0x187    /* Shift Home key */
    193 #define    KEY_SIC        0x188    /* Shift Input key */
    194 #define    KEY_SLEFT      0x189    /* Shift Left Arrow key */
    195 #define    KEY_SMESSAGE   0x18A    /* Shift Message key */
    196 #define    KEY_SMOVE      0x18B    /* Shift Move key */
    197 #define    KEY_SNEXT      0x18C    /* Shift Next key */
    198 #define    KEY_SOPTIONS   0x18D    /* Shift Options key */
    199 #define    KEY_SPREVIOUS  0x18E    /* Shift Previous key */
    200 #define    KEY_SPRINT     0x18F    /* Shift Print key */
    201 #define    KEY_SREDO      0x190    /* Shift Redo key */
    202 #define    KEY_SREPLACE   0x191    /* Shift Replace key */
    203 #define    KEY_SRIGHT     0x192    /* Shift Right Arrow key */
    204 #define    KEY_SRESUME    0x193    /* Shift Resume key */
    205 #define    KEY_SSAVE      0x194    /* Shift Save key */
    206 #define    KEY_SSUSPEND   0x195    /* Shift Suspend key */
    207 #define    KEY_SUNDO      0x196    /* Shift Undo key */
    208 #define    KEY_SUSPEND    0x197    /* Suspend key */
    209 #define    KEY_UNDO       0x198    /* Undo key  */
    210 #define    KEY_MAX        0x198    /* maximum extended key value */
    211 
    212 /* 8-bit ASCII characters. */
    213 #define	unctrl(c)		__unctrl[((unsigned)c) & 0xff]
    214 #define	unctrllen(ch)		__unctrllen[((unsigned)ch) & 0xff]
    215 
    216 extern char	 *__unctrl[256];	/* Control strings. */
    217 extern char	 __unctrllen[256];	/* Control strings length. */
    218 
    219 /*
    220  * A window an array of __LINE structures pointed to by the 'lines' pointer.
    221  * A line is an array of __LDATA structures pointed to by the 'line' pointer.
    222  *
    223  */
    224 
    225 typedef struct __ldata __LDATA;
    226 typedef struct __line  __LINE;
    227 typedef struct __window  WINDOW;
    228 
    229 /*
    230  * Attribute definitions
    231  */
    232 #define A_NORMAL	__NORMAL
    233 #define	A_STANDOUT	__STANDOUT
    234 #define	A_UNDERLINE	__UNDERSCORE
    235 #define	A_REVERSE	__REVERSE
    236 #define	A_BLINK		__BLINK
    237 #define	A_DIM		__DIM
    238 #define	A_BOLD		__BOLD
    239 #define	A_BLANK		__BLANK
    240 #define	A_PROTECT	__PROTECT
    241 #define A_ALTCHARSET	__ALTCHARSET
    242 #define A_ATTRIBUTES	__ATTRIBUTES
    243 #define A_CHARTEXT	__CHARTEXT
    244 #define A_COLOR		__COLOR
    245 
    246 /*
    247  * Alternate character set definitions
    248  */
    249 
    250 #define NUM_ACS	128
    251 
    252 extern chtype _acs_char[NUM_ACS];
    253 
    254 #define ACS_RARROW	_acs_char['+']
    255 #define ACS_LARROW	_acs_char[',']
    256 #define ACS_UARROW	_acs_char['-']
    257 #define ACS_DARROW	_acs_char['.']
    258 #define ACS_BLOCK	_acs_char['0']
    259 #define ACS_DIAMOND	_acs_char['`']
    260 #define ACS_CKBOARD	_acs_char['a']
    261 #define ACS_DEGREE	_acs_char['f']
    262 #define ACS_PLMINUS	_acs_char['g']
    263 #define ACS_BOARD	_acs_char['h']
    264 #define ACS_LANTERN	_acs_char['i']
    265 #define ACS_LRCORNER	_acs_char['j']
    266 #define ACS_URCORNER	_acs_char['k']
    267 #define ACS_ULCORNER	_acs_char['l']
    268 #define ACS_LLCORNER	_acs_char['m']
    269 #define ACS_PLUS	_acs_char['n']
    270 #define ACS_HLINE	_acs_char['q']
    271 #define ACS_S1		_acs_char['o']
    272 #define ACS_S9		_acs_char['s']
    273 #define ACS_LTEE	_acs_char['t']
    274 #define ACS_RTEE	_acs_char['u']
    275 #define ACS_BTEE	_acs_char['v']
    276 #define ACS_TTEE	_acs_char['w']
    277 #define ACS_VLINE	_acs_char['x']
    278 #define ACS_BULLET	_acs_char['~']
    279 
    280 /* System V compatability */
    281 #define ACS_SBBS	ACS_LRCORNER
    282 #define ACS_BBSS	ACS_URCORNER
    283 #define	ACS_BSSB	ACS_ULCORNER
    284 #define ACS_SSBB	ACS_LLCORNER
    285 #define ACS_SSSS	ACS_PLUS
    286 #define ACS_BSBS	ACS_HLINE
    287 #define ACS_SSSB	ACS_LTEE
    288 #define ACS_SBSS	ACS_RTEE
    289 #define	ACS_SSBS	ACS_BTEE
    290 #define	ACS_BSSS	ACS_TTEE
    291 #define	ACS_SBSB	ACS_VLINE
    292 #define _acs_map	_acs_char
    293 
    294 /*
    295  * Color definitions
    296  */
    297 
    298 #define COLOR_BLACK	0x00
    299 #define COLOR_WHITE	0x01
    300 #define COLOR_RED	0x02
    301 #define COLOR_GREEN	0x03
    302 #define COLOR_BLUE	0x04
    303 #define COLOR_CYAN	0x05
    304 #define COLOR_MAGENTA	0x06
    305 #define COLOR_YELLOW	0x07
    306 
    307 
    308 /* Curses external declarations. */
    309 extern WINDOW	*curscr;		/* Current screen. */
    310 extern WINDOW	*stdscr;		/* Standard screen. */
    311 
    312 extern struct termios __orig_termios;	/* Terminal state before curses */
    313 extern struct termios __baset;		/* Our base terminal state */
    314 extern int	__tcaction;		/* If terminal hardware set. */
    315 
    316 extern int	 COLS;			/* Columns on the screen. */
    317 extern int	 LINES;			/* Lines on the screen. */
    318 
    319 extern char	*ttytype;		/* Full name of current terminal. */
    320 
    321 #define	ERR	(0)			/* Error return. */
    322 #define	OK	(1)			/* Success return. */
    323 
    324 /* Standard screen pseudo functions. */
    325 #define	addbytes(s, n)			__waddbytes(stdscr, s, n, 0)
    326 #define	addch(ch)			waddch(stdscr, ch)
    327 #define	addnstr(s, n)			waddnstr(stdscr, s, n)
    328 #define	addstr(s)			waddnstr(stdscr, s, -1)
    329 #define	border(l, r, t, b, tl, tr, bl, br) \
    330 	wborder(stdscr, l, r, t, b, tl, tr, bl, br)
    331 #define	clear()				wclear(stdscr)
    332 #define	clrtobot()			wclrtobot(stdscr)
    333 #define	clrtoeol()			wclrtoeol(stdscr)
    334 #define	delch()				wdelch(stdscr)
    335 #define	deleteln()			wdeleteln(stdscr)
    336 #define	erase()				werase(stdscr)
    337 #define	getch()				wgetch(stdscr)
    338 #define	getstr(s)			wgetstr(stdscr, s)
    339 #define	inch()				winch(stdscr)
    340 #define	insch(ch)			winsch(stdscr, ch)
    341 #define	insdelln(n)			winsdelln(stdscr, n)
    342 #define	insertln()			winsertln(stdscr)
    343 #define	move(y, x)			wmove(stdscr, y, x)
    344 #define	refresh()			wrefresh(stdscr)
    345 #define scrl(n)				wscrl(stdscr, n)
    346 #define	standend()			wstandend(stdscr)
    347 #define	standout()			wstandout(stdscr)
    348 #define	timeout(delay)			wtimeout(stdscr, delay)
    349 #define	underscore()			wunderscore(stdscr)
    350 #define	underend()			wunderend(stdscr)
    351 #define	attron(attr)			wattron(stdscr, attr)
    352 #define	attroff(attr)			wattroff(stdscr, attr)
    353 #define	attrset(attr)			wattrset(stdscr, attr)
    354 #define	waddbytes(w, s, n)		__waddbytes(w, s, n, 0)
    355 #define	waddstr(w, s)			waddnstr(w, s, -1)
    356 
    357 /* Standard screen plus movement pseudo functions. */
    358 #define	mvaddbytes(y, x, s, n)		mvwaddbytes(stdscr, y, x, s, n)
    359 #define	mvaddch(y, x, ch)		mvwaddch(stdscr, y, x, ch)
    360 #define	mvaddnstr(y, x, s, n)		mvwaddnstr(stdscr, y, x, s, n)
    361 #define	mvaddstr(y, x, s)		mvwaddstr(stdscr, y, x, s)
    362 #define	mvdelch(y, x)			mvwdelch(stdscr, y, x)
    363 #define	mvgetch(y, x)			mvwgetch(stdscr, y, x)
    364 #define	mvgetstr(y, x, s)		mvwgetstr(stdscr, y, x, s)
    365 #define	mvinch(y, x)			mvwinch(stdscr, y, x)
    366 #define	mvinsch(y, x, c)		mvwinsch(stdscr, y, x, c)
    367 #define	mvwaddbytes(w, y, x, s, n) \
    368 	(wmove(w, y, x) == ERR ? ERR : __waddbytes(w, s, n, 0))
    369 #define	mvwaddch(w, y, x, ch) \
    370 	(wmove(w, y, x) == ERR ? ERR : waddch(w, ch))
    371 #define	mvwaddnstr(w, y, x, s, n) \
    372 	(wmove(w, y, x) == ERR ? ERR : waddnstr(w, s, n))
    373 #define	mvwaddstr(w, y, x, s) \
    374 	(wmove(w, y, x) == ERR ? ERR : waddnstr(w, s, -1))
    375 #define	mvwdelch(w, y, x) \
    376 	(wmove(w, y, x) == ERR ? ERR : wdelch(w))
    377 #define	mvwgetch(w, y, x) \
    378 	(wmove(w, y, x) == ERR ? ERR : wgetch(w))
    379 #define	mvwgetstr(w, y, x, s) \
    380 	(wmove(w, y, x) == ERR ? ERR : wgetstr(w, s))
    381 #define	mvwinch(w, y, x) \
    382 	(wmove(w, y, x) == ERR ? ERR : winch(w))
    383 #define	mvwinsch(w, y, x, c) \
    384 	(wmove(w, y, x) == ERR ? ERR : winsch(w, c))
    385 
    386 #define	getyx(w, y, x)		(y) = getcury(w), (x) = getcurx(w)
    387 #define getbegyx(w, y, x)	(y) = getbegy(w), (x) = getbegx(w)
    388 #define getmaxyx(w, y, x)	(y) = getmaxy(w), (x) = getmaxx(w)
    389 #define getcury(w)		((w)->cury)
    390 #define getcurx(w)		((w)->curx)
    391 #define getbegy(w)		((w)->begy)
    392 #define getbegx(w)		((w)->begx)
    393 #define getmaxy(w)		((w)->maxy)
    394 #define getmaxx(w)		((w)->maxx)
    395 
    396 /* Public function prototypes. */
    397 __BEGIN_DECLS
    398 int	 beep __P((void));
    399 int	 box __P((WINDOW *, chtype, chtype));
    400 int	 cbreak __P((void));
    401 int	 clearok __P((WINDOW *, bool));
    402 int	 delwin __P((WINDOW *));
    403 int	 echo __P((void));
    404 int	 endwin __P((void));
    405 int	 flash __P((void));
    406 int	 flushinp __P((void));
    407 int	 flushok __P((WINDOW *, bool));
    408 char	*fullname __P((char *, char *));
    409 char	*getcap __P((char *));
    410 int	 gettmode __P((void));
    411 int	 idlok __P((WINDOW *, bool));
    412 WINDOW	*initscr __P((void));
    413 bool	 isendwin __P((void));
    414 void	 keypad __P((WINDOW *, bool));
    415 int	 leaveok __P((WINDOW *, bool));
    416 char	*longname __P((void));
    417 int	 mvcur __P((int, int, int, int));
    418 int	 mvprintw __P((int, int, char *, ...));
    419 int	 mvscanw __P((int, int, char *, ...));
    420 int	 mvwin __P((WINDOW *, int, int));
    421 int	 mvwprintw __P((WINDOW *, int, int, char *, ...));
    422 int	 mvwscanw __P((WINDOW *, int, int, char *, ...));
    423 WINDOW	*newwin __P((int, int, int, int));
    424 int	 nl __P((void));
    425 int	 nocbreak __P((void));
    426 void	 nodelay __P((WINDOW *, bool));
    427 int	 noecho __P((void));
    428 int	 nonl __P((void));
    429 int	 noraw __P((void));
    430 int	 notimeout __P((WINDOW *, bool));
    431 int	 overlay __P((const WINDOW *, WINDOW *));
    432 int	 overwrite __P((WINDOW *, WINDOW *));
    433 int	 printw __P((char *, ...));
    434 int	 raw __P((void));
    435 int	 resetty __P((void));
    436 int	 savetty __P((void));
    437 int	 scanw __P((char *, ...));
    438 int	 scroll __P((WINDOW *));
    439 int	 scrollok __P((WINDOW *, bool));
    440 int	 setterm __P((char *));
    441 WINDOW	*subwin __P((WINDOW *, int, int, int, int));
    442 int	 touchline __P((WINDOW *, int, int));
    443 int	 touchoverlap __P((WINDOW *, WINDOW *));
    444 int	 touchwin __P((WINDOW *));
    445 int	 vwprintw __P((WINDOW *, char *, _BSD_VA_LIST_));
    446 int	 vwscanw __P((WINDOW *, char *, _BSD_VA_LIST_));
    447 int	 waddch __P((WINDOW *, const chtype));
    448 int	 waddnstr __P((WINDOW *, const char *, int));
    449 int	 wattron __P((WINDOW *, int));
    450 int	 wattroff __P((WINDOW *, int));
    451 int	 wattrset __P((WINDOW *, int));
    452 int	 wborder __P((WINDOW *, chtype, chtype, chtype, chtype, chtype,
    453 		      chtype, chtype, chtype));
    454 int	 wclear __P((WINDOW *));
    455 int	 wclrtobot __P((WINDOW *));
    456 int	 wclrtoeol __P((WINDOW *));
    457 int	 wdelch __P((WINDOW *));
    458 int	 wdeleteln __P((WINDOW *));
    459 int	 werase __P((WINDOW *));
    460 int	 wgetch __P((WINDOW *));
    461 int	 wgetstr __P((WINDOW *, char *));
    462 chtype	 winch __P((WINDOW *));
    463 int	 winsch __P((WINDOW *, chtype));
    464 int	 winsdelln __P((WINDOW *, int));
    465 int	 winsertln __P((WINDOW *));
    466 int	 wmove __P((WINDOW *, int, int));
    467 int	 wprintw __P((WINDOW *, char *, ...));
    468 int	 wrefresh __P((WINDOW *));
    469 int	 wscanw __P((WINDOW *, char *, ...));
    470 int	 wscrl __P((WINDOW *, int));
    471 int	 wstandend __P((WINDOW *));
    472 int	 wstandout __P((WINDOW *));
    473 void	 wtimeout __P((WINDOW *, int));
    474 int	 wunderend __P((WINDOW *));
    475 int	 wunderscore __P((WINDOW *));
    476 
    477 /* Private functions that are needed for user programs prototypes. */
    478 int	 __cputchar __P((int));
    479 int	 __waddbytes __P((WINDOW *, const char *, int, attr_t));
    480 __END_DECLS
    481 
    482 /* Private functions. */
    483 #ifdef _CURSES_PRIVATE
    484 #ifdef DEBUG
    485 void	 __CTRACE __P((const char *, ...));
    486 #endif
    487 int	 __delay __P((void));
    488 unsigned int __hash __P((char *, int));
    489 void	 __id_subwins __P((WINDOW *));
    490 void	 __init_getch __P((char *));
    491 void	 __init_acs __P((void));
    492 char	*__longname __P((char *, char *));	/* Original BSD version */
    493 int	 __mvcur __P((int, int, int, int, int));
    494 int	 __nodelay __P((void));
    495 int	 __notimeout __P((void));
    496 void	 __restore_termios __P((void));
    497 void	 __restore_stophandler __P((void));
    498 void	 __save_termios __P((void));
    499 void	 __set_stophandler __P((void));
    500 void	 __set_subwin __P((WINDOW *, WINDOW *));
    501 void	 __startwin __P((void));
    502 void	 __stop_signal_handler __P((int));
    503 void	 __swflags __P((WINDOW *));
    504 int	 __timeout __P((int));
    505 int	 __touchline __P((WINDOW *, int, int, int, int));
    506 int	 __touchwin __P((WINDOW *));
    507 char	*__tscroll __P((const char *, int, int));
    508 int	 __waddch __P((WINDOW *, __LDATA *));
    509 int	 __stopwin __P((void));
    510 void	 __restartwin __P((void));
    511 
    512 /* Private #defines. */
    513 #define	min(a,b)	(a < b ? a : b)
    514 #define	max(a,b)	(a > b ? a : b)
    515 
    516 /* Private externs. */
    517 extern int	 __echoit;
    518 extern int	 __endwin;
    519 extern int	 __pfast;
    520 extern int	 __rawmode;
    521 extern int	 __noqch;
    522 #endif
    523 
    524 #endif /* !_CURSES_H_ */
    525