1 /** 2 * @file 3 * Definitions of NeoMutt commands 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_MUTT_COMMANDS_H 24 #define MUTT_MUTT_COMMANDS_H 25 26 #include "config.h" 27 #include <stddef.h> 28 #include "mutt/lib.h" 29 30 struct Command; 31 32 /** 33 * enum MuttSetCommand - Flags for parse_set() 34 */ 35 enum MuttSetCommand 36 { 37 MUTT_SET_SET, ///< default is to set all vars 38 MUTT_SET_INV, ///< default is to invert all vars 39 MUTT_SET_UNSET, ///< default is to unset all vars 40 MUTT_SET_RESET, ///< default is to reset all vars to default 41 }; 42 43 /* parameter to parse_mailboxes */ 44 #define MUTT_NAMED (1 << 0) 45 46 /* command registry functions */ 47 #define COMMANDS_REGISTER(cmds) commands_register(cmds, mutt_array_size(cmds)) 48 49 void mutt_commands_init (void); 50 void commands_register (const struct Command *cmdv, const size_t cmds); 51 void mutt_commands_free (void); 52 size_t mutt_commands_array (struct Command **first); 53 struct Command *mutt_command_get (const char *s); 54 #ifdef USE_LUA 55 void mutt_commands_apply (void *data, void (*application)(void *, const struct Command *)); 56 #endif 57 58 #endif /* MUTT_MUTT_COMMANDS_H */ 59