]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/tui/tui.h
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / tui / tui.h
CommitLineData
f377b406 1/* External/Public TUI Header File.
65f05602 2
213516ef 3 Copyright (C) 1998-2023 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
7421ccda
AB
25/* Flag to control tui debugging. */
26
27extern bool debug_tui;
28
29/* Print a "tui" debug statement. */
30
31#define tui_debug_printf(fmt, ...) \
32 debug_prefixed_printf_cond (debug_tui, "tui", fmt, ##__VA_ARGS__)
33
34/* Print "tui" enter/exit debug statements. */
35
36#define TUI_SCOPED_DEBUG_ENTER_EXIT \
37 scoped_debug_enter_exit (debug_tui, "tui")
38
4a4b3fed
AC
39struct ui_file;
40
22940a24
AC
41/* Types of error returns. */
42enum tui_status
43{
44 TUI_SUCCESS,
45 TUI_FAILURE
46};
c906108c 47
1cc6d956 48/* Types of windows. */
22940a24
AC
49enum tui_win_type
50{
51 SRC_WIN = 0,
52 DISASSEM_WIN,
53 DATA_WIN,
54 CMD_WIN,
f237f998 55 STATUS_WIN,
22940a24
AC
56 /* This must ALWAYS be AFTER the major windows last. */
57 MAX_MAJOR_WINDOWS,
22940a24
AC
58};
59
13274fc3
UW
60extern CORE_ADDR tui_get_low_disassembly_address (struct gdbarch *,
61 CORE_ADDR, CORE_ADDR);
62extern void tui_show_assembly (struct gdbarch *gdbarch, CORE_ADDR addr);
56122977 63extern bool tui_is_window_visible (enum tui_win_type type);
87d557ae
TT
64extern bool tui_get_command_dimension (unsigned int *width,
65 unsigned int *height);
39db33d6 66
a350efd4
TT
67/* Initialize readline and configure the keymap for the switching key
68 shortcut. May be called more than once without issue. */
69extern void tui_ensure_readline_initialized ();
39db33d6
SC
70
71/* Enter in the tui mode (curses). */
72extern void tui_enable (void);
73
74/* Leave the tui mode. */
75extern void tui_disable (void);
c906108c 76
e09d2eba
SC
77enum tui_key_mode
78{
79 /* Plain command mode to enter gdb commands. */
6d012f14 80 TUI_COMMAND_MODE,
e09d2eba
SC
81
82 /* SingleKey mode with some keys bound to gdb commands. */
6d012f14 83 TUI_SINGLE_KEY_MODE,
e09d2eba 84
1cc6d956
MS
85 /* Read/edit one command and return to SingleKey after it's
86 processed. */
6d012f14 87 TUI_ONE_COMMAND_MODE
e09d2eba
SC
88};
89
90extern enum tui_key_mode tui_current_key_mode;
91
1cc6d956
MS
92/* Change the TUI key mode by installing the appropriate readline
93 keymap. */
e09d2eba
SC
94extern void tui_set_key_mode (enum tui_key_mode mode);
95
a1e4dee4 96extern bool tui_active;
c6f60bcd 97
1a5c2598 98#endif /* TUI_TUI_H */