Move the rest of mutt "things" into a window as well.
[apps/madmutt.git] / lib-ui / curses.h
index 9f7f272..5029316 100644 (file)
 #undef lines
 #endif /* lines */
 
-#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 CLEARLINE(W, x) wmove(W, x,0), wclrtoeol(W)
 #define BEEP() do { if (mod_core.beep) beep(); } while (0)
 
-#define BKGDSET(x)  wbkgdset(stdscr, ColorDefs[x] | ' ')
+#define BKGDSET(W, x)   wbkgdset(W, ColorDefs[x] | ' ')
+#define SETCOLOR(W, X)  wattrset(W, ColorDefs[X])
+#define ADDCOLOR(W, X)  wattron(W, ColorDefs[X])
 
 void mutt_curs_set (int);
-#define PAGELEN (LINES-3)
 
 #define ctrl(c) ((c)-'@')
 
@@ -38,6 +37,11 @@ void mutt_curs_set (int);
 #endif
 
 event_t mutt_getch (void);
+#ifndef waddnwstr
+int waddwch(WINDOW *win, wchar_t w);
+#else
+#define waddwch(win, w)  waddnwstr(win, &(w), 1)
+#endif
 
 void curses_initialize(void);
 void curses_install(void);
@@ -104,7 +108,7 @@ void mutt_format_string (char *, ssize_t, int, int, int, char, const char *,
 void mutt_format_s (char *, ssize_t, const char *, const char *);
 void mutt_format_s_tree (char *, ssize_t, const char *, const char *);
 void mutt_free_color (int fg, int bg);
-void mutt_paddstr (int, const char *);
+void mutt_paddstr(WINDOW *, int, const char *);
 #define mutt_perror(a) _mutt_perror (a, __FILE__, __LINE__)
 void _mutt_perror (const char*, const char*,int);
 void mutt_query_exit (void);
@@ -112,7 +116,6 @@ void mutt_query_menu (char *, ssize_t);
 void mutt_show_error (void);
 ssize_t mutt_pretty_size(char *s, ssize_t len, ssize_t n);
 
-int mutt_addwch (wchar_t);
 int mutt_alloc_color (int fg, int bg);
 int mutt_any_key_to_continue (const char *);
 void mutt_what_key (void);
@@ -150,13 +153,6 @@ void ci_start_color (void);
 void _mutt_make_string (char *, ssize_t, const char *, CONTEXT *,
                         HEADER *, format_flag);
 
-
-#define WSETCOLOR(w, X) wattrset(w, 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 SW              (option(OPTMBOXPANE)?SidebarWidth:0)
-
 #endif /* !_MUTT_CURSES_H */