]> granicus.if.org Git - neomutt/blob - mutt_commands.h
doxygen: add struct/enum/union templates
[neomutt] / mutt_commands.h
1 /**
2  * @file
3  * Mapping from user command name to function
4  *
5  * @authors
6  * Copyright (C) 2016 Bernard Pratz <z+mutt+pub@m0g.net>
7  *
8  * @copyright
9  * This program is free software: you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License as published by the Free Software
11  * Foundation, either version 2 of the License, or (at your option) any later
12  * version.
13  *
14  * This program is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
17  * details.
18  *
19  * You should have received a copy of the GNU General Public License along with
20  * this program.  If not, see <http://www.gnu.org/licenses/>.
21  */
22
23 #ifndef _MUTT_COMMANDS_H
24 #define _MUTT_COMMANDS_H
25
26 struct Buffer;
27
28 /**
29  * struct Command - A user-callable command
30  */
31 struct Command
32 {
33   char *name;
34   int (*func)(struct Buffer *, struct Buffer *, unsigned long, struct Buffer *);
35   unsigned long data;
36 };
37
38 const struct Command *mutt_command_get(const char *s);
39 void mutt_commands_apply(void *data, void (*application)(void *, const struct Command *));
40
41 #endif /* _MUTT_COMMANDS_H */