X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=include%2Fcurses.h.in;h=2562f728b3bae23c6f4bf81781a1e2e32576735a;hp=43e474ba449b8af36170d1dfec37f838d4444791;hb=refs%2Ftags%2Fv4.2;hpb=3a9b6a3bf0269231bef7de74757a910dedd04e0c;ds=sidebyside diff --git a/include/curses.h.in b/include/curses.h.in index 43e474ba..2562f728 100644 --- a/include/curses.h.in +++ b/include/curses.h.in @@ -1,30 +1,50 @@ -/*************************************************************************** -* COPYRIGHT NOTICE * -**************************************************************************** -* ncurses is copyright (C) 1992-1995 * -* Zeyd M. Ben-Halim * -* zmbenhal@netcom.com * -* Eric S. Raymond * -* esr@snark.thyrsus.com * -* * -* Permission is hereby granted to reproduce and distribute ncurses * -* by any means and for any fee, whether alone or as part of a * -* larger distribution, in source or in binary form, PROVIDED * -* this notice is included with any such distribution, and is not * -* removed from any of its header files. Mention of ncurses in any * -* applications linked with it is highly appreciated. * -* * -* ncurses comes AS IS with no warranty, implied or expressed. * -* * -***************************************************************************/ - -/* $Id: curses.h.in,v 1.44 1997/04/20 01:32:08 tom Exp $ */ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Zeyd M. Ben-Halim 1992,1995 * + * and: Eric S. Raymond * + ****************************************************************************/ + +/* $Id: curses.h.in,v 1.60 1998/02/11 12:13:46 tom Exp $ */ #ifndef __NCURSES_H #define __NCURSES_H + #define CURSES 1 #define CURSES_H 1 +/* This should be defined for the enhanced functionality to be visible. + * However, none of the wide-character (enhanced) functionality is implemented. + * So we do not define it (yet). +#define _XOPEN_CURSES 1 + */ + /* These are defined only in curses.h, and are used for conditional compiles */ #define NCURSES_VERSION_MAJOR @NCURSES_MAJOR@ #define NCURSES_VERSION_MINOR @NCURSES_MINOR@ @@ -46,9 +66,7 @@ #define NCURSES_CONST /* nothing */ #endif -#ifndef _UNCTRL_H -typedef unsigned long chtype; -#endif +typedef unsigned @cf_cv_typeof_chtype@ chtype; #include #include @@ -68,8 +86,8 @@ typedef unsigned long chtype; #undef TRUE #undef FALSE -#define CXX_BUILTIN_BOOL @nc_cv_builtin_bool@ -#define CXX_TYPE_OF_BOOL @nc_cv_type_of_bool@ +#define CXX_BUILTIN_BOOL @cf_cv_builtin_bool@ +#define CXX_TYPE_OF_BOOL @cf_cv_type_of_bool@ #if defined(__cplusplus) && CXX_BUILTIN_BOOL #define TRUE ((CXX_TYPE_OF_BOOL)true) @@ -86,26 +104,25 @@ extern "C" { /* * XSI attributes. In the ncurses implementation, they are identical to the - * A_ attributes because attr_t is just an int. The XSI Curses attr_* and - * wattr_* entry points are all mapped to attr* and wattr* entry points. + * A_ attributes. */ -#define WA_ATTRIBUTES 0xffffff00 -#define WA_NORMAL 0x00000000 -#define WA_STANDOUT 0x00010000 -#define WA_UNDERLINE 0x00020000 -#define WA_REVERSE 0x00040000 -#define WA_BLINK 0x00080000 -#define WA_DIM 0x00100000 -#define WA_BOLD 0x00200000 -#define WA_ALTCHARSET 0x00400000 -#define WA_INVIS 0x00800000 -#define WA_PROTECT 0x01000000 -#define WA_HORIZONTAL 0x02000000 /* XSI Curses attr -- not yet used */ -#define WA_LEFT 0x04000000 /* XSI Curses attr -- not yet used */ -#define WA_LOW 0x08000000 /* XSI Curses attr -- not yet used */ -#define WA_RIGHT 0x10000000 /* XSI Curses attr -- not yet used */ -#define WA_TOP 0x20000000 /* XSI Curses attr -- not yet used */ -#define WA_VERTICAL 0x40000000 /* XSI Curses attr -- not yet used */ +#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 /* colors */ extern int COLORS; @@ -149,7 +166,7 @@ extern chtype acs_map[]; #define ACS_DARROW (acs_map['.']) /* arrow pointing down */ #define ACS_UARROW (acs_map['-']) /* arrow pointing up */ #define ACS_BOARD (acs_map['h']) /* board of squares */ -#define ACS_LANTERN (acs_map['I']) /* lantern symbol */ +#define ACS_LANTERN (acs_map['i']) /* lantern symbol */ #define ACS_BLOCK (acs_map['0']) /* solid square block */ /* * These aren't documented, but a lot of System Vs have them anyway @@ -233,7 +250,16 @@ typedef struct cchar_t; #endif /* _XOPEN_SOURCE_EXTENDED */ -struct _win_st { +struct ldat +{ + chtype *text; /* text of the line */ + short firstchar; /* first changed character in the line */ + short lastchar; /* last changed character in the line */ + short oldindex; /* index of the line at last update */ +}; + +struct _win_st +{ short _cury, _curx; /* current cursor position */ /* window location and size */ @@ -258,15 +284,7 @@ struct _win_st { bool _use_keypad; /* process function keys into KEY_ symbols? */ int _delay; /* 0 = nodelay, <0 = blocking, >0 = delay */ - /* the actual line data */ - struct ldat - { - chtype *text; /* text of the line */ - short firstchar; /* first changed character in the line */ - short lastchar; /* last changed character in the line */ - short oldindex; /* index of the line at last update */ - } - *_line; + struct ldat *_line; /* the actual line data */ /* global screen state */ short _regtop; /* top line of scrolling region */ @@ -288,9 +306,13 @@ struct _win_st { short _yoffset; /* real begy is _begy + _yoffset */ }; -extern WINDOW *stdscr, *curscr, *newscr; +extern WINDOW *stdscr; +extern WINDOW *curscr; +extern WINDOW *newscr; -extern int LINES, COLS, TABSIZE; +extern int LINES; +extern int COLS; +extern int TABSIZE; /* * This global was an undocumented feature under AIX curses. @@ -298,9 +320,11 @@ extern int LINES, COLS, TABSIZE; extern int ESCDELAY; /* ESC expire time in milliseconds */ /* non-XSI extensions (dickey@clark.net) */ +extern int define_key (char *, int); +extern int keyok (int, bool); extern int resizeterm (int, int); -extern int wresize (WINDOW *, int, int); extern int use_default_colors (void); +extern int wresize (WINDOW *, int, int); extern char ttytype[]; /* needed for backward compatibility */ @@ -308,8 +332,9 @@ extern char ttytype[]; /* needed for backward compatibility */ * GCC (and some other compilers) define '__attribute__'; we're using this * macro to alert the compiler to flag inconsistencies in printf/scanf-like * function calls. Just in case '__attribute__' isn't defined, make a dummy. + * G++ doesn't accept it anyway. */ -#if !defined(__GNUC__) && !defined(__attribute__) +#if defined(__cplusplus) || (!defined(__GNUC__) && !defined(__attribute__)) #define __attribute__(p) /* nothing */ #endif @@ -387,6 +412,7 @@ extern int clearok(WINDOW *,bool); /* implemented */ extern int clrtobot(void); /* generated */ extern int clrtoeol(void); /* generated */ extern int color_content(short,short*,short*,short*); /* implemented */ +extern int color_set(short,void*); /* missing */ extern int COLOR_PAIR(int); /* generated */ extern int copywin(const WINDOW*,WINDOW*,int,int,int,int,int,int,int); /* implemented */ extern int curs_set(int); /* implemented */ @@ -404,6 +430,7 @@ extern int echo(void); /* implemented */ extern int echochar(const chtype); /* generated */ #ifdef _XOPEN_SOURCE_EXTENDED extern int echo_wchar(const cchar_t *); /* missing */ +extern int erasewchar(wchar_t*); /* missing */ #endif /* _XOPEN_SOURCE_EXTENDED */ extern int endwin(void); /* implemented */ extern char erasechar(void); /* implemented */ @@ -427,7 +454,7 @@ extern int getstr(char *); /* generated */ #ifdef _XOPEN_SOURCE_EXTENDED extern int get_wch(wint_t *); /* missing */ #endif /* _XOPEN_SOURCE_EXTENDED */ -extern WINDOW *getwin(FILE *); /* not in XPG4 */ +extern WINDOW *getwin(FILE *); /* implemented */ #ifdef _XOPEN_SOURCE_EXTENDED extern int get_wstr(wint_t *); /* missing */ #endif /* _XOPEN_SOURCE_EXTENDED */ @@ -621,7 +648,7 @@ extern int overlay(const WINDOW*,WINDOW *); /* implemented */ extern int overwrite(const WINDOW*,WINDOW *); /* implemented */ extern int pair_content(short,short*,short*); /* implemented */ extern int PAIR_NUMBER(int); /* generated */ -extern int pechochar(WINDOW *, chtype); /* implemented */ +extern int pechochar(WINDOW *, const chtype); /* implemented */ #ifdef _XOPEN_SOURCE_EXTENDED extern int pecho_wchar(WINDOW *, const cchar_t *); /* missing */ #endif /* _XOPEN_SOURCE_EXTENDED */ @@ -655,18 +682,12 @@ extern int setcchar(cchar_t *, wchar_t *, attr_t, short, const void *); /* missi extern int setscrreg(int,int); /* generated */ extern SCREEN *set_term(SCREEN *); /* implemented */ extern int slk_attroff(const attr_t); /* implemented */ -#ifdef _XOPEN_SOURCE_EXTENDED -extern int slk_attr_off(attr_t); /* missing */ -#endif /* _XOPEN_SOURCE_EXTENDED */ +extern int slk_attr_off(attr_t); /* generated:WIDEC */ extern int slk_attron(const attr_t); /* implemented */ -#ifdef _XOPEN_SOURCE_EXTENDED -extern int slk_attr_on(attr_t); /* missing */ -#endif /* _XOPEN_SOURCE_EXTENDED */ +extern int slk_attr_on(attr_t); /* generated:WIDEC */ extern int slk_attrset(const attr_t); /* implemented */ extern attr_t slk_attr(void); /* implemented */ -#ifdef _XOPEN_SOURCE_EXTENDED -extern int slk_attr_set(attr_t); /* missing */ -#endif /* _XOPEN_SOURCE_EXTENDED */ +extern int slk_attr_set(attr_t); /* generated:WIDEC */ extern int slk_clear(void); /* implemented */ extern int slk_init(int); /* implemented */ extern char *slk_label(int); /* implemented */ @@ -684,7 +705,8 @@ extern int start_color(void); /* implemented */ extern WINDOW *subpad(WINDOW *, int, int, int, int); /* implemented */ extern WINDOW *subwin(WINDOW *,int,int,int,int); /* implemented */ extern int syncok(WINDOW *, bool); /* implemented */ -extern attr_t termattrs(void); /* implemented */ +extern chtype termattrs(void); /* implemented */ +extern attr_t term_attrs(void); /* missing */ extern char *termname(void); /* implemented */ extern int tigetflag(const char *); /* implemented */ extern int tigetnum(const char *); /* implemented */ @@ -698,9 +720,7 @@ extern int unget_wch(const wchar_t *); /* missing */ extern int untouchwin(WINDOW *); /* generated */ extern void use_env(bool); /* implemented */ extern int vidattr(chtype); /* implemented */ -#ifdef _XOPEN_SOURCE_EXTENDED -extern int vid_attr(attr_t); /* missing */ -#endif /* _XOPEN_SOURCE_EXTENDED */ +extern int vid_attr(attr_t); /* generated:WIDEC */ extern int vidputs(chtype, int (*)(int)); /* implemented */ #ifdef _XOPEN_SOURCE_EXTENDED extern int vid_puts(attr_t, int (*)(int)); /* missing */ @@ -732,7 +752,7 @@ extern int wattr_on(WINDOW *, const attr_t); /* implemented */ extern int wattr_off(WINDOW *, const attr_t); /* implemented */ extern int wattr_set(WINDOW *, attr_t); /* generated */ extern int wbkgd(WINDOW *,const chtype); /* implemented */ -extern void wbkgdset(WINDOW *,chtype); /* generated */ +extern void wbkgdset(WINDOW *,chtype); /* implemented */ #ifdef _XOPEN_SOURCE_EXTENDED extern int wbkgrndset(WINDOW *,const cchar_t *); /* missing */ extern int wbkgrnd(WINDOW *,const cchar_t *); /* missing */ @@ -745,6 +765,7 @@ extern int wchgat(WINDOW *, int, attr_t, short, const void *);/* implemented */ extern int wclear(WINDOW *); /* implemented */ extern int wclrtobot(WINDOW *); /* implemented */ extern int wclrtoeol(WINDOW *); /* implemented */ +extern int wcolor_set(WINDOW*,short,void*); /* missing */ extern void wcursyncup(WINDOW *); /* implemented */ extern int wdelch(WINDOW *); /* implemented */ extern int wdeleteln(WINDOW *); /* generated */ @@ -817,27 +838,45 @@ extern int wvline_set(WINDOW *, const cchar_t *, int); /* missing */ #endif /* _XOPEN_SOURCE_EXTENDED */ /* attributes */ -#define A_ATTRIBUTES 0xffffff00 -#define A_NORMAL 0x00000000 -#define A_STANDOUT 0x00010000 -#define A_UNDERLINE 0x00020000 -#define A_REVERSE 0x00040000 -#define A_BLINK 0x00080000 -#define A_DIM 0x00100000 -#define A_BOLD 0x00200000 -#define A_ALTCHARSET 0x00400000 -#define A_INVIS 0x00800000 -#define A_PROTECT 0x01000000 -#define A_HORIZONTAL 0x02000000 /* XSI Curses attr -- not yet used */ -#define A_LEFT 0x04000000 /* XSI Curses attr -- not yet used */ -#define A_LOW 0x08000000 /* XSI Curses attr -- not yet used */ -#define A_RIGHT 0x10000000 /* XSI Curses attr -- not yet used */ -#define A_TOP 0x20000000 /* XSI Curses attr -- not yet used */ -#define A_VERTICAL 0x40000000 /* XSI Curses attr -- not yet used */ -#define A_CHARTEXT 0x000000ff -#define A_COLOR 0x0000ff00 -#define COLOR_PAIR(n) ((n) << 8) -#define PAIR_NUMBER(a) (((a) & A_COLOR) >> 8) + +#define NCURSES_BITS(mask,shift) ((mask) << ((shift) + @cf_cv_widec_shift@)) + +#define A_NORMAL 0L +#define A_ATTRIBUTES NCURSES_BITS(~(@cf_cv_1UL@ - @cf_cv_1UL@),0) +#define A_CHARTEXT (NCURSES_BITS(@cf_cv_1UL@,0) - @cf_cv_1UL@) +#define A_COLOR NCURSES_BITS(((@cf_cv_1UL@) << 8) - @cf_cv_1UL@,0) +#define A_STANDOUT NCURSES_BITS(@cf_cv_1UL@,8) +#define A_UNDERLINE NCURSES_BITS(@cf_cv_1UL@,9) +#define A_REVERSE NCURSES_BITS(@cf_cv_1UL@,10) +#define A_BLINK NCURSES_BITS(@cf_cv_1UL@,11) +#define A_DIM NCURSES_BITS(@cf_cv_1UL@,12) +#define A_BOLD NCURSES_BITS(@cf_cv_1UL@,13) +#define A_ALTCHARSET NCURSES_BITS(@cf_cv_1UL@,14) +#define A_INVIS NCURSES_BITS(@cf_cv_1UL@,15) + +/* Tradeoff on 32-bit machines ('protect' vs widec). The others (e.g., left + * highlight are not implemented in any terminal descriptions, anyway. + */ +#if ((16 + @cf_cv_widec_shift@) < @cf_cv_shift_limit@) +#define A_PROTECT NCURSES_BITS(@cf_cv_1UL@,16) +#define A_HORIZONTAL NCURSES_BITS(@cf_cv_1UL@,17) +#define A_LEFT NCURSES_BITS(@cf_cv_1UL@,18) +#define A_LOW NCURSES_BITS(@cf_cv_1UL@,19) +#define A_RIGHT NCURSES_BITS(@cf_cv_1UL@,20) +#define A_TOP NCURSES_BITS(@cf_cv_1UL@,21) +#define A_VERTICAL NCURSES_BITS(@cf_cv_1UL@,22) +#else +#define A_PROTECT 0L +#define A_HORIZONTAL 0L +#define A_LEFT 0L +#define A_LOW 0L +#define A_RIGHT 0L +#define A_TOP 0L +#define A_VERTICAL 0L +#endif + +#define COLOR_PAIR(n) NCURSES_BITS(n, 0) +#define PAIR_NUMBER(a) (((a) & A_COLOR) >> @cf_cv_widec_shift@) /* * pseudo functions @@ -854,27 +893,28 @@ extern int wvline_set(WINDOW *, const cchar_t *, int); /* missing */ #define nocrmode() nocbreak() #define gettmode() -#define getyx(win,y,x) (y = (win)->_cury, x = (win)->_curx) -#define getbegyx(win,y,x) (y = (win)->_begy, x = (win)->_begx) -#define getmaxyx(win,y,x) (y = (win)->_maxy + 1, x = (win)->_maxx + 1) -#define getparyx(win,y,x) (y = (win)->_pary, x = (win)->_parx) +#define getyx(win,y,x) (y = (win)?(win)->_cury:ERR, x = (win)?(win)->_curx:ERR) +#define getbegyx(win,y,x) (y = (win)?(win)->_begy:ERR, x = (win)?(win)->_begx:ERR) +#define getmaxyx(win,y,x) (y = (win)?((win)->_maxy + 1):ERR, x = (win)?((win)->_maxx + 1):ERR) +#define getparyx(win,y,x) (y = (win)?(win)->_pary:ERR, x = (win)?(win)->_parx:ERR) #define getsyx(y,x) getyx(stdscr, y, x) #define setsyx(y,x) (stdscr->_cury = y, stdscr->_curx = x) -#define wbkgdset(win, ch) \ - (((win)->_attrs = (((win)->_attrs & ~((win)->_bkgd & A_ATTRIBUTES)) | \ - ((ch) & A_ATTRIBUTES))), \ - ((win)->_bkgd = (ch))) - /* It seems older SYSV curses versions define these */ -#define getattrs(win) ((win)->_attrs) -#define getmaxx(win) ((win)->_maxx + 1) -#define getmaxy(win) ((win)->_maxy + 1) - -#define winch(win) ((win)->_line[(win)->_cury].text[(win)->_curx]) +#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) + +#define winch(win) ((win)?(win)->_line[(win)->_cury].text[(win)->_curx]:0) #define wstandout(win) (wattr_set(win,A_STANDOUT)) #define wstandend(win) (wattr_set(win,A_NORMAL)) -#define wattr_set(win,at) ((win)->_attrs = (at)) +#define wattr_set(win,at) ((win)?((win)->_attrs = (at)):0) #define wattron(win,at) wattr_on(win, at) #define wattroff(win,at) wattr_off(win, at) @@ -882,9 +922,9 @@ extern int wvline_set(WINDOW *, const cchar_t *, int); /* missing */ #define scroll(win) wscrl(win,1) -#define touchwin(win) wtouchln((win), 0, (win)->_maxy + 1, 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, (win)->_maxy + 1, 0) +#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) @@ -1054,6 +1094,10 @@ extern int wvline_set(WINDOW *, const cchar_t *, int); /* missing */ #define mvwinwstr(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : winnwstr(stdscr,c,-1)) #define mvwvline_set(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : wvline_set(win,c,n)) +#define slk_attr_off(a) slk_attroff(a) +#define slk_attr_on(a) slk_attron(a) +#define slk_attr_set(a) slk_attrset(a) +#define vid_attr(a) vidattr(a) #define vline_set(c,n) vhline_set(stdscr,c,n) #define waddwstr(win,wstr,n) waddnwstr(win,wstr,-1) #define wattr_get(win) ((win)->_attrs) @@ -1176,6 +1220,7 @@ extern int wvline_set(WINDOW *, const cchar_t *, int); /* missing */ #define KEY_SUSPEND 0627 /* Suspend */ #define KEY_UNDO 0630 /* Undo */ #define KEY_MOUSE 0631 /* Mouse event has occurred */ +#define KEY_RESIZE 0632 /* Terminal resize event */ #define KEY_MAX 0777 /* Maximum key value */ /* mouse interface */ @@ -1233,7 +1278,7 @@ MEVENT; extern int getmouse(MEVENT *); extern int ungetmouse(MEVENT *); extern mmask_t mousemask(mmask_t, mmask_t *); -extern bool wenclose(WINDOW *, int, int); +extern bool wenclose(const WINDOW *, int, int); extern int mouseinterval(int); /* other non-XSI functions */ @@ -1272,6 +1317,7 @@ extern void trace(const unsigned int); #if defined(TRACE) || defined(NCURSES_TEST) extern int _nc_optimize_enable; /* enable optimizations */ +extern const char *_nc_visbuf(const char *); #define OPTIMIZE_MVCUR 0x01 /* cursor movement optimization */ #define OPTIMIZE_HASHMAP 0x02 /* diff hashing to detect scrolls */ #define OPTIMIZE_SCROLL 0x04 /* scroll optimization */