Commit | Line | Data |
---|---|---|
f377b406 | 1 | /* External/Public TUI Header File. |
65f05602 AC |
2 | |
3 | Copyright 1998, 1999, 2000, 2001, 2004 Free Software Foundation, | |
4 | Inc. | |
5 | ||
f377b406 SC |
6 | Contributed by Hewlett-Packard Company. |
7 | ||
8 | This file is part of GDB. | |
9 | ||
10 | This program is free software; you can redistribute it and/or modify | |
11 | it under the terms of the GNU General Public License as published by | |
12 | the Free Software Foundation; either version 2 of the License, or | |
13 | (at your option) any later version. | |
14 | ||
15 | This program is distributed in the hope that it will be useful, | |
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | GNU General Public License for more details. | |
19 | ||
20 | You should have received a copy of the GNU General Public License | |
21 | along with this program; if not, write to the Free Software | |
22 | Foundation, Inc., 59 Temple Place - Suite 330, | |
23 | Boston, MA 02111-1307, USA. */ | |
c906108c SS |
24 | |
25 | #ifndef TUI_H | |
26 | #define TUI_H | |
c906108c | 27 | |
c906108c | 28 | #include <stdarg.h> |
2a5127c4 | 29 | #include <string.h> |
c906108c SS |
30 | #include "ansidecl.h" |
31 | ||
32 | #if defined(reg) | |
33 | #undef reg | |
34 | #endif | |
35 | #if defined(chtype) | |
36 | #undef chtype | |
37 | #endif | |
38 | ||
4a4b3fed AC |
39 | struct ui_file; |
40 | ||
297d1607 | 41 | extern void strcat_to_buf (char *, int, const char *); |
c906108c | 42 | |
22940a24 AC |
43 | /* Types of error returns. */ |
44 | enum tui_status | |
45 | { | |
46 | TUI_SUCCESS, | |
47 | TUI_FAILURE | |
48 | }; | |
c906108c SS |
49 | |
50 | /* Types of windows */ | |
22940a24 AC |
51 | enum tui_win_type |
52 | { | |
53 | SRC_WIN = 0, | |
54 | DISASSEM_WIN, | |
55 | DATA_WIN, | |
56 | CMD_WIN, | |
57 | /* This must ALWAYS be AFTER the major windows last. */ | |
58 | MAX_MAJOR_WINDOWS, | |
59 | /* Auxillary windows. */ | |
60 | LOCATOR_WIN, | |
61 | EXEC_INFO_WIN, | |
62 | DATA_ITEM_WIN, | |
63 | /* This must ALWAYS be next to last. */ | |
64 | MAX_WINDOWS, | |
65 | UNDEFINED_WIN /* LAST */ | |
66 | }; | |
67 | ||
68 | /* This is a point definition. */ | |
69 | struct tui_point | |
70 | { | |
71 | int x, y; | |
72 | }; | |
c906108c | 73 | |
c906108c SS |
74 | /* GENERAL TUI FUNCTIONS */ |
75 | /* tui.c */ | |
22940a24 | 76 | extern CORE_ADDR tui_get_low_disassembly_address (CORE_ADDR, CORE_ADDR); |
1403b519 | 77 | extern void tui_show_assembly (CORE_ADDR addr); |
22940a24 | 78 | extern int tui_is_window_visible (enum tui_win_type type); |
1403b519 | 79 | extern int tui_get_command_dimension (int *width, int *height); |
39db33d6 SC |
80 | |
81 | /* Initialize readline and configure the keymap for the switching | |
82 | key shortcut. */ | |
83 | extern void tui_initialize_readline (void); | |
84 | ||
85 | /* Enter in the tui mode (curses). */ | |
86 | extern void tui_enable (void); | |
87 | ||
88 | /* Leave the tui mode. */ | |
89 | extern void tui_disable (void); | |
c906108c | 90 | |
e09d2eba SC |
91 | enum tui_key_mode |
92 | { | |
93 | /* Plain command mode to enter gdb commands. */ | |
94 | tui_command_mode, | |
95 | ||
96 | /* SingleKey mode with some keys bound to gdb commands. */ | |
97 | tui_single_key_mode, | |
98 | ||
99 | /* Read/edit one command and return to SingleKey after it's processed. */ | |
100 | tui_one_command_mode | |
101 | }; | |
102 | ||
103 | extern enum tui_key_mode tui_current_key_mode; | |
104 | ||
105 | /* Change the TUI key mode by installing the appropriate readline keymap. */ | |
106 | extern void tui_set_key_mode (enum tui_key_mode mode); | |
107 | ||
c6f60bcd SC |
108 | extern void tui_initialize_io (void); |
109 | ||
110 | extern void tui_initialize_readline (void); | |
111 | ||
112 | extern int tui_active; | |
113 | ||
114 | extern void tui_install_hooks (void); | |
115 | extern void tui_remove_hooks (void); | |
116 | ||
117 | extern void tui_show_source (const char *file, int line); | |
118 | ||
119 | extern struct ui_out *tui_out_new (struct ui_file *stream); | |
120 | ||
22940a24 | 121 | /* tui-layout.c */ |
080ce8c0 | 122 | extern enum tui_status tui_set_layout_for_display_command (const char *name); |
c906108c | 123 | |
22940a24 AC |
124 | /* tui-winsource.c */ |
125 | extern void tui_update_all_exec_infos (void); | |
c906108c | 126 | |
c906108c | 127 | #endif /* TUI_H */ |