NeoMutt  2024-04-25-85-g27bab4
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
attach_data.c
Go to the documentation of this file.
1
29#include "config.h"
30#include "mutt/lib.h"
31#include "attach_data.h"
32#include "attach/lib.h"
33
37void attach_data_free(struct Menu *menu, void **ptr)
38{
39 if (!ptr || !*ptr)
40 return;
41
42 struct ComposeAttachData *attach_data = *ptr;
43
44 mutt_actx_free(&attach_data->actx);
45
46 FREE(ptr);
47}
48
55{
56 struct ComposeAttachData *attach_data = mutt_mem_calloc(1, sizeof(struct ComposeAttachData));
57
58 attach_data->actx = mutt_actx_new();
59 attach_data->actx->email = e;
60
61 return attach_data;
62}
struct AttachCtx * mutt_actx_new(void)
Create a new Attachment Context.
Definition: attach.c:189
void mutt_actx_free(struct AttachCtx **ptr)
Free an Attachment Context.
Definition: attach.c:198
GUI display the mailboxes in a side panel.
struct ComposeAttachData * attach_data_new(struct Email *e)
Create new Compose Attach Data.
Definition: attach_data.c:54
Compose Attach Data.
void attach_data_free(struct Menu *menu, void **ptr)
Free the Compose Attach Data - Implements Menu::mdata_free() -.
Definition: attach_data.c:37
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:51
#define FREE(x)
Definition: memory.h:45
Convenience wrapper for the library headers.
struct Email * email
Used by recvattach for updating.
Definition: attach.h:66
Data to fill the Compose Attach Window.
Definition: attach_data.h:33
struct Menu * menu
Menu displaying the attachments.
Definition: attach_data.h:35
struct AttachCtx * actx
Set of attachments.
Definition: attach_data.h:34
The envelope/body of an email.
Definition: email.h:39
Definition: lib.h:79