#ifndef __NCURSES_H
#define __NCURSES_H
#define CURSES 1
#define CURSES_H 1
#define NCURSES_VERSION_MAJOR 5
#define NCURSES_VERSION_MINOR 7
#define NCURSES_VERSION_PATCH 20081102
#undef NCURSES_VERSION
#define NCURSES_VERSION "5.7"
#define NCURSES_MOUSE_VERSION 1
#include <ncurses_dll.h>
#ifndef NCURSES_ENABLE_STDBOOL_H
#define NCURSES_ENABLE_STDBOOL_H 1
#endif
#ifdef NCURSES_NOMACROS
#ifndef NCURSES_ATTR_T
#define NCURSES_ATTR_T attr_t
#endif
#endif
#ifndef NCURSES_ATTR_T
#define NCURSES_ATTR_T int
#endif
#undef NCURSES_CONST
#define NCURSES_CONST
#undef NCURSES_INLINE
#define NCURSES_INLINE inline
#undef NCURSES_COLOR_T
#define NCURSES_COLOR_T short
#ifndef NCURSES_OPAQUE
#define NCURSES_OPAQUE 1
#endif
#undef NCURSES_SIZE_T
#define NCURSES_SIZE_T short
#undef NCURSES_TPARM_VARARGS
#define NCURSES_TPARM_VARARGS 1
#undef NCURSES_CH_T
#define NCURSES_CH_T cchar_t
#if 0 && defined(_LP64)
typedef unsigned chtype;
typedef unsigned mmask_t;
#else
typedef unsigned int chtype;
typedef unsigned long mmask_t;
#endif
#include <stdio.h>
#include <unctrl.h>
#include <stdarg.h>
#ifdef _XOPEN_SOURCE_EXTENDED
#include <stddef.h>
#endif
#undef TRUE
#define TRUE 1
#undef FALSE
#define FALSE 0
typedef unsigned char NCURSES_BOOL;
#if defined(__cplusplus)
#define NCURSES_BOOL bool
#else
#if NCURSES_ENABLE_STDBOOL_H
#include <stdbool.h>
#define NCURSES_BOOL bool
#else
#undef bool
#define bool NCURSES_BOOL
#endif
#endif
#ifdef __cplusplus
extern "C" {
#define NCURSES_CAST(type,value) static_cast<type>(value)
#else
#define NCURSES_CAST(type,value) (type)(value)
#endif
#define WA_ATTRIBUTES A_ATTRIBUTES
#define WA_NORMAL A_NORMAL
#define WA_STANDOUT A_STANDOUT
#define WA_UNDERLINE A_UNDERLINE
#define WA_REVERSE A_REVERSE
#define WA_BLINK A_BLINK
#define WA_DIM A_DIM
#define WA_BOLD A_BOLD
#define WA_ALTCHARSET A_ALTCHARSET
#define WA_INVIS A_INVIS
#define WA_PROTECT A_PROTECT
#define WA_HORIZONTAL A_HORIZONTAL
#define WA_LEFT A_LEFT
#define WA_LOW A_LOW
#define WA_RIGHT A_RIGHT
#define WA_TOP A_TOP
#define WA_VERTICAL A_VERTICAL
#define COLOR_BLACK 0
#define COLOR_RED 1
#define COLOR_GREEN 2
#define COLOR_YELLOW 3
#define COLOR_BLUE 4
#define COLOR_MAGENTA 5
#define COLOR_CYAN 6
#define COLOR_WHITE 7
#if 0 || 0
NCURSES_WRAPPED_VAR(chtype*, acs_map);
#define acs_map (_nc_acs_map())
#else
extern NCURSES_EXPORT_VAR(chtype) acs_map[];
#endif
#define NCURSES_ACS(c) (acs_map[NCURSES_CAST(unsigned char,c)])
#define ACS_ULCORNER NCURSES_ACS('l')
#define ACS_LLCORNER NCURSES_ACS('m')
#define ACS_URCORNER NCURSES_ACS('k')
#define ACS_LRCORNER NCURSES_ACS('j')
#define ACS_LTEE NCURSES_ACS('t')
#define ACS_RTEE NCURSES_ACS('u')
#define ACS_BTEE NCURSES_ACS('v')
#define ACS_TTEE NCURSES_ACS('w')
#define ACS_HLINE NCURSES_ACS('q')
#define ACS_VLINE NCURSES_ACS('x')
#define ACS_PLUS NCURSES_ACS('n')
#define ACS_S1 NCURSES_ACS('o')
#define ACS_S9 NCURSES_ACS('s')
#define ACS_DIAMOND NCURSES_ACS('`')
#define ACS_CKBOARD NCURSES_ACS('a')
#define ACS_DEGREE NCURSES_ACS('f')
#define ACS_PLMINUS NCURSES_ACS('g')
#define ACS_BULLET NCURSES_ACS('~')
#define ACS_LARROW NCURSES_ACS(',')
#define ACS_RARROW NCURSES_ACS('+')
#define ACS_DARROW NCURSES_ACS('.')
#define ACS_UARROW NCURSES_ACS('-')
#define ACS_BOARD NCURSES_ACS('h')
#define ACS_LANTERN NCURSES_ACS('i')
#define ACS_BLOCK NCURSES_ACS('0')
#define ACS_S3 NCURSES_ACS('p')
#define ACS_S7 NCURSES_ACS('r')
#define ACS_LEQUAL NCURSES_ACS('y')
#define ACS_GEQUAL NCURSES_ACS('z')
#define ACS_PI NCURSES_ACS('{')
#define ACS_NEQUAL NCURSES_ACS('|')
#define ACS_STERLING NCURSES_ACS('}')
#define ACS_BSSB ACS_ULCORNER
#define ACS_SSBB ACS_LLCORNER
#define ACS_BBSS ACS_URCORNER
#define ACS_SBBS ACS_LRCORNER
#define ACS_SBSS ACS_RTEE
#define ACS_SSSB ACS_LTEE
#define ACS_SSBS ACS_BTEE
#define ACS_BSSS ACS_TTEE
#define ACS_BSBS ACS_HLINE
#define ACS_SBSB ACS_VLINE
#define ACS_SSSS ACS_PLUS
#undef ERR
#define ERR (-1)
#undef OK
#define OK (0)
#define _SUBWIN 0x01
#define _ENDLINE 0x02
#define _FULLWIN 0x04
#define _SCROLLWIN 0x08
#define _ISPAD 0x10
#define _HASMOVED 0x20
#define _WRAPPED 0x40
#define _NOCHANGE -1
#define _NEWINDEX -1
typedef struct screen SCREEN;
typedef struct _win_st WINDOW;
typedef chtype attr_t;
#ifdef _XOPEN_SOURCE_EXTENDED
#if 0
#ifdef mblen
#undef mblen
#endif
#include <libutf8.h>
#endif
#if 1
#include <wchar.h>
#endif
#if 0
typedef unsigned short wchar_t1;
#endif
#if 0
typedef unsigned int wint_t1;
#endif
#define CCHARW_MAX 5
typedef struct
{
attr_t attr;
wchar_t chars[CCHARW_MAX];
#if 0
#undef NCURSES_EXT_COLORS
#define NCURSES_EXT_COLORS 20081102
int ext_color;
#endif
}
cchar_t;
#endif
#if !NCURSES_OPAQUE
struct ldat;
struct _win_st
{
NCURSES_SIZE_T _cury, _curx;
NCURSES_SIZE_T _maxy, _maxx;
NCURSES_SIZE_T _begy, _begx;
short _flags;
attr_t _attrs;
chtype _bkgd;
bool _notimeout;
bool _clear;
bool _leaveok;
bool _scroll;
bool _idlok;
bool _idcok;
bool _immed;
bool _sync;
bool _use_keypad;
int _delay;
struct ldat *_line;
NCURSES_SIZE_T _regtop;
NCURSES_SIZE_T _regbottom;
int _parx;
int _pary;
WINDOW *_parent;
struct pdat
{
NCURSES_SIZE_T _pad_y, _pad_x;
NCURSES_SIZE_T _pad_top, _pad_left;
NCURSES_SIZE_T _pad_bottom, _pad_right;
} _pad;
NCURSES_SIZE_T _yoffset;
#ifdef _XOPEN_SOURCE_EXTENDED
cchar_t _bkgrnd;
#if 0
int _color;
#endif
#endif
};
#endif
#if 1
#ifdef NCURSES_WGETCH_EVENTS
#if !defined(__BEOS__) || defined(__HAIKU__)
# define NCURSES_EVENT_VERSION 1
#endif
# define _NC_EVENT_TIMEOUT_MSEC 1
# define _NC_EVENT_FILE 2
# define _NC_EVENT_FILE_READABLE 2
# if 0
# define _NC_EVENT_FILE_WRITABLE 4
# define _NC_EVENT_FILE_EXCEPTION 8
# endif
typedef struct
{
int type;
union
{
long timeout_msec;
struct
{
unsigned int flags;
int fd;
unsigned int result;
} fev;
} data;
} _nc_event;
typedef struct
{
int count;
int result_flags;
_nc_event *events[1];
} _nc_eventlist;
extern NCURSES_EXPORT(int) wgetch_events(WINDOW *, _nc_eventlist *);
extern NCURSES_EXPORT(int) wgetnstr_events(WINDOW *,char *,int,_nc_eventlist *);
#endif
#endif
#if !(defined(__GNUC__) || defined(__GNUG__) || defined(__attribute__))
#define __attribute__(p)
#endif
#ifndef GCC_PRINTFLIKE
#if defined(GCC_PRINTF) && !defined(printf)
#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
#else
#define GCC_PRINTFLIKE(fmt,var)
#endif
#endif
#ifndef GCC_SCANFLIKE
#if defined(GCC_SCANF) && !defined(scanf)
#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
#else
#define GCC_SCANFLIKE(fmt,var)
#endif
#endif
#ifndef GCC_NORETURN
#define GCC_NORETURN
#endif
#ifndef GCC_UNUSED
#define GCC_UNUSED
#endif
extern NCURSES_EXPORT(int) addch (const chtype);
extern NCURSES_EXPORT(int) addchnstr (const chtype *, int);
extern NCURSES_EXPORT(int) addchstr (const chtype *);
extern NCURSES_EXPORT(int) addnstr (const char *, int);
extern NCURSES_EXPORT(int) addstr (const char *);
extern NCURSES_EXPORT(int) attroff (NCURSES_ATTR_T);
extern NCURSES_EXPORT(int) attron (NCURSES_ATTR_T);
extern NCURSES_EXPORT(int) attrset (NCURSES_ATTR_T);
extern NCURSES_EXPORT(int) attr_get (attr_t *, short *, void *);
extern NCURSES_EXPORT(int) attr_off (attr_t, void *);
extern NCURSES_EXPORT(int) attr_on (attr_t, void *);
extern NCURSES_EXPORT(int) attr_set (attr_t, short, void *);
extern NCURSES_EXPORT(int) baudrate (void);
extern NCURSES_EXPORT(int) beep (void);
extern NCURSES_EXPORT(int) bkgd (chtype);
extern NCURSES_EXPORT(void) bkgdset (chtype);
extern NCURSES_EXPORT(int) border (chtype,chtype,chtype,chtype,chtype,chtype,chtype,chtype);
extern NCURSES_EXPORT(int) box (WINDOW *, chtype, chtype);
extern NCURSES_EXPORT(bool) can_change_color (void);
extern NCURSES_EXPORT(int) cbreak (void);
extern NCURSES_EXPORT(int) chgat (int, attr_t, short, const void *);
extern NCURSES_EXPORT(int) clear (void);
extern NCURSES_EXPORT(int) clearok (WINDOW *,bool);
extern NCURSES_EXPORT(int) clrtobot (void);
extern NCURSES_EXPORT(int) clrtoeol (void);
extern NCURSES_EXPORT(int) color_content (short,short*,short*,short*);
extern NCURSES_EXPORT(int) color_set (short,void*);
extern NCURSES_EXPORT(int) COLOR_PAIR (int);
extern NCURSES_EXPORT(int) copywin (const WINDOW*,WINDOW*,int,int,int,int,int,int,int);
extern NCURSES_EXPORT(int) curs_set (int);
extern NCURSES_EXPORT(int) def_prog_mode (void);
extern NCURSES_EXPORT(int) def_shell_mode (void);
extern NCURSES_EXPORT(int) delay_output (int);
extern NCURSES_EXPORT(int) delch (void);
extern NCURSES_EXPORT(void) delscreen (SCREEN *);
extern NCURSES_EXPORT(int) delwin (WINDOW *);
extern NCURSES_EXPORT(int) deleteln (void);
extern NCURSES_EXPORT(WINDOW *) derwin (WINDOW *,int,int,int,int);
extern NCURSES_EXPORT(int) doupdate (void);
extern NCURSES_EXPORT(WINDOW *) dupwin (WINDOW *);
extern NCURSES_EXPORT(int) echo (void);
extern NCURSES_EXPORT(int) echochar (const chtype);
extern NCURSES_EXPORT(int) erase (void);
extern NCURSES_EXPORT(int) endwin (void);
extern NCURSES_EXPORT(char) erasechar (void);
extern NCURSES_EXPORT(void) filter (void);
extern NCURSES_EXPORT(int) flash (void);
extern NCURSES_EXPORT(int) flushinp (void);
extern NCURSES_EXPORT(chtype) getbkgd (WINDOW *);
extern NCURSES_EXPORT(int) getch (void);
extern NCURSES_EXPORT(int) getnstr (char *, int);
extern NCURSES_EXPORT(int) getstr (char *);
extern NCURSES_EXPORT(WINDOW *) getwin (FILE *);
extern NCURSES_EXPORT(int) halfdelay (int);
extern NCURSES_EXPORT(bool) has_colors (void);
extern NCURSES_EXPORT(bool) has_ic (void);
extern NCURSES_EXPORT(bool) has_il (void);
extern NCURSES_EXPORT(int) hline (chtype, int);
extern NCURSES_EXPORT(void) idcok (WINDOW *, bool);
extern NCURSES_EXPORT(int) idlok (WINDOW *, bool);
extern NCURSES_EXPORT(void) immedok (WINDOW *, bool);
extern NCURSES_EXPORT(chtype) inch (void);
extern NCURSES_EXPORT(int) inchnstr (chtype *, int);
extern NCURSES_EXPORT(int) inchstr (chtype *);
extern NCURSES_EXPORT(WINDOW *) initscr (void);
extern NCURSES_EXPORT(int) init_color (short,short,short,short);
extern NCURSES_EXPORT(int) init_pair (short,short,short);
extern NCURSES_EXPORT(int) innstr (char *, int);
extern NCURSES_EXPORT(int) insch (chtype);
extern NCURSES_EXPORT(int) insdelln (int);
extern NCURSES_EXPORT(int) insertln (void);
extern NCURSES_EXPORT(int) insnstr (const char *, int);
extern NCURSES_EXPORT(int) insstr (const char *);
extern NCURSES_EXPORT(int) instr (char *);
extern NCURSES_EXPORT(int) intrflush (WINDOW *,bool);
extern NCURSES_EXPORT(bool) isendwin (void);
extern NCURSES_EXPORT(bool) is_linetouched (WINDOW *,int);
extern NCURSES_EXPORT(bool) is_wintouched (WINDOW *);
extern NCURSES_EXPORT(NCURSES_CONST char *) keyname (int);
extern NCURSES_EXPORT(int) keypad (WINDOW *,bool);
extern NCURSES_EXPORT(char) killchar (void);
extern NCURSES_EXPORT(int) leaveok (WINDOW *,bool);
extern NCURSES_EXPORT(char *) longname (void);
extern NCURSES_EXPORT(int) meta (WINDOW *,bool);
extern NCURSES_EXPORT(int) move (int, int);
extern NCURSES_EXPORT(int) mvaddch (int, int, const chtype);
extern NCURSES_EXPORT(int) mvaddchnstr (int, int, const chtype *, int);
extern NCURSES_EXPORT(int) mvaddchstr (int, int, const chtype *);
extern NCURSES_EXPORT(int) mvaddnstr (int, int, const char *, int);
extern NCURSES_EXPORT(int) mvaddstr (int, int, const char *);
extern NCURSES_EXPORT(int) mvchgat (int, int, int, attr_t, short, const void *);
extern NCURSES_EXPORT(int) mvcur (int,int,int,int);
extern NCURSES_EXPORT(int) mvdelch (int, int);
extern NCURSES_EXPORT(int) mvderwin (WINDOW *, int, int);
extern NCURSES_EXPORT(int) mvgetch (int, int);
extern NCURSES_EXPORT(int) mvgetnstr (int, int, char *, int);
extern NCURSES_EXPORT(int) mvgetstr (int, int, char *);
extern NCURSES_EXPORT(int) mvhline (int, int, chtype, int);
extern NCURSES_EXPORT(chtype) mvinch (int, int);
extern NCURSES_EXPORT(int) mvinchnstr (int, int, chtype *, int);
extern NCURSES_EXPORT(int) mvinchstr (int, int, chtype *);
extern NCURSES_EXPORT(int) mvinnstr (int, int, char *, int);
extern NCURSES_EXPORT(int) mvinsch (int, int, chtype);
extern NCURSES_EXPORT(int) mvinsnstr (int, int, const char *, int);
extern NCURSES_EXPORT(int) mvinsstr (int, int, const char *);
extern NCURSES_EXPORT(int) mvinstr (int, int, char *);
extern NCURSES_EXPORT(int) mvprintw (int,int, const char *,...)
GCC_PRINTFLIKE(3,4);
extern NCURSES_EXPORT(int) mvscanw (int,int, NCURSES_CONST char *,...)
GCC_SCANFLIKE(3,4);
extern NCURSES_EXPORT(int) mvvline (int, int, chtype, int);
extern NCURSES_EXPORT(int) mvwaddch (WINDOW *, int, int, const chtype);
extern NCURSES_EXPORT(int) mvwaddchnstr (WINDOW *, int, int, const chtype *, int);
extern NCURSES_EXPORT(int) mvwaddchstr (WINDOW *, int, int, const chtype *);
extern NCURSES_EXPORT(int) mvwaddnstr (WINDOW *, int, int, const char *, int);
extern NCURSES_EXPORT(int) mvwaddstr (WINDOW *, int, int, const char *);
extern NCURSES_EXPORT(int) mvwchgat (WINDOW *, int, int, int, attr_t, short, const void *);
extern NCURSES_EXPORT(int) mvwdelch (WINDOW *, int, int);
extern NCURSES_EXPORT(int) mvwgetch (WINDOW *, int, int);
extern NCURSES_EXPORT(int) mvwgetnstr (WINDOW *, int, int, char *, int);
extern NCURSES_EXPORT(int) mvwgetstr (WINDOW *, int, int, char *);
extern NCURSES_EXPORT(int) mvwhline (WINDOW *, int, int, chtype, int);
extern NCURSES_EXPORT(int) mvwin (WINDOW *,int,int);
extern NCURSES_EXPORT(chtype) mvwinch (WINDOW *, int, int);
extern NCURSES_EXPORT(int) mvwinchnstr (WINDOW *, int, int, chtype *, int);
extern NCURSES_EXPORT(int) mvwinchstr (WINDOW *, int, int, chtype *);
extern NCURSES_EXPORT(int) mvwinnstr (WINDOW *, int, int, char *, int);
extern NCURSES_EXPORT(int) mvwinsch (WINDOW *, int, int, chtype);
extern NCURSES_EXPORT(int) mvwinsnstr (WINDOW *, int, int, const char *, int);
extern NCURSES_EXPORT(int) mvwinsstr (WINDOW *, int, int, const char *);
extern NCURSES_EXPORT(int) mvwinstr (WINDOW *, int, int, char *);
extern NCURSES_EXPORT(int) mvwprintw (WINDOW*,int,int, const char *,...)
GCC_PRINTFLIKE(4,5);
extern NCURSES_EXPORT(int) mvwscanw (WINDOW *,int,int, NCURSES_CONST char *,...)
GCC_SCANFLIKE(4,5);
extern NCURSES_EXPORT(int) mvwvline (WINDOW *,int, int, chtype, int);
extern NCURSES_EXPORT(int) napms (int);
extern NCURSES_EXPORT(WINDOW *) newpad (int,int);
extern NCURSES_EXPORT(SCREEN *) newterm (NCURSES_CONST char *,FILE *,FILE *);
extern NCURSES_EXPORT(WINDOW *) newwin (int,int,int,int);
extern NCURSES_EXPORT(int) nl (void);
extern NCURSES_EXPORT(int) nocbreak (void);
extern NCURSES_EXPORT(int) nodelay (WINDOW *,bool);
extern NCURSES_EXPORT(int) noecho (void);
extern NCURSES_EXPORT(int) nonl (void);
extern NCURSES_EXPORT(void) noqiflush (void);
extern NCURSES_EXPORT(int) noraw (void);
extern NCURSES_EXPORT(int) notimeout (WINDOW *,bool);
extern NCURSES_EXPORT(int) overlay (const WINDOW*,WINDOW *);
extern NCURSES_EXPORT(int) overwrite (const WINDOW*,WINDOW *);
extern NCURSES_EXPORT(int) pair_content (short,short*,short*);
extern NCURSES_EXPORT(int) PAIR_NUMBER (int);
extern NCURSES_EXPORT(int) pechochar (WINDOW *, const chtype);
extern NCURSES_EXPORT(int) pnoutrefresh (WINDOW*,int,int,int,int,int,int);
extern NCURSES_EXPORT(int) prefresh (WINDOW *,int,int,int,int,int,int);
extern NCURSES_EXPORT(int) printw (const char *,...)
GCC_PRINTFLIKE(1,2);
extern NCURSES_EXPORT(int) putwin (WINDOW *, FILE *);
extern NCURSES_EXPORT(void) qiflush (void);
extern NCURSES_EXPORT(int) raw (void);
extern NCURSES_EXPORT(int) redrawwin (WINDOW *);
extern NCURSES_EXPORT(int) refresh (void);
extern NCURSES_EXPORT(int) resetty (void);
extern NCURSES_EXPORT(int) reset_prog_mode (void);
extern NCURSES_EXPORT(int) reset_shell_mode (void);
extern NCURSES_EXPORT(int) ripoffline (int, int (*)(WINDOW *, int));
extern NCURSES_EXPORT(int) savetty (void);
extern NCURSES_EXPORT(int) scanw (NCURSES_CONST char *,...)
GCC_SCANFLIKE(1,2);
extern NCURSES_EXPORT(int) scr_dump (const char *);
extern NCURSES_EXPORT(int) scr_init (const char *);
extern NCURSES_EXPORT(int) scrl (int);
extern NCURSES_EXPORT(int) scroll (WINDOW *);
extern NCURSES_EXPORT(int) scrollok (WINDOW *,bool);
extern NCURSES_EXPORT(int) scr_restore (const char *);
extern NCURSES_EXPORT(int) scr_set (const char *);
extern NCURSES_EXPORT(int) setscrreg (int,int);
extern NCURSES_EXPORT(SCREEN *) set_term (SCREEN *);
extern NCURSES_EXPORT(int) slk_attroff (const chtype);
extern NCURSES_EXPORT(int) slk_attr_off (const attr_t, void *);
extern NCURSES_EXPORT(int) slk_attron (const chtype);
extern NCURSES_EXPORT(int) slk_attr_on (attr_t,void*);
extern NCURSES_EXPORT(int) slk_attrset (const chtype);
extern NCURSES_EXPORT(attr_t) slk_attr (void);
extern NCURSES_EXPORT(int) slk_attr_set (const attr_t,short,void*);
extern NCURSES_EXPORT(int) slk_clear (void);
extern NCURSES_EXPORT(int) slk_color (short);
extern NCURSES_EXPORT(int) slk_init (int);
extern NCURSES_EXPORT(char *) slk_label (int);
extern NCURSES_EXPORT(int) slk_noutrefresh (void);
extern NCURSES_EXPORT(int) slk_refresh (void);
extern NCURSES_EXPORT(int) slk_restore (void);
extern NCURSES_EXPORT(int) slk_set (int,const char *,int);
extern NCURSES_EXPORT(int) slk_touch (void);
extern NCURSES_EXPORT(int) standout (void);
extern NCURSES_EXPORT(int) standend (void);
extern NCURSES_EXPORT(int) start_color (void);
extern NCURSES_EXPORT(WINDOW *) subpad (WINDOW *, int, int, int, int);
extern NCURSES_EXPORT(WINDOW *) subwin (WINDOW *, int, int, int, int);
extern NCURSES_EXPORT(int) syncok (WINDOW *, bool);
extern NCURSES_EXPORT(chtype) termattrs (void);
extern NCURSES_EXPORT(char *) termname (void);
extern NCURSES_EXPORT(void) timeout (int);
extern NCURSES_EXPORT(int) touchline (WINDOW *, int, int);
extern NCURSES_EXPORT(int) touchwin (WINDOW *);
extern NCURSES_EXPORT(int) typeahead (int);
extern NCURSES_EXPORT(int) ungetch (int);
extern NCURSES_EXPORT(int) untouchwin (WINDOW *);
extern NCURSES_EXPORT(void) use_env (bool);
extern NCURSES_EXPORT(int) vidattr (chtype);
extern NCURSES_EXPORT(int) vidputs (chtype, int (*)(int));
extern NCURSES_EXPORT(int) vline (chtype, int);
extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *,va_list);
extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *,va_list);
extern NCURSES_EXPORT(int) vwscanw (WINDOW *, NCURSES_CONST char *,va_list);
extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, NCURSES_CONST char *,va_list);
extern NCURSES_EXPORT(int) waddch (WINDOW *, const chtype);
extern NCURSES_EXPORT(int) waddchnstr (WINDOW *,const chtype *,int);
extern NCURSES_EXPORT(int) waddchstr (WINDOW *,const chtype *);
extern NCURSES_EXPORT(int) waddnstr (WINDOW *,const char *,int);
extern NCURSES_EXPORT(int) waddstr (WINDOW *,const char *);
extern NCURSES_EXPORT(int) wattron (WINDOW *, int);
extern NCURSES_EXPORT(int) wattroff (WINDOW *, int);
extern NCURSES_EXPORT(int) wattrset (WINDOW *, int);
extern NCURSES_EXPORT(int) wattr_get (WINDOW *, attr_t *, short *, void *);
extern NCURSES_EXPORT(int) wattr_on (WINDOW *, attr_t, void *);
extern NCURSES_EXPORT(int) wattr_off (WINDOW *, attr_t, void *);
extern NCURSES_EXPORT(int) wattr_set (WINDOW *, attr_t, short, void *);
extern NCURSES_EXPORT(int) wbkgd (WINDOW *, chtype);
extern NCURSES_EXPORT(void) wbkgdset (WINDOW *,chtype);
extern NCURSES_EXPORT(int) wborder (WINDOW *,chtype,chtype,chtype,chtype,chtype,chtype,chtype,chtype);
extern NCURSES_EXPORT(int) wchgat (WINDOW *, int, attr_t, short, const void *);
extern NCURSES_EXPORT(int) wclear (WINDOW *);
extern NCURSES_EXPORT(int) wclrtobot (WINDOW *);
extern NCURSES_EXPORT(int) wclrtoeol (WINDOW *);
extern NCURSES_EXPORT(int) wcolor_set (WINDOW*,short,void*);
extern NCURSES_EXPORT(void) wcursyncup (WINDOW *);
extern NCURSES_EXPORT(int) wdelch (WINDOW *);
extern NCURSES_EXPORT(int) wdeleteln (WINDOW *);
extern NCURSES_EXPORT(int) wechochar (WINDOW *, const chtype);
extern NCURSES_EXPORT(int) werase (WINDOW *);
extern NCURSES_EXPORT(int) wgetch (WINDOW *);
extern NCURSES_EXPORT(int) wgetnstr (WINDOW *,char *,int);
extern NCURSES_EXPORT(int) wgetstr (WINDOW *, char *);
extern NCURSES_EXPORT(int) whline (WINDOW *, chtype, int);
extern NCURSES_EXPORT(chtype) winch (WINDOW *);
extern NCURSES_EXPORT(int) winchnstr (WINDOW *, chtype *, int);
extern NCURSES_EXPORT(int) winchstr (WINDOW *, chtype *);
extern NCURSES_EXPORT(int) winnstr (WINDOW *, char *, int);
extern NCURSES_EXPORT(int) winsch (WINDOW *, chtype);
extern NCURSES_EXPORT(int) winsdelln (WINDOW *,int);
extern NCURSES_EXPORT(int) winsertln (WINDOW *);
extern NCURSES_EXPORT(int) winsnstr (WINDOW *, const char *,int);
extern NCURSES_EXPORT(int) winsstr (WINDOW *, const char *);
extern NCURSES_EXPORT(int) winstr (WINDOW *, char *);
extern NCURSES_EXPORT(int) wmove (WINDOW *,int,int);
extern NCURSES_EXPORT(int) wnoutrefresh (WINDOW *);
extern NCURSES_EXPORT(int) wprintw (WINDOW *, const char *,...)
GCC_PRINTFLIKE(2,3);
extern NCURSES_EXPORT(int) wredrawln (WINDOW *,int,int);
extern NCURSES_EXPORT(int) wrefresh (WINDOW *);
extern NCURSES_EXPORT(int) wscanw (WINDOW *, NCURSES_CONST char *,...)
GCC_SCANFLIKE(2,3);
extern NCURSES_EXPORT(int) wscrl (WINDOW *,int);
extern NCURSES_EXPORT(int) wsetscrreg (WINDOW *,int,int);
extern NCURSES_EXPORT(int) wstandout (WINDOW *);
extern NCURSES_EXPORT(int) wstandend (WINDOW *);
extern NCURSES_EXPORT(void) wsyncdown (WINDOW *);
extern NCURSES_EXPORT(void) wsyncup (WINDOW *);
extern NCURSES_EXPORT(void) wtimeout (WINDOW *,int);
extern NCURSES_EXPORT(int) wtouchln (WINDOW *,int,int,int);
extern NCURSES_EXPORT(int) wvline (WINDOW *,chtype,int);
extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *);
extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *);
extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *);
extern NCURSES_EXPORT(int) putp (const char *);
#if NCURSES_TPARM_VARARGS
extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...);
#else
extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, long,long,long,long,long,long,long,long,long);
extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...);
#endif
extern NCURSES_EXPORT(int) getattrs (const WINDOW *);
extern NCURSES_EXPORT(int) getcurx (const WINDOW *);
extern NCURSES_EXPORT(int) getcury (const WINDOW *);
extern NCURSES_EXPORT(int) getbegx (const WINDOW *);
extern NCURSES_EXPORT(int) getbegy (const WINDOW *);
extern NCURSES_EXPORT(int) getmaxx (const WINDOW *);
extern NCURSES_EXPORT(int) getmaxy (const WINDOW *);
extern NCURSES_EXPORT(int) getparx (const WINDOW *);
extern NCURSES_EXPORT(int) getpary (const WINDOW *);
#ifndef _XOPEN_SOURCE_EXTENDED
#define vid_attr(a,pair,opts) vidattr(a)
#endif
#if 1
#undef NCURSES_EXT_FUNCS
#define NCURSES_EXT_FUNCS 20081102
typedef int (*NCURSES_WINDOW_CB)(WINDOW *, void *);
typedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *);
extern NCURSES_EXPORT(bool) is_term_resized (int, int);
extern NCURSES_EXPORT(char *) keybound (int, int);
extern NCURSES_EXPORT(const char *) curses_version (void);
extern NCURSES_EXPORT(int) assume_default_colors (int, int);
extern NCURSES_EXPORT(int) define_key (const char *, int);
extern NCURSES_EXPORT(int) key_defined (const char *);
extern NCURSES_EXPORT(int) keyok (int, bool);
extern NCURSES_EXPORT(int) resize_term (int, int);
extern NCURSES_EXPORT(int) resizeterm (int, int);
extern NCURSES_EXPORT(int) set_escdelay (int);
extern NCURSES_EXPORT(int) set_tabsize (int);
extern NCURSES_EXPORT(int) use_default_colors (void);
extern NCURSES_EXPORT(int) use_extended_names (bool);
extern NCURSES_EXPORT(int) use_legacy_coding (int);
extern NCURSES_EXPORT(int) use_screen (SCREEN *, NCURSES_SCREEN_CB, void *);
extern NCURSES_EXPORT(int) use_window (WINDOW *, NCURSES_WINDOW_CB, void *);
extern NCURSES_EXPORT(int) wresize (WINDOW *, int, int);
extern NCURSES_EXPORT(void) nofilter(void);
extern NCURSES_EXPORT(WINDOW *) wgetparent (const WINDOW *);
extern NCURSES_EXPORT(bool) is_cleared (const WINDOW *);
extern NCURSES_EXPORT(bool) is_idcok (const WINDOW *);
extern NCURSES_EXPORT(bool) is_idlok (const WINDOW *);
extern NCURSES_EXPORT(bool) is_immedok (const WINDOW *);
extern NCURSES_EXPORT(bool) is_keypad (const WINDOW *);
extern NCURSES_EXPORT(bool) is_leaveok (const WINDOW *);
extern NCURSES_EXPORT(bool) is_nodelay (const WINDOW *);
extern NCURSES_EXPORT(bool) is_notimeout (const WINDOW *);
extern NCURSES_EXPORT(bool) is_scrollok (const WINDOW *);
extern NCURSES_EXPORT(bool) is_syncok (const WINDOW *);
extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *);
#else
#define curses_version() NCURSES_VERSION
#endif
#define NCURSES_ATTR_SHIFT 8
#define NCURSES_BITS(mask,shift) ((mask) << ((shift) + NCURSES_ATTR_SHIFT))
#define A_NORMAL (1U - 1U)
#define A_ATTRIBUTES NCURSES_BITS(~(1U - 1U),0)
#define A_CHARTEXT (NCURSES_BITS(1U,0) - 1U)
#define A_COLOR NCURSES_BITS(((1U) << 8) - 1U,0)
#define A_STANDOUT NCURSES_BITS(1U,8)
#define A_UNDERLINE NCURSES_BITS(1U,9)
#define A_REVERSE NCURSES_BITS(1U,10)
#define A_BLINK NCURSES_BITS(1U,11)
#define A_DIM NCURSES_BITS(1U,12)
#define A_BOLD NCURSES_BITS(1U,13)
#define A_ALTCHARSET NCURSES_BITS(1U,14)
#define A_INVIS NCURSES_BITS(1U,15)
#define A_PROTECT NCURSES_BITS(1U,16)
#define A_HORIZONTAL NCURSES_BITS(1U,17)
#define A_LEFT NCURSES_BITS(1U,18)
#define A_LOW NCURSES_BITS(1U,19)
#define A_RIGHT NCURSES_BITS(1U,20)
#define A_TOP NCURSES_BITS(1U,21)
#define A_VERTICAL NCURSES_BITS(1U,22)
#define getyx(win,y,x) (y = getcury(win), x = getcurx(win))
#define getbegyx(win,y,x) (y = getbegy(win), x = getbegx(win))
#define getmaxyx(win,y,x) (y = getmaxy(win), x = getmaxx(win))
#define getparyx(win,y,x) (y = getpary(win), x = getparx(win))
#define getsyx(y,x) do { if (newscr) { \
if (is_leaveok(newscr)) \
(y) = (x) = -1; \
else \
getyx(newscr,(y), (x)); \
} \
} while(0)
#define setsyx(y,x) do { if (newscr) { \
if ((y) == -1 && (x) == -1) \
leaveok(newscr, TRUE); \
else { \
leaveok(newscr, FALSE); \
wmove(newscr, (y), (x)); \
} \
} \
} while(0)
#ifndef NCURSES_NOMACROS
#define wgetstr(w, s) wgetnstr(w, s, -1)
#define getnstr(s, n) wgetnstr(stdscr, s, n)
#define setterm(term) setupterm(term, 1, (int *)0)
#define fixterm() reset_prog_mode()
#define resetterm() reset_shell_mode()
#define saveterm() def_prog_mode()
#define crmode() cbreak()
#define nocrmode() nocbreak()
#define gettmode()
#if !NCURSES_OPAQUE
#define getattrs(win) ((win) ? (win)->_attrs : A_NORMAL)
#define getcurx(win) ((win) ? (win)->_curx : ERR)
#define getcury(win) ((win) ? (win)->_cury : ERR)
#define getbegx(win) ((win) ? (win)->_begx : ERR)
#define getbegy(win) ((win) ? (win)->_begy : ERR)
#define getmaxx(win) ((win) ? ((win)->_maxx + 1) : ERR)
#define getmaxy(win) ((win) ? ((win)->_maxy + 1) : ERR)
#define getparx(win) ((win) ? (win)->_parx : ERR)
#define getpary(win) ((win) ? (win)->_pary : ERR)
#endif
#define wstandout(win) (wattrset(win,A_STANDOUT))
#define wstandend(win) (wattrset(win,A_NORMAL))
#define wattron(win,at) wattr_on(win, NCURSES_CAST(attr_t, at), NULL)
#define wattroff(win,at) wattr_off(win, NCURSES_CAST(attr_t, at), NULL)
#if !NCURSES_OPAQUE
#if defined(_XOPEN_SOURCE_EXTENDED) && 0
#define wattrset(win,at) ((win)->_color = PAIR_NUMBER(at), \
(win)->_attrs = (at))
#else
#define wattrset(win,at) ((win)->_attrs = (at))
#endif
#endif
#define scroll(win) wscrl(win,1)
#define touchwin(win) wtouchln((win), 0, getmaxy(win), 1)
#define touchline(win, s, c) wtouchln((win), s, c, 1)
#define untouchwin(win) wtouchln((win), 0, getmaxy(win), 0)
#define box(win, v, h) wborder(win, v, v, h, h, 0, 0, 0, 0)
#define border(ls, rs, ts, bs, tl, tr, bl, br) wborder(stdscr, ls, rs, ts, bs, tl, tr, bl, br)
#define hline(ch, n) whline(stdscr, ch, n)
#define vline(ch, n) wvline(stdscr, ch, n)
#define winstr(w, s) winnstr(w, s, -1)
#define winchstr(w, s) winchnstr(w, s, -1)
#define winsstr(w, s) winsnstr(w, s, -1)
#if !NCURSES_OPAQUE
#define redrawwin(win) wredrawln(win, 0, (win)->_maxy+1)
#endif
#define waddstr(win,str) waddnstr(win,str,-1)
#define waddchstr(win,str) waddchnstr(win,str,-1)
#define COLOR_PAIR(n) NCURSES_BITS(n, 0)
#define PAIR_NUMBER(a) (NCURSES_CAST(int,(((a) & A_COLOR) >> NCURSES_ATTR_SHIFT)))
#define addch(ch) waddch(stdscr,ch)
#define addchnstr(str,n) waddchnstr(stdscr,str,n)
#define addchstr(str) waddchstr(stdscr,str)
#define addnstr(str,n) waddnstr(stdscr,str,n)
#define addstr(str) waddnstr(stdscr,str,-1)
#define attroff(at) wattroff(stdscr,at)
#define attron(at) wattron(stdscr,at)
#define attrset(at) wattrset(stdscr,at)
#define attr_get(ap,cp,o) wattr_get(stdscr,ap,cp,o)
#define attr_off(a,o) wattr_off(stdscr,a,o)
#define attr_on(a,o) wattr_on(stdscr,a,o)
#define attr_set(a,c,o) wattr_set(stdscr,a,c,o)
#define bkgd(ch) wbkgd(stdscr,ch)
#define bkgdset(ch) wbkgdset(stdscr,ch)
#define chgat(n,a,c,o) wchgat(stdscr,n,a,c,o)
#define clear() wclear(stdscr)
#define clrtobot() wclrtobot(stdscr)
#define clrtoeol() wclrtoeol(stdscr)
#define color_set(c,o) wcolor_set(stdscr,c,o)
#define delch() wdelch(stdscr)
#define deleteln() winsdelln(stdscr,-1)
#define echochar(c) wechochar(stdscr,c)
#define erase() werase(stdscr)
#define getch() wgetch(stdscr)
#define getstr(str) wgetstr(stdscr,str)
#define inch() winch(stdscr)
#define inchnstr(s,n) winchnstr(stdscr,s,n)
#define inchstr(s) winchstr(stdscr,s)
#define innstr(s,n) winnstr(stdscr,s,n)
#define insch(c) winsch(stdscr,c)
#define insdelln(n) winsdelln(stdscr,n)
#define insertln() winsdelln(stdscr,1)
#define insnstr(s,n) winsnstr(stdscr,s,n)
#define insstr(s) winsstr(stdscr,s)
#define instr(s) winstr(stdscr,s)
#define move(y,x) wmove(stdscr,y,x)
#define refresh() wrefresh(stdscr)
#define scrl(n) wscrl(stdscr,n)
#define setscrreg(t,b) wsetscrreg(stdscr,t,b)
#define standend() wstandend(stdscr)
#define standout() wstandout(stdscr)
#define timeout(delay) wtimeout(stdscr,delay)
#define wdeleteln(win) winsdelln(win,-1)
#define winsertln(win) winsdelln(win,1)
#define mvwaddch(win,y,x,ch) (wmove(win,y,x) == ERR ? ERR : waddch(win,ch))
#define mvwaddchnstr(win,y,x,str,n) (wmove(win,y,x) == ERR ? ERR : waddchnstr(win,str,n))
#define mvwaddchstr(win,y,x,str) (wmove(win,y,x) == ERR ? ERR : waddchnstr(win,str,-1))
#define mvwaddnstr(win,y,x,str,n) (wmove(win,y,x) == ERR ? ERR : waddnstr(win,str,n))
#define mvwaddstr(win,y,x,str) (wmove(win,y,x) == ERR ? ERR : waddnstr(win,str,-1))
#define mvwdelch(win,y,x) (wmove(win,y,x) == ERR ? ERR : wdelch(win))
#define mvwchgat(win,y,x,n,a,c,o) (wmove(win,y,x) == ERR ? ERR : wchgat(win,n,a,c,o))
#define mvwgetch(win,y,x) (wmove(win,y,x) == ERR ? ERR : wgetch(win))
#define mvwgetnstr(win,y,x,str,n) (wmove(win,y,x) == ERR ? ERR : wgetnstr(win,str,n))
#define mvwgetstr(win,y,x,str) (wmove(win,y,x) == ERR ? ERR : wgetstr(win,str))
#define mvwhline(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : whline(win,c,n))
#define mvwinch(win,y,x) (wmove(win,y,x) == ERR ? NCURSES_CAST(chtype, ERR) : winch(win))
#define mvwinchnstr(win,y,x,s,n) (wmove(win,y,x) == ERR ? ERR : winchnstr(win,s,n))
#define mvwinchstr(win,y,x,s) (wmove(win,y,x) == ERR ? ERR : winchstr(win,s))
#define mvwinnstr(win,y,x,s,n) (wmove(win,y,x) == ERR ? ERR : winnstr(win,s,n))
#define mvwinsch(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : winsch(win,c))
#define mvwinsnstr(win,y,x,s,n) (wmove(win,y,x) == ERR ? ERR : winsnstr(win,s,n))
#define mvwinsstr(win,y,x,s) (wmove(win,y,x) == ERR ? ERR : winsstr(win,s))
#define mvwinstr(win,y,x,s) (wmove(win,y,x) == ERR ? ERR : winstr(win,s))
#define mvwvline(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : wvline(win,c,n))
#define mvaddch(y,x,ch) mvwaddch(stdscr,y,x,ch)
#define mvaddchnstr(y,x,str,n) mvwaddchnstr(stdscr,y,x,str,n)
#define mvaddchstr(y,x,str) mvwaddchstr(stdscr,y,x,str)
#define mvaddnstr(y,x,str,n) mvwaddnstr(stdscr,y,x,str,n)
#define mvaddstr(y,x,str) mvwaddstr(stdscr,y,x,str)
#define mvchgat(y,x,n,a,c,o) mvwchgat(stdscr,y,x,n,a,c,o)
#define mvdelch(y,x) mvwdelch(stdscr,y,x)
#define mvgetch(y,x) mvwgetch(stdscr,y,x)
#define mvgetnstr(y,x,str,n) mvwgetnstr(stdscr,y,x,str,n)
#define mvgetstr(y,x,str) mvwgetstr(stdscr,y,x,str)
#define mvhline(y,x,c,n) mvwhline(stdscr,y,x,c,n)
#define mvinch(y,x) mvwinch(stdscr,y,x)
#define mvinchnstr(y,x,s,n) mvwinchnstr(stdscr,y,x,s,n)
#define mvinchstr(y,x,s) mvwinchstr(stdscr,y,x,s)
#define mvinnstr(y,x,s,n) mvwinnstr(stdscr,y,x,s,n)
#define mvinsch(y,x,c) mvwinsch(stdscr,y,x,c)
#define mvinsnstr(y,x,s,n) mvwinsnstr(stdscr,y,x,s,n)
#define mvinsstr(y,x,s) mvwinsstr(stdscr,y,x,s)
#define mvinstr(y,x,s) mvwinstr(stdscr,y,x,s)
#define mvvline(y,x,c,n) mvwvline(stdscr,y,x,c,n)
#if !NCURSES_OPAQUE
#define getbkgd(win) ((win)->_bkgd)
#endif
#define slk_attr_off(a,v) ((v) ? ERR : slk_attroff(a))
#define slk_attr_on(a,v) ((v) ? ERR : slk_attron(a))
#if !NCURSES_OPAQUE
#if defined(_XOPEN_SOURCE_EXTENDED) && 0
#define wattr_set(win,a,p,opts) ((win)->_attrs = ((a) & ~A_COLOR), \
(win)->_color = (p), \
OK)
#define wattr_get(win,a,p,opts) ((void)((a) != (void *)0 && (*(a) = (win)->_attrs)), \
(void)((p) != (void *)0 && (*(p) = (win)->_color)), \
OK)
#else
#define wattr_set(win,a,p,opts) ((win)->_attrs = (((a) & ~A_COLOR) | COLOR_PAIR(p)), OK)
#define wattr_get(win,a,p,opts) ((void)((a) != (void *)0 && (*(a) = (win)->_attrs)), \
(void)((p) != (void *)0 && (*(p) = PAIR_NUMBER((win)->_attrs))), \
OK)
#endif
#endif
#define vw_printw vwprintw
#define vw_scanw vwscanw
#if !1
#define vsscanf(a,b,c) _nc_vsscanf(a,b,c)
NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list);
#endif
#if 1
#if !NCURSES_OPAQUE
#define is_cleared(win) ((win)->_clear)
#define is_idcok(win) ((win)->_idcok)
#define is_idlok(win) ((win)->_idlok)
#define is_immedok(win) ((win)->_immed)
#define is_keypad(win) ((win)->_use_keypad)
#define is_leaveok(win) ((win)->_leaveok)
#define is_nodelay(win) ((win)->_delay == 0)
#define is_notimeout(win) ((win)->_notimeout)
#define is_scrollok(win) ((win)->_scroll)
#define is_syncok(win) ((win)->_sync)
#define wgetparent(win) ((win) ? (win)->_parent : 0)
#define wgetscrreg(win,t,b) ((win) ? (*(t) = (win)->_regtop, *(b) = (win)->_regbottom, OK) : ERR)
#endif
#endif
#endif
#if 0
NCURSES_WRAPPED_VAR(WINDOW *, curscr);
NCURSES_WRAPPED_VAR(WINDOW *, newscr);
NCURSES_WRAPPED_VAR(WINDOW *, stdscr);
NCURSES_WRAPPED_VAR(char *, ttytype);
NCURSES_WRAPPED_VAR(int, COLORS);
NCURSES_WRAPPED_VAR(int, COLOR_PAIRS);
NCURSES_WRAPPED_VAR(int, COLS);
NCURSES_WRAPPED_VAR(int, ESCDELAY);
NCURSES_WRAPPED_VAR(int, LINES);
NCURSES_WRAPPED_VAR(int, TABSIZE);
#define curscr NCURSES_PUBLIC_VAR(curscr())
#define newscr NCURSES_PUBLIC_VAR(newscr())
#define stdscr NCURSES_PUBLIC_VAR(stdscr())
#define ttytype NCURSES_PUBLIC_VAR(ttytype())
#define COLORS NCURSES_PUBLIC_VAR(COLORS())
#define COLOR_PAIRS NCURSES_PUBLIC_VAR(COLOR_PAIRS())
#define COLS NCURSES_PUBLIC_VAR(COLS())
#define ESCDELAY NCURSES_PUBLIC_VAR(ESCDELAY())
#define LINES NCURSES_PUBLIC_VAR(LINES())
#define TABSIZE NCURSES_PUBLIC_VAR(TABSIZE())
#else
extern NCURSES_EXPORT_VAR(WINDOW *) curscr;
extern NCURSES_EXPORT_VAR(WINDOW *) newscr;
extern NCURSES_EXPORT_VAR(WINDOW *) stdscr;
extern NCURSES_EXPORT_VAR(char) ttytype[];
extern NCURSES_EXPORT_VAR(int) COLORS;
extern NCURSES_EXPORT_VAR(int) COLOR_PAIRS;
extern NCURSES_EXPORT_VAR(int) COLS;
extern NCURSES_EXPORT_VAR(int) ESCDELAY;
extern NCURSES_EXPORT_VAR(int) LINES;
extern NCURSES_EXPORT_VAR(int) TABSIZE;
#endif
#define KEY_CODE_YES 0400
#define KEY_MIN 0401
#define KEY_BREAK 0401
#define KEY_SRESET 0530
#define KEY_RESET 0531
#define KEY_DOWN 0402
#define KEY_UP 0403
#define KEY_LEFT 0404
#define KEY_RIGHT 0405
#define KEY_HOME 0406
#define KEY_BACKSPACE 0407
#define KEY_F0 0410
#define KEY_F(n) (KEY_F0+(n))
#define KEY_DL 0510
#define KEY_IL 0511
#define KEY_DC 0512
#define KEY_IC 0513
#define KEY_EIC 0514
#define KEY_CLEAR 0515
#define KEY_EOS 0516
#define KEY_EOL 0517
#define KEY_SF 0520
#define KEY_SR 0521
#define KEY_NPAGE 0522
#define KEY_PPAGE 0523
#define KEY_STAB 0524
#define KEY_CTAB 0525
#define KEY_CATAB 0526
#define KEY_ENTER 0527
#define KEY_PRINT 0532
#define KEY_LL 0533
#define KEY_A1 0534
#define KEY_A3 0535
#define KEY_B2 0536
#define KEY_C1 0537
#define KEY_C3 0540
#define KEY_BTAB 0541
#define KEY_BEG 0542
#define KEY_CANCEL 0543
#define KEY_CLOSE 0544
#define KEY_COMMAND 0545
#define KEY_COPY 0546
#define KEY_CREATE 0547
#define KEY_END 0550
#define KEY_EXIT 0551
#define KEY_FIND 0552
#define KEY_HELP 0553
#define KEY_MARK 0554
#define KEY_MESSAGE 0555
#define KEY_MOVE 0556
#define KEY_NEXT 0557
#define KEY_OPEN 0560
#define KEY_OPTIONS 0561
#define KEY_PREVIOUS 0562
#define KEY_REDO 0563
#define KEY_REFERENCE 0564
#define KEY_REFRESH 0565
#define KEY_REPLACE 0566
#define KEY_RESTART 0567
#define KEY_RESUME 0570
#define KEY_SAVE 0571
#define KEY_SBEG 0572
#define KEY_SCANCEL 0573
#define KEY_SCOMMAND 0574
#define KEY_SCOPY 0575
#define KEY_SCREATE 0576
#define KEY_SDC 0577
#define KEY_SDL 0600
#define KEY_SELECT 0601
#define KEY_SEND 0602
#define KEY_SEOL 0603
#define KEY_SEXIT 0604
#define KEY_SFIND 0605
#define KEY_SHELP 0606
#define KEY_SHOME 0607
#define KEY_SIC 0610
#define KEY_SLEFT 0611
#define KEY_SMESSAGE 0612
#define KEY_SMOVE 0613
#define KEY_SNEXT 0614
#define KEY_SOPTIONS 0615
#define KEY_SPREVIOUS 0616
#define KEY_SPRINT 0617
#define KEY_SREDO 0620
#define KEY_SREPLACE 0621
#define KEY_SRIGHT 0622
#define KEY_SRSUME 0623
#define KEY_SSAVE 0624
#define KEY_SSUSPEND 0625
#define KEY_SUNDO 0626
#define KEY_SUSPEND 0627
#define KEY_UNDO 0630
#define KEY_MOUSE 0631
#define KEY_RESIZE 0632
#define KEY_EVENT 0633
#define KEY_MAX 0777
#ifdef _XOPEN_SOURCE_EXTENDED
extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs;
#define NCURSES_WACS(c) (&_nc_wacs[(unsigned char)c])
#define WACS_BSSB NCURSES_WACS('l')
#define WACS_SSBB NCURSES_WACS('m')
#define WACS_BBSS NCURSES_WACS('k')
#define WACS_SBBS NCURSES_WACS('j')
#define WACS_SBSS NCURSES_WACS('u')
#define WACS_SSSB NCURSES_WACS('t')
#define WACS_SSBS NCURSES_WACS('v')
#define WACS_BSSS NCURSES_WACS('w')
#define WACS_BSBS NCURSES_WACS('q')
#define WACS_SBSB NCURSES_WACS('x')
#define WACS_SSSS NCURSES_WACS('n')
#define WACS_ULCORNER WACS_BSSB
#define WACS_LLCORNER WACS_SSBB
#define WACS_URCORNER WACS_BBSS
#define WACS_LRCORNER WACS_SBBS
#define WACS_RTEE WACS_SBSS
#define WACS_LTEE WACS_SSSB
#define WACS_BTEE WACS_SSBS
#define WACS_TTEE WACS_BSSS
#define WACS_HLINE WACS_BSBS
#define WACS_VLINE WACS_SBSB
#define WACS_PLUS WACS_SSSS
#define WACS_S1 NCURSES_WACS('o')
#define WACS_S9 NCURSES_WACS('s')
#define WACS_DIAMOND NCURSES_WACS('`')
#define WACS_CKBOARD NCURSES_WACS('a')
#define WACS_DEGREE NCURSES_WACS('f')
#define WACS_PLMINUS NCURSES_WACS('g')
#define WACS_BULLET NCURSES_WACS('~')
#define WACS_LARROW NCURSES_WACS(',')
#define WACS_RARROW NCURSES_WACS('+')
#define WACS_DARROW NCURSES_WACS('.')
#define WACS_UARROW NCURSES_WACS('-')
#define WACS_BOARD NCURSES_WACS('h')
#define WACS_LANTERN NCURSES_WACS('i')
#define WACS_BLOCK NCURSES_WACS('0')
#define WACS_S3 NCURSES_WACS('p')
#define WACS_S7 NCURSES_WACS('r')
#define WACS_LEQUAL NCURSES_WACS('y')
#define WACS_GEQUAL NCURSES_WACS('z')
#define WACS_PI NCURSES_WACS('{')
#define WACS_NEQUAL NCURSES_WACS('|')
#define WACS_STERLING NCURSES_WACS('}')
extern NCURSES_EXPORT(int) add_wch (const cchar_t *);
extern NCURSES_EXPORT(int) add_wchnstr (const cchar_t *, int);
extern NCURSES_EXPORT(int) add_wchstr (const cchar_t *);
extern NCURSES_EXPORT(int) addnwstr (const wchar_t *, int);
extern NCURSES_EXPORT(int) addwstr (const wchar_t *);
extern NCURSES_EXPORT(int) bkgrnd (const cchar_t *);
extern NCURSES_EXPORT(void) bkgrndset (const cchar_t *);
extern NCURSES_EXPORT(int) border_set (const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*);
extern NCURSES_EXPORT(int) box_set (WINDOW *, const cchar_t *, const cchar_t *);
extern NCURSES_EXPORT(int) echo_wchar (const cchar_t *);
extern NCURSES_EXPORT(int) erasewchar (wchar_t*);
extern NCURSES_EXPORT(int) get_wch (wint_t *);
extern NCURSES_EXPORT(int) get_wstr (wint_t *);
extern NCURSES_EXPORT(int) getbkgrnd (cchar_t *);
extern NCURSES_EXPORT(int) getcchar (const cchar_t *, wchar_t*, attr_t*, short*, void*);
extern NCURSES_EXPORT(int) getn_wstr (wint_t *, int);
extern NCURSES_EXPORT(int) hline_set (const cchar_t *, int);
extern NCURSES_EXPORT(int) in_wch (cchar_t *);
extern NCURSES_EXPORT(int) in_wchnstr (cchar_t *, int);
extern NCURSES_EXPORT(int) in_wchstr (cchar_t *);
extern NCURSES_EXPORT(int) innwstr (wchar_t *, int);
extern NCURSES_EXPORT(int) ins_nwstr (const wchar_t *, int);
extern NCURSES_EXPORT(int) ins_wch (const cchar_t *);
extern NCURSES_EXPORT(int) ins_wstr (const wchar_t *);
extern NCURSES_EXPORT(int) inwstr (wchar_t *);
extern NCURSES_EXPORT(NCURSES_CONST char*) key_name (wchar_t);
extern NCURSES_EXPORT(int) killwchar (wchar_t *);
extern NCURSES_EXPORT(int) mvadd_wch (int, int, const cchar_t *);
extern NCURSES_EXPORT(int) mvadd_wchnstr (int, int, const cchar_t *, int);
extern NCURSES_EXPORT(int) mvadd_wchstr (int, int, const cchar_t *);
extern NCURSES_EXPORT(int) mvaddnwstr (int, int, const wchar_t *, int);
extern NCURSES_EXPORT(int) mvaddwstr (int, int, const wchar_t *);
extern NCURSES_EXPORT(int) mvget_wch (int, int, wint_t *);
extern NCURSES_EXPORT(int) mvget_wstr (int, int, wint_t *);
extern NCURSES_EXPORT(int) mvgetn_wstr (int, int, wint_t *, int);
extern NCURSES_EXPORT(int) mvhline_set (int, int, const cchar_t *, int);
extern NCURSES_EXPORT(int) mvin_wch (int, int, cchar_t *);
extern NCURSES_EXPORT(int) mvin_wchnstr (int, int, cchar_t *, int);
extern NCURSES_EXPORT(int) mvin_wchstr (int, int, cchar_t *);
extern NCURSES_EXPORT(int) mvinnwstr (int, int, wchar_t *, int);
extern NCURSES_EXPORT(int) mvins_nwstr (int, int, const wchar_t *, int);
extern NCURSES_EXPORT(int) mvins_wch (int, int, const cchar_t *);
extern NCURSES_EXPORT(int) mvins_wstr (int, int, const wchar_t *);
extern NCURSES_EXPORT(int) mvinwstr (int, int, wchar_t *);
extern NCURSES_EXPORT(int) mvvline_set (int, int, const cchar_t *, int);
extern NCURSES_EXPORT(int) mvwadd_wch (WINDOW *, int, int, const cchar_t *);
extern NCURSES_EXPORT(int) mvwadd_wchnstr (WINDOW *, int, int, const cchar_t *, int);
extern NCURSES_EXPORT(int) mvwadd_wchstr (WINDOW *, int, int, const cchar_t *);
extern NCURSES_EXPORT(int) mvwaddnwstr (WINDOW *, int, int, const wchar_t *, int);
extern NCURSES_EXPORT(int) mvwaddwstr (WINDOW *, int, int, const wchar_t *);
extern NCURSES_EXPORT(int) mvwget_wch (WINDOW *, int, int, wint_t *);
extern NCURSES_EXPORT(int) mvwget_wstr (WINDOW *, int, int, wint_t *);
extern NCURSES_EXPORT(int) mvwgetn_wstr (WINDOW *, int, int, wint_t *, int);
extern NCURSES_EXPORT(int) mvwhline_set (WINDOW *, int, int, const cchar_t *, int);
extern NCURSES_EXPORT(int) mvwin_wch (WINDOW *, int, int, cchar_t *);
extern NCURSES_EXPORT(int) mvwin_wchnstr (WINDOW *, int,int, cchar_t *,int);
extern NCURSES_EXPORT(int) mvwin_wchstr (WINDOW *, int, int, cchar_t *);
extern NCURSES_EXPORT(int) mvwinnwstr (WINDOW *, int, int, wchar_t *, int);
extern NCURSES_EXPORT(int) mvwins_nwstr (WINDOW *, int,int, const wchar_t *,int);
extern NCURSES_EXPORT(int) mvwins_wch (WINDOW *, int, int, const cchar_t *);
extern NCURSES_EXPORT(int) mvwins_wstr (WINDOW *, int, int, const wchar_t *);
extern NCURSES_EXPORT(int) mvwinwstr (WINDOW *, int, int, wchar_t *);
extern NCURSES_EXPORT(int) mvwvline_set (WINDOW *, int,int, const cchar_t *,int);
extern NCURSES_EXPORT(int) pecho_wchar (WINDOW *, const cchar_t *);
extern NCURSES_EXPORT(int) setcchar (cchar_t *, const wchar_t *, const attr_t, short, const void *);
extern NCURSES_EXPORT(int) slk_wset (int, const wchar_t *, int);
extern NCURSES_EXPORT(attr_t) term_attrs (void);
extern NCURSES_EXPORT(int) unget_wch (const wchar_t);
extern NCURSES_EXPORT(int) vid_attr (attr_t, short, void *);
extern NCURSES_EXPORT(int) vid_puts (attr_t, short, void *, int (*)(int));
extern NCURSES_EXPORT(int) vline_set (const cchar_t *, int);
extern NCURSES_EXPORT(int) wadd_wch (WINDOW *,const cchar_t *);
extern NCURSES_EXPORT(int) wadd_wchnstr (WINDOW *,const cchar_t *,int);
extern NCURSES_EXPORT(int) wadd_wchstr (WINDOW *,const cchar_t *);
extern NCURSES_EXPORT(int) waddnwstr (WINDOW *,const wchar_t *,int);
extern NCURSES_EXPORT(int) waddwstr (WINDOW *,const wchar_t *);
extern NCURSES_EXPORT(int) wbkgrnd (WINDOW *,const cchar_t *);
extern NCURSES_EXPORT(void) wbkgrndset (WINDOW *,const cchar_t *);
extern NCURSES_EXPORT(int) wborder_set (WINDOW *,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*);
extern NCURSES_EXPORT(int) wecho_wchar (WINDOW *, const cchar_t *);
extern NCURSES_EXPORT(int) wget_wch (WINDOW *, wint_t *);
extern NCURSES_EXPORT(int) wget_wstr (WINDOW *, wint_t *);
extern NCURSES_EXPORT(int) wgetbkgrnd (WINDOW *, cchar_t *);
extern NCURSES_EXPORT(int) wgetn_wstr (WINDOW *,wint_t *, int);
extern NCURSES_EXPORT(int) whline_set (WINDOW *, const cchar_t *, int);
extern NCURSES_EXPORT(int) win_wch (WINDOW *, cchar_t *);
extern NCURSES_EXPORT(int) win_wchnstr (WINDOW *, cchar_t *, int);
extern NCURSES_EXPORT(int) win_wchstr (WINDOW *, cchar_t *);
extern NCURSES_EXPORT(int) winnwstr (WINDOW *, wchar_t *, int);
extern NCURSES_EXPORT(int) wins_nwstr (WINDOW *, const wchar_t *, int);
extern NCURSES_EXPORT(int) wins_wch (WINDOW *, const cchar_t *);
extern NCURSES_EXPORT(int) wins_wstr (WINDOW *, const wchar_t *);
extern NCURSES_EXPORT(int) winwstr (WINDOW *, wchar_t *);
extern NCURSES_EXPORT(wchar_t*) wunctrl (cchar_t *);
extern NCURSES_EXPORT(int) wvline_set (WINDOW *, const cchar_t *, int);
#ifndef NCURSES_NOMACROS
#define add_wch(c) wadd_wch(stdscr,c)
#define add_wchnstr(str,n) wadd_wchnstr(stdscr,str,n)
#define add_wchstr(str) wadd_wchstr(stdscr,str)
#define addnwstr(wstr,n) waddnwstr(stdscr,wstr,n)
#define addwstr(wstr) waddwstr(stdscr,wstr)
#define bkgrnd(c) wbkgrnd(stdscr,c)
#define bkgrndset(c) wbkgrndset(stdscr,c)
#define border_set(l,r,t,b,tl,tr,bl,br) wborder_set(stdscr,l,r,t,b,tl,tr,bl,br)
#define box_set(w,v,h) wborder_set(w,v,v,h,h,0,0,0,0)
#define echo_wchar(c) wecho_wchar(stdscr,c)
#define get_wch(c) wget_wch(stdscr,c)
#define get_wstr(t) wget_wstr(stdscr,t)
#define getbkgrnd(wch) wgetbkgrnd(stdscr,wch)
#define getn_wstr(t,n) wgetn_wstr(stdscr,t,n)
#define hline_set(c,n) whline_set(stdscr,c,n)
#define in_wch(c) win_wch(stdscr,c)
#define in_wchnstr(c,n) win_wchnstr(stdscr,c,n)
#define in_wchstr(c) win_wchstr(stdscr,c)
#define innwstr(c,n) winnwstr(stdscr,c,n)
#define ins_nwstr(t,n) wins_nwstr(stdscr,t,n)
#define ins_wch(c) wins_wch(stdscr,c)
#define ins_wstr(t) wins_wstr(stdscr,t)
#define inwstr(c) winwstr(stdscr,c)
#define vline_set(c,n) wvline_set(stdscr,c,n)
#define wadd_wchstr(win,str) wadd_wchnstr(win,str,-1)
#define waddwstr(win,wstr) waddnwstr(win,wstr,-1)
#define wget_wstr(w,t) wgetn_wstr(w,t,-1)
#define win_wchstr(w,c) win_wchnstr(w,c,-1)
#define wins_wstr(w,t) wins_nwstr(w,t,-1)
#if !NCURSES_OPAQUE
#define wgetbkgrnd(win,wch) (*wch = win->_bkgrnd, OK)
#endif
#define mvadd_wch(y,x,c) mvwadd_wch(stdscr,y,x,c)
#define mvadd_wchnstr(y,x,s,n) mvwadd_wchnstr(stdscr,y,x,s,n)
#define mvadd_wchstr(y,x,s) mvwadd_wchstr(stdscr,y,x,s)
#define mvaddnwstr(y,x,wstr,n) mvwaddnwstr(stdscr,y,x,wstr,n)
#define mvaddwstr(y,x,wstr) mvwaddwstr(stdscr,y,x,wstr)
#define mvget_wch(y,x,c) mvwget_wch(stdscr,y,x,c)
#define mvget_wstr(y,x,t) mvwget_wstr(stdscr,y,x,t)
#define mvgetn_wstr(y,x,t,n) mvwgetn_wstr(stdscr,y,x,t,n)
#define mvhline_set(y,x,c,n) mvwhline_set(stdscr,y,x,c,n)
#define mvin_wch(y,x,c) mvwin_wch(stdscr,y,x,c)
#define mvin_wchnstr(y,x,c,n) mvwin_wchnstr(stdscr,y,x,c,n)
#define mvin_wchstr(y,x,c) mvwin_wchstr(stdscr,y,x,c)
#define mvinnwstr(y,x,c,n) mvwinnwstr(stdscr,y,x,c,n)
#define mvins_nwstr(y,x,t,n) mvwins_nwstr(stdscr,y,x,t,n)
#define mvins_wch(y,x,c) mvwins_wch(stdscr,y,x,c)
#define mvins_wstr(y,x,t) mvwins_wstr(stdscr,y,x,t)
#define mvinwstr(y,x,c) mvwinwstr(stdscr,y,x,c)
#define mvvline_set(y,x,c,n) mvwvline_set(stdscr,y,x,c,n)
#define mvwadd_wch(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : wadd_wch(win,c))
#define mvwadd_wchnstr(win,y,x,s,n) (wmove(win,y,x) == ERR ? ERR : wadd_wchnstr(win,s,n))
#define mvwadd_wchstr(win,y,x,s) (wmove(win,y,x) == ERR ? ERR : wadd_wchstr(win,s))
#define mvwaddnwstr(win,y,x,wstr,n) (wmove(win,y,x) == ERR ? ERR : waddnwstr(win,wstr,n))
#define mvwaddwstr(win,y,x,wstr) (wmove(win,y,x) == ERR ? ERR : waddwstr(win,wstr))
#define mvwget_wch(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : wget_wch(win,c))
#define mvwget_wstr(win,y,x,t) (wmove(win,y,x) == ERR ? ERR : wget_wstr(win,t))
#define mvwgetn_wstr(win,y,x,t,n) (wmove(win,y,x) == ERR ? ERR : wgetn_wstr(win,t,n))
#define mvwhline_set(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : whline_set(win,c,n))
#define mvwin_wch(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : win_wch(win,c))
#define mvwin_wchnstr(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : win_wchnstr(win,c,n))
#define mvwin_wchstr(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : win_wchstr(win,c))
#define mvwinnwstr(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : winnwstr(win,c,n))
#define mvwins_nwstr(win,y,x,t,n) (wmove(win,y,x) == ERR ? ERR : wins_nwstr(win,t,n))
#define mvwins_wch(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : wins_wch(win,c))
#define mvwins_wstr(win,y,x,t) (wmove(win,y,x) == ERR ? ERR : wins_wstr(win,t))
#define mvwinwstr(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : winwstr(win,c))
#define mvwvline_set(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : wvline_set(win,c,n))
#endif
#if defined(TRACE) || defined(NCURSES_TEST)
extern NCURSES_EXPORT(const char *) _nc_viswbuf(const wchar_t *);
extern NCURSES_EXPORT(const char *) _nc_viswibuf(const wint_t *);
#endif
#endif
#if NCURSES_MOUSE_VERSION > 1
#define NCURSES_MOUSE_MASK(b,m) ((m) << (((b) - 1) * 5))
#else
#define NCURSES_MOUSE_MASK(b,m) ((m) << (((b) - 1) * 6))
#endif
#define NCURSES_BUTTON_RELEASED 001L
#define NCURSES_BUTTON_PRESSED 002L
#define NCURSES_BUTTON_CLICKED 004L
#define NCURSES_DOUBLE_CLICKED 010L
#define NCURSES_TRIPLE_CLICKED 020L
#define NCURSES_RESERVED_EVENT 040L
#define BUTTON1_RELEASED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_RELEASED)
#define BUTTON1_PRESSED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_PRESSED)
#define BUTTON1_CLICKED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_CLICKED)
#define BUTTON1_DOUBLE_CLICKED NCURSES_MOUSE_MASK(1, NCURSES_DOUBLE_CLICKED)
#define BUTTON1_TRIPLE_CLICKED NCURSES_MOUSE_MASK(1, NCURSES_TRIPLE_CLICKED)
#define BUTTON2_RELEASED NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_RELEASED)
#define BUTTON2_PRESSED NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_PRESSED)
#define BUTTON2_CLICKED NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_CLICKED)
#define BUTTON2_DOUBLE_CLICKED NCURSES_MOUSE_MASK(2, NCURSES_DOUBLE_CLICKED)
#define BUTTON2_TRIPLE_CLICKED NCURSES_MOUSE_MASK(2, NCURSES_TRIPLE_CLICKED)
#define BUTTON3_RELEASED NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_RELEASED)
#define BUTTON3_PRESSED NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_PRESSED)
#define BUTTON3_CLICKED NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_CLICKED)
#define BUTTON3_DOUBLE_CLICKED NCURSES_MOUSE_MASK(3, NCURSES_DOUBLE_CLICKED)
#define BUTTON3_TRIPLE_CLICKED NCURSES_MOUSE_MASK(3, NCURSES_TRIPLE_CLICKED)
#define BUTTON4_RELEASED NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_RELEASED)
#define BUTTON4_PRESSED NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_PRESSED)
#define BUTTON4_CLICKED NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_CLICKED)
#define BUTTON4_DOUBLE_CLICKED NCURSES_MOUSE_MASK(4, NCURSES_DOUBLE_CLICKED)
#define BUTTON4_TRIPLE_CLICKED NCURSES_MOUSE_MASK(4, NCURSES_TRIPLE_CLICKED)
#if NCURSES_MOUSE_VERSION > 1
#define BUTTON5_RELEASED NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_RELEASED)
#define BUTTON5_PRESSED NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_PRESSED)
#define BUTTON5_CLICKED NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_CLICKED)
#define BUTTON5_DOUBLE_CLICKED NCURSES_MOUSE_MASK(5, NCURSES_DOUBLE_CLICKED)
#define BUTTON5_TRIPLE_CLICKED NCURSES_MOUSE_MASK(5, NCURSES_TRIPLE_CLICKED)
#define BUTTON_CTRL NCURSES_MOUSE_MASK(6, 0001L)
#define BUTTON_SHIFT NCURSES_MOUSE_MASK(6, 0002L)
#define BUTTON_ALT NCURSES_MOUSE_MASK(6, 0004L)
#define REPORT_MOUSE_POSITION NCURSES_MOUSE_MASK(6, 0010L)
#else
#define BUTTON1_RESERVED_EVENT NCURSES_MOUSE_MASK(1, NCURSES_RESERVED_EVENT)
#define BUTTON2_RESERVED_EVENT NCURSES_MOUSE_MASK(2, NCURSES_RESERVED_EVENT)
#define BUTTON3_RESERVED_EVENT NCURSES_MOUSE_MASK(3, NCURSES_RESERVED_EVENT)
#define BUTTON4_RESERVED_EVENT NCURSES_MOUSE_MASK(4, NCURSES_RESERVED_EVENT)
#define BUTTON_CTRL NCURSES_MOUSE_MASK(5, 0001L)
#define BUTTON_SHIFT NCURSES_MOUSE_MASK(5, 0002L)
#define BUTTON_ALT NCURSES_MOUSE_MASK(5, 0004L)
#define REPORT_MOUSE_POSITION NCURSES_MOUSE_MASK(5, 0010L)
#endif
#define ALL_MOUSE_EVENTS (REPORT_MOUSE_POSITION - 1)
#define BUTTON_RELEASE(e, x) ((e) & NCURSES_MOUSE_MASK(x, 001))
#define BUTTON_PRESS(e, x) ((e) & NCURSES_MOUSE_MASK(x, 002))
#define BUTTON_CLICK(e, x) ((e) & NCURSES_MOUSE_MASK(x, 004))
#define BUTTON_DOUBLE_CLICK(e, x) ((e) & NCURSES_MOUSE_MASK(x, 010))
#define BUTTON_TRIPLE_CLICK(e, x) ((e) & NCURSES_MOUSE_MASK(x, 020))
#define BUTTON_RESERVED_EVENT(e, x) ((e) & NCURSES_MOUSE_MASK(x, 040))
typedef struct
{
short id;
int x, y, z;
mmask_t bstate;
}
MEVENT;
extern NCURSES_EXPORT(int) getmouse (MEVENT *);
extern NCURSES_EXPORT(int) ungetmouse (MEVENT *);
extern NCURSES_EXPORT(mmask_t) mousemask (mmask_t, mmask_t *);
extern NCURSES_EXPORT(bool) wenclose (const WINDOW *, int, int);
extern NCURSES_EXPORT(int) mouseinterval (int);
extern NCURSES_EXPORT(bool) wmouse_trafo (const WINDOW*, int*, int*, bool);
extern NCURSES_EXPORT(bool) mouse_trafo (int*, int*, bool);
#define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
extern NCURSES_EXPORT(int) mcprint (char *, int);
extern NCURSES_EXPORT(int) has_key (int);
extern NCURSES_EXPORT(void) _tracef (const char *, ...) GCC_PRINTFLIKE(1,2);
extern NCURSES_EXPORT(void) _tracedump (const char *, WINDOW *);
extern NCURSES_EXPORT(char *) _traceattr (attr_t);
extern NCURSES_EXPORT(char *) _traceattr2 (int, chtype);
extern NCURSES_EXPORT(char *) _nc_tracebits (void);
extern NCURSES_EXPORT(char *) _tracechar (int);
extern NCURSES_EXPORT(char *) _tracechtype (chtype);
extern NCURSES_EXPORT(char *) _tracechtype2 (int, chtype);
#ifdef _XOPEN_SOURCE_EXTENDED
#define _tracech_t _tracecchar_t
extern NCURSES_EXPORT(char *) _tracecchar_t (const cchar_t *);
#define _tracech_t2 _tracecchar_t2
extern NCURSES_EXPORT(char *) _tracecchar_t2 (int, const cchar_t *);
#else
#define _tracech_t _tracechtype
#define _tracech_t2 _tracechtype2
#endif
extern NCURSES_EXPORT(char *) _tracemouse (const MEVENT *);
extern NCURSES_EXPORT(void) trace (const unsigned int);
#define TRACE_DISABLE 0x0000
#define TRACE_TIMES 0x0001
#define TRACE_TPUTS 0x0002
#define TRACE_UPDATE 0x0004
#define TRACE_MOVE 0x0008
#define TRACE_CHARPUT 0x0010
#define TRACE_ORDINARY 0x001F
#define TRACE_CALLS 0x0020
#define TRACE_VIRTPUT 0x0040
#define TRACE_IEVENT 0x0080
#define TRACE_BITS 0x0100
#define TRACE_ICALLS 0x0200
#define TRACE_CCALLS 0x0400
#define TRACE_DATABASE 0x0800
#define TRACE_ATTRS 0x1000
#define TRACE_SHIFT 13
#define TRACE_MAXIMUM ((1 << TRACE_SHIFT) - 1)
#if defined(TRACE) || defined(NCURSES_TEST)
extern NCURSES_EXPORT_VAR(int) _nc_optimize_enable;
extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *);
#define OPTIMIZE_MVCUR 0x01
#define OPTIMIZE_HASHMAP 0x02
#define OPTIMIZE_SCROLL 0x04
#define OPTIMIZE_ALL 0xff
#endif
#ifdef __cplusplus
#ifndef NCURSES_NOMACROS
#undef box
#undef clear
#undef erase
#undef move
#undef refresh
#endif
}
#endif
#endif