Copyright year update in most files of the GDB Project.
[deliverable/binutils-gdb.git] / gdb / tui / tui.h
CommitLineData
f377b406 1/* External/Public TUI Header File.
65f05602 2
c5a57081
JB
3 Copyright (C) 1998-2001, 2004, 2007-2012 Free Software Foundation,
4 Inc.
65f05602 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
a9762ec7 12 the Free Software Foundation; either version 3 of the License, or
f377b406
SC
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
a9762ec7 21 along with this program. If not, see <http://www.gnu.org/licenses/>. */
c906108c
SS
22
23#ifndef TUI_H
24#define TUI_H
c906108c 25
4a4b3fed
AC
26struct ui_file;
27
297d1607 28extern void strcat_to_buf (char *, int, const char *);
c906108c 29
22940a24
AC
30/* Types of error returns. */
31enum tui_status
32{
33 TUI_SUCCESS,
34 TUI_FAILURE
35};
c906108c 36
1cc6d956 37/* Types of windows. */
22940a24
AC
38enum tui_win_type
39{
40 SRC_WIN = 0,
41 DISASSEM_WIN,
42 DATA_WIN,
43 CMD_WIN,
44 /* This must ALWAYS be AFTER the major windows last. */
45 MAX_MAJOR_WINDOWS,
46 /* Auxillary windows. */
47 LOCATOR_WIN,
48 EXEC_INFO_WIN,
49 DATA_ITEM_WIN,
50 /* This must ALWAYS be next to last. */
51 MAX_WINDOWS,
52 UNDEFINED_WIN /* LAST */
53};
54
c906108c
SS
55/* GENERAL TUI FUNCTIONS */
56/* tui.c */
13274fc3
UW
57extern CORE_ADDR tui_get_low_disassembly_address (struct gdbarch *,
58 CORE_ADDR, CORE_ADDR);
59extern void tui_show_assembly (struct gdbarch *gdbarch, CORE_ADDR addr);
22940a24 60extern int tui_is_window_visible (enum tui_win_type type);
c68a6671
AC
61extern int tui_get_command_dimension (unsigned int *width,
62 unsigned int *height);
39db33d6
SC
63
64/* Initialize readline and configure the keymap for the switching
65 key shortcut. */
66extern void tui_initialize_readline (void);
67
956c2c8b
PA
68/* True if enabling the TUI is allowed. Example, if the top level
69 interpreter is MI, enabling curses will certainly lose. */
70extern int tui_allowed_p (void);
71
39db33d6
SC
72/* Enter in the tui mode (curses). */
73extern void tui_enable (void);
74
75/* Leave the tui mode. */
76extern void tui_disable (void);
c906108c 77
e09d2eba
SC
78enum tui_key_mode
79{
80 /* Plain command mode to enter gdb commands. */
6d012f14 81 TUI_COMMAND_MODE,
e09d2eba
SC
82
83 /* SingleKey mode with some keys bound to gdb commands. */
6d012f14 84 TUI_SINGLE_KEY_MODE,
e09d2eba 85
1cc6d956
MS
86 /* Read/edit one command and return to SingleKey after it's
87 processed. */
6d012f14 88 TUI_ONE_COMMAND_MODE
e09d2eba
SC
89};
90
91extern enum tui_key_mode tui_current_key_mode;
92
1cc6d956
MS
93/* Change the TUI key mode by installing the appropriate readline
94 keymap. */
e09d2eba
SC
95extern void tui_set_key_mode (enum tui_key_mode mode);
96
c6f60bcd
SC
97extern int tui_active;
98
c6f60bcd
SC
99extern void tui_show_source (const char *file, int line);
100
101extern struct ui_out *tui_out_new (struct ui_file *stream);
102
22940a24 103/* tui-layout.c */
08ef48c5 104extern enum tui_status tui_set_layout_for_display_command (const char *);
c906108c 105
6d012f14 106#endif
This page took 1.136449 seconds and 4 git commands to generate.