#include "muttlib.h"
#include "mx.h"
#include "ncrypt/ncrypt.h"
+#include "neomutt.h"
#include "opcodes.h"
#include "options.h"
#include "pager.h"
oldcount = Context ? Context->mailbox->msg_count : 0;
mutt_startup_shutdown_hook(MUTT_SHUTDOWN_HOOK);
+ notify_send(NeoMutt->notify, NT_GLOBAL, NT_GLOBAL_SHUTDOWN, 0);
if (!Context || ((check = mx_mbox_close(&Context)) == 0))
done = true;
mutt_folder_hook(mutt_b2s(folder), NULL);
mutt_startup_shutdown_hook(MUTT_STARTUP_HOOK);
+ notify_send(NeoMutt->notify, NT_GLOBAL, NT_GLOBAL_STARTUP, 0);
repeat_error = true;
struct Mailbox *m = mx_path_resolve(mutt_b2s(folder));
NT_MAILBOX, ///< Mailbox has changed
NT_EMAIL, ///< Email has changed
NT_WINDOW, ///< Window has changed
-
- NT_MAX,
};
#endif /* MUTT_LIB_NOTIFY_TYPE_H */
/**
* @file
- * NeoMutt container for notifications
+ * Container for Accounts, Notifications
*
* @authors
* Copyright (C) 2019 Richard Russon <rich@flatcap.org>
*/
/**
- * @page neomutt NeoMutt container for notifications
+ * @page neomutt Container for Accounts, Notifications
*
- * NeoMutt container for notifications
+ * Container for Accounts, Notifications
*/
#include "config.h"
/**
* @file
- * NeoMutt container for notifications
+ * Container for Accounts, Notifications
*
* @authors
* Copyright (C) 2019 Richard Russon <rich@flatcap.org>
struct Notify;
/**
- * struct NeoMutt - Container for notifications
+ * struct NeoMutt - Container for Accounts, Notifications
*/
struct NeoMutt
{
- struct Notify *notify;
+ struct Notify *notify; ///< Notifications handler
};
extern struct NeoMutt *NeoMutt;
+/**
+ * NotifyGlobal - Events not associated with an object
+ */
+enum NotifyGlobal
+{
+ NT_GLOBAL_STARTUP = 1, ///< NeoMutt is initialised
+ NT_GLOBAL_SHUTDOWN, ///< NeoMutt is about to close
+ NT_GLOBAL_TIMEOUT, ///< A timer has elapsed
+};
+
+void neomutt_free(struct NeoMutt **ptr);
struct NeoMutt *neomutt_new(void);
-void neomutt_free(struct NeoMutt **ptr);
#endif /* MUTT_NEOMUTT_H */