NeoMutt  2022-04-29-247-gc6aae8
Teaching an old dog new tricks
DOXYGEN
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 struct ComposeAttachData *attach_data = *ptr;
40
41 mutt_actx_free(&attach_data->actx);
42
43 FREE(ptr);
44}
45
51{
52 struct ComposeAttachData *attach_data = mutt_mem_calloc(1, sizeof(struct ComposeAttachData));
53
54 attach_data->actx = mutt_actx_new();
55 attach_data->actx->email = e;
56
57 return attach_data;
58}
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:50
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:50
#define FREE(x)
Definition: memory.h:43
Convenience wrapper for the library headers.
struct Email * email
Used by recvattach for updating.
Definition: attach.h:52
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:37
Definition: lib.h:69