NeoMutt  2023-05-17-56-ga67199
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 EmailArray;
31struct Mailbox;
32struct Notify;
33struct NotifyCallback;
34
39{
40 off_t vsize;
41 char *pattern;
42 struct PatternList *limit_pattern;
45
46 struct Menu *menu;
47
48 bool collapsed : 1;
49
50 struct Mailbox *mailbox;
51 struct Notify *notify;
52};
53
60{
64};
65
70{
71 struct MailboxView *mv;
72};
73
74void mview_free (struct MailboxView **ptr);
76struct MailboxView *mview_new (struct Mailbox *m, struct Notify *parent);
77void mview_update (struct MailboxView *mv);
78bool mview_has_limit (const struct MailboxView *mv);
79struct Mailbox * mview_mailbox (struct MailboxView *mv);
80
81bool message_is_tagged(struct Email *e);
82struct Email *mutt_get_virt_email(struct Mailbox *m, int vnum);
83
84int ea_add_tagged(struct EmailArray *ea, struct MailboxView *mv, struct Email *e, bool use_tagged);
85
86bool mutt_limit_current_thread(struct MailboxView *mv, struct Email *e);
87
88#endif /* MUTT_MVIEW_H */
int mview_mailbox_observer(struct NotifyCallback *nc)
Notification that a Mailbox has changed - Implements observer_t -.
Definition: mview.c:314
struct Email * mutt_get_virt_email(struct Mailbox *m, int vnum)
Get a virtual Email.
Definition: mview.c:407
NotifyMview
Types of MailboxView Event.
Definition: mview.h:60
@ NT_MVIEW_DELETE
The Mview is about to be destroyed.
Definition: mview.h:62
@ NT_MVIEW_CHANGE
The Mview has changed.
Definition: mview.h:63
@ NT_MVIEW_ADD
The Mview has been opened.
Definition: mview.h:61
struct Mailbox * mview_mailbox(struct MailboxView *mv)
Wrapper to get the mailbox in a MailboxView, or NULL.
Definition: mview.c:439
bool mutt_limit_current_thread(struct MailboxView *mv, struct Email *e)
Limit the email view to the current thread.
Definition: mview.c:470
void mview_free(struct MailboxView **ptr)
Free a MailboxView.
Definition: mview.c:49
int ea_add_tagged(struct EmailArray *ea, struct MailboxView *mv, struct Email *e, bool use_tagged)
Get an array of the tagged Emails.
Definition: mview.c:367
bool message_is_tagged(struct Email *e)
Is a message in the index tagged (and within limit)
Definition: mview.c:353
void mview_update(struct MailboxView *mv)
Update the MailboxView's message counts.
Definition: mview.c:126
bool mview_has_limit(const struct MailboxView *mv)
Is a limit active?
Definition: mview.c:428
struct MailboxView * mview_new(struct Mailbox *m, struct Notify *parent)
Create a new MailboxView.
Definition: mview.c:78
The envelope/body of an email.
Definition: email.h:37
int vnum
Virtual message number.
Definition: email.h:113
An Event that happened to an MailboxView.
Definition: mview.h:70
struct MailboxView * mv
The MailboxView this Event relates to.
Definition: mview.h:71
View of a Mailbox.
Definition: mview.h:39
bool collapsed
Are all threads collapsed?
Definition: mview.h:48
struct Menu * menu
Needed for pattern compilation.
Definition: mview.h:46
off_t vsize
Size (in bytes) of the messages shown.
Definition: mview.h:40
struct Notify * notify
Notifications: NotifyMview, EventMview.
Definition: mview.h:51
struct PatternList * limit_pattern
Compiled limit pattern.
Definition: mview.h:42
struct ThreadsContext * threads
Threads context.
Definition: mview.h:43
int msg_in_pager
Message currently shown in the pager.
Definition: mview.h:44
struct Mailbox * mailbox
Current Mailbox.
Definition: mview.h:50
char * pattern
Limit pattern string.
Definition: mview.h:41
A mailbox.
Definition: mailbox.h:79
Definition: lib.h:70
Data passed to a notification function.
Definition: observer.h:34
Notification API.
Definition: notify.c:51
The "current" threading state.
Definition: mutt_thread.h:41