NeoMutt  2020-06-26-250-g349c94
Teaching an old dog new tricks
DOXYGEN
pager.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_PAGER_H
24 #define MUTT_PAGER_H
25 
26 #include <stdbool.h>
27 #include <stdint.h>
28 #include <stdio.h>
29 
30 /* These Config Variables are only used in pager.c */
31 extern bool C_AllowAnsi;
32 extern bool C_HeaderColorPartial;
33 extern short C_PagerContext;
34 extern short C_PagerIndexLines;
35 extern bool C_PagerStop;
36 extern short C_SearchContext;
37 extern short C_SkipQuotedOffset;
38 extern bool C_SmartWrap;
39 extern struct Regex *C_Smileys;
40 extern bool C_Tilde;
41 
42 typedef uint16_t PagerFlags;
43 #define MUTT_PAGER_NO_FLAGS 0
44 #define MUTT_SHOWFLAT (1 << 0)
45 #define MUTT_SHOWCOLOR (1 << 1)
46 #define MUTT_HIDE (1 << 2)
47 #define MUTT_SEARCH (1 << 3)
48 #define MUTT_TYPES (1 << 4)
49 #define MUTT_SHOW (MUTT_SHOWCOLOR | MUTT_SHOWFLAT)
50 
51 /* exported flags for mutt_(do_)?pager */
52 #define MUTT_PAGER_NSKIP (1 << 5)
53 #define MUTT_PAGER_MARKER (1 << 6)
54 #define MUTT_PAGER_RETWINCH (1 << 7)
55 #define MUTT_PAGER_ATTACHMENT (1 << 8)
56 #define MUTT_PAGER_NOWRAP (1 << 9)
57 #define MUTT_PAGER_LOGS (1 << 10)
58 #define MUTT_PAGER_MESSAGE (MUTT_SHOWCOLOR | MUTT_PAGER_MARKER)
59 
60 #define MUTT_DISPLAYFLAGS (MUTT_SHOW | MUTT_PAGER_NSKIP | MUTT_PAGER_MARKER | MUTT_PAGER_LOGS)
61 
65 struct Pager
66 {
67  struct Context *ctx;
68  struct Email *email;
69  struct Body *body;
70  FILE *fp;
71  struct AttachCtx *actx;
72 
77 };
78 
79 int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct Pager *extra);
80 void mutt_buffer_strip_formatting(struct Buffer *dest, const char *src, bool strip_markers);
81 
82 void mutt_clear_pager_position(void);
83 
84 #endif /* MUTT_PAGER_H */
int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct Pager *extra)
Display a file, or help, in a window.
Definition: pager.c:2250
The "current" mailbox.
Definition: context.h:37
FILE * fp
Source stream.
Definition: pager.h:70
struct MuttWindow * win_index
Definition: pager.h:74
bool C_PagerStop
Config: Don&#39;t automatically open the next message when at the end of a message.
Definition: pager.c:88
The envelope/body of an email.
Definition: email.h:37
short C_PagerIndexLines
Config: Number of index lines to display above the pager.
Definition: pager.c:87
String manipulation buffer.
Definition: buffer.h:33
short C_SkipQuotedOffset
Config: Lines of context to show when skipping quoted text.
Definition: pager.c:90
bool C_Tilde
Config: Character to pad blank lines in the pager.
Definition: pager.c:93
struct Body * body
Current attachment.
Definition: pager.h:69
A division of the screen.
Definition: mutt_window.h:115
An email being displayed.
Definition: pager.h:65
The body of an email.
Definition: body.h:34
bool C_AllowAnsi
Config: Allow ANSI colour codes in rich text messages.
Definition: pager.c:84
struct MuttWindow * win_pager
Definition: pager.h:76
struct Context * ctx
Current mailbox.
Definition: pager.h:67
bool C_HeaderColorPartial
Config: Only colour the part of the header matching the regex.
Definition: pager.c:85
struct AttachCtx * actx
Attachment information.
Definition: pager.h:71
uint16_t PagerFlags
Flags for mutt_pager(), e.g. MUTT_SHOWFLAT.
Definition: pager.h:42
struct Regex * C_Smileys
Config: Regex to match smileys to prevent mistakes when quoting text.
Definition: pager.c:92
bool C_SmartWrap
Config: Wrap text at word boundaries.
Definition: pager.c:91
short C_SearchContext
Config: Context to display around search matches.
Definition: pager.c:89
struct Email * email
Current message.
Definition: pager.h:68
Cached regular expression.
Definition: regex3.h:88
struct MuttWindow * win_ibar
Definition: pager.h:73
short C_PagerContext
Config: Number of lines of overlap when changing pages in the pager.
Definition: pager.c:86
A set of attachments.
Definition: attach.h:49
void mutt_buffer_strip_formatting(struct Buffer *dest, const char *src, bool strip_markers)
Removes ANSI and backspace formatting.
Definition: pager.c:1384
void mutt_clear_pager_position(void)
Reset the pager&#39;s viewing position.
Definition: pager.c:1975
struct MuttWindow * win_pbar
Definition: pager.h:75