* tuiWin.c, tuiWin.h, tui.c, tui.h, tuiCommand.c: Add FSF copyright.
[deliverable/binutils-gdb.git] / gdb / tui / tui.h
CommitLineData
f377b406
SC
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. */
c906108c
SS
21
22#ifndef TUI_H
23#define TUI_H
2894793a
AC
24#if defined (HAVE_NCURSES_H)
25#include <ncurses.h>
26#elif defined (HAVE_CURSES_H)
c906108c 27#include <curses.h>
2894793a 28#endif
c906108c
SS
29
30#ifdef ANSI_PROTOTYPES
31#include <stdarg.h>
32#else
33#include <varargs.h>
34#endif
35
36#include "ansidecl.h"
37
38#if defined(reg)
39#undef reg
40#endif
41#if defined(chtype)
42#undef chtype
43#endif
44
45/* Opaque data type */
46typedef char *Opaque;
c5aa993b 47typedef
507f3c78 48Opaque (*OpaqueFuncPtr) (va_list);
c5aa993b
JM
49 typedef char **OpaqueList;
50 typedef OpaqueList OpaquePtr;
c906108c
SS
51
52/* Generic function pointer */
507f3c78
KB
53 typedef void (*TuiVoidFuncPtr) (va_list);
54 typedef int (*TuiIntFuncPtr) (va_list);
c906108c 55/*
507f3c78 56 typedef Opaque (*TuiOpaqueFuncPtr) (va_list);
c5aa993b
JM
57 */
58 typedef OpaqueFuncPtr TuiOpaqueFuncPtr;
c906108c 59
a14ed312
KB
60extern Opaque vcatch_errors (OpaqueFuncPtr, ...);
61extern Opaque va_catch_errors (OpaqueFuncPtr, va_list);
c906108c 62
a14ed312
KB
63extern void strcat_to_buf (char *, int, char *);
64extern void strcat_to_buf_with_fmt (char *, int, char *, ...);
c906108c
SS
65
66/* Types of error returns */
c5aa993b
JM
67 typedef enum
68 {
69 TUI_SUCCESS,
70 TUI_FAILURE
71 }
72TuiStatus, *TuiStatusPtr;
c906108c
SS
73
74/* Types of windows */
c5aa993b
JM
75 typedef enum
76 {
77 SRC_WIN = 0,
78 DISASSEM_WIN,
79 DATA_WIN,
80 CMD_WIN,
81 /* This must ALWAYS be AFTER the major windows last */
82 MAX_MAJOR_WINDOWS,
83 /* auxillary windows */
84 LOCATOR_WIN,
85 EXEC_INFO_WIN,
86 DATA_ITEM_WIN,
87 /* This must ALWAYS be next to last */
88 MAX_WINDOWS,
89 UNDEFINED_WIN /* LAST */
90 }
91TuiWinType, *TuiWinTypePtr;
c906108c
SS
92
93/* This is a point definition */
c5aa993b
JM
94 typedef struct _TuiPoint
95 {
96 int x, y;
97 }
98TuiPoint, *TuiPointPtr;
c906108c
SS
99
100/* Generic window information */
c5aa993b
JM
101 typedef struct _TuiGenWinInfo
102 {
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 */
114 }
115TuiGenWinInfo, *TuiGenWinInfoPtr;
c906108c
SS
116
117/* GENERAL TUI FUNCTIONS */
118/* tui.c */
a14ed312
KB
119extern void tuiInit (char *argv0);
120extern void tuiInitWindows (void);
121extern void tuiResetScreen (void);
122extern void tuiCleanUp (void);
123extern void tuiError (char *, int);
124extern void tui_vError (va_list);
125extern void tuiFree (char *);
126extern Opaque tuiDo (TuiOpaqueFuncPtr, ...);
127extern Opaque tuiDoAndReturnToTop (TuiOpaqueFuncPtr, ...);
128extern Opaque tuiGetLowDisassemblyAddress (Opaque, Opaque);
129extern Opaque tui_vGetLowDisassemblyAddress (va_list);
130extern void tui_vSelectSourceSymtab (va_list);
c906108c
SS
131
132/* tuiDataWin.c */
a14ed312 133extern void tui_vCheckDataValues (va_list);
c906108c
SS
134
135/* tuiIO.c */
a14ed312 136extern void tui_vStartNewLines (va_list);
c906108c
SS
137
138/* tuiLayout.c */
a14ed312
KB
139extern void tui_vAddWinToLayout (va_list);
140extern TuiStatus tui_vSetLayoutTo (va_list);
c906108c
SS
141
142/* tuiSourceWin.c */
a14ed312
KB
143extern void tuiDisplayMainFunction (void);
144extern void tuiUpdateAllExecInfos (void);
145extern void tuiUpdateOnEnd (void);
146extern void tui_vAllSetHasBreakAt (va_list);
147extern void tui_vUpdateSourceWindowsWithAddr (va_list);
c906108c
SS
148
149/* tuiStack.c */
a14ed312
KB
150extern void tui_vShowFrameInfo (va_list);
151extern void tui_vUpdateLocatorFilename (va_list);
c906108c 152#endif /* TUI_H */
This page took 0.145674 seconds and 4 git commands to generate.