[BACK]Return to curses.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libcurses

Annotation of src/lib/libcurses/curses.h, Revision 1.128

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

CVSweb <webmaster@jp.NetBSD.org>