NeoMutt  2024-11-14-138-ge5ca67
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
observer.c File Reference

Menu notification observers. More...

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

Go to the source code of this file.

Functions

static int menu_color_observer (struct NotifyCallback *nc)
 Notification that a Color has changed - Implements observer_t -.
 
static int menu_config_observer (struct NotifyCallback *nc)
 Notification that a Config Variable has changed - Implements observer_t -.
 
static int menu_window_observer (struct NotifyCallback *nc)
 Notification that a Window has changed - Implements observer_t -.
 
void menu_add_observers (struct Menu *menu)
 Add the notification observers.
 

Detailed Description

Menu notification observers.

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 observer.c.

Function Documentation

◆ menu_add_observers()

void menu_add_observers ( struct Menu menu)

Add the notification observers.

Parameters
menuMenu

Definition at line 134 of file observer.c.

135{
136 struct MuttWindow *win = menu->win;
137
141}
void mutt_color_observer_add(observer_t callback, void *global_data)
Add an observer.
Definition: notify.c:59
static int menu_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
Definition: observer.c:97
static int menu_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
Definition: observer.c:70
static int menu_color_observer(struct NotifyCallback *nc)
Notification that a Color has changed - Implements observer_t -.
Definition: observer.c:41
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_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
Definition: notify_type.h:57
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
Definition: notify_type.h:43
struct Notify * notify
Notifications: NotifyConfig, EventConfig.
Definition: subset.h:52
struct MuttWindow * win
Window holding the Menu.
Definition: lib.h:86
struct Notify * notify
Notifications: NotifyWindow, EventWindow.
Definition: mutt_window.h:138
Container for Accounts, Notifications.
Definition: neomutt.h:42
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function: