NeoMutt
2025-12-11-1009-ga75d9e
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
functions.h
Go to the documentation of this file.
1
22
23
#ifndef MUTT_MLIST_FUNCTIONS_H
24
#define MUTT_MLIST_FUNCTIONS_H
25
26
#include <stdbool.h>
27
#include <stddef.h>
28
#include "
mutt/lib.h
"
29
#include "
email/lib.h
"
30
31
struct
KeyEvent
;
32
struct
MuttWindow
;
33
37
struct
ListAction
38
{
39
const
char
*
name
;
40
int
op
;
41
size_t
offset
;
42
};
43
47
struct
ListEntry
48
{
49
const
struct
ListAction
*
action
;
50
const
char
*
value
;
51
};
52
ARRAY_HEAD
(ListEntryArray,
struct
ListEntry
);
53
55
extern
const
struct
ListAction
ListActions
[];
56
58
extern
const
int
ListActionsCount
;
59
63
struct
ListData
64
{
65
struct
Menu
*
menu
;
66
struct
Mailbox
*
mailbox
;
67
struct
Rfc2369ListHeaders
headers
;
68
struct
ListEntryArray
entries
;
69
int
label_width
;
70
bool
done
;
71
};
72
86
typedef
int (*
mlist_function_t
)(
struct
ListData
*ld,
const
struct
KeyEvent
*event);
87
91
struct
MlistFunction
92
{
93
int
op
;
94
mlist_function_t
function
;
95
};
96
97
struct
ListHead *
mlist_action_value
(
struct
Rfc2369ListHeaders
*headers,
const
struct
ListAction
*action);
98
int
mlist_function_dispatcher
(
struct
MuttWindow
*win,
const
struct
KeyEvent
*event);
99
bool
mlist_open_url
(
const
char
*url);
100
101
#endif
/* MUTT_MLIST_FUNCTIONS_H */
ARRAY_HEAD
#define ARRAY_HEAD(name, T)
Define a named struct for arrays of elements of a certain type.
Definition
array.h:47
lib.h
Structs that make up an email.
mlist_function_dispatcher
int mlist_function_dispatcher(struct MuttWindow *win, const struct KeyEvent *event)
Perform a List dialog function - Implements function_dispatcher_t -.
Definition
functions.c:269
ListActionsCount
const int ListActionsCount
Number of entries in ListActions.
Definition
functions.c:57
ListActions
const struct ListAction ListActions[]
Mailing-list actions shown in the dialog.
Definition
functions.c:45
mlist_function_t
int(* mlist_function_t)(struct ListData *ld, const struct KeyEvent *event)
Definition
functions.h:86
mlist_open_url
bool mlist_open_url(const char *url)
mlist_action_value
struct ListHead * mlist_action_value(struct Rfc2369ListHeaders *headers, const struct ListAction *action)
Get the stored value for a mailing-list action.
Definition
functions.c:113
lib.h
Convenience wrapper for the library headers.
KeyEvent
An event such as a keypress.
Definition
get.h:75
ListAction
A mailing-list action in the dialog.
Definition
functions.h:38
ListAction::name
const char * name
Label for the action.
Definition
functions.h:39
ListAction::op
int op
Op code.
Definition
functions.h:40
ListAction::offset
size_t offset
Offset into struct Rfc2369ListHeaders.
Definition
functions.h:41
ListData
Private data for the Mailing-list action dialog.
Definition
functions.h:64
ListData::label_width
int label_width
Width of the longest action label.
Definition
functions.h:69
ListData::menu
struct Menu * menu
Dialog menu.
Definition
functions.h:65
ListData::mailbox
struct Mailbox * mailbox
Source mailbox.
Definition
functions.h:66
ListData::entries
struct ListEntryArray entries
Menu rows.
Definition
functions.h:68
ListData::headers
struct Rfc2369ListHeaders headers
Parsed List-* headers.
Definition
functions.h:67
ListData::done
bool done
Exit the dialog.
Definition
functions.h:70
ListEntry
A mailing-list action in the dialog.
Definition
functions.h:48
ListEntry::value
const char * value
URI to use.
Definition
functions.h:50
ListEntry::action
const struct ListAction * action
Action definition.
Definition
functions.h:49
Mailbox
A mailbox.
Definition
mailbox.h:81
Menu
Definition
lib.h:86
MlistFunction
A list dialog function.
Definition
functions.h:92
MlistFunction::function
mlist_function_t function
Function to call.
Definition
functions.h:94
MlistFunction::op
int op
Op code, e.g. OP_QUIT.
Definition
functions.h:93
MuttWindow
Definition
mutt_window.h:129
Rfc2369ListHeaders
Mailing-list actions from RFC 2369 headers.
Definition
parse.h:41