]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/tui/tui.h
Initial creation of sourceware repository
[thirdparty/binutils-gdb.git] / gdb / tui / tui.h
CommitLineData
c906108c
SS
1/* External/Public TUI Header File */
2
3#ifndef TUI_H
4#define TUI_H
5#include <curses.h>
6
7#ifdef ANSI_PROTOTYPES
8#include <stdarg.h>
9#else
10#include <varargs.h>
11#endif
12
13#include "ansidecl.h"
14
15#if defined(reg)
16#undef reg
17#endif
18#if defined(chtype)
19#undef chtype
20#endif
21
22/* Opaque data type */
23typedef char *Opaque;
24typedef Opaque (*OpaqueFuncPtr) PARAMS ((va_list));
25typedef char **OpaqueList;
26typedef OpaqueList OpaquePtr;
27
28/* Generic function pointer */
29typedef void (*TuiVoidFuncPtr) PARAMS ((va_list));
30typedef int (*TuiIntFuncPtr) PARAMS ((va_list));
31/*
32typedef Opaque (*TuiOpaqueFuncPtr) PARAMS ((va_list));
33*/
34typedef OpaqueFuncPtr TuiOpaqueFuncPtr;
35
36extern Opaque vcatch_errors PARAMS ((OpaqueFuncPtr, ...));
37extern Opaque va_catch_errors PARAMS ((OpaqueFuncPtr, va_list));
38
39extern void strcat_to_buf PARAMS ((char *, int, char *));
40extern void strcat_to_buf_with_fmt PARAMS ((char *, int, char *, ...));
41
42/* Types of error returns */
43typedef enum {
44 TUI_SUCCESS,
45 TUI_FAILURE
46} TuiStatus, *TuiStatusPtr;
47
48/* Types of windows */
49typedef enum {
50 SRC_WIN = 0,
51 DISASSEM_WIN,
52 DATA_WIN,
53 CMD_WIN,
54 /* This must ALWAYS be AFTER the major windows last */
55 MAX_MAJOR_WINDOWS,
56 /* auxillary windows */
57 LOCATOR_WIN,
58 EXEC_INFO_WIN,
59 DATA_ITEM_WIN,
60 /* This must ALWAYS be next to last */
61 MAX_WINDOWS,
62 UNDEFINED_WIN /* LAST */
63} TuiWinType, *TuiWinTypePtr;
64
65/* This is a point definition */
66typedef struct _TuiPoint {
67 int x, y;
68} TuiPoint, *TuiPointPtr;
69
70/* Generic window information */
71typedef struct _TuiGenWinInfo {
72 WINDOW *handle; /* window handle */
73 TuiWinType type; /* type of window */
74 int width; /* window width */
75 int height; /* window height */
76 TuiPoint origin; /* origin of window */
77 OpaquePtr content; /* content of window */
78 int contentSize; /* Size of content (# of elements) */
79 int contentInUse; /* Can it be used, or is it already used? */
80 int viewportHeight; /* viewport height */
81 int lastVisibleLine; /* index of last visible line */
82 int isVisible; /* whether the window is visible or not */
83} TuiGenWinInfo, *TuiGenWinInfoPtr;
84
85/* GENERAL TUI FUNCTIONS */
86/* tui.c */
87extern void tuiInit PARAMS ((char *argv0));
88extern void tuiInitWindows PARAMS ((void));
89extern void tuiResetScreen PARAMS ((void));
90extern void tuiCleanUp PARAMS ((void));
91extern void tuiError PARAMS ((char *, int));
92extern void tui_vError PARAMS ((va_list));
93extern void tuiFree PARAMS ((char *));
94extern Opaque tuiDo PARAMS ((TuiOpaqueFuncPtr, ...));
95extern Opaque tuiDoAndReturnToTop PARAMS ((TuiOpaqueFuncPtr, ...));
96extern Opaque tuiGetLowDisassemblyAddress PARAMS ((Opaque, Opaque));
97extern Opaque tui_vGetLowDisassemblyAddress PARAMS ((va_list));
98extern void tui_vSelectSourceSymtab PARAMS ((va_list));
99
100/* tuiDataWin.c */
101extern void tui_vCheckDataValues PARAMS ((va_list));
102
103/* tuiIO.c */
104extern void tui_vStartNewLines PARAMS ((va_list));
105
106/* tuiLayout.c */
107extern void tui_vAddWinToLayout PARAMS ((va_list));
108extern TuiStatus tui_vSetLayoutTo PARAMS ((va_list));
109
110/* tuiSourceWin.c */
111extern void tuiDisplayMainFunction PARAMS ((void));
112extern void tuiUpdateAllExecInfos PARAMS ((void));
113extern void tuiUpdateOnEnd PARAMS ((void));
114extern void tui_vAllSetHasBreakAt PARAMS ((va_list));
115extern void tui_vUpdateSourceWindowsWithAddr PARAMS ((va_list));
116
117/* tuiStack.c */
118extern void tui_vShowFrameInfo PARAMS ((va_list));
119extern void tui_vUpdateLocatorFilename PARAMS ((va_list));
120#endif /* TUI_H */