NeoMutt  2021-02-05-89-gabe350
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 Mailbox;
32 struct NotifyCallback;
33 struct ThreadsContext;
34 
38 struct Context
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 {
63 };
64 
69 {
70  struct Context *context;
71 };
72 
73 void ctx_free (struct Context **ptr);
74 int ctx_mailbox_observer(struct NotifyCallback *nc);
75 struct Context *ctx_new (struct Mailbox *m);
76 void ctx_update (struct Context *ctx);
77 bool ctx_has_limit (const struct Context *ctx);
78 struct Mailbox* ctx_mailbox (struct Context *ctx);
79 
80 bool message_is_tagged (struct Context *ctx, struct Email *e);
81 struct Email *mutt_get_virt_email(struct Mailbox *m, int vnum);
82 
83 int el_add_tagged (struct EmailList *el, struct Context *ctx, struct Email *e, bool use_tagged);
84 
85 #endif /* MUTT_CONTEXT_H */
NotifyContext
NotifyContext
Types of Context Event.
Definition: context.h:59
ctx_free
void ctx_free(struct Context **ptr)
Free a Context.
Definition: context.c:50
NotifyCallback
Data passed to a notification function.
Definition: observer.h:39
ThreadsContext
The "current" threading state.
Definition: mutt_thread.c:61
Mailbox
A mailbox.
Definition: mailbox.h:81
ctx_has_limit
bool ctx_has_limit(const struct Context *ctx)
Is a limit active?
Definition: context.c:418
EventContext
An Event that happened to an Context.
Definition: context.h:68
ctx_mailbox_observer
int ctx_mailbox_observer(struct NotifyCallback *nc)
Watch for changes affecting the Context - Implements observer_t.
Definition: context.c:298
Context::vsize
off_t vsize
Size (in bytes) of the messages shown.
Definition: context.h:40
Context::notify
struct Notify * notify
Notifications handler.
Definition: context.h:51
ctx_new
struct Context * ctx_new(struct Mailbox *m)
Create a new Context.
Definition: context.c:76
Context
The "current" mailbox.
Definition: context.h:38
mutt_get_virt_email
struct Email * mutt_get_virt_email(struct Mailbox *m, int vnum)
Get a virtual Email.
Definition: context.c:397
el_add_tagged
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:349
Context::msg_in_pager
int msg_in_pager
Message currently shown in the pager.
Definition: context.h:44
Context::threads
struct ThreadsContext * threads
Threads context.
Definition: context.h:43
Context::mailbox
struct Mailbox * mailbox
Definition: context.h:50
NT_CONTEXT_OPEN
@ NT_CONTEXT_OPEN
The Context has been opened.
Definition: context.h:61
Context::collapsed
bool collapsed
Are all threads collapsed?
Definition: context.h:48
ctx_mailbox
struct Mailbox * ctx_mailbox(struct Context *ctx)
wrapper to get the mailbox in a Context, or NULL
Definition: context.c:429
Context::limit_pattern
struct PatternList * limit_pattern
Compiled limit pattern.
Definition: context.h:42
Notify
Notification API.
Definition: notify.c:39
message_is_tagged
bool message_is_tagged(struct Context *ctx, struct Email *e)
Is a message in the index tagged (and within limit)
Definition: context.c:335
ctx_update
void ctx_update(struct Context *ctx)
Update the Context's message counts.
Definition: context.c:112
Context::menu
struct Menu * menu
Needed for pattern compilation.
Definition: context.h:46
Email::vnum
int vnum
Virtual message number.
Definition: email.h:88
NT_CONTEXT_CLOSE
@ NT_CONTEXT_CLOSE
The Context is about to be destroyed.
Definition: context.h:62
Context::pattern
char * pattern
Limit pattern string.
Definition: context.h:41
EventContext::context
struct Context * context
The Context this Event relates to.
Definition: context.h:70
Email
The envelope/body of an email.
Definition: email.h:37
Menu
GUI selectable list of items.
Definition: mutt_menu.h:52