prompt: move code to new prompt module
[tig.git] / include / tig / prompt.h
blobececf573a985ba0a3518fe1b9751800e98e2010b
1 /* Copyright (c) 2006-2014 Jonas Fonseca <jonas.fonseca@gmail.com>
3 * This program is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU General Public License as
5 * published by the Free Software Foundation; either version 2 of
6 * the License, or (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
14 #ifndef TIG_PROMPT_H
15 #define TIG_PROMPT_H
17 #include "tig/tig.h"
18 #include "tig/keys.h"
20 struct view;
22 struct menu_item {
23 int hotkey;
24 const char *text;
25 void *data;
28 char *read_prompt(const char *prompt);
29 bool prompt_yesno(const char *prompt);
30 bool prompt_menu(const char *prompt, const struct menu_item *items, int *selected);
32 enum request run_prompt_command(struct view *view, char *cmd);
33 enum request open_prompt(struct view *view);
35 #endif
36 /* vim: set ts=8 sw=8 noexpandtab: */