* configure.ac: Switch license to GPLv3.
[deliverable/binutils-gdb.git] / gdb / tui / tui.h
CommitLineData
f377b406 1/* External/Public TUI Header File.
65f05602 2
6aba47ca
DJ
3 Copyright (C) 1998, 1999, 2000, 2001, 2004, 2007
4 Free Software Foundation, 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
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
88d83552
EZ
22 Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 Boston, MA 02110-1301, USA. */
c906108c
SS
24
25#ifndef TUI_H
26#define TUI_H
c906108c 27
4a4b3fed
AC
28struct ui_file;
29
297d1607 30extern void strcat_to_buf (char *, int, const char *);
c906108c 31
22940a24
AC
32/* Types of error returns. */
33enum tui_status
34{
35 TUI_SUCCESS,
36 TUI_FAILURE
37};
c906108c 38
1cc6d956 39/* Types of windows. */
22940a24
AC
40enum tui_win_type
41{
42 SRC_WIN = 0,
43 DISASSEM_WIN,
44 DATA_WIN,
45 CMD_WIN,
46 /* This must ALWAYS be AFTER the major windows last. */
47 MAX_MAJOR_WINDOWS,
48 /* Auxillary windows. */
49 LOCATOR_WIN,
50 EXEC_INFO_WIN,
51 DATA_ITEM_WIN,
52 /* This must ALWAYS be next to last. */
53 MAX_WINDOWS,
54 UNDEFINED_WIN /* LAST */
55};
56
c906108c
SS
57/* GENERAL TUI FUNCTIONS */
58/* tui.c */
08ef48c5
MS
59extern CORE_ADDR tui_get_low_disassembly_address (CORE_ADDR,
60 CORE_ADDR);
1403b519 61extern void tui_show_assembly (CORE_ADDR addr);
22940a24 62extern int tui_is_window_visible (enum tui_win_type type);
c68a6671
AC
63extern int tui_get_command_dimension (unsigned int *width,
64 unsigned int *height);
39db33d6
SC
65
66/* Initialize readline and configure the keymap for the switching
67 key shortcut. */
68extern void tui_initialize_readline (void);
69
70/* Enter in the tui mode (curses). */
71extern void tui_enable (void);
72
73/* Leave the tui mode. */
74extern void tui_disable (void);
c906108c 75
e09d2eba
SC
76enum tui_key_mode
77{
78 /* Plain command mode to enter gdb commands. */
6d012f14 79 TUI_COMMAND_MODE,
e09d2eba
SC
80
81 /* SingleKey mode with some keys bound to gdb commands. */
6d012f14 82 TUI_SINGLE_KEY_MODE,
e09d2eba 83
1cc6d956
MS
84 /* Read/edit one command and return to SingleKey after it's
85 processed. */
6d012f14 86 TUI_ONE_COMMAND_MODE
e09d2eba
SC
87};
88
89extern enum tui_key_mode tui_current_key_mode;
90
1cc6d956
MS
91/* Change the TUI key mode by installing the appropriate readline
92 keymap. */
e09d2eba
SC
93extern void tui_set_key_mode (enum tui_key_mode mode);
94
c6f60bcd
SC
95extern int tui_active;
96
c6f60bcd
SC
97extern void tui_show_source (const char *file, int line);
98
99extern struct ui_out *tui_out_new (struct ui_file *stream);
100
22940a24 101/* tui-layout.c */
08ef48c5 102extern enum tui_status tui_set_layout_for_display_command (const char *);
c906108c 103
6d012f14 104#endif
This page took 0.705824 seconds and 4 git commands to generate.