NeoMutt  2024-11-14-138-ge5ca67
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
sort.h
Go to the documentation of this file.
1
25#ifndef MUTT_EMAIL_SORT_H
26#define MUTT_EMAIL_SORT_H
27
28#include <stdbool.h>
29#include "core/lib.h"
30
31struct Address;
32struct Email;
33struct MailboxView;
34
47typedef int (*sort_email_t)(const struct Email *a, const struct Email *b, bool reverse);
48
53{
65};
66
67int mutt_compare_emails(const struct Email *a, const struct Email *b,
68 enum MailboxType type, short sort, short sort_aux);
69
70void mutt_sort_headers(struct MailboxView *mv, bool init);
71void mutt_sort_unsorted(struct Mailbox *m);
72
73const char *mutt_get_name(const struct Address *a);
74
75#endif /* MUTT_EMAIL_SORT_H */
Convenience wrapper for the core headers.
MailboxType
Supported mailbox formats.
Definition: mailbox.h:41
int(* sort_email_t)(const struct Email *a, const struct Email *b, bool reverse)
Definition: sort.h:47
const char * mutt_get_name(const struct Address *a)
Pick the best name to display from an address.
Definition: sort.c:139
void mutt_sort_headers(struct MailboxView *mv, bool init)
Sort emails by their headers.
Definition: sort.c:355
void mutt_sort_unsorted(struct Mailbox *m)
Sort emails by their disk order.
Definition: sort.c:449
EmailSortType
Methods for sorting Emails.
Definition: sort.h:53
@ EMAIL_SORT_LABEL
Sort by the emails label.
Definition: sort.h:57
@ EMAIL_SORT_DATE_RECEIVED
Sort by when the message were delivered locally.
Definition: sort.h:55
@ EMAIL_SORT_SPAM
Sort by the email's spam score.
Definition: sort.h:60
@ EMAIL_SORT_SCORE
Sort by the email's score.
Definition: sort.h:58
@ EMAIL_SORT_DATE
Sort by the date the email was sent.
Definition: sort.h:54
@ EMAIL_SORT_THREADS
Sort by email threads.
Definition: sort.h:62
@ EMAIL_SORT_SUBJECT
Sort by the email's subject.
Definition: sort.h:61
@ EMAIL_SORT_FROM
Sort by the email's From field.
Definition: sort.h:56
@ EMAIL_SORT_UNSORTED
Sort by the order the messages appear in the mailbox.
Definition: sort.h:64
@ EMAIL_SORT_SIZE
Sort by the size of the email.
Definition: sort.h:59
@ EMAIL_SORT_TO
Sort by the email's To field.
Definition: sort.h:63
int mutt_compare_emails(const struct Email *a, const struct Email *b, enum MailboxType type, short sort, short sort_aux)
Compare two emails using up to two sort methods -.
Definition: sort.c:329
An email address.
Definition: address.h:36
The envelope/body of an email.
Definition: email.h:39
View of a Mailbox.
Definition: mview.h:40
A mailbox.
Definition: mailbox.h:79