]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - include/curses.tail
ncurses 5.7 - patch 20090411
[ncurses.git] / include / curses.tail
index dd38ed4ea9e9bfb67a38dad2cace3fb39c9442e9..53602afc927befad99085710b12d2a32f4d089f9 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: curses.tail,v 1.15 2007/03/10 17:51:24 tom Exp $ */
+/* $Id: curses.tail,v 1.17 2008/11/23 00:12:12 tom Exp $ */
 /*
  * vile:cmode:
  * This file is part of ncurses, designed to be appended after curses.h.in
 /*
  * vile:cmode:
  * This file is part of ncurses, designed to be appended after curses.h.in
 #define        ALL_MOUSE_EVENTS        (REPORT_MOUSE_POSITION - 1)
 
 /* macros to extract single event-bits from masks */
 #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
 {
 
 typedef struct
 {
@@ -94,6 +94,7 @@ typedef struct
 }
 MEVENT;
 
 }
 MEVENT;
 
+extern NCURSES_EXPORT(bool) has_mouse (void);
 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(int) getmouse (MEVENT *);
 extern NCURSES_EXPORT(int) ungetmouse (MEVENT *);
 extern NCURSES_EXPORT(mmask_t) mousemask (mmask_t, mmask_t *);