NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
private_data.c
Go to the documentation of this file.
1
22
28
29
#include "config.h"
30
#include "
mutt/lib.h
"
31
#include "
private_data.h
"
32
#include "
lib.h
"
33
39
void
pager_private_data_free
(
struct
MuttWindow
*win,
void
**ptr)
40
{
41
if
(!ptr || !*ptr)
42
return
;
43
44
struct
PagerPrivateData
*priv = *ptr;
45
46
mutt_debug
(
LL_NOTIFY
,
"NT_PAGER_DELETE: %p\n"
, (
void
*) priv);
47
notify_send
(priv->
notify
,
NT_PAGER
,
NT_PAGER_DELETE
, priv);
48
notify_free
(&priv->
notify
);
49
50
attr_color_list_clear
(&priv->
ansi_list
);
51
52
FREE
(ptr);
53
}
54
59
struct
PagerPrivateData
*
pager_private_data_new
(
void
)
60
{
61
struct
PagerPrivateData
*priv =
MUTT_MEM_CALLOC
(1,
struct
PagerPrivateData
);
62
63
priv->
notify
=
notify_new
();
64
65
// TODO initialize fields
66
67
TAILQ_INIT
(&priv->
ansi_list
);
68
69
return
priv;
70
}
attr_color_list_clear
void attr_color_list_clear(struct AttrColorList *acl)
Free the contents of an AttrColorList.
Definition
attr.c:116
mutt_debug
#define mutt_debug(LEVEL,...)
Definition
logging2.h:91
LL_NOTIFY
@ LL_NOTIFY
Log of notifications.
Definition
logging2.h:50
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.
notify_new
struct Notify * notify_new(void)
Create a new notifications handler.
Definition
notify.c:62
notify_send
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
Definition
notify.c:173
notify_free
void notify_free(struct Notify **ptr)
Free a notification handler.
Definition
notify.c:75
NT_PAGER
@ NT_PAGER
Pager data has changed, NotifyPager, PagerPrivateData.
Definition
notify_type.h:54
lib.h
GUI display a file/email/help in a viewport with paging.
NT_PAGER_DELETE
@ NT_PAGER_DELETE
Pager Private Data is about to be freed.
Definition
lib.h:191
pager_private_data_new
struct PagerPrivateData * pager_private_data_new(void)
Create new Pager Data.
Definition
private_data.c:59
pager_private_data_free
void pager_private_data_free(struct MuttWindow *win, void **ptr)
Free Pager Data.
Definition
private_data.c:39
private_data.h
Private state data for the Pager.
TAILQ_INIT
#define TAILQ_INIT(head)
Definition
queue.h:822
MuttWindow
Definition
mutt_window.h:129
PagerPrivateData
Private state data for the Pager.
Definition
private_data.h:41
PagerPrivateData::notify
struct Notify * notify
Notifications: NotifyPager, PagerPrivateData.
Definition
private_data.h:71
PagerPrivateData::ansi_list
struct AttrColorList ansi_list
List of ANSI colours used in the Pager.
Definition
private_data.h:70