2 * Copyright (c) 2021 Omar Polo <op@omarpolo.com>
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 #include "telescope.h"
23 extern int body_lines;
26 extern struct kmap global_map, minibuffer_map, *current_map, *base_map;
31 struct vline *current_line;
32 struct vline *top_line;
84 PPATCH_HUNK_HDR_TRAIL,
110 PDOWNLOAD_DONE_TRAIL,
114 PDOWNLOAD_INFO_TRAIL,
127 extern struct thiskey thiskey;
129 extern struct tab *current_tab;
131 extern struct buffer helpwin;
132 extern int help_lines, help_cols;
134 extern struct buffer downloadwin;
135 extern int download_lines;
136 extern int download_cols;
138 void get_scroll_position(struct tab *, size_t *, size_t *);
139 void save_excursion(struct excursion *, struct buffer *);
140 void restore_excursion(struct excursion *, struct buffer *);
141 void global_key_unbound(void);
142 struct buffer *current_buffer(void);
143 struct vline *adjust_line(struct vline *, struct buffer *);
144 void start_loading_anim(struct tab *);
146 int ui_print_colors(void);
148 void ui_main_loop(void);
149 void ui_on_tab_loaded(struct tab *);
150 void ui_on_tab_refresh(struct tab *);
151 void ui_on_download_refresh(void);
152 void ui_remotely_open_link(const char *);
153 const char *ui_keyname(int);
154 void ui_toggle_side_window(int);
155 void ui_show_downloads_pane(void);
156 void ui_schedule_redraw(void);
157 void ui_after_message_hook(void);
158 void ui_require_input(struct tab *, int, void (*)(void));
159 void ui_yornp(const char *, void (*)(int, struct tab *), struct tab *);
160 void ui_read(const char *, void (*)(const char *, struct tab *), struct tab *, const char *);
161 void ui_other_window(void);
162 void ui_suspend(void);