NeoMutt  2018-07-16 +2481-68dcde
Teaching an old dog new tricks
DOXYGEN
context.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_CONTEXT_H
24 #define MUTT_CONTEXT_H
25 
26 #include <stdbool.h>
27 #include <sys/types.h>
28 
29 struct Email;
30 struct EmailList;
31 struct NotifyCallback;
32 
36 struct Context
37 {
38  off_t vsize;
39  char *pattern;
40  struct PatternList *limit_pattern;
41  struct Email *last_tag;
42  struct MuttThread *tree;
43  struct Hash *thread_hash;
45 
46  struct Menu *menu;
47 
48  bool collapsed : 1;
49 
50  struct Mailbox *mailbox;
51  struct Notify *notify;
52 };
53 
58 {
59  struct Context *context;
60 };
61 
66 {
69 };
70 
71 void ctx_free (struct Context **ptr);
72 int ctx_mailbox_observer(struct NotifyCallback *nc);
73 struct Context *ctx_new (void);
74 void ctx_update (struct Context *ctx);
75 void ctx_update_tables (struct Context *ctx, bool committing);
76 
77 bool message_is_tagged (struct Context *ctx, int index);
78 bool message_is_visible(struct Context *ctx, int index);
79 
80 int el_add_email (struct EmailList *el, struct Email *e);
81 int el_add_tagged (struct EmailList *el, struct Context *ctx, struct Email *e, bool use_tagged);
82 void emaillist_clear(struct EmailList *el);
83 
84 #endif /* MUTT_CONTEXT_H */
The "current" mailbox.
Definition: context.h:36
The envelope/body of an email.
Definition: email.h:39
GUI selectable list of items.
Definition: mutt_menu.h:82
bool message_is_visible(struct Context *ctx, int index)
Is a message in the index within limit.
Definition: context.c:327
Data passed to a notification function.
Definition: observer.h:40
struct MuttThread * tree
Top of thread tree.
Definition: context.h:42
int el_add_email(struct EmailList *el, struct Email *e)
Get a list of the selected Emails.
Definition: context.c:398
A Hash Table.
Definition: hash.h:61
NotifyContext
Types of Context Event.
Definition: context.h:65
int el_add_tagged(struct EmailList *el, struct Context *ctx, struct Email *e, bool use_tagged)
Get a list of the tagged Emails.
Definition: context.c:357
bool message_is_tagged(struct Context *ctx, int index)
Is a message in the index tagged (and within limit)
Definition: context.c:343
int ctx_mailbox_observer(struct NotifyCallback *nc)
Watch for changes affecting the Context - Implements observer_t.
Definition: context.c:285
struct Mailbox * mailbox
Definition: context.h:50
The Context has been opened.
Definition: context.h:67
void emaillist_clear(struct EmailList *el)
Drop a private list of Emails.
Definition: email.c:127
struct Notify * notify
Notifications handler.
Definition: context.h:51
struct Context * context
The Context this Event relates to.
Definition: context.h:59
struct Menu * menu
Needed for pattern compilation.
Definition: context.h:46
struct Context * ctx_new(void)
Create a new Context.
Definition: context.c:70
int msg_not_read_yet
Which msg "new" in pager, -1 if none.
Definition: context.h:44
off_t vsize
Definition: context.h:38
struct Hash * thread_hash
Hash table for threading.
Definition: context.h:43
A mailbox.
Definition: mailbox.h:92
struct PatternList * limit_pattern
Compiled limit pattern.
Definition: context.h:40
Notification API.
Definition: notify.c:40
void ctx_update(struct Context *ctx)
Update the Context&#39;s message counts.
Definition: context.c:102
The Context is about to be destroyed.
Definition: context.h:68
An Email conversation.
Definition: thread.h:34
bool collapsed
Are all threads collapsed?
Definition: context.h:48
An Event that happened to an Context.
Definition: context.h:57
void ctx_free(struct Context **ptr)
Free a Context.
Definition: context.c:48
char * pattern
Limit pattern string.
Definition: context.h:39
void ctx_update_tables(struct Context *ctx, bool committing)
Update a Context structure&#39;s internal tables.
Definition: context.c:191
struct Email * last_tag
Last tagged msg (used to link threads)
Definition: context.h:41