NeoMutt  2021-02-05-329-g9e03b7
Teaching an old dog new tricks
DOXYGEN
lib.h
Go to the documentation of this file.
1 
37 #ifndef MUTT_INDEX_LIB_H
38 #define MUTT_INDEX_LIB_H
39 
40 #include <stdbool.h>
41 #include <stdint.h>
42 #include <stdio.h>
43 #include "core/lib.h"
44 #include "shared_data.h" // IWYU pragma: keep
45 
46 struct Context;
47 struct Email;
48 struct Menu;
49 struct MuttWindow;
50 
51 typedef uint8_t NotifyIndex;
52 #define NT_INDEX_NO_FLAGS 0
53 #define NT_INDEX_CONFIG (1 << 0)
54 #define NT_INDEX_CONTEXT (1 << 1)
55 #define NT_INDEX_ACCOUNT (1 << 2)
56 #define NT_INDEX_MAILBOX (1 << 3)
57 #define NT_INDEX_EMAIL (1 << 4)
58 #define NT_INDEX_CLOSING (1 << 5)
59 #define NT_INDEX_SUBSET (1 << 6)
60 
61 int index_color(struct Menu *menu, int line);
62 void index_make_entry(struct Menu *menu, char *buf, size_t buflen, int line);
63 void mutt_draw_statusline(int cols, const char *buf, size_t buflen);
64 struct Mailbox *mutt_index_menu(struct MuttWindow *dlg, struct Mailbox *m);
65 void mutt_set_header_color(struct Mailbox *m, struct Email *e);
66 void mutt_update_index(struct Menu *menu, struct Context *ctx, enum MxStatus check, int oldcount, struct IndexSharedData *shared);
67 struct MuttWindow *index_pager_init(void);
68 void index_pager_shutdown(struct MuttWindow *dlg);
69 
70 #endif /* MUTT_INDEX_LIB_H */
The "current" mailbox.
Definition: context.h:37
The envelope/body of an email.
Definition: email.h:37
int index_color(struct Menu *menu, int line)
Calculate the colour for a line of the index - Implements Menu::color()
Definition: index.c:934
GUI selectable list of items.
Definition: lib.h:56
void mutt_draw_statusline(int cols, const char *buf, size_t buflen)
Draw a highlighted status bar.
Definition: index.c:964
void index_make_entry(struct Menu *menu, char *buf, size_t buflen, int line)
Format a menu item for the index list - Implements Menu::make_entry()
Definition: index.c:853
struct MuttWindow * index_pager_init(void)
Allocate the Windows for the Index/Pager.
Definition: index.c:4260
uint8_t NotifyIndex
Flags, e.g. NT_INDEX_ACCOUNT.
Definition: lib.h:49
Data shared between Index, Pager and Sidebar.
Definition: shared_data.h:36
A division of the screen.
Definition: mutt_window.h:117
void mutt_update_index(struct Menu *menu, struct Context *ctx, enum MxStatus check, int oldcount, struct IndexSharedData *shared)
Update the index.
Definition: index.c:630
Convenience wrapper for the core headers.
struct Mailbox * mutt_index_menu(struct MuttWindow *dlg, struct Mailbox *m)
Display a list of emails.
Definition: index.c:1155
A mailbox.
Definition: mailbox.h:81
void index_pager_shutdown(struct MuttWindow *dlg)
Clear up any non-Window parts.
Definition: index.c:4289
Data shared between Index, Pager and Sidebar.
MxStatus
Return values from mbox_check(), mbox_check_stats(), mbox_snc(), and mbox_close() ...
Definition: mxapi.h:75
void mutt_set_header_color(struct Mailbox *m, struct Email *e)
Select a colour for a message.
Definition: index.c:4197