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