Automatic Copyright Year update after running gdb/copyright.py
[binutils-gdb.git] / gdb / tui / tui.h
bloba4df66f17fcb793f4ad56c4009bd01a62cab807b
1 /* External/Public TUI Header File.
3 Copyright (C) 1998-2022 Free Software Foundation, Inc.
5 Contributed by Hewlett-Packard Company.
7 This file is part of GDB.
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
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
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.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
22 #ifndef TUI_TUI_H
23 #define TUI_TUI_H
25 struct ui_file;
27 /* Types of error returns. */
28 enum tui_status
30 TUI_SUCCESS,
31 TUI_FAILURE
34 /* Types of windows. */
35 enum tui_win_type
37 SRC_WIN = 0,
38 DISASSEM_WIN,
39 DATA_WIN,
40 CMD_WIN,
41 STATUS_WIN,
42 /* This must ALWAYS be AFTER the major windows last. */
43 MAX_MAJOR_WINDOWS,
46 extern CORE_ADDR tui_get_low_disassembly_address (struct gdbarch *,
47 CORE_ADDR, CORE_ADDR);
48 extern void tui_show_assembly (struct gdbarch *gdbarch, CORE_ADDR addr);
49 extern bool tui_is_window_visible (enum tui_win_type type);
50 extern bool tui_get_command_dimension (unsigned int *width,
51 unsigned int *height);
53 /* Initialize readline and configure the keymap for the switching key
54 shortcut. May be called more than once without issue. */
55 extern void tui_ensure_readline_initialized ();
57 /* Enter in the tui mode (curses). */
58 extern void tui_enable (void);
60 /* Leave the tui mode. */
61 extern void tui_disable (void);
63 enum tui_key_mode
65 /* Plain command mode to enter gdb commands. */
66 TUI_COMMAND_MODE,
68 /* SingleKey mode with some keys bound to gdb commands. */
69 TUI_SINGLE_KEY_MODE,
71 /* Read/edit one command and return to SingleKey after it's
72 processed. */
73 TUI_ONE_COMMAND_MODE
76 extern enum tui_key_mode tui_current_key_mode;
78 /* Change the TUI key mode by installing the appropriate readline
79 keymap. */
80 extern void tui_set_key_mode (enum tui_key_mode mode);
82 extern bool tui_active;
84 #endif /* TUI_TUI_H */