NeoMutt  2022-04-29-247-gc6aae8
Teaching an old dog new tricks
DOXYGEN
wdata_free()

Free the private data attached to the MuttWindow. More...

+ Collaboration diagram for wdata_free():

Functions

void browser_private_data_free (struct BrowserPrivateData **ptr)
 Free Private Browser Data - Implements MuttWindow::wdata_free() -. More...
 
void cbar_data_free (struct MuttWindow *win, void **ptr)
 Free the private data attached to the MuttWindow - Implements MuttWindow::wdata_free() -. More...
 
void compose_shared_data_free (struct MuttWindow *win, void **ptr)
 Create the compose shared data - Implements MuttWindow::wdata_free() -. More...
 
void env_wdata_free (struct MuttWindow *win, void **ptr)
 Free the Envelope Data - Implements MuttWindow::wdata_free() -. More...
 
static void msgwin_wdata_free (struct MuttWindow *win, void **ptr)
 Free the private data attached to the Message Window - Implements MuttWindow::wdata_free() -. More...
 
static void sbar_wdata_free (struct MuttWindow *win, void **ptr)
 Free the private data attached to the MuttWindow - Implements MuttWindow::wdata_free() -. More...
 
void helpbar_wdata_free (struct MuttWindow *win, void **ptr)
 Free Helpbar Window data - Implements MuttWindow::wdata_free() -. More...
 
static void ibar_data_free (struct MuttWindow *win, void **ptr)
 Free the private data attached to the MuttWindow - Implements MuttWindow::wdata_free() -. More...
 
void index_private_data_free (struct MuttWindow *win, void **ptr)
 Free Private Index Data - Implements MuttWindow::wdata_free() -. More...
 
void index_shared_data_free (struct MuttWindow *win, void **ptr)
 Free Shared Index Data - Implements MuttWindow::wdata_free() -. More...
 
static void menu_wdata_free (struct MuttWindow *win, void **ptr)
 Destroy a Menu Window - Implements MuttWindow::wdata_free() -. More...
 
void chain_data_free (struct MuttWindow *win, void **ptr)
 Free the Chain data attached to the Window - Implements MuttWindow::wdata_free() -. More...
 
static void pbar_data_free (struct MuttWindow *win, void **ptr)
 Free the private data attached to the MuttWindow - Implements MuttWindow::wdata_free() -. More...
 
void progress_wdata_free (struct MuttWindow *win, void **ptr)
 Free Progress Bar Window data - Implements MuttWindow::wdata_free() -. More...
 
void sb_wdata_free (struct MuttWindow *win, void **ptr)
 Free Sidebar Window data - Implements MuttWindow::wdata_free() -. More...
 

Detailed Description

Free the private data attached to the MuttWindow.

Parameters
winWindow
ptrWindow data to free

Contract

Function Documentation

◆ browser_private_data_free()

void browser_private_data_free ( struct BrowserPrivateData **  ptr)

Free Private Browser Data - Implements MuttWindow::wdata_free() -.

Definition at line 36 of file private_data.c.

37{
38 if (!ptr || !*ptr)
39 return;
40
41 struct BrowserPrivateData *priv = *ptr;
42
45 destroy_state(&priv->state);
46
47 FREE(ptr);
48}
void destroy_state(struct BrowserState *state)
Free the BrowserState.
Definition: functions.c:74
#define FREE(x)
Definition: memory.h:43
void mutt_buffer_pool_release(struct Buffer **pbuf)
Free a Buffer from the pool.
Definition: pool.c:112
Private state data for the Browser.
Definition: private_data.h:34
struct Buffer * prefix
Folder prefix string.
Definition: private_data.h:49
struct Buffer * OldLastDir
Previous to last dir.
Definition: private_data.h:48
struct BrowserState state
State containing list of files/dir/mailboxes.
Definition: private_data.h:42
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cbar_data_free()

void cbar_data_free ( struct MuttWindow win,
void **  ptr 
)

Free the private data attached to the MuttWindow - Implements MuttWindow::wdata_free() -.

Definition at line 40 of file cbar_data.c.

41{
42 struct ComposeBarData *cbar_data = *ptr;
43
46
47 FREE(&cbar_data->compose_format);
48
49 FREE(ptr);
50}
int cbar_color_observer(struct NotifyCallback *nc)
Notification that a Color has changed - Implements observer_t -.
Definition: cbar.c:203
int cbar_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
Definition: cbar.c:229
bool notify_observer_remove(struct Notify *notify, const observer_t callback, const void *global_data)
Remove an observer from an object.
Definition: notify.c:228
Data to fill the Compose Bar Window.
Definition: cbar_data.h:34
char * compose_format
Cached status string.
Definition: cbar_data.h:35
Container for Accounts, Notifications.
Definition: neomutt.h:37
struct Notify * notify
Notifications handler.
Definition: neomutt.h:38
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compose_shared_data_free()

