NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
DOXYGEN
shared_data.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_INDEX_SHARED_DATA_H
24 #define MUTT_INDEX_SHARED_DATA_H
25 
26 #include <stdbool.h>
27 #include <stdio.h>
28 
29 struct Context;
30 struct Email;
31 struct MuttWindow;
32 
37 {
38  struct ConfigSubset *sub;
39  struct Context *ctx;
40  struct Account *account;
41  struct Mailbox *mailbox;
42  struct Email *email;
43  size_t email_seq;
44  struct Notify *notify;
45 };
46 
47 void index_shared_data_free(struct MuttWindow *win, void **ptr);
49 
50 bool index_shared_data_is_cur_email(const struct IndexSharedData *shared, const struct Email *e);
51 void index_shared_data_set_context (struct IndexSharedData *shared, struct Context *ctx);
52 void index_shared_data_set_email (struct IndexSharedData *shared, struct Email *e);
53 
54 #endif /* MUTT_INDEX_SHARED_DATA_H */
The "current" mailbox.
Definition: context.h:37
size_t email_seq
Sequence number of the current email.
Definition: shared_data.h:43
The envelope/body of an email.
Definition: email.h:37
struct Email * email
Currently selected Email.
Definition: shared_data.h:42
struct ConfigSubset * sub
Config set to use.
Definition: shared_data.h:38
A group of associated Mailboxes.
Definition: account.h:36
Data shared between Index, Pager and Sidebar.
Definition: shared_data.h:36
struct IndexSharedData * index_shared_data_new(void)
Create new Index Data.
Definition: shared_data.c:300
void index_shared_data_set_email(struct IndexSharedData *shared, struct Email *e)
Set the current Email for the Index and friends.
Definition: shared_data.c:228
struct Notify * notify
Notifications: NotifyIndex, IndexSharedData.
Definition: shared_data.h:44
bool index_shared_data_is_cur_email(const struct IndexSharedData *shared, const struct Email *e)
Check whether an email is the currently selected Email.
Definition: shared_data.c:257
struct Context * ctx
Current Mailbox view.
Definition: shared_data.h:39
A set of inherited config items.
Definition: subset.h:46
A mailbox.
Definition: mailbox.h:81
Notification API.
Definition: notify.c:50
void index_shared_data_free(struct MuttWindow *win, void **ptr)
Free Index Data.
Definition: shared_data.c:273
struct Account * account
Current Account.
Definition: shared_data.h:40
struct Mailbox * mailbox
Current Mailbox.
Definition: shared_data.h:41
void index_shared_data_set_context(struct IndexSharedData *shared, struct Context *ctx)
Set the Context for the Index and friends.
Definition: shared_data.c:154