OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [gdb/] [tui/] [tui.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.