NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
wdata.c
Go to the documentation of this file.
1
22
28
29
#include "config.h"
30
#include <stddef.h>
31
#include "
private.h
"
32
#include "
mutt/lib.h
"
33
#include "
gui/lib.h
"
34
39
struct
HelpbarWindowData
*
helpbar_wdata_new
(
void
)
40
{
41
return
MUTT_MEM_CALLOC
(1,
struct
HelpbarWindowData
);
42
}
43
47
void
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
64
struct
HelpbarWindowData
*
helpbar_wdata_get
(
struct
MuttWindow
*win)
65
{
66
if
(!win || (win->
type
!=
WT_HELP_BAR
))
67
return
NULL;
68
69
return
win->
wdata
;
70
}
helpbar_wdata_free
void helpbar_wdata_free(struct MuttWindow *win, void **ptr)
Free Helpbar Window data - Implements MuttWindow::wdata_free() -.
Definition
wdata.c:47
lib.h
Convenience wrapper for the gui headers.
private.h
Shared constants/structs that are private to the Help Bar.
helpbar_wdata_get
struct HelpbarWindowData * helpbar_wdata_get(struct MuttWindow *win)
Get the Helpbar data for this window.
Definition
wdata.c:64
helpbar_wdata_new
struct HelpbarWindowData * helpbar_wdata_new(void)
Create new Window data for the Helpbar.
Definition
wdata.c:39
FREE
#define FREE(x)
Free memory and set the pointer to NULL.
Definition
memory.h:68
MUTT_MEM_CALLOC
#define MUTT_MEM_CALLOC(n, type)
Definition
memory.h:52
lib.h
Convenience wrapper for the library headers.
WT_HELP_BAR
@ WT_HELP_BAR
Help Bar containing list of useful key bindings.
Definition
mutt_window.h:96
HelpbarWindowData
Help Bar Window data -.
Definition
private.h:34
MuttWindow
Definition
mutt_window.h:129
MuttWindow::wdata
void * wdata
Private data.
Definition
mutt_window.h:150
MuttWindow::type
enum WindowType type
Window type, e.g. WT_SIDEBAR.
Definition
mutt_window.h:149