Home | History | Annotate | Line # | Download | only in libcurses
curses.h revision 1.120.2.1
      1  1.120.2.1    bouyer /*	$NetBSD: curses.h,v 1.120.2.1 2017/04/21 16:53:10 bouyer Exp $	*/
      2       1.18     mikel 
      3        1.1       cgd /*
      4       1.13       cgd  * Copyright (c) 1981, 1993, 1994
      5        1.7       cgd  *	The Regents of the University of California.  All rights reserved.
      6        1.1       cgd  *
      7        1.1       cgd  * Redistribution and use in source and binary forms, with or without
      8        1.1       cgd  * modification, are permitted provided that the following conditions
      9        1.1       cgd  * are met:
     10        1.1       cgd  * 1. Redistributions of source code must retain the above copyright
     11        1.1       cgd  *    notice, this list of conditions and the following disclaimer.
     12        1.1       cgd  * 2. Redistributions in binary form must reproduce the above copyright
     13        1.1       cgd  *    notice, this list of conditions and the following disclaimer in the
     14        1.1       cgd  *    documentation and/or other materials provided with the distribution.
     15       1.78       agc  * 3. Neither the name of the University nor the names of its contributors
     16        1.1       cgd  *    may be used to endorse or promote products derived from this software
     17        1.1       cgd  *    without specific prior written permission.
     18        1.1       cgd  *
     19        1.1       cgd  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     20        1.1       cgd  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     21        1.1       cgd  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     22        1.1       cgd  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     23        1.1       cgd  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     24        1.1       cgd  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     25        1.1       cgd  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     26        1.1       cgd  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     27        1.1       cgd  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     28        1.1       cgd  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     29        1.1       cgd  * SUCH DAMAGE.
     30        1.1       cgd  *
     31       1.21     perry  *	@(#)curses.h	8.5 (Berkeley) 4/29/95
     32       1.88     blymn  *
     33       1.88     blymn  *	Modified by Ruibiao Qiu <ruibiao (at) arl.wustl.edu,ruibiao (at) gmail.com> 2005
     34      1.101       wiz  *	to add wide-character support
     35       1.88     blymn  *  - Add complex character structure (cchar_t)
     36      1.101       wiz  *	- Add definitions of wide-character routines
     37       1.88     blymn  *	- Add KEY_CODE_YES
     38        1.1       cgd  */
     39        1.1       cgd 
     40        1.4   mycroft #ifndef _CURSES_H_
     41        1.4   mycroft #define	_CURSES_H_
     42        1.1       cgd 
     43       1.22       mrg #include <sys/types.h>
     44       1.22       mrg #include <sys/cdefs.h>
     45       1.30     blymn #include <wchar.h>
     46       1.22       mrg 
     47        1.4   mycroft #include <stdio.h>
     48       1.89   xtraeme #include <stdbool.h>
     49        1.1       cgd 
     50        1.4   mycroft /*
     51       1.31       jdc  * attr_t must be the same size as wchar_t (see <wchar.h>) to avoid padding
     52       1.31       jdc  * in __LDATA.
     53        1.4   mycroft  */
     54       1.30     blymn typedef wchar_t	chtype;
     55       1.30     blymn typedef wchar_t	attr_t;
     56       1.44       jdc 
     57       1.92       jdc #if !defined(HAVE_WCHAR) && !defined(DISABLE_WCHAR)
     58       1.91       jdc #define HAVE_WCHAR 1
     59       1.91       jdc #endif
     60       1.91       jdc 
     61       1.88     blymn #ifdef HAVE_WCHAR
     62      1.115       roy /*
     63       1.91       jdc  * The complex character structure required by the X/Open reference and used
     64       1.91       jdc  * in * functions such as in_wchstr(). It includes a string of up to 8 wide
     65       1.91       jdc  * characters and its length, an attribute, and a color-pair.
     66       1.88     blymn  */
     67       1.88     blymn #define CURSES_CCHAR_MAX 8
     68       1.88     blymn #define CCHARW_MAX       5
     69       1.88     blymn typedef struct {
     70       1.88     blymn 	attr_t		attributes;		/* character attributes */
     71       1.91       jdc 	unsigned	elements;		/* number of wide char in
     72       1.91       jdc 						   vals[] */
     73       1.91       jdc 	wchar_t		vals[CURSES_CCHAR_MAX]; /* wide chars including
     74       1.91       jdc 						   non-spacing */
     75       1.88     blymn } cchar_t;
     76      1.115       roy #else
     77       1.88     blymn typedef chtype cchar_t;
     78       1.88     blymn #endif /* HAVE_WCHAR */
     79       1.88     blymn 
     80        1.4   mycroft #ifndef TRUE
     81       1.22       mrg #define	TRUE	(/*CONSTCOND*/1)
     82        1.4   mycroft #endif
     83        1.4   mycroft #ifndef FALSE
     84       1.22       mrg #define	FALSE	(/*CONSTCOND*/0)
     85        1.4   mycroft #endif
     86        1.1       cgd 
     87       1.30     blymn #ifndef _CURSES_PRIVATE
     88       1.30     blymn 
     89       1.64     blymn #define _puts(s)        tputs(s, 0, __cputchar)
     90       1.64     blymn #define _putchar(c)     __cputchar(c)
     91        1.1       cgd 
     92        1.4   mycroft /* Old-style terminal modes access. */
     93       1.64     blymn #define crmode()        cbreak()
     94       1.64     blymn #define nocrmode()      nocbreak()
     95        1.4   mycroft #endif /* _CURSES_PRIVATE */
     96       1.50       jdc 
     97        1.7       cgd 
     98       1.22       mrg /* symbols for values returned by getch in keypad mode */
     99       1.22       mrg #define    KEY_MIN        0x101    /* minimum extended key value */
    100       1.22       mrg #define    KEY_BREAK      0x101    /* break key */
    101       1.22       mrg #define    KEY_DOWN       0x102    /* down arrow */
    102       1.22       mrg #define    KEY_UP         0x103    /* up arrow */
    103       1.22       mrg #define    KEY_LEFT       0x104    /* left arrow */
    104       1.22       mrg #define    KEY_RIGHT      0x105    /* right arrow*/
    105       1.22       mrg #define    KEY_HOME       0x106    /* home key */
    106       1.22       mrg #define    KEY_BACKSPACE  0x107    /* Backspace */
    107       1.22       mrg 
    108       1.22       mrg /* First function key (block of 64 follow) */
    109       1.24    simonb #define    KEY_F0         0x108
    110       1.22       mrg /* Function defining other function key values*/
    111       1.24    simonb #define    KEY_F(n)       (KEY_F0+(n))
    112       1.22       mrg 
    113       1.22       mrg #define    KEY_DL         0x148    /* Delete Line */
    114       1.22       mrg #define    KEY_IL         0x149    /* Insert Line*/
    115       1.22       mrg #define    KEY_DC         0x14A    /* Delete Character */
    116       1.22       mrg #define    KEY_IC         0x14B    /* Insert Character */
    117       1.22       mrg #define    KEY_EIC        0x14C    /* Exit Insert Char mode */
    118       1.22       mrg #define    KEY_CLEAR      0x14D    /* Clear screen */
    119       1.22       mrg #define    KEY_EOS        0x14E    /* Clear to end of screen */
    120       1.22       mrg #define    KEY_EOL        0x14F    /* Clear to end of line */
    121       1.22       mrg #define    KEY_SF         0x150    /* Scroll one line forward */
    122       1.22       mrg #define    KEY_SR         0x151    /* Scroll one line back */
    123       1.22       mrg #define    KEY_NPAGE      0x152    /* Next Page */
    124       1.22       mrg #define    KEY_PPAGE      0x153    /* Prev Page */
    125       1.22       mrg #define    KEY_STAB       0x154    /* Set Tab */
    126       1.22       mrg #define    KEY_CTAB       0x155    /* Clear Tab */
    127       1.22       mrg #define    KEY_CATAB      0x156    /* Clear All Tabs */
    128       1.22       mrg #define    KEY_ENTER      0x157    /* Enter or Send */
    129       1.22       mrg #define    KEY_SRESET     0x158    /* Soft Reset */
    130       1.22       mrg #define    KEY_RESET      0x159    /* Hard Reset */
    131       1.22       mrg #define    KEY_PRINT      0x15A    /* Print */
    132       1.22       mrg #define    KEY_LL         0x15B    /* Home Down */
    133       1.22       mrg 
    134       1.22       mrg /*
    135       1.22       mrg  * "Keypad" keys arranged like this:
    136       1.22       mrg  *
    137       1.22       mrg  *  A1   up  A3
    138       1.22       mrg  * left  B2 right
    139       1.22       mrg  *  C1  down C3
    140       1.22       mrg  *
    141       1.22       mrg  */
    142       1.22       mrg #define    KEY_A1         0x15C    /* Keypad upper left */
    143       1.22       mrg #define    KEY_A3         0x15D    /* Keypad upper right */
    144       1.22       mrg #define    KEY_B2         0x15E    /* Keypad centre key */
    145       1.22       mrg #define    KEY_C1         0x15F    /* Keypad lower left */
    146       1.22       mrg #define    KEY_C3         0x160    /* Keypad lower right */
    147       1.22       mrg 
    148       1.22       mrg #define    KEY_BTAB       0x161    /* Back Tab */
    149       1.22       mrg #define    KEY_BEG        0x162    /* Begin key */
    150       1.22       mrg #define    KEY_CANCEL     0x163    /* Cancel key */
    151       1.22       mrg #define    KEY_CLOSE      0x164    /* Close Key */
    152       1.22       mrg #define    KEY_COMMAND    0x165    /* Command Key */
    153       1.22       mrg #define    KEY_COPY       0x166    /* Copy key */
    154       1.22       mrg #define    KEY_CREATE     0x167    /* Create key */
    155       1.22       mrg #define    KEY_END        0x168    /* End key */
    156       1.22       mrg #define    KEY_EXIT       0x169    /* Exit key */
    157       1.22       mrg #define    KEY_FIND       0x16A    /* Find key */
    158       1.22       mrg #define    KEY_HELP       0x16B    /* Help key */
    159       1.22       mrg #define    KEY_MARK       0x16C    /* Mark key */
    160       1.22       mrg #define    KEY_MESSAGE    0x16D    /* Message key */
    161       1.22       mrg #define    KEY_MOVE       0x16E    /* Move key */
    162       1.22       mrg #define    KEY_NEXT       0x16F    /* Next Object key */
    163       1.22       mrg #define    KEY_OPEN       0x170    /* Open key */
    164       1.22       mrg #define    KEY_OPTIONS    0x171    /* Options key */
    165       1.22       mrg #define    KEY_PREVIOUS   0x172    /* Previous Object key */
    166       1.22       mrg #define    KEY_REDO       0x173    /* Redo key */
    167       1.22       mrg #define    KEY_REFERENCE  0x174    /* Ref Key */
    168       1.22       mrg #define    KEY_REFRESH    0x175    /* Refresh key */
    169       1.22       mrg #define    KEY_REPLACE    0x176    /* Replace key */
    170       1.22       mrg #define    KEY_RESTART    0x177    /* Restart key */
    171       1.22       mrg #define    KEY_RESUME     0x178    /* Resume key */
    172       1.22       mrg #define    KEY_SAVE       0x179    /* Save key */
    173       1.22       mrg #define    KEY_SBEG       0x17A    /* Shift begin key */
    174       1.22       mrg #define    KEY_SCANCEL    0x17B    /* Shift Cancel key */
    175       1.22       mrg #define    KEY_SCOMMAND   0x17C    /* Shift Command key */
    176       1.22       mrg #define    KEY_SCOPY      0x17D    /* Shift Copy key */
    177       1.22       mrg #define    KEY_SCREATE    0x17E    /* Shift Create key */
    178       1.22       mrg #define    KEY_SDC        0x17F    /* Shift Delete Character */
    179       1.22       mrg #define    KEY_SDL        0x180    /* Shift Delete Line */
    180       1.22       mrg #define    KEY_SELECT     0x181    /* Select key */
    181       1.22       mrg #define    KEY_SEND       0x182    /* Send key */
    182       1.22       mrg #define    KEY_SEOL       0x183    /* Shift Clear Line key */
    183       1.22       mrg #define    KEY_SEXIT      0x184    /* Shift Exit key */
    184       1.22       mrg #define    KEY_SFIND      0x185    /* Shift Find key */
    185       1.22       mrg #define    KEY_SHELP      0x186    /* Shift Help key */
    186       1.22       mrg #define    KEY_SHOME      0x187    /* Shift Home key */
    187       1.22       mrg #define    KEY_SIC        0x188    /* Shift Input key */
    188       1.22       mrg #define    KEY_SLEFT      0x189    /* Shift Left Arrow key */
    189       1.22       mrg #define    KEY_SMESSAGE   0x18A    /* Shift Message key */
    190       1.22       mrg #define    KEY_SMOVE      0x18B    /* Shift Move key */
    191       1.22       mrg #define    KEY_SNEXT      0x18C    /* Shift Next key */
    192       1.22       mrg #define    KEY_SOPTIONS   0x18D    /* Shift Options key */
    193       1.22       mrg #define    KEY_SPREVIOUS  0x18E    /* Shift Previous key */
    194       1.22       mrg #define    KEY_SPRINT     0x18F    /* Shift Print key */
    195       1.22       mrg #define    KEY_SREDO      0x190    /* Shift Redo key */
    196       1.22       mrg #define    KEY_SREPLACE   0x191    /* Shift Replace key */
    197       1.22       mrg #define    KEY_SRIGHT     0x192    /* Shift Right Arrow key */
    198       1.44       jdc #define    KEY_SRSUME     0x193    /* Shift Resume key */
    199       1.22       mrg #define    KEY_SSAVE      0x194    /* Shift Save key */
    200       1.22       mrg #define    KEY_SSUSPEND   0x195    /* Shift Suspend key */
    201       1.22       mrg #define    KEY_SUNDO      0x196    /* Shift Undo key */
    202       1.22       mrg #define    KEY_SUSPEND    0x197    /* Suspend key */
    203       1.44       jdc #define    KEY_UNDO       0x198    /* Undo key */
    204       1.58       wiz #define    KEY_MOUSE      0x199    /* Mouse event has occurred */
    205       1.84       jdc #define    KEY_RESIZE     0x200    /* Resize event has occurred */
    206       1.84       jdc #define    KEY_MAX        0x240    /* maximum extended key value */
    207       1.88     blymn #define    KEY_CODE_YES   0x241    /* A function key pressed */
    208       1.22       mrg 
    209       1.82  christos #include <unctrl.h>
    210        1.7       cgd 
    211        1.7       cgd /*
    212        1.7       cgd  * A window an array of __LINE structures pointed to by the 'lines' pointer.
    213        1.7       cgd  * A line is an array of __LDATA structures pointed to by the 'line' pointer.
    214        1.7       cgd  */
    215        1.7       cgd 
    216       1.31       jdc /*
    217       1.31       jdc  * Definitions for characters and attributes in __LDATA
    218       1.31       jdc  */
    219       1.31       jdc #define __CHARTEXT	0x000000ff	/* bits for 8-bit characters */
    220       1.31       jdc #define __NORMAL	0x00000000	/* Added characters are normal. */
    221       1.84       jdc #define __STANDOUT	0x00000100	/* Added characters are standout. */
    222       1.84       jdc #define __UNDERSCORE	0x00000200	/* Added characters are underscored. */
    223       1.84       jdc #define __REVERSE	0x00000400	/* Added characters are reverse
    224       1.31       jdc 					   video. */
    225       1.84       jdc #define __BLINK		0x00000800	/* Added characters are blinking. */
    226       1.84       jdc #define __DIM		0x00001000	/* Added characters are dim. */
    227       1.84       jdc #define __BOLD		0x00002000	/* Added characters are bold. */
    228       1.84       jdc #define __BLANK		0x00004000	/* Added characters are blanked. */
    229       1.84       jdc #define __PROTECT	0x00008000	/* Added characters are protected. */
    230       1.84       jdc #define __ALTCHARSET	0x00010000	/* Added characters are ACS */
    231       1.84       jdc #define __COLOR		0x03fe0000	/* Color bits */
    232       1.84       jdc #define __ATTRIBUTES	0x03ffff00	/* All 8-bit attribute bits */
    233      1.100  drochner #ifdef HAVE_WCHAR
    234      1.100  drochner #define __ACS_IS_WACS	0x04000000 /* internal: use wacs table for ACS char */
    235      1.100  drochner #endif
    236       1.31       jdc 
    237       1.30     blymn typedef struct __ldata __LDATA;
    238       1.30     blymn typedef struct __line  __LINE;
    239       1.30     blymn typedef struct __window  WINDOW;
    240       1.62     blymn typedef struct __screen SCREEN;
    241       1.30     blymn 
    242       1.30     blymn /*
    243       1.30     blymn  * Attribute definitions
    244       1.30     blymn  */
    245       1.31       jdc #define	A_NORMAL	__NORMAL
    246       1.30     blymn #define	A_STANDOUT	__STANDOUT
    247       1.30     blymn #define	A_UNDERLINE	__UNDERSCORE
    248       1.30     blymn #define	A_REVERSE	__REVERSE
    249       1.30     blymn #define	A_BLINK		__BLINK
    250       1.30     blymn #define	A_DIM		__DIM
    251       1.30     blymn #define	A_BOLD		__BOLD
    252       1.30     blymn #define	A_BLANK		__BLANK
    253       1.91       jdc #define	A_INVIS		__BLANK
    254       1.30     blymn #define	A_PROTECT	__PROTECT
    255       1.31       jdc #define	A_ALTCHARSET	__ALTCHARSET
    256       1.31       jdc #define	A_ATTRIBUTES	__ATTRIBUTES
    257       1.31       jdc #define	A_CHARTEXT	__CHARTEXT
    258       1.31       jdc #define	A_COLOR		__COLOR
    259       1.30     blymn 
    260       1.88     blymn #ifdef HAVE_WCHAR
    261       1.88     blymn #define WA_ATTRIBUTES	0x03ffffff	/* Wide character attributes mask */
    262      1.105       roy #define WA_NORMAL	__NORMAL
    263       1.91       jdc #define WA_STANDOUT	__STANDOUT	/* Best highlighting mode */
    264       1.91       jdc #define WA_UNDERLINE	__UNDERSCORE	/* Underlining */
    265       1.91       jdc #define WA_REVERSE	__REVERSE	/* Reverse video */
    266       1.88     blymn #define WA_BLINK	__BLINK		/* Blinking */
    267       1.91       jdc #define WA_DIM		__DIM		/* Half bright */
    268       1.88     blymn #define WA_BOLD		__BOLD		/* Extra bright or bold */
    269       1.91       jdc #define WA_INVIS	__BLANK		/* Invisible */
    270       1.88     blymn #define WA_PROTECT	__PROTECT	/* Protected */
    271       1.91       jdc #define WA_ALTCHARSET	__ALTCHARSET	/* Alternate character set */
    272       1.88     blymn #define WA_LOW		0x00000002	/* Low highlight */
    273       1.88     blymn #define WA_TOP		0x00000004	/* Top highlight */
    274       1.88     blymn #define WA_HORIZONTAL	0x00000008	/* Horizontal highlight */
    275       1.88     blymn #define WA_VERTICAL	0x00000010	/* Vertical highlight */
    276       1.88     blymn #define WA_LEFT		0x00000020	/* Left highlight */
    277       1.88     blymn #define WA_RIGHT	0x00000040	/* Right highlight */
    278       1.88     blymn #endif /* HAVE_WCHAR */
    279       1.88     blymn 
    280       1.30     blymn /*
    281       1.30     blymn  * Alternate character set definitions
    282       1.30     blymn  */
    283       1.30     blymn 
    284       1.31       jdc #define	NUM_ACS	128
    285       1.30     blymn 
    286      1.114       roy __BEGIN_DECLS
    287       1.30     blymn extern chtype _acs_char[NUM_ACS];
    288      1.114       roy __END_DECLS
    289       1.87  christos #ifdef __cplusplus
    290       1.87  christos #define __UC_CAST(a)	static_cast<unsigned char>(a)
    291       1.87  christos #else
    292       1.87  christos #define __UC_CAST(a)	(unsigned char)(a)
    293       1.87  christos #endif
    294       1.90       jdc 
    295       1.90       jdc /* Standard definitions */
    296       1.87  christos #define	ACS_RARROW	_acs_char[__UC_CAST('+')]
    297       1.87  christos #define	ACS_LARROW	_acs_char[__UC_CAST(',')]
    298       1.87  christos #define	ACS_UARROW	_acs_char[__UC_CAST('-')]
    299       1.87  christos #define	ACS_DARROW	_acs_char[__UC_CAST('.')]
    300       1.87  christos #define	ACS_BLOCK	_acs_char[__UC_CAST('0')]
    301       1.87  christos #define	ACS_DIAMOND	_acs_char[__UC_CAST('`')]
    302       1.87  christos #define	ACS_CKBOARD	_acs_char[__UC_CAST('a')]
    303       1.87  christos #define	ACS_DEGREE	_acs_char[__UC_CAST('f')]
    304       1.87  christos #define	ACS_PLMINUS	_acs_char[__UC_CAST('g')]
    305       1.87  christos #define	ACS_BOARD	_acs_char[__UC_CAST('h')]
    306       1.87  christos #define	ACS_LANTERN	_acs_char[__UC_CAST('i')]
    307       1.87  christos #define	ACS_LRCORNER	_acs_char[__UC_CAST('j')]
    308       1.87  christos #define	ACS_URCORNER	_acs_char[__UC_CAST('k')]
    309       1.87  christos #define	ACS_ULCORNER	_acs_char[__UC_CAST('l')]
    310       1.87  christos #define	ACS_LLCORNER	_acs_char[__UC_CAST('m')]
    311       1.87  christos #define	ACS_PLUS	_acs_char[__UC_CAST('n')]
    312       1.87  christos #define	ACS_HLINE	_acs_char[__UC_CAST('q')]
    313       1.87  christos #define	ACS_S1		_acs_char[__UC_CAST('o')]
    314       1.87  christos #define	ACS_S9		_acs_char[__UC_CAST('s')]
    315       1.87  christos #define	ACS_LTEE	_acs_char[__UC_CAST('t')]
    316       1.87  christos #define	ACS_RTEE	_acs_char[__UC_CAST('u')]
    317       1.87  christos #define	ACS_BTEE	_acs_char[__UC_CAST('v')]
    318       1.87  christos #define	ACS_TTEE	_acs_char[__UC_CAST('w')]
    319       1.87  christos #define	ACS_VLINE	_acs_char[__UC_CAST('x')]
    320       1.87  christos #define	ACS_BULLET	_acs_char[__UC_CAST('~')]
    321       1.30     blymn 
    322       1.90       jdc /* Extensions */
    323       1.90       jdc #define	ACS_S3		_acs_char[__UC_CAST('p')]
    324       1.90       jdc #define	ACS_S7		_acs_char[__UC_CAST('r')]
    325       1.90       jdc #define	ACS_LEQUAL	_acs_char[__UC_CAST('y')]
    326       1.90       jdc #define	ACS_GEQUAL	_acs_char[__UC_CAST('z')]
    327       1.90       jdc #define	ACS_PI		_acs_char[__UC_CAST('{')]
    328       1.90       jdc #define	ACS_NEQUAL	_acs_char[__UC_CAST('|')]
    329       1.90       jdc #define	ACS_STERLING	_acs_char[__UC_CAST('}')]
    330       1.90       jdc 
    331       1.88     blymn #ifdef HAVE_WCHAR
    332      1.114       roy __BEGIN_DECLS
    333       1.88     blymn extern cchar_t _wacs_char[NUM_ACS];
    334      1.114       roy __END_DECLS
    335       1.88     blymn 
    336      1.100  drochner #define	WACS_RARROW     (&_wacs_char[(unsigned char)'+'])
    337      1.100  drochner #define	WACS_LARROW     (&_wacs_char[(unsigned char)','])
    338      1.100  drochner #define	WACS_UARROW     (&_wacs_char[(unsigned char)'-'])
    339      1.100  drochner #define	WACS_DARROW     (&_wacs_char[(unsigned char)'.'])
    340      1.100  drochner #define	WACS_BLOCK      (&_wacs_char[(unsigned char)'0'])
    341      1.100  drochner #define	WACS_DIAMOND    (&_wacs_char[(unsigned char)'`'])
    342      1.100  drochner #define	WACS_CKBOARD    (&_wacs_char[(unsigned char)'a'])
    343      1.100  drochner #define	WACS_DEGREE     (&_wacs_char[(unsigned char)'f'])
    344      1.100  drochner #define	WACS_PLMINUS    (&_wacs_char[(unsigned char)'g'])
    345      1.100  drochner #define	WACS_BOARD      (&_wacs_char[(unsigned char)'h'])
    346      1.100  drochner #define	WACS_LANTERN    (&_wacs_char[(unsigned char)'i'])
    347      1.100  drochner #define	WACS_LRCORNER   (&_wacs_char[(unsigned char)'j'])
    348      1.100  drochner #define	WACS_URCORNER   (&_wacs_char[(unsigned char)'k'])
    349      1.100  drochner #define	WACS_ULCORNER   (&_wacs_char[(unsigned char)'l'])
    350      1.100  drochner #define	WACS_LLCORNER   (&_wacs_char[(unsigned char)'m'])
    351      1.100  drochner #define	WACS_PLUS       (&_wacs_char[(unsigned char)'n'])
    352      1.100  drochner #define	WACS_HLINE      (&_wacs_char[(unsigned char)'q'])
    353      1.100  drochner #define	WACS_S1         (&_wacs_char[(unsigned char)'o'])
    354      1.100  drochner #define	WACS_S9         (&_wacs_char[(unsigned char)'s'])
    355      1.100  drochner #define	WACS_LTEE       (&_wacs_char[(unsigned char)'t'])
    356      1.100  drochner #define	WACS_RTEE       (&_wacs_char[(unsigned char)'u'])
    357      1.100  drochner #define	WACS_BTEE       (&_wacs_char[(unsigned char)'v'])
    358      1.100  drochner #define	WACS_TTEE       (&_wacs_char[(unsigned char)'w'])
    359      1.100  drochner #define	WACS_VLINE      (&_wacs_char[(unsigned char)'x'])
    360      1.100  drochner #define	WACS_BULLET     (&_wacs_char[(unsigned char)'~'])
    361      1.100  drochner #define	WACS_S3		(&_wacs_char[(unsigned char)'p'])
    362      1.100  drochner #define	WACS_S7		(&_wacs_char[(unsigned char)'r'])
    363      1.100  drochner #define	WACS_LEQUAL	(&_wacs_char[(unsigned char)'y'])
    364      1.100  drochner #define	WACS_GEQUAL	(&_wacs_char[(unsigned char)'z'])
    365      1.100  drochner #define	WACS_PI		(&_wacs_char[(unsigned char)'{'])
    366      1.100  drochner #define	WACS_NEQUAL	(&_wacs_char[(unsigned char)'|'])
    367      1.100  drochner #define	WACS_STERLING	(&_wacs_char[(unsigned char)'}'])
    368       1.88     blymn #endif /* HAVE_WCHAR */
    369       1.88     blymn 
    370       1.57       wiz /* System V compatibility */
    371       1.31       jdc #define	ACS_SBBS	ACS_LRCORNER
    372       1.31       jdc #define	ACS_BBSS	ACS_URCORNER
    373       1.30     blymn #define	ACS_BSSB	ACS_ULCORNER
    374       1.31       jdc #define	ACS_SSBB	ACS_LLCORNER
    375       1.31       jdc #define	ACS_SSSS	ACS_PLUS
    376       1.31       jdc #define	ACS_BSBS	ACS_HLINE
    377       1.31       jdc #define	ACS_SSSB	ACS_LTEE
    378       1.31       jdc #define	ACS_SBSS	ACS_RTEE
    379       1.30     blymn #define	ACS_SSBS	ACS_BTEE
    380       1.30     blymn #define	ACS_BSSS	ACS_TTEE
    381       1.30     blymn #define	ACS_SBSB	ACS_VLINE
    382       1.31       jdc #define	_acs_map	_acs_char
    383       1.30     blymn 
    384       1.30     blymn /*
    385       1.83       jdc  * Color definitions (ANSI color numbers)
    386       1.30     blymn  */
    387       1.30     blymn 
    388       1.31       jdc #define	COLOR_BLACK	0x00
    389       1.31       jdc #define	COLOR_RED	0x01
    390       1.31       jdc #define	COLOR_GREEN	0x02
    391       1.31       jdc #define	COLOR_YELLOW	0x03
    392       1.31       jdc #define	COLOR_BLUE	0x04
    393       1.31       jdc #define	COLOR_MAGENTA	0x05
    394       1.31       jdc #define	COLOR_CYAN	0x06
    395       1.31       jdc #define	COLOR_WHITE	0x07
    396        1.7       cgd 
    397       1.87  christos #ifdef __cplusplus
    398      1.119       roy #define __UINT32_CAST(a)	static_cast<uint32_t>(a)
    399       1.87  christos #else
    400      1.119       roy #define __UINT32_CAST(a)	(uint32_t)(a)
    401       1.87  christos #endif
    402       1.87  christos #define	COLOR_PAIR(n)	(((__UINT32_CAST(n)) << 17) & A_COLOR)
    403       1.87  christos #define	PAIR_NUMBER(n)	(((__UINT32_CAST(n)) & A_COLOR) >> 17)
    404        1.7       cgd 
    405        1.4   mycroft /* Curses external declarations. */
    406      1.114       roy __BEGIN_DECLS
    407        1.4   mycroft extern WINDOW	*curscr;		/* Current screen. */
    408        1.4   mycroft extern WINDOW	*stdscr;		/* Standard screen. */
    409        1.4   mycroft 
    410       1.22       mrg extern int	__tcaction;		/* If terminal hardware set. */
    411        1.4   mycroft 
    412        1.4   mycroft extern int	 COLS;			/* Columns on the screen. */
    413        1.4   mycroft extern int	 LINES;			/* Lines on the screen. */
    414       1.83       jdc extern int	 COLORS;		/* Max colors on the screen. */
    415       1.83       jdc extern int	 COLOR_PAIRS;		/* Max color pairs on the screen. */
    416       1.74       jdc 
    417       1.74       jdc extern int	 ESCDELAY;		/* Delay between keys in esc seq's. */
    418      1.106       roy extern int	 TABSIZE;		/* Size of a tab. */
    419      1.114       roy __END_DECLS
    420        1.4   mycroft 
    421       1.99       roy #ifndef OK
    422       1.85       jdc #define	ERR	(-1)			/* Error return. */
    423       1.85       jdc #define	OK	(0)			/* Success return. */
    424       1.99       roy #endif
    425        1.4   mycroft 
    426       1.33     blymn /*
    427       1.33     blymn  * The following have, traditionally, been macros but X/Open say they
    428       1.33     blymn  * need to be functions.  Keep the old macros for debugging.
    429       1.33     blymn  */
    430       1.33     blymn #ifdef _CURSES_USE_MACROS
    431        1.4   mycroft /* Standard screen pseudo functions. */
    432        1.7       cgd #define	addbytes(s, n)			__waddbytes(stdscr, s, n, 0)
    433        1.7       cgd #define	addch(ch)			waddch(stdscr, ch)
    434       1.75       jdc #define	addchnstr(s)			waddchnstr(stdscr, s, n)
    435       1.75       jdc #define	addchstr(s)			waddchnstr(stdscr, s, -1)
    436        1.7       cgd #define	addnstr(s, n)			waddnstr(stdscr, s, n)
    437       1.26    simonb #define	addstr(s)			waddnstr(stdscr, s, -1)
    438       1.73       jdc #define attr_get(a, p, o)		wattr_get(stdscr, a, p, o)
    439       1.73       jdc #define attr_off(a, o)			wattr_off(stdscr, a, o)
    440       1.73       jdc #define attr_on(a, o)			wattr_on(stdscr, a, o)
    441       1.73       jdc #define attr_set(a, p, o)		wattr_set(stdscr, a, p, o)
    442       1.67       jdc #define	attroff(attr)			wattroff(stdscr, attr)
    443       1.67       jdc #define	attron(attr)			wattron(stdscr, attr)
    444       1.67       jdc #define	attrset(attr)			wattrset(stdscr, attr)
    445       1.31       jdc #define bkgd(ch)			wbkgd(stdscr, ch)
    446       1.31       jdc #define bkgdset(ch)			wbkgdset(stdscr, ch)
    447       1.30     blymn #define	border(l, r, t, b, tl, tr, bl, br) \
    448       1.30     blymn 	wborder(stdscr, l, r, t, b, tl, tr, bl, br)
    449        1.7       cgd #define	clear()				wclear(stdscr)
    450        1.7       cgd #define	clrtobot()			wclrtobot(stdscr)
    451        1.7       cgd #define	clrtoeol()			wclrtoeol(stdscr)
    452       1.73       jdc #define color_set(c, o)			wcolor_set(stdscr, c, o)
    453        1.7       cgd #define	delch()				wdelch(stdscr)
    454        1.7       cgd #define	deleteln()			wdeleteln(stdscr)
    455       1.86       jdc #define	echochar(c)			wechochar(stdscr, c)
    456        1.7       cgd #define	erase()				werase(stdscr)
    457        1.7       cgd #define	getch()				wgetch(stdscr)
    458       1.56       jdc #define	getnstr(s, n)			wgetnstr(stdscr, s, n)
    459        1.7       cgd #define	getstr(s)			wgetstr(stdscr, s)
    460        1.7       cgd #define	inch()				winch(stdscr)
    461       1.52    simonb #define	inchnstr(c)			winchnstr(stdscr, c)
    462       1.52    simonb #define	inchstr(c)			winchstr(stdscr, c)
    463       1.52    simonb #define	innstr(s, n)			winnstr(stdscr, s, n)
    464        1.7       cgd #define	insch(ch)			winsch(stdscr, ch)
    465       1.30     blymn #define	insdelln(n)			winsdelln(stdscr, n)
    466        1.7       cgd #define	insertln()			winsertln(stdscr)
    467       1.52    simonb #define	instr(s)			winstr(stdscr, s)
    468        1.7       cgd #define	move(y, x)			wmove(stdscr, y, x)
    469        1.7       cgd #define	refresh()			wrefresh(stdscr)
    470       1.31       jdc #define	scrl(n)				wscrl(stdscr, n)
    471       1.55       jdc #define	setscrreg(t, b)			wsetscrreg(stdscr, t, b)
    472        1.7       cgd #define	standend()			wstandend(stdscr)
    473        1.7       cgd #define	standout()			wstandout(stdscr)
    474       1.22       mrg #define	timeout(delay)			wtimeout(stdscr, delay)
    475       1.22       mrg #define	underscore()			wunderscore(stdscr)
    476       1.22       mrg #define	underend()			wunderend(stdscr)
    477        1.7       cgd #define	waddbytes(w, s, n)		__waddbytes(w, s, n, 0)
    478       1.26    simonb #define	waddstr(w, s)			waddnstr(w, s, -1)
    479        1.4   mycroft 
    480        1.4   mycroft /* Standard screen plus movement pseudo functions. */
    481        1.7       cgd #define	mvaddbytes(y, x, s, n)		mvwaddbytes(stdscr, y, x, s, n)
    482        1.7       cgd #define	mvaddch(y, x, ch)		mvwaddch(stdscr, y, x, ch)
    483       1.75       jdc #define	mvaddchnstr(y, x, s, n)		mvwaddchnstr(stdscr, y, x, s, n)
    484       1.75       jdc #define	mvaddchstr(y, x, s)		mvwaddchstr(stdscr, y, x, s)
    485        1.7       cgd #define	mvaddnstr(y, x, s, n)		mvwaddnstr(stdscr, y, x, s, n)
    486        1.7       cgd #define	mvaddstr(y, x, s)		mvwaddstr(stdscr, y, x, s)
    487        1.7       cgd #define	mvdelch(y, x)			mvwdelch(stdscr, y, x)
    488        1.7       cgd #define	mvgetch(y, x)			mvwgetch(stdscr, y, x)
    489      1.107     joerg #define	mvgetnstr(y, x, s, n)		mvwgetnstr(stdscr, y, x, s, n)
    490        1.7       cgd #define	mvgetstr(y, x, s)		mvwgetstr(stdscr, y, x, s)
    491        1.7       cgd #define	mvinch(y, x)			mvwinch(stdscr, y, x)
    492       1.52    simonb #define	mvinchnstr(y, x, c, n)		mvwinchnstr(stdscr, y, x, c, n)
    493       1.52    simonb #define	mvinchstr(y, x, c)		mvwinchstr(stdscr, y, x, c)
    494       1.52    simonb #define	mvinnstr(y, x, s, n)		mvwinnstr(stdscr, y, x, s, n)
    495        1.7       cgd #define	mvinsch(y, x, c)		mvwinsch(stdscr, y, x, c)
    496       1.52    simonb #define	mvinstr(y, x, s)		mvwinstr(stdscr, y, x, s)
    497        1.7       cgd #define	mvwaddbytes(w, y, x, s, n) \
    498        1.7       cgd 	(wmove(w, y, x) == ERR ? ERR : __waddbytes(w, s, n, 0))
    499        1.7       cgd #define	mvwaddch(w, y, x, ch) \
    500        1.7       cgd 	(wmove(w, y, x) == ERR ? ERR : waddch(w, ch))
    501       1.75       jdc #define	mvwaddchnstr(w, y, x, s, n) \
    502       1.75       jdc 	(wmove(w, y, x) == ERR ? ERR : waddchnstr(w, s, n))
    503       1.75       jdc #define	mvwaddchstr(w, y, x, s) \
    504       1.75       jdc 	(wmove(w, y, x) == ERR ? ERR : waddchnstr(w, s, -1))
    505        1.7       cgd #define	mvwaddnstr(w, y, x, s, n) \
    506        1.7       cgd 	(wmove(w, y, x) == ERR ? ERR : waddnstr(w, s, n))
    507        1.7       cgd #define	mvwaddstr(w, y, x, s) \
    508       1.25    simonb 	(wmove(w, y, x) == ERR ? ERR : waddnstr(w, s, -1))
    509        1.7       cgd #define	mvwdelch(w, y, x) \
    510        1.7       cgd 	(wmove(w, y, x) == ERR ? ERR : wdelch(w))
    511        1.7       cgd #define	mvwgetch(w, y, x) \
    512        1.7       cgd 	(wmove(w, y, x) == ERR ? ERR : wgetch(w))
    513       1.56       jdc #define	mvwgetnstr(w, y, x, s, n) \
    514       1.56       jdc 	(wmove(w, y, x) == ERR ? ERR : wgetnstr(w, s, n))
    515        1.7       cgd #define	mvwgetstr(w, y, x, s) \
    516        1.7       cgd 	(wmove(w, y, x) == ERR ? ERR : wgetstr(w, s))
    517        1.7       cgd #define	mvwinch(w, y, x) \
    518        1.7       cgd 	(wmove(w, y, x) == ERR ? ERR : winch(w))
    519       1.52    simonb #define	mvwinchnstr(w, y, x, c, n) \
    520       1.52    simonb 	(wmove(w, y, x) == ERR ? ERR : winchnstr(w, c, n))
    521       1.52    simonb #define	mvwinchstr(w, y, x, s) \
    522       1.52    simonb 	(wmove(w, y, x) == ERR ? ERR : winchstr(w, c))
    523       1.52    simonb #define	mvwinnstr(w, y, x, s, n) \
    524       1.52    simonb 	(wmove(w, y, x) == ERR ? ERR : winnstr(w, s, n))
    525        1.7       cgd #define	mvwinsch(w, y, x, c) \
    526        1.7       cgd 	(wmove(w, y, x) == ERR ? ERR : winsch(w, c))
    527       1.52    simonb #define	mvwinstr(w, y, x, s) \
    528       1.52    simonb 	(wmove(w, y, x) == ERR ? ERR : winstr(w, s))
    529       1.33     blymn 
    530       1.77       jdc /* Miscellaneous. */
    531       1.77       jdc #define	noqiflush()		intrflush(stdscr, FALSE)
    532       1.77       jdc #define	qiflush()		intrflush(stdscr, TRUE)
    533       1.77       jdc 
    534       1.33     blymn #else
    535       1.33     blymn /* Use functions not macros... */
    536       1.44       jdc __BEGIN_DECLS
    537       1.44       jdc int	 addbytes(const char *, int);
    538       1.44       jdc int	 addch(chtype);
    539       1.75       jdc int	 addchnstr(const chtype *, int);
    540       1.75       jdc int	 addchstr(const chtype *);
    541       1.44       jdc int	 addnstr(const char *, int);
    542       1.44       jdc int	 addstr(const char *);
    543       1.73       jdc int	 attr_get(attr_t *, short *, void *);
    544       1.73       jdc int	 attr_off(attr_t, void *);
    545       1.73       jdc int	 attr_on(attr_t, void *);
    546       1.73       jdc int	 attr_set(attr_t, short, void *);
    547       1.67       jdc int	 attroff(int);
    548       1.67       jdc int	 attron(int);
    549       1.67       jdc int	 attrset(int);
    550       1.44       jdc int	 bkgd(chtype);
    551       1.44       jdc void	 bkgdset(chtype);
    552       1.44       jdc int	 border(chtype, chtype, chtype, chtype,
    553       1.44       jdc 	   chtype, chtype, chtype, chtype);
    554       1.44       jdc int	 clear(void);
    555       1.44       jdc int	 clrtobot(void);
    556       1.44       jdc int	 clrtoeol(void);
    557       1.73       jdc int	 color_set(short, void *);
    558       1.44       jdc int	 delch(void);
    559       1.44       jdc int	 deleteln(void);
    560       1.86       jdc int	 echochar(const chtype);
    561       1.44       jdc int	 erase(void);
    562       1.44       jdc int	 getch(void);
    563       1.56       jdc int	 getnstr(char *, int);
    564       1.44       jdc int	 getstr(char *);
    565       1.44       jdc chtype	 inch(void);
    566       1.52    simonb int	 inchnstr(chtype *, int);
    567       1.52    simonb int	 inchstr(chtype *);
    568       1.52    simonb int	 innstr(char *, int);
    569       1.44       jdc int	 insch(chtype);
    570       1.44       jdc int	 insdelln(int);
    571       1.44       jdc int	 insertln(void);
    572       1.52    simonb int	 instr(char *);
    573       1.44       jdc int	 move(int, int);
    574       1.44       jdc int	 refresh(void);
    575       1.44       jdc int	 scrl(int);
    576       1.55       jdc int	 setscrreg(int, int);
    577       1.44       jdc int	 standend(void);
    578       1.44       jdc int	 standout(void);
    579       1.44       jdc void	 timeout(int);
    580       1.44       jdc int	 underscore(void);
    581       1.44       jdc int	 underend(void);
    582       1.44       jdc int	 waddbytes(WINDOW *, const char *, int);
    583       1.44       jdc int	 waddstr(WINDOW *, const char *);
    584       1.33     blymn 
    585       1.33     blymn /* Standard screen plus movement functions. */
    586       1.44       jdc int	 mvaddbytes(int, int, const char *, int);
    587       1.44       jdc int	 mvaddch(int, int, chtype);
    588       1.75       jdc int	 mvaddchnstr(int, int, const chtype *, int);
    589       1.75       jdc int	 mvaddchstr(int, int, const chtype *);
    590       1.44       jdc int	 mvaddnstr(int, int, const char *, int);
    591       1.44       jdc int	 mvaddstr(int, int, const char *);
    592       1.44       jdc int	 mvdelch(int, int);
    593       1.44       jdc int	 mvgetch(int, int);
    594       1.56       jdc int	 mvgetnstr(int, int, char *, int);
    595       1.44       jdc int	 mvgetstr(int, int, char *);
    596       1.44       jdc chtype	 mvinch(int, int);
    597       1.52    simonb int	 mvinchnstr(int, int, chtype *, int);
    598       1.52    simonb int	 mvinchstr(int, int, chtype *);
    599       1.52    simonb int	 mvinnstr(int, int, char *, int);
    600       1.44       jdc int	 mvinsch(int, int, chtype);
    601       1.52    simonb int	 mvinstr(int, int, char *);
    602       1.44       jdc 
    603       1.44       jdc int	 mvwaddbytes(WINDOW *, int, int, const char *, int);
    604       1.44       jdc int	 mvwaddch(WINDOW *, int, int, chtype);
    605       1.75       jdc int	 mvwaddchnstr(WINDOW *, int, int, const chtype *, int);
    606       1.75       jdc int	 mvwaddchstr(WINDOW *, int, int, const chtype *);
    607       1.44       jdc int	 mvwaddnstr(WINDOW *, int, int, const char *, int);
    608       1.44       jdc int	 mvwaddstr(WINDOW *, int, int, const char *);
    609       1.44       jdc int	 mvwdelch(WINDOW *, int, int);
    610       1.44       jdc int	 mvwgetch(WINDOW *, int, int);
    611       1.56       jdc int	 mvwgetnstr(WINDOW *, int, int, char *, int);
    612       1.44       jdc int	 mvwgetstr(WINDOW *, int, int, char *);
    613       1.44       jdc chtype	 mvwinch(WINDOW *, int, int);
    614       1.44       jdc int	 mvwinsch(WINDOW *, int, int, chtype);
    615       1.44       jdc __END_DECLS
    616       1.33     blymn #endif /* _CURSES_USE_MACROS */
    617       1.33     blymn 
    618       1.34       jdc #define	getyx(w, y, x)		(y) = getcury(w), (x) = getcurx(w)
    619       1.31       jdc #define	getbegyx(w, y, x)	(y) = getbegy(w), (x) = getbegx(w)
    620       1.31       jdc #define	getmaxyx(w, y, x)	(y) = getmaxy(w), (x) = getmaxx(w)
    621       1.61     blymn #define	getparyx(w, y, x)	(y) = getpary(w), (x) = getparx(w)
    622        1.4   mycroft 
    623      1.109       roy #define	getsyx(y, x)						\
    624      1.109       roy 	do {							\
    625      1.109       roy 		if (is_leaveok(curscr))				\
    626      1.109       roy 			(y) = (x) = -1;				\
    627      1.109       roy 		else						\
    628      1.109       roy 			getyx(curscr,(y), (x));			\
    629      1.109       roy 	} while(0 /* CONSTCOND */)
    630      1.109       roy #define	setsyx(y, x)						\
    631      1.109       roy 	do {							\
    632      1.109       roy 		if ((y) == -1 && (x) == -1)			\
    633      1.109       roy 			leaveok(curscr, TRUE);			\
    634      1.109       roy 		else {						\
    635      1.109       roy 			leaveok(curscr, FALSE);			\
    636      1.109       roy 			wmove(curscr, (y), (x));		\
    637      1.109       roy 		}						\
    638      1.109       roy 	} while(0 /* CONSTCOND */)
    639      1.109       roy 
    640      1.109       roy 
    641        1.4   mycroft /* Public function prototypes. */
    642       1.14       jtc __BEGIN_DECLS
    643       1.66       jdc int	 assume_default_colors(short, short);
    644       1.63  christos int	 baudrate(void);
    645       1.33     blymn int	 beep(void);
    646       1.47     blymn int	 box(WINDOW *, chtype, chtype);
    647       1.72       jdc bool	 can_change_color(void);
    648       1.33     blymn int	 cbreak(void);
    649       1.47     blymn int	 clearok(WINDOW *, bool);
    650       1.47     blymn int	 color_content(short, short *, short *, short *);
    651       1.47     blymn int	 copywin(const WINDOW *, WINDOW *, int, int, int, int, int, int, int);
    652       1.47     blymn int	 curs_set(int);
    653       1.33     blymn int	 def_prog_mode(void);
    654       1.33     blymn int	 def_shell_mode(void);
    655       1.69     blymn int      define_key(char *, int);
    656       1.62     blymn int	 delay_output(int);
    657       1.62     blymn void     delscreen(SCREEN *);
    658       1.47     blymn int	 delwin(WINDOW *);
    659       1.47     blymn WINDOW	*derwin(WINDOW *, int, int, int, int);
    660       1.47     blymn WINDOW	*dupwin(WINDOW *);
    661       1.44       jdc int	 doupdate(void);
    662       1.33     blymn int	 echo(void);
    663       1.33     blymn int	 endwin(void);
    664       1.46     blymn char     erasechar(void);
    665      1.108       roy void	 filter(void);
    666       1.33     blymn int	 flash(void);
    667       1.33     blymn int	 flushinp(void);
    668       1.47     blymn int	 flushok(WINDOW *, bool);
    669       1.47     blymn char	*fullname(const char *, char *);
    670       1.48       jdc chtype	 getattrs(WINDOW *);
    671       1.47     blymn chtype	 getbkgd(WINDOW *);
    672       1.47     blymn int	 getcury(WINDOW *);
    673       1.47     blymn int	 getcurx(WINDOW *);
    674       1.47     blymn int	 getbegy(WINDOW *);
    675       1.47     blymn int	 getbegx(WINDOW *);
    676       1.47     blymn int	 getmaxy(WINDOW *);
    677       1.47     blymn int	 getmaxx(WINDOW *);
    678       1.61     blymn int	 getpary(WINDOW *);
    679       1.61     blymn int	 getparx(WINDOW *);
    680       1.33     blymn int	 gettmode(void);
    681       1.93       jdc WINDOW	*getwin(FILE *);
    682       1.71     blymn int	 halfdelay(int);
    683       1.33     blymn bool	 has_colors(void);
    684       1.55       jdc bool	 has_ic(void);
    685       1.55       jdc bool	 has_il(void);
    686      1.112       roy int	 has_key(int);
    687       1.47     blymn int	 hline(chtype, int);
    688       1.65     blymn int	 idcok(WINDOW *, bool);
    689       1.47     blymn int	 idlok(WINDOW *, bool);
    690      1.113       roy int	 immedok(WINDOW *, bool);
    691       1.47     blymn int	 init_color(short, short, short, short);
    692       1.47     blymn int	 init_pair(short, short, short);
    693       1.33     blymn WINDOW	*initscr(void);
    694       1.47     blymn int	 intrflush(WINDOW *, bool);
    695       1.33     blymn bool	 isendwin(void);
    696       1.47     blymn bool	 is_linetouched(WINDOW *, int);
    697       1.47     blymn bool	 is_wintouched(WINDOW *);
    698      1.117       roy bool	 is_term_resized(int, int);
    699       1.69     blymn int      keyok(int, bool);
    700       1.94      cube int	 keypad(WINDOW *, bool);
    701       1.76       jdc char	*keyname(int);
    702       1.46     blymn char     killchar(void);
    703       1.47     blymn int	 leaveok(WINDOW *, bool);
    704       1.47     blymn int	 meta(WINDOW *, bool);
    705       1.47     blymn int	 mvcur(int, int, int, int);
    706       1.60     blymn int      mvderwin(WINDOW *, int, int);
    707       1.47     blymn int	 mvhline(int, int, chtype, int);
    708       1.96     joerg int	 mvprintw(int, int, const char *, ...) __printflike(3, 4);
    709       1.96     joerg int	 mvscanw(int, int, const char *, ...) __scanflike(3, 4);
    710       1.47     blymn int	 mvvline(int, int, chtype, int);
    711       1.47     blymn int	 mvwhline(WINDOW *, int, int, chtype, int);
    712       1.47     blymn int	 mvwvline(WINDOW *, int, int, chtype, int);
    713       1.47     blymn int	 mvwin(WINDOW *, int, int);
    714       1.52    simonb int	 mvwinchnstr(WINDOW *, int, int, chtype *, int);
    715       1.52    simonb int	 mvwinchstr(WINDOW *, int, int, chtype *);
    716       1.52    simonb int	 mvwinnstr(WINDOW *, int, int, char *, int);
    717       1.52    simonb int	 mvwinstr(WINDOW *, int, int, char *);
    718       1.96     joerg int	 mvwprintw(WINDOW *, int, int, const char *, ...) __printflike(4, 5);
    719       1.96     joerg int	 mvwscanw(WINDOW *, int, int, const char *, ...) __scanflike(4, 5);
    720       1.48       jdc int	 napms(int);
    721       1.70       jdc WINDOW	*newpad(int, int);
    722       1.62     blymn SCREEN  *newterm(char *, FILE *, FILE *);
    723       1.47     blymn WINDOW	*newwin(int, int, int, int);
    724       1.33     blymn int	 nl(void);
    725       1.98       roy attr_t	 no_color_attributes(void);
    726       1.33     blymn int	 nocbreak(void);
    727       1.80       jdc int	 nodelay(WINDOW *, bool);
    728       1.33     blymn int	 noecho(void);
    729       1.33     blymn int	 nonl(void);
    730       1.77       jdc void	 noqiflush(void);
    731       1.33     blymn int	 noraw(void);
    732       1.47     blymn int	 notimeout(WINDOW *, bool);
    733       1.47     blymn int	 overlay(const WINDOW *, WINDOW *);
    734       1.47     blymn int	 overwrite(const WINDOW *, WINDOW *);
    735       1.47     blymn int	 pair_content(short, short *, short *);
    736       1.86       jdc int	 pechochar(WINDOW *, const chtype);
    737       1.70       jdc int	 pnoutrefresh(WINDOW *, int, int, int, int, int, int);
    738       1.70       jdc int	 prefresh(WINDOW *, int, int, int, int, int, int);
    739       1.96     joerg int	 printw(const char *, ...) __printflike(1, 2);
    740       1.93       jdc int	 putwin(WINDOW *, FILE *);
    741       1.77       jdc void	 qiflush(void);
    742       1.33     blymn int	 raw(void);
    743       1.79       jdc int	 redrawwin(WINDOW *);
    744       1.33     blymn int	 reset_prog_mode(void);
    745       1.33     blymn int	 reset_shell_mode(void);
    746       1.33     blymn int	 resetty(void);
    747       1.59     blymn int      resizeterm(int, int);
    748      1.117       roy int	 resize_term(int, int);
    749      1.120       roy int	 ripoffline(int, int (*)(WINDOW *, int));
    750       1.33     blymn int	 savetty(void);
    751       1.96     joerg int	 scanw(const char *, ...) __scanflike(1, 2);
    752       1.47     blymn int	 scroll(WINDOW *);
    753       1.47     blymn int	 scrollok(WINDOW *, bool);
    754       1.33     blymn int	 setterm(char *);
    755      1.116       roy int	 set_escdelay(int);
    756      1.116       roy int	 set_tabsize(int);
    757       1.62     blymn SCREEN  *set_term(SCREEN *);
    758       1.44       jdc int	 start_color(void);
    759       1.70       jdc WINDOW	*subpad(WINDOW *, int, int, int, int);
    760       1.47     blymn WINDOW	*subwin(WINDOW *, int, int, int, int);
    761      1.113       roy int	 syncok(WINDOW *, bool);
    762       1.91       jdc chtype	 termattrs(void);
    763       1.91       jdc attr_t	 term_attrs(void);
    764       1.47     blymn int	 touchline(WINDOW *, int, int);
    765       1.47     blymn int	 touchoverlap(WINDOW *, WINDOW *);
    766       1.47     blymn int	 touchwin(WINDOW *);
    767      1.111       roy int	 typeahead(int);
    768       1.47     blymn int	 ungetch(int);
    769       1.47     blymn int	 untouchwin(WINDOW *);
    770       1.66       jdc int	 use_default_colors(void);
    771      1.110       roy void	 use_env(bool);
    772       1.47     blymn int	 vline(chtype, int);
    773      1.102     joerg int	 vw_printw(WINDOW *, const char *, __va_list) __printflike(2, 0);
    774      1.102     joerg int	 vw_scanw(WINDOW *, const char *, __va_list) __scanflike(2, 0);
    775      1.102     joerg int	 vwprintw(WINDOW *, const char *, __va_list) __printflike(2, 0);
    776      1.102     joerg int	 vwscanw(WINDOW *, const char *, __va_list) __scanflike(2, 0);
    777       1.47     blymn int	 waddch(WINDOW *, chtype);
    778       1.75       jdc int	 waddchnstr(WINDOW *, const chtype *, int);
    779       1.75       jdc int	 waddchstr(WINDOW *, const chtype *);
    780       1.47     blymn int	 waddnstr(WINDOW *, const char *, int);
    781       1.73       jdc int	 wattr_get(WINDOW *, attr_t *, short *, void *);
    782       1.73       jdc int	 wattr_off(WINDOW *, attr_t, void *);
    783       1.73       jdc int	 wattr_on(WINDOW *, attr_t, void *);
    784       1.73       jdc int	 wattr_set(WINDOW *, attr_t, short, void *);
    785       1.67       jdc int	 wattroff(WINDOW *, int);
    786       1.47     blymn int	 wattron(WINDOW *, int);
    787       1.47     blymn int	 wattrset(WINDOW *, int);
    788       1.47     blymn int	 wbkgd(WINDOW *, chtype);
    789       1.47     blymn void	 wbkgdset(WINDOW *, chtype);
    790       1.47     blymn int	 wborder(WINDOW *, chtype, chtype, chtype, chtype, chtype, chtype,
    791       1.47     blymn 		chtype, chtype);
    792       1.47     blymn int	 wclear(WINDOW *);
    793       1.47     blymn int	 wclrtobot(WINDOW *);
    794       1.47     blymn int	 wclrtoeol(WINDOW *);
    795       1.73       jdc int	 wcolor_set(WINDOW *, short, void *);
    796      1.100  drochner void	 wcursyncup(WINDOW *);
    797       1.47     blymn int	 wdelch(WINDOW *);
    798       1.47     blymn int	 wdeleteln(WINDOW *);
    799       1.86       jdc int	 wechochar(WINDOW *, const chtype);
    800       1.47     blymn int	 werase(WINDOW *);
    801       1.47     blymn int	 wgetch(WINDOW *);
    802       1.56       jdc int	 wgetnstr(WINDOW *, char *, int);
    803       1.47     blymn int	 wgetstr(WINDOW *, char *);
    804       1.47     blymn int	 whline(WINDOW *, chtype, int);
    805       1.47     blymn chtype	 winch(WINDOW *);
    806       1.52    simonb int	 winchnstr(WINDOW *, chtype *, int);
    807       1.52    simonb int	 winchstr(WINDOW *, chtype *);
    808       1.52    simonb int	 winnstr(WINDOW *, char *, int);
    809       1.47     blymn int	 winsch(WINDOW *, chtype);
    810       1.47     blymn int	 winsdelln(WINDOW *, int);
    811       1.47     blymn int	 winsertln(WINDOW *);
    812       1.52    simonb int	 winstr(WINDOW *, char *);
    813       1.47     blymn int	 wmove(WINDOW *, int, int);
    814       1.47     blymn int	 wnoutrefresh(WINDOW *);
    815       1.96     joerg int	 wprintw(WINDOW *, const char *, ...)  __printflike(2, 3);
    816       1.79       jdc int	 wredrawln(WINDOW *, int, int);
    817       1.47     blymn int	 wrefresh(WINDOW *);
    818       1.59     blymn int      wresize(WINDOW *, int, int);
    819       1.96     joerg int	 wscanw(WINDOW *, const char *, ...) __scanflike(2, 3);
    820       1.47     blymn int	 wscrl(WINDOW *, int);
    821       1.55       jdc int	 wsetscrreg(WINDOW *, int, int);
    822       1.47     blymn int	 wstandend(WINDOW *);
    823       1.47     blymn int	 wstandout(WINDOW *);
    824      1.100  drochner void	 wsyncdown(WINDOW *);
    825      1.100  drochner void	 wsyncup(WINDOW *);
    826       1.47     blymn void	 wtimeout(WINDOW *, int);
    827       1.47     blymn int	 wtouchln(WINDOW *, int, int, int);
    828       1.47     blymn int	 wunderend(WINDOW *);
    829       1.47     blymn int	 wunderscore(WINDOW *);
    830       1.47     blymn int	 wvline(WINDOW *, chtype, int);
    831        1.4   mycroft 
    832       1.88     blymn int insnstr(const char *, int);
    833       1.88     blymn int insstr(const char *);
    834       1.88     blymn int mvinsnstr(int, int, const char *, int);
    835       1.88     blymn int mvinsstr(int, int, const char *);
    836       1.88     blymn int mvwinsnstr(WINDOW *, int, int, const char *, int);
    837       1.88     blymn int mvwinsstr(WINDOW *, int, int, const char *);
    838       1.88     blymn int winsnstr(WINDOW *, const char *, int);
    839       1.88     blymn int winsstr(WINDOW *, const char *);
    840       1.88     blymn 
    841       1.95     joerg int chgat(int, attr_t, short, const void *);
    842       1.95     joerg int wchgat(WINDOW *, int, attr_t, short, const void *);
    843       1.95     joerg int mvchgat(int, int, int, attr_t, short, const void *);
    844       1.95     joerg int mvwchgat(WINDOW *, int, int, int, attr_t, short, const void *);
    845       1.95     joerg 
    846  1.120.2.1    bouyer /* Soft Label Keys. */
    847  1.120.2.1    bouyer int	 slk_attroff(const chtype);
    848  1.120.2.1    bouyer int	 slk_attr_off(const attr_t, void *);
    849  1.120.2.1    bouyer int	 slk_attron(const chtype);
    850  1.120.2.1    bouyer int	 slk_attr_on(const attr_t, void *);
    851  1.120.2.1    bouyer int	 slk_attrset(const chtype);
    852  1.120.2.1    bouyer int	 slk_attr_set(const attr_t, short, void *);
    853  1.120.2.1    bouyer int	 slk_clear(void);
    854  1.120.2.1    bouyer int	 slk_color(short);
    855  1.120.2.1    bouyer int	 slk_init(int);
    856  1.120.2.1    bouyer char	*slk_label(int);
    857  1.120.2.1    bouyer int	 slk_noutrefresh(void);
    858  1.120.2.1    bouyer int	 slk_refresh(void);
    859  1.120.2.1    bouyer int	 slk_restore(void);
    860  1.120.2.1    bouyer int	 slk_set(int, const char *, int);
    861  1.120.2.1    bouyer int	 slk_touch(void);
    862  1.120.2.1    bouyer int	 slk_wset(int, const wchar_t *, int);
    863  1.120.2.1    bouyer 
    864      1.101       wiz /* wide-character support routines */
    865       1.88     blymn /* return ERR when HAVE_WCHAR is not defined */
    866       1.88     blymn /* add */
    867       1.88     blymn int add_wch(const cchar_t *);
    868       1.88     blymn int wadd_wch(WINDOW *, const cchar_t *);
    869       1.88     blymn int mvadd_wch(int, int, const cchar_t *);
    870       1.88     blymn int mvwadd_wch(WINDOW *, int, int, const cchar_t *);
    871       1.88     blymn 
    872       1.88     blymn int add_wchnstr(const cchar_t *, int);
    873       1.88     blymn int add_wchstr(const cchar_t *);
    874       1.88     blymn int wadd_wchnstr(WINDOW *, const cchar_t *, int);
    875       1.88     blymn int wadd_wchstr(WINDOW *, const cchar_t *);
    876       1.88     blymn int mvadd_wchnstr(int, int, const cchar_t *, int);
    877       1.88     blymn int mvadd_wchstr(int, int, const cchar_t *);
    878       1.88     blymn int mvwadd_wchnstr(WINDOW *, int, int, const cchar_t *, int);
    879       1.88     blymn int mvwadd_wchstr(WINDOW *, int, int, const cchar_t *);
    880       1.88     blymn 
    881       1.88     blymn int addnwstr(const wchar_t *, int);
    882       1.88     blymn int addwstr(const wchar_t *);
    883       1.88     blymn int mvaddnwstr(int, int x, const wchar_t *, int);
    884       1.88     blymn int mvaddwstr(int, int x, const wchar_t *);
    885       1.88     blymn int mvwaddnwstr(WINDOW *, int, int, const wchar_t *, int);
    886       1.88     blymn int mvwaddwstr(WINDOW *, int, int, const wchar_t *);
    887       1.88     blymn int waddnwstr(WINDOW *, const wchar_t *, int);
    888       1.88     blymn int waddwstr(WINDOW *, const wchar_t *);
    889       1.88     blymn 
    890       1.88     blymn int echo_wchar(const cchar_t *);
    891       1.88     blymn int wecho_wchar(WINDOW *, const cchar_t *);
    892       1.88     blymn int pecho_wchar(WINDOW *, const cchar_t *);
    893       1.88     blymn 
    894       1.88     blymn /* insert */
    895       1.88     blymn int ins_wch(const cchar_t *);
    896       1.88     blymn int wins_wch(WINDOW *, const cchar_t *);
    897       1.88     blymn int mvins_wch(int, int, const cchar_t *);
    898       1.88     blymn int mvwins_wch(WINDOW *, int, int, const cchar_t *);
    899       1.88     blymn 
    900       1.88     blymn int ins_nwstr(const wchar_t *, int);
    901       1.88     blymn int ins_wstr(const wchar_t *);
    902       1.88     blymn int mvins_nwstr(int, int, const wchar_t *, int);
    903       1.88     blymn int mvins_wstr(int, int, const wchar_t *);
    904       1.88     blymn int mvwins_nwstr(WINDOW *, int, int, const wchar_t *, int);
    905       1.88     blymn int mvwins_wstr(WINDOW *, int, int, const wchar_t *);
    906       1.88     blymn int wins_nwstr(WINDOW *, const wchar_t *, int);
    907       1.88     blymn int wins_wstr(WINDOW *, const wchar_t *);
    908       1.88     blymn 
    909       1.88     blymn /* input */
    910       1.88     blymn int get_wch(wint_t *);
    911       1.88     blymn int unget_wch(const wchar_t);
    912       1.88     blymn int mvget_wch(int, int, wint_t *);
    913       1.88     blymn int mvwget_wch(WINDOW *, int, int, wint_t *);
    914       1.88     blymn int wget_wch(WINDOW *, wint_t *);
    915       1.88     blymn 
    916       1.88     blymn int getn_wstr(wchar_t *, int);
    917       1.88     blymn int get_wstr(wchar_t *);
    918       1.88     blymn int mvgetn_wstr(int, int, wchar_t *, int);
    919       1.88     blymn int mvget_wstr(int, int, wchar_t *);
    920       1.88     blymn int mvwgetn_wstr(WINDOW *, int, int, wchar_t *, int);
    921       1.88     blymn int mvwget_wstr(WINDOW *, int, int, wchar_t *);
    922       1.88     blymn int wgetn_wstr(WINDOW *, wchar_t *, int);
    923       1.88     blymn int wget_wstr(WINDOW *, wchar_t *);
    924       1.88     blymn 
    925       1.88     blymn int in_wch(cchar_t *);
    926       1.88     blymn int mvin_wch(int, int, cchar_t *);
    927       1.88     blymn int mvwin_wch(WINDOW *, int, int, cchar_t *);
    928       1.88     blymn int win_wch(WINDOW *, cchar_t *);
    929       1.88     blymn 
    930       1.88     blymn int in_wchnstr(cchar_t *, int);
    931       1.88     blymn int in_wchstr(cchar_t *);
    932       1.88     blymn int mvin_wchnstr(int, int, cchar_t *, int);
    933       1.88     blymn int mvin_wchstr(int, int, cchar_t *);
    934       1.88     blymn int mvwin_wchnstr(WINDOW *, int, int, cchar_t *, int);
    935       1.88     blymn int mvwin_wchstr(WINDOW *, int, int, cchar_t *);
    936       1.88     blymn int win_wchnstr(WINDOW *, cchar_t *, int);
    937       1.88     blymn int win_wchstr(WINDOW *, cchar_t *);
    938       1.88     blymn 
    939       1.88     blymn int innwstr(wchar_t *, int);
    940       1.88     blymn int inwstr(wchar_t *);
    941       1.88     blymn int mvinnwstr(int, int, wchar_t *, int);
    942       1.88     blymn int mvinwstr(int, int, wchar_t *);
    943       1.88     blymn int mvwinnwstr(WINDOW *, int, int, wchar_t *, int);
    944       1.88     blymn int mvwinwstr(WINDOW *, int, int, wchar_t *);
    945       1.88     blymn int winnwstr(WINDOW *, wchar_t *, int);
    946       1.88     blymn int winwstr(WINDOW *, wchar_t *);
    947       1.88     blymn 
    948       1.88     blymn /* cchar handlgin */
    949       1.88     blymn int setcchar(cchar_t *, const wchar_t *, const attr_t, short, const void *);
    950       1.88     blymn int getcchar(const cchar_t *, wchar_t *, attr_t *, short *, void *);
    951       1.88     blymn 
    952       1.88     blymn /* misc */
    953       1.88     blymn char *key_name( wchar_t );
    954       1.88     blymn int border_set(const cchar_t *, const cchar_t *, const cchar_t *,
    955       1.88     blymn                const cchar_t *, const cchar_t *, const cchar_t *,
    956       1.88     blymn                const cchar_t *, const cchar_t *);
    957       1.88     blymn int wborder_set(WINDOW *, const cchar_t *, const cchar_t *,
    958      1.115       roy                 const cchar_t *, const cchar_t *, const cchar_t *,
    959       1.88     blymn                 const cchar_t *, const cchar_t *, const cchar_t *);
    960       1.88     blymn int box_set(WINDOW *, const cchar_t *, const cchar_t *);
    961       1.88     blymn int erasewchar(wchar_t *);
    962       1.88     blymn int killwchar(wchar_t *);
    963       1.88     blymn int hline_set(const cchar_t *, int);
    964       1.88     blymn int mvhline_set(int, int, const cchar_t *, int);
    965       1.88     blymn int mvvline_set(int, int, const cchar_t *, int);
    966       1.88     blymn int mvwhline_set(WINDOW *, int, int, const cchar_t *, int);
    967       1.88     blymn int mvwvline_set(WINDOW *, int, int, const cchar_t *, int);
    968       1.88     blymn int vline_set(const cchar_t *, int);
    969       1.88     blymn int whline_set(WINDOW *, const cchar_t *, int);
    970       1.88     blymn int wvline_set(WINDOW *, const cchar_t *, int);
    971       1.88     blymn int bkgrnd(const cchar_t *);
    972       1.88     blymn void bkgrndset(const cchar_t *);
    973       1.88     blymn int getbkgrnd(cchar_t *);
    974       1.88     blymn int wbkgrnd(WINDOW *, const cchar_t *);
    975       1.88     blymn void wbkgrndset(WINDOW *, const cchar_t *);
    976       1.88     blymn int wgetbkgrnd(WINDOW *, cchar_t *);
    977       1.88     blymn 
    978      1.109       roy /* ncurses window tests */
    979      1.109       roy bool is_keypad(const WINDOW *);
    980      1.109       roy bool is_leaveok(const WINDOW *);
    981      1.118       roy bool is_pad(const WINDOW *);
    982      1.109       roy 
    983        1.7       cgd /* Private functions that are needed for user programs prototypes. */
    984       1.33     blymn int	 __cputchar(int);
    985       1.47     blymn int	 __waddbytes(WINDOW *, const char *, int, attr_t);
    986       1.88     blymn #ifdef HAVE_WCHAR
    987       1.88     blymn int __cputwchar( wchar_t );
    988       1.88     blymn #endif /* HAVE_WCHAR */
    989       1.14       jtc __END_DECLS
    990        1.1       cgd 
    991        1.4   mycroft #endif /* !_CURSES_H_ */
    992