* tuiData.h (FILE_PREFIX): Don't define.
[deliverable/binutils-gdb.git] / gdb / tui / tuiData.h
index 17293c2d06d61100e6e9de51bfb2bbdc4af97b4b..8a4eb9f8908fc30b1a4a303136d92b3e7473c9e2 100644 (file)
@@ -1,5 +1,5 @@
 /* TUI data manipulation routines.
-   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by Hewlett-Packard Company.
 
    This file is part of GDB.
 #ifndef TUI_DATA_H
 #define TUI_DATA_H
 
+#if defined (HAVE_NCURSES_H)
+#include <ncurses.h>
+#elif defined (HAVE_CURSES_H)
+#include <curses.h>
+#endif
+
+/* Generic window information */
+     typedef struct _TuiGenWinInfo
+       {
+        WINDOW *handle;        /* window handle */
+        TuiWinType type;       /* type of window */
+        int width;             /* window width */
+        int height;            /* window height */
+        TuiPoint origin;       /* origin of window */
+        OpaquePtr content;     /* content of window */
+        int contentSize;       /* Size of content (# of elements) */
+        int contentInUse;      /* Can it be used, or is it already used? */
+        int viewportHeight;    /* viewport height */
+        int lastVisibleLine;   /* index of last visible line */
+        int isVisible;         /* whether the window is visible or not */
+         char* title;          /* Window title to display.  */
+       }
+TuiGenWinInfo, *TuiGenWinInfoPtr;
+
 /* Constant definitions */
 #define DEFAULT_TAB_LEN                8
 #define NO_SRC_STRING                  "[ No Source Available ]"
 #define MIN_WIN_HEIGHT                 3
 #define MIN_CMD_WIN_HEIGHT             3
 
-#define FILE_PREFIX                    "File: "
-#define PROC_PREFIX                    "Procedure: "
+/* Strings to display in the TUI status line.  */
+#define PROC_PREFIX                    "In: "
 #define LINE_PREFIX                    "Line: "
-#define PC_PREFIX                      "pc: "
+#define PC_PREFIX                      "PC: "
+#define SINGLE_KEY                     "(SingleKey)"
+
+/* Minimum/Maximum length of some fields displayed in the TUI status line.  */
+#define MIN_LINE_WIDTH     4 /* Use at least 4 digits for line numbers.  */
+#define MIN_PROC_WIDTH    12
+#define MAX_TARGET_WIDTH  10
+#define MAX_PID_WIDTH     14
 
 #define TUI_FLOAT_REGS_NAME                  "$FREGS"
 #define TUI_FLOAT_REGS_NAME_LOWER            "$fregs"
@@ -119,7 +150,7 @@ TuiRegisterDisplayType, *TuiRegisterDisplayTypePtr;
 typedef union _TuiLineOrAddress
   {
     int lineNo;
-    Opaque addr;
+    CORE_ADDR addr;
   }
 TuiLineOrAddress, *TuiLineOrAddressPtr;
 
@@ -147,7 +178,7 @@ TuiSourceElement, *TuiSourceElementPtr;
 /* Elements in the data display window content */
 typedef struct _TuiDataElement
   {
-    char *name;
+    const char *name;
     int itemNo;                        /* the register number, or data display number */
     TuiDataType type;
     Opaque value;
@@ -172,10 +203,24 @@ typedef struct _TuiLocatorElement
     char fileName[MAX_LOCATOR_ELEMENT_LEN];
     char procName[MAX_LOCATOR_ELEMENT_LEN];
     int lineNo;
-    Opaque addr;
+    CORE_ADDR addr;
   }
 TuiLocatorElement, *TuiLocatorElementPtr;
 
