NeoMutt  2024-04-25-76-g20fe7b
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
neomutt.h
Go to the documentation of this file.
1
23#ifndef MUTT_CORE_NEOMUTT_H
24#define MUTT_CORE_NEOMUTT_H
25
26#include <locale.h>
27#include <stdbool.h>
28#include <stddef.h>
29#include <sys/types.h>
30#include "account.h"
31#include "mailbox.h"
32#ifdef __APPLE__
33#include <xlocale.h>
34#endif
35
36struct ConfigSet;
37
41struct NeoMutt
42{
43 struct Notify *notify;
46 struct ConfigSubset *sub;
47 struct AccountList accounts;
48 locale_t time_c_locale;
50};
51
52extern struct NeoMutt *NeoMutt;
53
60{
64};
65
66bool neomutt_account_add (struct NeoMutt *n, struct Account *a);
67bool neomutt_account_remove(struct NeoMutt *n, const struct Account *a);
68void neomutt_free (struct NeoMutt **ptr);
69struct NeoMutt *neomutt_new (struct ConfigSet *cs);
70
71void neomutt_mailboxlist_clear (struct MailboxList *ml);
72size_t neomutt_mailboxlist_get_all(struct MailboxList *head, struct NeoMutt *n, enum MailboxType type);
73
74// Similar to mutt_file_fopen, but with the proper permissions inferred from
75#define mutt_file_fopen_masked(PATH, MODE) mutt_file_fopen_masked_full(PATH, MODE, __FILE__, __LINE__, __func__)
76
77#endif /* MUTT_CORE_NEOMUTT_H */
MailboxType
Supported mailbox formats.
Definition: mailbox.h:41
Maildir Account.
Maildir Mailbox.
void neomutt_mailboxlist_clear(struct MailboxList *ml)
Free a Mailbox List.
Definition: neomutt.c:168
NotifyGlobal
Events not associated with an object.
Definition: neomutt.h:60
@ NT_GLOBAL_STARTUP
NeoMutt is initialised.
Definition: neomutt.h:61
@ NT_GLOBAL_COMMAND
A NeoMutt command.
Definition: neomutt.h:63
@ NT_GLOBAL_SHUTDOWN
NeoMutt is about to close.
Definition: neomutt.h:62
bool neomutt_account_add(struct NeoMutt *n, struct Account *a)
Add an Account to the global list.
Definition: neomutt.c:110
size_t neomutt_mailboxlist_get_all(struct MailboxList *head, struct NeoMutt *n, enum MailboxType type)
Get a List of all Mailboxes.
Definition: neomutt.c:191
bool neomutt_account_remove(struct NeoMutt *n, const struct Account *a)
Remove an Account from the global list.
Definition: neomutt.c:133
struct NeoMutt * neomutt_new(struct ConfigSet *cs)
Create the main NeoMutt object.
Definition: neomutt.c:50
void neomutt_free(struct NeoMutt **ptr)
Free a NeoMutt.
Definition: neomutt.c:86
A group of associated Mailboxes.
Definition: account.h:36
Container for lots of config items.
Definition: set.h:252
A set of inherited config items.
Definition: subset.h:47
Container for Accounts, Notifications.
Definition: neomutt.h:42
struct Notify * notify_timeout
Timeout notifications handler.
Definition: neomutt.h:45
struct Notify * notify_resize
Window resize notifications handler.
Definition: neomutt.h:44
struct AccountList accounts
List of all Accounts.
Definition: neomutt.h:47
mode_t user_default_umask
User's default file writing permissions (inferred from umask)
Definition: neomutt.h:49
struct Notify * notify
Notifications handler.
Definition: neomutt.h:43
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:46
locale_t time_c_locale
Current locale but LC_TIME=C.
Definition: neomutt.h:48
Notification API.
Definition: notify.c:53