NeoMutt  2023-05-17-16-g61469c
Teaching an old dog new tricks
DOXYGEN
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 struct HelpbarWindowData *wdata = *ptr;
50
51 // We don't own the help_data
52 FREE(&wdata->help_str);
53
54 FREE(ptr);
55}
56
62{
63 if (!win || (win->type != WT_HELP_BAR))
64 return NULL;
65
66 return win->wdata;
67}
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:61
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:43
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