mutt_account.o mutt_attach.o mutt_body.o mutt_header.o \
mutt_history.o mutt_logging.o mutt_parse.o mutt_signal.o \
mutt_socket.o mutt_thread.o mutt_window.o mx.o myvar.o \
- pager.o pattern.o postpone.o progress.o query.o recvattach.o \
+ neomutt.o pager.o pattern.o postpone.o progress.o query.o recvattach.o \
recvcmd.o resize.o rfc1524.o rfc3676.o \
score.o send.o sendlib.o sidebar.o smtp.o sort.o state.o \
status.o system.o terminal.o version.o icommands.o
#include "muttlib.h"
#include "mx.h"
#include "ncrypt/ncrypt.h"
+#include "neomutt.h"
#include "options.h"
#include "protos.h"
#include "send.h"
goto main_ok; // TEST04: neomutt -v
}
+ NeoMutt = neomutt_new();
+
Config = init_config(500);
if (!Config)
goto main_curses;
mutt_free_opts();
mutt_free_keys();
cs_free(&Config);
+ neomutt_free(&NeoMutt);
return rc;
}
--- /dev/null
+/**
+ * @file
+ * NeoMutt container for notifications
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * 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/>.
+ */
+
+/**
+ * @page neomutt NeoMutt container for notifications
+ *
+ * NeoMutt container for notifications
+ */
+
+#include "config.h"
+#include "mutt/mutt.h"
+#include "neomutt.h"
+
+struct NeoMutt *NeoMutt; ///< Global NeoMutt object
+
+/**
+ * neomutt_new - Create the master NeoMutt object
+ * @retval ptr New NeoMutt
+ */
+struct NeoMutt *neomutt_new(void)
+{
+ struct NeoMutt *n = mutt_mem_calloc(1, sizeof(*NeoMutt));
+
+ return n;
+}
+
+/**
+ * neomutt_free - Free a NeoMutt
+ * @param[out] ptr NeoMutt to free
+ */
+void neomutt_free(struct NeoMutt **ptr)
+{
+ if (!ptr || !*ptr)
+ return;
+
+ // struct NeoMutt *n = *ptr;
+
+ FREE(ptr);
+}
--- /dev/null
+/**
+ * @file
+ * NeoMutt container for notifications
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * 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/>.
+ */
+
+#ifndef MUTT_NEOMUTT_H
+#define MUTT_NEOMUTT_H
+
+struct Notify;
+
+/**
+ * struct NeoMutt - Container for notifications
+ */
+struct NeoMutt
+{
+ struct Notify *notify;
+};
+
+extern struct NeoMutt *NeoMutt;
+
+struct NeoMutt *neomutt_new(void);
+void neomutt_free(struct NeoMutt **ptr);
+
+#endif /* MUTT_NEOMUTT_H */