Do not use implicit ncurses functions, now we can grep for 'stdscr' to find them.
[apps/madmutt.git] / lib-ui / curses.h
index c639c86..f438395 100644 (file)
 #undef lines
 #endif /* lines */
 
 #undef lines
 #endif /* lines */
 
-#define CLEARLINE_WIN(x) move(x,(option(OPTMBOXPANE)?SidebarWidth:0)), clrtoeol()
-#define CLEARLINE(x) move(x,0), clrtoeol()
-#define CENTERLINE(x,y) move(y, (COLS-strlen(x))/2), addstr(x)
+#define CLEARLINE_WIN(x) wmove(stdscr, x,(option(OPTMBOXPANE)?SidebarWidth:0)), wclrtoeol(stdscr)
+#define CLEARLINE(x) wmove(stdscr, x,0), wclrtoeol(stdscr)
+#define CENTERLINE(x,y) wmove(stdscr, y, (COLS-strlen(x))/2), waddstr(stdscr, x)
 #define BEEP() do { if (mod_core.beep) beep(); } while (0)
 
 #define BEEP() do { if (mod_core.beep) beep(); } while (0)
 
-#define BKGDSET(x)  bkgdset(ColorDefs[x] | ' ')
+#define BKGDSET(x)  wbkgdset(stdscr, ColorDefs[x] | ' ')
 
 void mutt_curs_set (int);
 #define PAGELEN (LINES-3)
 
 void mutt_curs_set (int);
 #define PAGELEN (LINES-3)
@@ -163,8 +163,8 @@ void _mutt_make_string (char *, ssize_t, const char *, CONTEXT *,
                         HEADER *, format_flag);
 
 
                         HEADER *, format_flag);
 
 
-#define SETCOLOR(X) attrset(ColorDefs[X])
-#define ADDCOLOR(X) attron(ColorDefs[X])
+#define SETCOLOR(X) wattrset(stdscr, ColorDefs[X])
+#define ADDCOLOR(X) wattron(stdscr, ColorDefs[X])
 
 #define MAYBE_REDRAW(x) if (option (OPTNEEDREDRAW)) { unset_option (OPTNEEDREDRAW); x = REDRAW_FULL; }
 
 
 #define MAYBE_REDRAW(x) if (option (OPTNEEDREDRAW)) { unset_option (OPTNEEDREDRAW); x = REDRAW_FULL; }