NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
notify.h
Go to the documentation of this file.
1
22
23
#ifndef MUTT_MUTT_NOTIFY_H
24
#define MUTT_MUTT_NOTIFY_H
25
26
#include <stdbool.h>
27
#include "
notify_type.h
"
28
#include "
observer.h
"
29
30
struct
Notify
;
31
32
struct
Notify
*
notify_new
(
void
);
33
void
notify_free
(
struct
Notify
**ptr);
34
void
notify_set_parent
(
struct
Notify
*notify,
struct
Notify
*
parent
);
35
36
bool
notify_send
(
struct
Notify
*notify,
enum
NotifyType
event_type,
int
event_subtype,
void
*event_data);
37
bool
notify_observer_add
(
struct
Notify
*notify,
enum
NotifyType
type,
observer_t
callback,
void
*global_data);
38
bool
notify_observer_remove
(
struct
Notify
*notify,
const
observer_t
callback,
const
void
*global_data);
39
void
notify_observer_remove_all
(
struct
Notify
*notify);
40
41
#endif
/* MUTT_MUTT_NOTIFY_H */
notify_observer_remove
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
notify_observer_add
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
notify_new
struct Notify * notify_new(void)
Create a new notifications handler.
Definition
notify.c:62
notify_observer_remove_all
void notify_observer_remove_all(struct Notify *notify)
Remove all the observers from an object.
Definition
notify.c:256
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_set_parent
void notify_set_parent(struct Notify *notify, struct Notify *parent)
Set the parent notification handler.
Definition
notify.c:95
notify_free
void notify_free(struct Notify **ptr)
Free a notification handler.
Definition
notify.c:75
notify_type.h
Notification Types.
NotifyType
NotifyType
Notification Types.
Definition
notify_type.h:34
observer.h
Observer of notifications.
observer_t
int(* observer_t)(struct NotifyCallback *nc)
Definition
observer.h:54
Notify
Notification API.
Definition
notify.c:53
Notify::parent
struct Notify * parent
Parent of the notification object.
Definition
notify.c:54