NeoMutt  2024-11-14-34-g5aaf0d
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, 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
#define FREE(x)
Definition: memory.h:55
#define MUTT_MEM_CALLOC(n, type)
Definition: memory.h:40
Convenience wrapper for the library headers.
@ WT_HELP_BAR
Help Bar containing list of useful key bindings.
Definition: mutt_window.h:95
GUI display the mailboxes in a side panel.
Help Bar Window data -.
Definition: private.h:34
void * wdata
Private data.
Definition: mutt_window.h:144
enum WindowType type
Window type, e.g. WT_SIDEBAR.
Definition: mutt_window.h:143