Eliminate the old mi/tui specific ChangeLog files as in ...
[deliverable/binutils-gdb.git] / gdb / tui / tui.h
1 /* External/Public TUI Header File.
2 Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
3 Contributed by Hewlett-Packard Company.
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
21
22 #ifndef TUI_H
23 #define TUI_H
24
25 #include <stdarg.h>
26 #include <string.h>
27 #include "ansidecl.h"
28
29 #if defined(reg)
30 #undef reg
31 #endif
32 #if defined(chtype)
33 #undef chtype
34 #endif
35
36 struct ui_file;
37
38 /* Opaque data type */
39 typedef char *Opaque;
40 typedef
41 Opaque (*OpaqueFuncPtr) (va_list);
42 typedef char **OpaqueList;
43 typedef OpaqueList OpaquePtr;
44
45 /* Generic function pointer */
46 typedef void (*TuiVoidFuncPtr) (va_list);
47 typedef int (*TuiIntFuncPtr) (va_list);
48 /*
49 typedef Opaque (*TuiOpaqueFuncPtr) (va_list);
50 */
51 typedef OpaqueFuncPtr TuiOpaqueFuncPtr;
52
53 extern void strcat_to_buf (char *, int, const char *);
54
55 /* Types of error returns */
56 typedef enum
57 {
58 TUI_SUCCESS,
59 TUI_FAILURE
60 }
61 TuiStatus, *TuiStatusPtr;
62
63 /* Types of windows */
64 typedef enum
65 {
66 SRC_WIN = 0,
67 DISASSEM_WIN,
68 DATA_WIN,
69 CMD_WIN,
70 /* This must ALWAYS be AFTER the major windows last */
71 MAX_MAJOR_WINDOWS,
72 /* auxillary windows */
73 LOCATOR_WIN,
74 EXEC_INFO_WIN,
75 DATA_ITEM_WIN,
76 /* This must ALWAYS be next to last */
77 MAX_WINDOWS,
78 UNDEFINED_WIN /* LAST */
79 }
80 TuiWinType, *TuiWinTypePtr;
81
82 /* This is a point definition */
83 typedef struct _TuiPoint
84 {
85 int x, y;
86 }
87 TuiPoint, *TuiPointPtr;
88
89 /* GENERAL TUI FUNCTIONS */
90 /* tui.c */
91 extern void tuiFree (char *);
92 extern CORE_ADDR tuiGetLowDisassemblyAddress (CORE_ADDR, CORE_ADDR);
93 extern void tui_show_assembly (CORE_ADDR addr);
94 extern int tui_is_window_visible (TuiWinType type);
95 extern int tui_get_command_dimension (int *width, int *height);
96
97 /* Initialize readline and configure the keymap for the switching
98 key shortcut. */
99 extern void tui_initialize_readline (void);
100
101 /* Enter in the tui mode (curses). */
102 extern void tui_enable (void);
103
104 /* Leave the tui mode. */
105 extern void tui_disable (void);
106
107 enum tui_key_mode
108 {
109 /* Plain command mode to enter gdb commands. */
110 tui_command_mode,
111
112 /* SingleKey mode with some keys bound to gdb commands. */
113 tui_single_key_mode,
114
115 /* Read/edit one command and return to SingleKey after it's processed. */
116 tui_one_command_mode
117 };
118
119 extern enum tui_key_mode tui_current_key_mode;
120
121 /* Change the TUI key mode by installing the appropriate readline keymap. */
122 extern void tui_set_key_mode (enum tui_key_mode mode);
123
124 extern void tui_initialize_io (void);
125
126 extern void tui_initialize_readline (void);
127
128 extern int tui_active;
129
130 extern void tui_install_hooks (void);
131 extern void tui_remove_hooks (void);
132
133 extern void tui_show_source (const char *file, int line);
134
135 extern struct ui_out *tui_out_new (struct ui_file *stream);
136
137 /* tuiLayout.c */
138 extern TuiStatus tui_set_layout (const char *);
139
140 /* tuiSourceWin.c */
141 extern void tuiUpdateAllExecInfos (void);
142
143 #endif /* TUI_H */
This page took 0.031669 seconds and 4 git commands to generate.