NeoMutt  2025-12-11-911-gd8d604
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
notify.c
Go to the documentation of this file.
1
22
28
29#include "config.h"
30#include "mutt/lib.h"
31#include "core/lib.h"
32#include "module_data.h"
33#include "notify2.h"
34
35struct Notify;
36
42void color_notify_init(struct Notify **colors_notify, struct Notify *parent)
43{
44 *colors_notify = notify_new();
45 notify_set_parent(*colors_notify, parent);
46}
47
52void color_notify_cleanup(struct Notify **colors_notify)
53{
54 notify_free(colors_notify);
55}
56
62void mutt_color_observer_add(observer_t callback, void *global_data)
63{
65 notify_observer_add(mod_data->colors_notify, NT_COLOR, callback, global_data);
66}
67
73void mutt_color_observer_remove(observer_t callback, void *global_data)
74{
76 notify_observer_remove(mod_data->colors_notify, callback, global_data);
77}
Color private Module data.
void mutt_color_observer_remove(observer_t callback, void *global_data)
Remove an observer.
Definition notify.c:73
void mutt_color_observer_add(observer_t callback, void *global_data)
Add an observer.
Definition notify.c:62
void color_notify_init(struct Notify **colors_notify, struct Notify *parent)
Initialise the Colour notification.
Definition notify.c:42
void color_notify_cleanup(struct Notify **colors_notify)
Free the Colour notification.
Definition notify.c:52
Convenience wrapper for the core headers.
@ MODULE_ID_COLOR
ModuleColor, Color
Definition module_api.h:53
Convenience wrapper for the library headers.
bool notify_observer_remove(struct Notify *notify, const observer_t callback, const void *global_data)
Remove an observer from an object.
Definition notify.c:230
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
Definition notify.c:191
struct Notify * notify_new(void)
Create a new notifications handler.
Definition notify.c:62
void notify_set_parent(struct Notify *notify, struct Notify *parent)
Set the parent notification handler.
Definition notify.c:95
void notify_free(struct Notify **ptr)
Free a notification handler.
Definition notify.c:75
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
Definition neomutt.c:663
Colour notifications.
@ NT_COLOR
Colour has changed, NotifyColor, EventColor.
Definition notify_type.h:41
int(* observer_t)(struct NotifyCallback *nc)
Definition observer.h:54
Color private Module data.
Definition module_data.h:35
struct Notify * colors_notify
Notifications: ColorId, EventColor.
Definition module_data.h:40
Container for Accounts, Notifications.
Definition neomutt.h:41
Notification API.
Definition notify.c:53
struct Notify * parent
Parent of the notification object.
Definition notify.c:54