1 /* 2 * bindings.h 3 * 4 * Header for command string definitions (actually defined in commands.c) and 5 * functions for dealing with key bindings. 6 * 7 * This file is part of the ckpass project. 8 * 9 * Copyright (C) 2009 Heath N. Caldwell <hncaldwell@gmail.com> 10 * 11 * This program is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU General Public License as published by 13 * the Free Software Foundation, either version 3 of the License, or 14 * (at your option) any later version. 15 * 16 * This program is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License 22 * along with this program. If not, see <http://www.gnu.org/licenses/>. 23 * 24 */ 25 26 #ifndef BINDINGS_H 27 #define BINDINGS_H 28 29 /* Command strings. */ 30 extern const char *C_OPEN; 31 extern const char *C_SAVE; 32 extern const char *C_ADD_GROUP; 33 extern const char *C_SELECT; 34 extern const char *C_EDIT; 35 extern const char *C_QUIT; 36 extern const char *C_ADD_ENTRY; 37 extern const char *C_GROUPS; 38 extern const char *C_REVEAL; 39 extern const char *C_PREV; 40 extern const char *C_NEXT; 41 extern const char *C_XCLIP; 42 43 struct binding { 44 int key; 45 char *command; 46 }; 47 48 void add_binding(struct binding **set, int key, const char *command); 49 struct binding *new_binding_set(); 50 51 #endif // BINDINGS_H 52 53