NeoMutt  2022-04-29-81-g9c5a59
Teaching an old dog new tricks
DOXYGEN
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. More...
 
void color_notify_free (void)
 Free the Colour notification. More...
 
void mutt_color_observer_add (observer_t callback, void *global_data)
 Add an observer. More...
 
void mutt_color_observer_remove (observer_t callback, void *global_data)
 Remove an observer. More...
 

Variables

struct NotifyColorsNotify
 Notifications: ColorId, EventColor. More...
 

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 39 of file notify.c.

40 {
43 }
struct Notify * ColorsNotify
Notifications: ColorId, EventColor.
Definition: notify.c:34
struct Notify * notify_new(void)
Create a new notifications handler.
Definition: notify.c:60
void notify_set_parent(struct Notify *notify, struct Notify *parent)
Set the parent notification handler.
Definition: notify.c:93
Container for Accounts, Notifications.
Definition: neomutt.h:37
struct Notify * notify
Notifications handler.
Definition: neomutt.h:38
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ color_notify_free()

void color_notify_free ( void  )

Free the Colour notification.

Definition at line 48 of file notify.c.

49 {
51 }
void notify_free(struct Notify **ptr)
Free a notification handler.
Definition: notify.c:73
+ 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 58 of file notify.c.

59 {
61 }
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:189
@ NT_COLOR
Colour has changed, NotifyColor, EventColor.
Definition: notify_type.h:41
static void * global_data
Original opaque data in fallback implementation.
Definition: qsort_r.c:49
+ 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 68 of file notify.c.

69 {
71 }
bool notify_observer_remove(struct Notify *notify, observer_t callback, void *global_data)
Remove an observer from an object.
Definition: notify.c:228
+ 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 34 of file notify.c.