1 /* External/Public TUI Header File.
2 Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
3 Contributed by Hewlett-Packard Company.
5 This file is part of GDB.
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.
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.
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. */
24 #if defined (HAVE_NCURSES_H)
26 #elif defined (HAVE_CURSES_H)
30 #ifdef ANSI_PROTOTYPES
45 /* Opaque data type */
48 Opaque (*OpaqueFuncPtr
) (va_list);
49 typedef char **OpaqueList
;
50 typedef OpaqueList OpaquePtr
;
52 /* Generic function pointer */
53 typedef void (*TuiVoidFuncPtr
) (va_list);
54 typedef int (*TuiIntFuncPtr
) (va_list);
56 typedef Opaque (*TuiOpaqueFuncPtr) (va_list);
58 typedef OpaqueFuncPtr TuiOpaqueFuncPtr
;
60 extern Opaque
vcatch_errors (OpaqueFuncPtr
, ...);
61 extern Opaque
va_catch_errors (OpaqueFuncPtr
, va_list);
63 extern void strcat_to_buf (char *, int, char *);
64 extern void strcat_to_buf_with_fmt (char *, int, char *, ...);
66 /* Types of error returns */
72 TuiStatus
, *TuiStatusPtr
;
74 /* Types of windows */
81 /* This must ALWAYS be AFTER the major windows last */
83 /* auxillary windows */
87 /* This must ALWAYS be next to last */
89 UNDEFINED_WIN
/* LAST */
91 TuiWinType
, *TuiWinTypePtr
;
93 /* This is a point definition */
94 typedef struct _TuiPoint
98 TuiPoint
, *TuiPointPtr
;
100 /* Generic window information */
101 typedef struct _TuiGenWinInfo
103 WINDOW
*handle
; /* window handle */
104 TuiWinType type
; /* type of window */
105 int width
; /* window width */
106 int height
; /* window height */
107 TuiPoint origin
; /* origin of window */
108 OpaquePtr content
; /* content of window */
109 int contentSize
; /* Size of content (# of elements) */
110 int contentInUse
; /* Can it be used, or is it already used? */
111 int viewportHeight
; /* viewport height */
112 int lastVisibleLine
; /* index of last visible line */
113 int isVisible
; /* whether the window is visible or not */
115 TuiGenWinInfo
, *TuiGenWinInfoPtr
;
117 /* GENERAL TUI FUNCTIONS */
119 extern void tuiInit (char *argv0
);
120 extern void tuiInitWindows (void);
121 extern void tuiResetScreen (void);
122 extern void tuiCleanUp (void);
123 extern void tuiError (char *, int);
124 extern void tui_vError (va_list);
125 extern void tuiFree (char *);
126 extern Opaque
tuiDo (TuiOpaqueFuncPtr
, ...);
127 extern Opaque
tuiDoAndReturnToTop (TuiOpaqueFuncPtr
, ...);
128 extern Opaque
tuiGetLowDisassemblyAddress (Opaque
, Opaque
);
129 extern Opaque
tui_vGetLowDisassemblyAddress (va_list);
130 extern void tui_vSelectSourceSymtab (va_list);
133 extern void tui_vCheckDataValues (va_list);
136 extern void tui_vStartNewLines (va_list);
139 extern void tui_vAddWinToLayout (va_list);
140 extern TuiStatus
tui_vSetLayoutTo (va_list);
143 extern void tuiDisplayMainFunction (void);
144 extern void tuiUpdateAllExecInfos (void);
145 extern void tuiUpdateOnEnd (void);
146 extern void tui_vAllSetHasBreakAt (va_list);
147 extern void tui_vUpdateSourceWindowsWithAddr (va_list);
150 extern void tui_vShowFrameInfo (va_list);
151 extern void tui_vUpdateLocatorFilename (va_list);