NeoMutt  2025-12-11-872-g385a04
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
notify.c File Reference

Colour notifications. More...

#include "config.h"
#include "mutt/lib.h"
#include "core/lib.h"
#include "module_data.h"
#include "notify2.h"
+ Include dependency graph for notify.c:

Go to the source code of this file.

Functions

void color_notify_init (struct Notify **colors_notify, struct Notify *parent)
 Initialise the Colour notification.
 
void color_notify_cleanup (struct Notify **colors_notify)
 Free the Colour notification.
 
void mutt_color_observer_add (observer_t callback, void *global_data)
 Add an observer.
 
void mutt_color_observer_remove (observer_t callback, void *global_data)
 Remove an observer.
 

Detailed Description

Colour notifications.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file notify.c.

Function Documentation

◆ color_notify_init()

void color_notify_init ( struct Notify ** colors_notify,
struct Notify * parent )

Initialise the Colour notification.

Parameters
colors_notifyPointer to the notification object
parentParent notification object

Definition at line 42 of file notify.c.

43{
44 *colors_notify = notify_new();
45 notify_set_parent(*colors_notify, parent);
46}
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
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ color_notify_cleanup()

void color_notify_cleanup ( struct Notify ** colors_notify)

Free the Colour notification.

Parameters
colors_notifyPointer to the notification object

Definition at line 52 of file notify.c.

53{
54 notify_free(colors_notify);
55}
void notify_free(struct Notify **ptr)
Free a notification handler.
Definition notify.c:75
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_color_observer_add()

void mutt_color_observer_add ( observer_t callback,
void * global_data )

Add an observer.

Parameters
callbackThe callback
global_dataThe data

Definition at line 62 of file notify.c.

63{
65 notify_observer_add(mod_data->colors_notify, NT_COLOR, callback, global_data);
66}
@ MODULE_ID_COLOR
ModuleColor, Color
Definition module_api.h:53
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
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
Definition neomutt.c:663
@ NT_COLOR
Colour has changed, NotifyColor, EventColor.
Definition notify_type.h:41
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
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_color_observer_remove()

void mutt_color_observer_remove ( observer_t callback,
void * global_data )

Remove an observer.

Parameters
callbackThe callback
global_dataThe data

Definition at line 73 of file notify.c.

74{
76 notify_observer_remove(mod_data->colors_notify, callback, global_data);
77}
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
+ Here is the call graph for this function:
+ Here is the caller graph for this function: