NeoMutt  2022-04-29-215-gc12b98
Teaching an old dog new tricks
DOXYGEN
mview.h
Go to the documentation of this file.
1
23#ifndef MUTT_MVIEW_H
24#define MUTT_MVIEW_H
25
26#include <stdbool.h>
27#include <sys/types.h>
28
29struct Email;
30struct EmailList;
31struct Mailbox;
32struct NotifyCallback;
33
38{
39 off_t vsize;
40 char *pattern;
41 struct PatternList *limit_pattern;
44
45 struct Menu *menu;
46
47 bool collapsed : 1;
48
49 struct Mailbox *mailbox;
50 struct Notify *notify;
51};
52
59{
63};
64
69{
70 struct MailboxView *mv;
71};
72
73void mview_free (struct MailboxView **ptr);
75struct MailboxView *mview_new (struct Mailbox *m);
76void mview_update (struct MailboxView *mv);
77bool mview_has_limit (const struct MailboxView *mv);
78struct Mailbox* mview_mailbox (struct MailboxView *mv);
79
80bool message_is_tagged(struct Email *e);
81struct Email *mutt_get_virt_email(struct Mailbox *m, int vnum);
82
83int el_add_tagged(struct EmailList *el, struct MailboxView *mv, struct Email *e, bool use_tagged);
84
85#endif /* MUTT_MVIEW_H */
int mview_mailbox_observer(struct NotifyCallback *nc)
Notification that a Mailbox has changed - Implements observer_t -.
Definition: mview.c:313
int el_add_tagged(struct EmailList *el, struct MailboxView *mv, struct Email *e, bool use_tagged)
Get a list of the tagged Emails.
Definition: mview.c:366
struct Email * mutt_get_virt_email(struct Mailbox *m, int vnum)
Get a virtual Email.
Definition: mview.c:414
NotifyMview
Types of MailboxView Event.
Definition: mview.h:59
@ NT_MVIEW_DELETE
The Mview is about to be destroyed.
Definition: mview.h:61
@ NT_MVIEW_CHANGE
The Mview has changed.
Definition: mview.h:62
@ NT_MVIEW_ADD
The Mview has been opened.
Definition: mview.h:60
struct Mailbox * mview_mailbox(struct MailboxView *mv)
Wrapper to get the mailbox in a MailboxView, or NULL.
Definition: mview.c:446
void mview_free(struct MailboxView **ptr)
Free a MailboxView.
Definition: mview.c:49
bool message_is_tagged(struct Email *e)
Is a message in the index tagged (and within limit)
Definition: mview.c:352
struct MailboxView * mview_new(struct Mailbox *m)
Create a new MailboxView.
Definition: mview.c:77
void mview_update(struct MailboxView *mv)
Update the MailboxView's message counts.
Definition: mview.c:125
bool mview_has_limit(const struct MailboxView *mv)
Is a limit active?
Definition: mview.c:435
The envelope/body of an email.
Definition: email.h:37
int vnum
Virtual message number.
Definition: email.h:114
An Event that happened to an MailboxView.
Definition: mview.h:69
struct MailboxView * mv
The MailboxView this Event relates to.
Definition: mview.h:70
The "current" mailbox.
Definition: mview.h:38
bool collapsed
Are all threads collapsed?
Definition: mview.h:47
struct Menu * menu
Needed for pattern compilation.
Definition: mview.h:45
off_t vsize
Size (in bytes) of the messages shown.
Definition: mview.h:39
struct Notify * notify
Notifications: NotifyMview, EventMview.
Definition: mview.h:50
struct PatternList * limit_pattern
Compiled limit pattern.
Definition: mview.h:41
struct ThreadsContext * threads
Threads context.
Definition: mview.h:42
int msg_in_pager
Message currently shown in the pager.
Definition: mview.h:43
struct Mailbox * mailbox
Current Mailbox.
Definition: mview.h:49
char * pattern
Limit pattern string.
Definition: mview.h:40
A mailbox.
Definition: mailbox.h:79
Definition: lib.h:69
Data passed to a notification function.
Definition: observer.h:34
Notification API.
Definition: notify.c:51
The "current" threading state.
Definition: mutt_thread.c:50