void compose_shared_data_free ( struct MuttWindow win,
void **  ptr 
)

Create the compose shared data - Implements MuttWindow::wdata_free() -.

Definition at line 36 of file shared_data.c.

37{
38 // struct ComposeSharedData *shared = *ptr;
39
40 FREE(ptr);
41}
+ Here is the caller graph for this function:

◆ env_wdata_free()

void env_wdata_free ( struct MuttWindow win,
void **  ptr 
)

Free the Envelope Data - Implements MuttWindow::wdata_free() -.

Definition at line 39 of file wdata.c.

40{
41 struct EnvelopeWindowData *wdata = *ptr;
42
43 // Don't free email, env, fcc, sub -- we don't own them
44 mutt_list_free(&wdata->to_list);
45 mutt_list_free(&wdata->cc_list);
46 mutt_list_free(&wdata->bcc_list);
47
48 FREE(ptr);
49}
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
Definition: list.c:122
Data to fill the Envelope Window.
Definition: wdata.h:39
struct ListHead cc_list
'Cc:' list of addresses
Definition: wdata.h:45
struct ListHead bcc_list
'Bcc:' list of addresses
Definition: wdata.h:46
struct ListHead to_list
'To:' list of addresses
Definition: wdata.h:44
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ msgwin_wdata_free()

static void msgwin_wdata_free ( struct MuttWindow win,
void **  ptr 
)
static

Free the private data attached to the Message Window - Implements MuttWindow::wdata_free() -.

Definition at line 171 of file msgwin.c.

172{
173 struct MsgWinPrivateData *priv = *ptr;
174
175 FREE(&priv->text);
176
177 FREE(ptr);
178}
Private data for the Message Window.
Definition: msgwin.c:94
char * text
Cached display string.
Definition: msgwin.c:96
+ Here is the caller graph for this function:

◆ sbar_wdata_free()

static void sbar_wdata_free ( struct MuttWindow win,
void **  ptr 
)
static

Free the private data attached to the MuttWindow - Implements MuttWindow::wdata_free() -.

Definition at line 176 of file sbar.c.

177{
178 struct SBarPrivateData *priv = *ptr;
179
180 FREE(&priv->display);
181
182 FREE(ptr);
183}
Private data for the Simple Bar.
Definition: sbar.c:73
char * display
Cached display string.
Definition: sbar.c:74
+ Here is the caller graph for this function:

◆ helpbar_wdata_free()

void helpbar_wdata_free ( struct MuttWindow win,
void **  ptr 
)

Free Helpbar Window data - Implements MuttWindow::wdata_free() -.

Definition at line 47 of file wdata.c.

48{
49 struct HelpbarWindowData *wdata = *ptr;
50
51 // We don't own the help_data
52 FREE(&wdata->help_str);
53
54 FREE(ptr);
55}
Help Bar Window data -.
Definition: private.h:34
void * wdata
Private data.
Definition: mutt_window.h:145
+ Here is the caller graph for this function:

◆ ibar_data_free()

static void ibar_data_free ( struct MuttWindow win,
void **  ptr 
)
static

Free the private data attached to the MuttWindow - Implements MuttWindow::wdata_free() -.

Definition at line 296 of file ibar.c.

297{
298 struct IBarPrivateData *ibar_data = *ptr;
299
300 FREE(&ibar_data->status_format);
301 FREE(&ibar_data->ts_status_format);
302 FREE(&ibar_data->ts_icon_format);
303
304 FREE(ptr);
305}
Data to draw the Index Bar.
Definition: ibar.c:78
char * ts_icon_format
Cached terminal icon string.
Definition: ibar.c:83
char * ts_status_format
Cached terminal status string.
Definition: ibar.c:82
char * status_format
Cached screen status string.
Definition: ibar.c:81
+ Here is the caller graph for this function:

◆ index_private_data_free()

void index_private_data_free ( struct MuttWindow win,
void **  ptr 
)

Free Private Index Data - Implements MuttWindow::wdata_free() -.

Definition at line 36 of file private_data.c.

37{
38 if (!ptr || !*ptr)
39 return;
40
41 // struct IndexPrivateData *priv = *ptr;
42
43 FREE(ptr);
44}
+ Here is the caller graph for this function:

◆ index_shared_data_free()

void index_shared_data_free ( struct MuttWindow win,
void **  ptr 
)

Free Shared Index Data - Implements MuttWindow::wdata_free() -.

Only notify is owned by IndexSharedData and should be freed.

Definition at line 273 of file shared_data.c.

