OSDN Git Service

d250208e5640e8277e823dcc5bc19c84113fbf1d
[pf3gnuchains/pf3gnuchains4x.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 /* Opaque data type */
37 typedef char *Opaque;
38 typedef
39 Opaque (*OpaqueFuncPtr) (va_list);
40      typedef char **OpaqueList;
41      typedef OpaqueList OpaquePtr;
42
43 /* Generic function pointer */
44      typedef void (*TuiVoidFuncPtr) (va_list);
45      typedef int (*TuiIntFuncPtr) (va_list);
46 /*
47    typedef Opaque (*TuiOpaqueFuncPtr) (va_list);
48  */
49      typedef OpaqueFuncPtr TuiOpaqueFuncPtr;
50
51 extern void strcat_to_buf (char *, int, char *);
52 extern void strcat_to_buf_with_fmt (char *, int, char *, ...);
53
54 /* Types of error returns */
55      typedef enum
56        {
57          TUI_SUCCESS,
58          TUI_FAILURE
59        }
60 TuiStatus, *TuiStatusPtr;
61
62 /* Types of windows */
63      typedef enum
64        {
65          SRC_WIN = 0,
66          DISASSEM_WIN,
67          DATA_WIN,
68          CMD_WIN,
69          /* This must ALWAYS be AFTER the major windows last */
70          MAX_MAJOR_WINDOWS,
71          /* auxillary windows */
72          LOCATOR_WIN,
73          EXEC_INFO_WIN,
74          DATA_ITEM_WIN,
75          /* This must ALWAYS be next to last */
76          MAX_WINDOWS,
77          UNDEFINED_WIN          /* LAST */
78        }
79 TuiWinType, *TuiWinTypePtr;
80
81 /* This is a point definition */
82      typedef struct _TuiPoint
83        {
84          int x, y;
85        }
86 TuiPoint, *TuiPointPtr;
87
88 /* GENERAL TUI FUNCTIONS */
89 /* tui.c */
90 extern void tuiFree (char *);
91 extern CORE_ADDR tuiGetLowDisassemblyAddress (CORE_ADDR, CORE_ADDR);
92 extern void tui_show_assembly (CORE_ADDR addr);
93 extern int tui_is_window_visible (TuiWinType type);
94 extern int tui_get_command_dimension (int *width, int *height);
95
96 /* Initialize readline and configure the keymap for the switching
97    key shortcut.  */
98 extern void tui_initialize_readline (void);
99
100 /* Enter in the tui mode (curses).  */
101 extern void tui_enable (void);
102
103 /* Leave the tui mode.  */
104 extern void tui_disable (void);
105
106 extern void tui_initialize_io (void);
107
108 extern void tui_initialize_readline (void);
109
110 extern int tui_active;
111
112 extern void tui_install_hooks (void);
113 extern void tui_remove_hooks (void);
114
115 extern void tui_show_source (const char *file, int line);
116
117 extern struct ui_out *tui_out_new (struct ui_file *stream);
118
119 /* tuiDataWin.c */
120 extern void tui_vCheckDataValues (va_list);
121
122 /* tuiIO.c */
123 extern void tui_vStartNewLines (va_list);
124
125 /* tuiLayout.c */
126 extern TuiStatus tui_set_layout (const char *);
127
128 /* tuiSourceWin.c */
129 extern void tuiDisplayMainFunction (void);
130 extern void tuiUpdateAllExecInfos (void);
131 extern void tui_vAllSetHasBreakAt (va_list);
132 extern void tui_vUpdateSourceWindowsWithAddr (va_list);
133
134 /* tuiStack.c */
135 extern void tui_vShowFrameInfo (va_list);
136 extern void tui_vUpdateLocatorFilename (va_list);
137 #endif /* TUI_H */