NeoMutt  2024-03-23-142-g2b2e76
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
notify.c File Reference

Colour notifications. More...

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

Go to the source code of this file.

Functions

void color_notify_init (void)
 Initialise the Colour notification.
 
void color_notify_cleanup (void)
 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.
 

Variables

struct NotifyColorsNotify = NULL
 Notifications: ColorId, EventColor.
 

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 ( void  )

Initialise the Colour notification.

Definition at line 40 of file notify.c.

41{
44}
struct Notify * ColorsNotify
Notifications: ColorId, EventColor.
Definition: notify.c:35
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
Container for Accounts, Notifications.
Definition: neomutt.h:41
struct Notify * notify
Notifications handler.
Definition: neomutt.h:42
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ color_notify_cleanup()

void color_notify_cleanup ( void  )

Free the Colour notification.

Definition at line 49 of file notify.c.

50{
52}
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 59 of file notify.c.

60{
61 notify_observer_add(ColorsNotify, NT_COLOR, callback, global_data);
62}
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
@ NT_COLOR
Colour has changed, NotifyColor, EventColor.
Definition: notify_type.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 69 of file notify.c.

70{
71 notify_observer_remove(ColorsNotify, callback, global_data);
72}
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:

Variable Documentation

◆ ColorsNotify

struct Notify* ColorsNotify = NULL

Notifications: ColorId, EventColor.

Definition at line 35 of file notify.c.