X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mutt_curses.h;h=1141e254e6b83e3384091d985bc5a21a983d33cf;hp=1575bbf419a7517881c302346136c13715ff101e;hb=99a84f88c0acee0c46e9525684b5187d4192168b;hpb=df70e07e24add1869bcc9b7af2277d9d0c09a281 diff --git a/mutt_curses.h b/mutt_curses.h index 1575bbf..1141e25 100644 --- a/mutt_curses.h +++ b/mutt_curses.h @@ -1,21 +1,14 @@ /* + * Copyright notice from original mutt: * Copyright (C) 1996-2000 Michael R. Elkins * Copyright (C) 2004 g10 Code GmbH - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * + * This file is part of mutt-ng, see http://www.muttng.org/. + * It's licensed under the GNU General Public License, + * please see the file GPL in the top level source directory. */ +#ifndef _MUTT_CURSES_H +#define _MUTT_CURSES_H #ifdef USE_SLANG_CURSES @@ -39,13 +32,13 @@ #ifdef HAVE_NCURSESW_NCURSES_H #include -#else -#ifdef HAVE_NCURSES_H +#elif HAVE_NCURSES_NCURSES_H +#include +#elif HAVE_NCURSES_H #include #else #include #endif -#endif #define M_ENTER_C '\n' #define M_ENTER_S "\n" @@ -59,7 +52,7 @@ #undef lines #endif /* lines */ -#define CLEARLINE_WIN(x) move(x,SidebarWidth), clrtoeol() +#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 BEEP() do { if (option (OPTBEEP)) beep(); } while (0) @@ -138,6 +131,15 @@ typedef struct color_line { struct color_line *next; } COLOR_LINE; +typedef struct { + const char* msg; + long pos; + long size; + char sizestr[SHORT_STRING]; +} progress_t; + +void mutt_progress_bar (progress_t* progress, long pos); + extern int *ColorQuote; extern int ColorQuoteUsed; extern int ColorDefs[]; @@ -176,3 +178,5 @@ extern int wclear (); extern int waddstr (); extern int wclrtoeol (); #endif + +#endif /* !_MUTT_CURSES_H */