+/* Flags to tell what kind of breakpoint is at current line.  */
+#define TUI_BP_ENABLED      0x01
+#define TUI_BP_DISABLED     0x02
+#define TUI_BP_HIT          0x04
+#define TUI_BP_CONDITIONAL  0x08
+#define TUI_BP_HARDWARE     0x10
+
+/* Position of breakpoint markers in the exec info string.  */
+#define TUI_BP_HIT_POS      0
+#define TUI_BP_BREAK_POS    1
+#define TUI_EXEC_POS        2
+#define TUI_EXECINFO_SIZE   4
+
+typedef char TuiExecInfoContent[TUI_EXECINFO_SIZE];
 
 /* An content element in a window */
 typedef union
@@ -185,7 +230,7 @@ typedef union
     TuiDataElement data;       /* elements of dataWindow */
     TuiCommandElement command; /* command elements */
     TuiLocatorElement locator; /* locator elements */
-    char *simpleString;                /* simple char based elements */
+    TuiExecInfoContent simpleString;   /* simple char based elements */
   }
 TuiWhichElement, *TuiWhichElementPtr;
 
@@ -221,6 +266,7 @@ typedef struct _TuiSourceInfo
     TuiGenWinInfoPtr executionInfo;    /* execution information window */
     int horizontalOffset;      /* used for horizontal scroll */
     TuiLineOrAddress startLineOrAddr;
+    char* filename;
   }
 TuiSourceInfo, *TuiSourceInfoPtr;
 
@@ -229,6 +275,7 @@ typedef struct _TuiCommandInfo
   {
     int curLine;               /* The current line position */
     int curch;                 /* The current cursor position */
+    int start_line;
   }
 TuiCommandInfo, *TuiCommandInfoPtr;
 
@@ -299,35 +346,23 @@ extern TuiWinContent allocContent (int, TuiWinType);
 extern int addContentElements (TuiGenWinInfoPtr, int);
 extern void initContentElement (TuiWinElementPtr, TuiWinType);
 extern void freeWindow (TuiWinInfoPtr);
-extern void freeAllWindows (void);
 extern void freeWinContent (TuiGenWinInfoPtr);
 extern void freeDataContent (TuiWinContent, int);
 extern void freeAllSourceWinsContent (void);
 extern void tuiDelWindow (TuiWinInfoPtr);
 extern void tuiDelDataWindows (TuiWinContent, int);
-extern TuiWinInfoPtr winByName (char *);
 extern TuiWinInfoPtr partialWinByName (char *);
 extern char *winName (TuiGenWinInfoPtr);
-extern char *displayableWinContentOf (TuiGenWinInfoPtr, TuiWinElementPtr);
-extern char *displayableWinContentAt (TuiGenWinInfoPtr, int);
-extern int winElementHeight (TuiGenWinInfoPtr, TuiWinElementPtr);
 extern TuiLayoutType currentLayout (void);
 extern void setCurrentLayoutTo (TuiLayoutType);
 extern int termHeight (void);
-extern void setTermHeight (int);
+extern void setTermHeightTo (int);
 extern int termWidth (void);
-extern void setTermWidth (int);
-extern int historyLimit (void);
-extern void setHistoryLimit (int);
+extern void setTermWidthTo (int);
 extern void setGenWinOrigin (TuiGenWinInfoPtr, int, int);
 extern TuiGenWinInfoPtr locatorWinInfoPtr (void);
 extern TuiGenWinInfoPtr sourceExecInfoWinPtr (void);
 extern TuiGenWinInfoPtr disassemExecInfoWinPtr (void);
-extern char *nullStr (void);
-extern char *blankStr (void);
-extern char *locationStr (void);
-extern char *breakStr (void);
-extern char *breakLocationStr (void);
 extern TuiListPtr sourceWindows (void);
 extern void clearSourceWindows (void);
 extern void clearSourceWindowsDetail (void);
@@ -344,5 +379,6 @@ extern void tuiSetWinResizedTo (int);
 extern TuiWinInfoPtr tuiNextWin (TuiWinInfoPtr);
 extern TuiWinInfoPtr tuiPrevWin (TuiWinInfoPtr);
 
+extern void addToSourceWindows (TuiWinInfoPtr winInfo);
 
 #endif /* TUI_DATA_H */
This page took 0.027061 seconds and 4 git commands to generate.