NeoMutt  2024-03-23-147-g885fbc
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
notify2.h File Reference

Colour notifications. More...

#include "config.h"
#include "mutt/lib.h"
#include "color.h"
+ Include dependency graph for notify2.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  EventColor
 An Event that happened to a Colour. More...
 

Enumerations

enum  NotifyColor { NT_COLOR_SET = 1 , NT_COLOR_RESET }
 Types of Color Event. More...
 

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
 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 notify2.h.

Enumeration Type Documentation

◆ NotifyColor

Types of Color Event.

Observers of NT_COLOR will be passed an EventColor.

Note
Notifications are sent after the event.
Enumerator
NT_COLOR_SET 

Color has been set.

NT_COLOR_RESET 

Color has been reset/removed.

Definition at line 39 of file notify2.h.

40{
41 NT_COLOR_SET = 1,
43};
@ NT_COLOR_RESET
Color has been reset/removed.
Definition: notify2.h:42
@ NT_COLOR_SET
Color has been set.
Definition: notify2.h:41

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
extern

Notifications: ColorId, EventColor.

Definition at line 35 of file notify.c.