* wrs(5/28/93) -- modified to be consistent (perform identically) with either
* PDCurses or under Unix System V, R4
*
- * $Id: testcurs.c,v 1.47 2013/02/16 20:29:04 tom Exp $
+ * $Id: testcurs.c,v 1.49 2014/07/27 00:25:14 tom Exp $
*/
#include <test.priv.h>
#ifdef A_COLOR
if (has_colors()) {
init_pair(2, COLOR_WHITE, COLOR_RED);
- wbkgd(subWin, COLOR_PAIR(2) | A_BOLD);
+ wbkgd(subWin, (chtype) COLOR_PAIR(2) | A_BOLD);
} else
wbkgd(subWin, A_BOLD);
#else
else
wprintw(win, "Key Pressed: %s", unctrl(UChar(c)));
#ifdef KEY_MOUSE
+ if (c == KEY_MOUSE) {
+#if defined(NCURSES_MOUSE_VERSION)
#define ButtonChanged(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, 037))
#define ButtonPressed(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_PRESSED))
#define ButtonDouble(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, NCURSES_DOUBLE_CLICKED))
#define ButtonTriple(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, NCURSES_TRIPLE_CLICKED))
#define ButtonRelease(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_RELEASED))
- if (c == KEY_MOUSE) {
MEVENT event;
int button = 0;
else
wprintw(win, "released: ");
wprintw(win, " Position: Y: %d X: %d", event.y, event.x);
-#if defined(NCURSES_MOUSE_VERSION)
#elif defined(PDCURSES)
int button = 0;
request_mouse_pos();
else
wprintw(win, "released: ");
wprintw(win, " Position: Y: %d X: %d", MOUSE_Y_POS, MOUSE_X_POS);
-#endif /* PDCURSES */
+#endif /* NCURSES_VERSION vs PDCURSES */
}
#endif /* KEY_MOUSE */
wrefresh(win);