NeoMutt  2024-03-23-23-gec7045
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
wdata.c
Go to the documentation of this file.
1
29#include "config.h"
30#include <stddef.h>
31#include "private.h"
32#include "mutt/lib.h"
33#include "gui/lib.h"
34
40{
41 return mutt_mem_calloc(1, sizeof(struct HelpbarWindowData));
42}
43
47void helpbar_wdata_free(struct MuttWindow *win, void **ptr)
48{
49 if (!ptr || !*ptr)
50 return;
51
52 struct HelpbarWindowData *wdata = *ptr;
53
54 // We don't own the help_data
55 FREE(&wdata->help_str);
56
57 FREE(ptr);
58}
59
65{
66 if (!win || (win->type != WT_HELP_BAR))
67 return NULL;
68
69 return win->wdata;
70}
void helpbar_wdata_free(struct MuttWindow *win, void **ptr)
Free Helpbar Window data - Implements MuttWindow::wdata_free() -.
Definition: wdata.c:47
Convenience wrapper for the gui headers.
struct HelpbarWindowData * helpbar_wdata_get(struct MuttWindow *win)
Get the Helpbar data for this window.
Definition: wdata.c:64
struct HelpbarWindowData * helpbar_wdata_new(void)
Create new Window data for the Helpbar.
Definition: wdata.c:39
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:45
Convenience wrapper for the library headers.
@ WT_HELP_BAR
Help Bar containing list of useful key bindings.
Definition: mutt_window.h:96
GUI display the mailboxes in a side panel.
Help Bar Window data -.
Definition: private.h:34
void * wdata
Private data.
Definition: mutt_window.h:145
enum WindowType type
Window type, e.g. WT_SIDEBAR.
Definition: mutt_window.h:144