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