X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=include%2Fcurses.tail;h=aef7c378d5d53972fd098665719fd64569372998;hp=66388e395dee51ad46c4001d919213fd800610ef;hb=8f527f87c0b979d9c2598ef5c3394463af288468;hpb=55ccd2b959766810cf7db8d1c4462f338ce0afc8 diff --git a/include/curses.tail b/include/curses.tail index 66388e39..aef7c378 100644 --- a/include/curses.tail +++ b/include/curses.tail @@ -1,4 +1,9 @@ -/* $Id: curses.tail,v 1.12 2005/03/27 00:09:51 tom Exp $ */ +/* $Id: curses.tail,v 1.16 2008/07/05 20:20:38 tom Exp $ */ +/* + * vile:cmode: + * This file is part of ncurses, designed to be appended after curses.h.in + * (see that file for the relevant copyright). + */ /* mouse interface */ @@ -74,12 +79,12 @@ #define ALL_MOUSE_EVENTS (REPORT_MOUSE_POSITION - 1) /* macros to extract single event-bits from masks */ -#define BUTTON_RELEASE(e, x) ((e) & (001 << (6 * ((x) - 1)))) -#define BUTTON_PRESS(e, x) ((e) & (002 << (6 * ((x) - 1)))) -#define BUTTON_CLICK(e, x) ((e) & (004 << (6 * ((x) - 1)))) -#define BUTTON_DOUBLE_CLICK(e, x) ((e) & (010 << (6 * ((x) - 1)))) -#define BUTTON_TRIPLE_CLICK(e, x) ((e) & (020 << (6 * ((x) - 1)))) -#define BUTTON_RESERVED_EVENT(e, x) ((e) & (040 << (6 * ((x) - 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 { @@ -148,10 +153,6 @@ extern NCURSES_EXPORT(void) trace (const unsigned int); #if defined(TRACE) || defined(NCURSES_TEST) extern NCURSES_EXPORT_VAR(int) _nc_optimize_enable; /* enable optimizations */ -#ifdef _XOPEN_SOURCE_EXTENDED -extern NCURSES_EXPORT(const char *) _nc_viswbuf(const wchar_t *); -extern NCURSES_EXPORT(const char *) _nc_viswibuf(const wint_t *); -#endif extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *); #define OPTIMIZE_MVCUR 0x01 /* cursor movement optimization */ #define OPTIMIZE_HASHMAP 0x02 /* diff hashing to detect scrolls */ @@ -161,6 +162,8 @@ extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *); #ifdef __cplusplus +#ifndef NCURSES_NOMACROS + /* these names conflict with STL */ #undef box #undef clear @@ -168,6 +171,8 @@ extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *); #undef move #undef refresh +#endif /* NCURSES_NOMACROS */ + } #endif