274{
275 if (!ptr || !*ptr)
276 return;
277
278 struct IndexSharedData *shared = *ptr;
279
280 mutt_debug(LL_NOTIFY, "NT_INDEX_DELETE: %p\n", shared);
281 notify_send(shared->notify, NT_INDEX, NT_INDEX_DELETE, shared);
282 notify_free(&shared->notify);
283
284 if (shared->account)
286 if (shared->mailboxview)
288 if (shared->mailbox)
290 if (shared->email)
292
293 FREE(ptr);
294}
#define mutt_debug(LEVEL,...)
Definition: logging.h:84
static int index_shared_account_observer(struct NotifyCallback *nc)
Notification that an Account has changed - Implements observer_t -.
Definition: shared_data.c:66
static int index_shared_email_observer(struct NotifyCallback *nc)
Notification that an Email has changed - Implements observer_t -.
Definition: shared_data.c:116
static int index_shared_context_observer(struct NotifyCallback *nc)
Notification that the MailboxView has changed - Implements observer_t -.
Definition: shared_data.c:41
static int index_shared_mailbox_observer(struct NotifyCallback *nc)
Notification that a Mailbox has changed - Implements observer_t -.
Definition: shared_data.c:91
#define NT_INDEX_DELETE
Index Shared Data is about to be freed.
Definition: lib.h:61
@ LL_NOTIFY
Log of notifications.
Definition: logging.h:45
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
Definition: notify.c:171
void notify_free(struct Notify **ptr)
Free a notification handler.
Definition: notify.c:73
@ NT_INDEX
Index data has changed, NotifyIndex, IndexSharedData.
Definition: notify_type.h:48
struct Notify * notify
Notifications: NotifyAccount, EventAccount.
Definition: account.h:42
struct Notify * notify
Notifications: NotifyEmail, EventEmail.
Definition: email.h:71
Data shared between Index, Pager and Sidebar.
Definition: shared_data.h:37
struct MailboxView * mailboxview
Current Mailbox view.
Definition: shared_data.h:39
struct Account * account
Current Account.
Definition: shared_data.h:40
struct Email * email
Currently selected Email.
Definition: shared_data.h:42
struct Mailbox * mailbox
Current Mailbox.
Definition: shared_data.h:41
struct Notify * notify
Notifications: NotifyIndex, IndexSharedData.
Definition: shared_data.h:44
struct Notify * notify
Notifications: NotifyMview, EventMview.
Definition: mview.h:50
struct Notify * notify
Notifications: NotifyMailbox, EventMailbox.
Definition: mailbox.h:144
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ menu_wdata_free()

static void menu_wdata_free ( struct MuttWindow win,
void **  ptr 
)
static

Destroy a Menu Window - Implements MuttWindow::wdata_free() -.

Definition at line 125 of file window.c.

126{
127 menu_free((struct Menu **) ptr);
128}
void menu_free(struct Menu **ptr)
Free a Menu.
Definition: menu.c:111
Definition: lib.h:69
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ chain_data_free()

void chain_data_free ( struct MuttWindow win,
void **  ptr 
)

Free the Chain data attached to the Window - Implements MuttWindow::wdata_free() -.

Definition at line 45 of file chain_data.c.

46{
47 FREE(ptr);
48}
+ Here is the caller graph for this function:

◆ pbar_data_free()

static void pbar_data_free ( struct MuttWindow win,
void **  ptr 
)
static

Free the private data attached to the MuttWindow - Implements MuttWindow::wdata_free() -.

Definition at line 296 of file pbar.c.

297{
298 struct PBarPrivateData *pbar_data = *ptr;
299
300 FREE(&pbar_data->pager_format);
301
302 FREE(ptr);
303}
Data to draw the Pager Bar.
Definition: pbar.c:84
char * pager_format
Cached status string.
Definition: pbar.c:87
+ Here is the caller graph for this function:

◆ progress_wdata_free()

void progress_wdata_free ( struct MuttWindow win,
void **  ptr 
)

Free Progress Bar Window data - Implements MuttWindow::wdata_free() -.

Definition at line 45 of file wdata.c.

46{
47 if (!win || !ptr || !*ptr)
48 return;
49
50 FREE(ptr);
51}
+ Here is the caller graph for this function:

◆ sb_wdata_free()

void sb_wdata_free ( struct MuttWindow win,
void **  ptr 
)

Free Sidebar Window data - Implements MuttWindow::wdata_free() -.

Definition at line 55 of file wdata.c.

56{
57 struct SidebarWindowData *wdata = *ptr;
58
59 struct SbEntry **sbep = NULL;
60 ARRAY_FOREACH(sbep, &wdata->entries)
61 {
62 FREE(sbep);
63 }
64 ARRAY_FREE(&wdata->entries);
65
66 FREE(ptr);
67}
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
Definition: array.h:211
#define ARRAY_FREE(head)
Release all memory.
Definition: array.h:203
Info about folders in the sidebar.
Definition: private.h:41
Sidebar private Window data -.
Definition: private.h:65
struct SbEntryArray entries
Items to display in the sidebar.
Definition: private.h:68
+ Here is the caller graph for this function: