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.
20 int get_input(int prompt_position
, struct key
*key
, bool modifiers
);
21 int get_input_char(void);
23 extern WINDOW
*status_win
;
25 void update_status(const char *msg
, ...);
26 void report(const char *msg
, ...) PRINTF_LIKE(1, 2);
27 #define report_clear() report("%s", "")
33 /* The display array of active views and the index of the current view. */
34 extern struct view
*display
[2];
35 extern unsigned int current_view
;
37 #define foreach_displayed_view(view, i) \
38 for (i = 0; i < ARRAY_SIZE(display) && (view = display[i]); i++)
40 #define displayed_views() (display[1] != NULL ? 2 : 1)
42 #define view_is_displayed(view) \
43 (view == display[0] || view == display[1])
45 void init_display(void);
46 void resize_display(void);
47 void redraw_display(bool clear
);
48 bool save_display(const char *path
);
50 bool open_external_viewer(const char *argv
[], const char *dir
, bool confirm
, bool refresh
, const char *notice
);
51 void open_editor(const char *file
, unsigned int lineno
);
52 void enable_mouse(bool enable
);
54 bool open_script(const char *path
);
55 bool is_script_executing(void);
58 /* vim: set ts=8 sw=8 noexpandtab: */