NeoMutt  2020-09-25
Teaching an old dog new tricks
DOXYGEN
protos.h
Go to the documentation of this file.
1 
24 #ifndef MUTT_PROTOS_H
25 #define MUTT_PROTOS_H
26 
27 #include "config.h"
28 #include <stddef.h>
29 #include <stdbool.h>
30 #include <stdio.h>
31 #include "mutt/lib.h"
32 #include "mutt.h"
33 #include "ncrypt/lib.h"
34 #include "keymap.h"
35 
36 struct Context;
37 struct Email;
38 struct EmailList;
39 struct EnterState;
40 struct Mailbox;
41 
45 enum XdgType
46 {
49 };
50 
55 {
58 };
59 
60 int mutt_ev_message(struct Mailbox *m, struct EmailList *el, enum EvMessage action);
61 
62 int mutt_system(const char *cmd);
63 
64 int mutt_set_xdg_path(enum XdgType type, struct Buffer *buf);
65 void mutt_help(enum MenuType menu, int wraplan);
66 void mutt_set_flag_update(struct Mailbox *m, struct Email *e, int flag, bool bf, bool upd_mbox);
67 #define mutt_set_flag(m, e, flag, bf) mutt_set_flag_update(m, e, flag, bf, true)
68 void mutt_signal_init(void);
69 void mutt_emails_set_flag(struct Mailbox *m, struct EmailList *el, int flag, bool bf);
70 int mutt_change_flag(struct Mailbox *m, struct EmailList *el, bool bf);
71 
72 int mutt_complete(char *buf, size_t buflen);
73 int mutt_prepare_template(FILE *fp, struct Mailbox *m, struct Email *e_new, struct Email *e, bool resend);
74 int mutt_enter_string(char *buf, size_t buflen, int col, CompletionFlags flags);
75 int mutt_enter_string_full(char *buf, size_t buflen, int col, CompletionFlags flags, bool multiple,
76  char ***files, int *numfiles, struct EnterState *state);
77 int mutt_get_postponed(struct Context *ctx, struct Email *hdr, struct Email **cur, struct Buffer *fcc);
78 SecurityFlags mutt_parse_crypt_hdr(const char *p, bool set_empty_signas, SecurityFlags crypt_app);
79 int mutt_num_postponed(struct Mailbox *m, bool force);
80 int mutt_thread_set_flag(struct Email *e, int flag, bool bf, bool subthread);
81 void mutt_update_num_postponed(void);
82 int mutt_is_quote_line(char *buf, regmatch_t *pmatch);
83 
84 #ifndef HAVE_WCSCASECMP
85 int wcscasecmp(const wchar_t *a, const wchar_t *b);
86 #endif
87 
88 int mutt_reply_observer(struct NotifyCallback *nc);
89 
90 #endif /* MUTT_PROTOS_H */
The "current" mailbox.
Definition: context.h:38
int mutt_complete(char *buf, size_t buflen)
Attempt to complete a partial pathname.
Definition: complete.c:57
Manage keymappings.
enum MailboxType type
Mailbox type.
Definition: mailbox.h:105
int mutt_num_postponed(struct Mailbox *m, bool force)
Return the number of postponed messages.
Definition: postpone.c:89
int mutt_reply_observer(struct NotifyCallback *nc)
Listen for config changes to "reply_regex" - Implements observer_t.
Definition: index.c:3973
The envelope/body of an email.
Definition: email.h:37
Data passed to a notification function.
Definition: observer.h:39
int mutt_get_postponed(struct Context *ctx, struct Email *hdr, struct Email **cur, struct Buffer *fcc)
Recall a postponed message.
Definition: postpone.c:315
uint16_t CompletionFlags
Flags for mutt_enter_string_full(), e.g. MUTT_ALIAS.
Definition: mutt.h:55
MenuType
Types of GUI selections.
Definition: keymap.h:72
int mutt_is_quote_line(char *buf, regmatch_t *pmatch)
Is a line of message text a quote?
Definition: pager.c:964
String manipulation buffer.
Definition: buffer.h:33
int mutt_enter_string(char *buf, size_t buflen, int col, CompletionFlags flags)
Ask the user for a string.
Definition: enter.c:146
void mutt_help(enum MenuType menu, int wraplan)
Display the help menu.
Definition: help.c:386
uint16_t SecurityFlags
Flags, e.g. SEC_ENCRYPT.
Definition: lib.h:83
XDG home dir: ~/.config.
Definition: protos.h:47
int mutt_thread_set_flag(struct Email *e, int flag, bool bf, bool subthread)
Set a flag on an entire thread.
Definition: flags.c:371
void mutt_signal_init(void)
Initialise the signal handling.
Definition: mutt_signal.c:132
Many unsorted constants and some structs.
EvMessage
Edit or View a message.
Definition: protos.h:54
int mutt_ev_message(struct Mailbox *m, struct EmailList *el, enum EvMessage action)
Edit or view a message.
Definition: editmsg.c:279
int flags
e.g. MB_NORMAL
Definition: mailbox.h:134
Keep our place when entering a string.
Definition: enter_state.h:32
View the message.
Definition: protos.h:56
Edit the message.
Definition: protos.h:57
A mailbox.
Definition: mailbox.h:81
XdgType
XDG variable types.
Definition: protos.h:45
int wcscasecmp(const wchar_t *a, const wchar_t *b)
Compare two wide-character strings, ignoring case.
Definition: wcscasecmp.c:41
API for encryption/signing of emails.
int mutt_change_flag(struct Mailbox *m, struct EmailList *el, bool bf)
Change the flag on a Message.
Definition: flags.c:429
void mutt_update_num_postponed(void)
Force the update of the number of postponed messages.
Definition: postpone.c:202
int mutt_enter_string_full(char *buf, size_t buflen, int col, CompletionFlags flags, bool multiple, char ***files, int *numfiles, struct EnterState *state)
Ask the user for a string.
Definition: enter.c:178
int mutt_set_xdg_path(enum XdgType type, struct Buffer *buf)
Find an XDG path or its fallback.
Definition: muttlib.c:1499
void mutt_set_flag_update(struct Mailbox *m, struct Email *e, int flag, bool bf, bool upd_mbox)
Set a flag on an email.
Definition: flags.c:54
SecurityFlags mutt_parse_crypt_hdr(const char *p, bool set_empty_signas, SecurityFlags crypt_app)
Parse a crypto header string.
Definition: postpone.c:499
Convenience wrapper for the library headers.
XDG system dir: /etc/xdg.
Definition: protos.h:48
int mutt_prepare_template(FILE *fp, struct Mailbox *m, struct Email *e_new, struct Email *e, bool resend)
Prepare a message template.
Definition: postpone.c:655
int mutt_system(const char *cmd)
Run an external command.
Definition: system.c:51
void mutt_emails_set_flag(struct Mailbox *m, struct EmailList *el, int flag, bool bf)
Set flag on messages.
Definition: flags.c:350