X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-ui%2Fcurses.h;h=e8c6055054a8d2c0cb4ed21c2ecfae4af0d44e9b;hp=39bfad09ba23a18e5fae4fbf4ab3e26602eb5ff6;hb=f435868132e200bfa71ac155f037cf64bf5414ba;hpb=84bc6d1930165b21919541b3b24294a9d99c3541 diff --git a/lib-ui/curses.h b/lib-ui/curses.h index 39bfad0..e8c6055 100644 --- a/lib-ui/curses.h +++ b/lib-ui/curses.h @@ -10,19 +10,8 @@ #ifndef _MUTT_CURSES_H #define _MUTT_CURSES_H -#include #include "mutt.h" -#if defined(HAVE_NCURSESW_NCURSES_H) -#include -#elif defined(HAVE_NCURSES_NCURSES_H) -#include -#elif defined(HAVE_NCURSES_H) -#include -#else -#include -#endif - /* AIX defines ``lines'' in , but it's used as a var name in * various places in Mutt */ @@ -30,26 +19,14 @@ #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) -#if !defined(HAVE_CURS_SET) -#define curs_set(x) -#endif - -#if defined(HAVE_BKGDSET) -#define BKGDSET(x) bkgdset (ColorDefs[x] | ' ') -#else -#define BKGDSET(x) -#endif +#define BKGDSET(x) wbkgdset(stdscr, ColorDefs[x] | ' ') -#if defined(HAVE_CURS_SET) void mutt_curs_set (int); -#else -#define mutt_curs_set(x) -#endif #define PAGELEN (LINES-3) #define ctrl(c) ((c)-'@') @@ -62,6 +39,9 @@ void mutt_curs_set (int); event_t mutt_getch (void); +void curses_initialize(void); +void curses_install(void); + void mutt_endwin (const char *); void mutt_flushinp (void); void mutt_refresh (void); @@ -139,6 +119,7 @@ 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); int mutt_complete (char *, ssize_t); #define mutt_enter_fname(A,B,C,D,E) _mutt_enter_fname(A,B,C,D,E,0,NULL,NULL) int _mutt_enter_fname (const char *, char *, ssize_t, int *, int, int, @@ -167,7 +148,6 @@ extern COLOR_LINE *ColorHdrList; extern COLOR_LINE *ColorBodyList; extern COLOR_LINE *ColorIndexList; -void ci_init_color (void); void ci_start_color (void); #define mutt_make_string(A,B,C,D,E) _mutt_make_string(A,B,C,D,E,0) @@ -175,8 +155,8 @@ void _mutt_make_string (char *, ssize_t, const char *, CONTEXT *, 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; }