Commit | Line | Data |
---|---|---|
f377b406 | 1 | /* External/Public TUI Header File. |
65f05602 | 2 | |
42a4f53d | 3 | Copyright (C) 1998-2019 Free Software Foundation, Inc. |
65f05602 | 4 | |
f377b406 SC |
5 | Contributed by Hewlett-Packard Company. |
6 | ||
7 | This file is part of GDB. | |
8 | ||
9 | This program is free software; you can redistribute it and/or modify | |
10 | it under the terms of the GNU General Public License as published by | |
a9762ec7 | 11 | the Free Software Foundation; either version 3 of the License, or |
f377b406 SC |
12 | (at your option) any later version. |
13 | ||
14 | This program is distributed in the hope that it will be useful, | |
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | GNU General Public License for more details. | |
18 | ||
19 | You should have received a copy of the GNU General Public License | |
a9762ec7 | 20 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
c906108c | 21 | |
1a5c2598 TT |
22 | #ifndef TUI_TUI_H |
23 | #define TUI_TUI_H | |
c906108c | 24 | |
4a4b3fed AC |
25 | struct ui_file; |
26 | ||
22940a24 AC |
27 | /* Types of error returns. */ |
28 | enum tui_status | |
29 | { | |
30 | TUI_SUCCESS, | |
31 | TUI_FAILURE | |
32 | }; | |
c906108c | 33 | |
1cc6d956 | 34 | /* Types of windows. */ |
22940a24 AC |
35 | enum tui_win_type |
36 | { | |
37 | SRC_WIN = 0, | |
38 | DISASSEM_WIN, | |
39 | DATA_WIN, | |
40 | CMD_WIN, | |
41 | /* This must ALWAYS be AFTER the major windows last. */ | |
42 | MAX_MAJOR_WINDOWS, | |
6658b1bf | 43 | /* Auxiliary windows. */ |
22940a24 | 44 | LOCATOR_WIN, |
d2802c33 | 45 | DATA_ITEM_WIN |
22940a24 AC |
46 | }; |
47 | ||
c906108c SS |
48 | /* GENERAL TUI FUNCTIONS */ |
49 | /* tui.c */ | |
13274fc3 UW |
50 | extern CORE_ADDR tui_get_low_disassembly_address (struct gdbarch *, |
51 | CORE_ADDR, CORE_ADDR); | |
52 | extern void tui_show_assembly (struct gdbarch *gdbarch, CORE_ADDR addr); | |
56122977 | 53 | extern bool tui_is_window_visible (enum tui_win_type type); |
c68a6671 AC |
54 | extern int tui_get_command_dimension (unsigned int *width, |
55 | unsigned int *height); | |
39db33d6 SC |
56 | |
57 | /* Initialize readline and configure the keymap for the switching | |
58 | key shortcut. */ | |
59 | extern void tui_initialize_readline (void); | |
60 | ||
61 | /* Enter in the tui mode (curses). */ | |
62 | extern void tui_enable (void); | |
63 | ||
64 | /* Leave the tui mode. */ | |
65 | extern void tui_disable (void); | |
c906108c | 66 | |
e09d2eba SC |
67 | enum tui_key_mode |
68 | { | |
69 | /* Plain command mode to enter gdb commands. */ | |
6d012f14 | 70 | TUI_COMMAND_MODE, |
e09d2eba SC |
71 | |
72 | /* SingleKey mode with some keys bound to gdb commands. */ | |
6d012f14 | 73 | TUI_SINGLE_KEY_MODE, |
e09d2eba | 74 | |
1cc6d956 MS |
75 | /* Read/edit one command and return to SingleKey after it's |
76 | processed. */ | |
6d012f14 | 77 | TUI_ONE_COMMAND_MODE |
e09d2eba SC |
78 | }; |
79 | ||
80 | extern enum tui_key_mode tui_current_key_mode; | |
81 | ||
1cc6d956 MS |
82 | /* Change the TUI key mode by installing the appropriate readline |
83 | keymap. */ | |
e09d2eba SC |
84 | extern void tui_set_key_mode (enum tui_key_mode mode); |
85 | ||
c6f60bcd SC |
86 | extern int tui_active; |
87 | ||
56d397a3 | 88 | extern void tui_show_source (const char *fullname, int line); |
c6f60bcd | 89 | |
1a5c2598 | 90 | #endif /* TUI_TUI_H */ |