Nico Golde:
[apps/madmutt.git] / pager.h
1 /*
2  * Copyright notice from original mutt:
3  * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
4  *
5  * This file is part of mutt-ng, see http://www.muttng.org/.
6  * It's licensed under the GNU General Public License,
7  * please see the file GPL in the top level source directory.
8  */
9
10 /* dynamic internal flags */
11 #define M_SHOWFLAT      (1<<0)
12 #define M_SHOWCOLOR     (1<<1)
13 #define M_HIDE          (1<<2)
14 #define M_SEARCH        (1<<3)
15 #define M_TYPES         (1<<4)
16 #define M_SHOW          (M_SHOWCOLOR | M_SHOWFLAT)
17
18 /* exported flags for mutt_(do_)?pager */
19 #define M_PAGER_NSKIP           (1<<5)  /* preserve whitespace with smartwrap */
20 #define M_PAGER_MARKER          (1<<6)  /* use markers if option is set */
21 #define M_PAGER_RETWINCH        (1<<7)  /* need reformatting on SIGWINCH */
22 #define M_PAGER_MESSAGE         (M_SHOWCOLOR | M_PAGER_MARKER)
23 #define M_PAGER_ATTACHMENT      (1<<8)
24
25 #define M_DISPLAYFLAGS  (M_SHOW | M_PAGER_NSKIP | M_PAGER_MARKER)
26
27 typedef struct {
28   CONTEXT *ctx;                 /* current mailbox */
29   HEADER *hdr;                  /* current message */
30   BODY *bdy;                    /* current attachment */
31   FILE *fp;                     /* source stream */
32   ATTACHPTR **idx;              /* attachment information */
33   short idxlen;
34 } pager_t;
35
36 int mutt_do_pager (const char *, const char *, int, pager_t *);
37 int mutt_pager (const char *, const char *, int, pager_t *);