* tui/tui-win.h: Update copyright. Include "tui-data.h".
(struct tui_win_info): Declare.
(tui_scroll_forward): Rename tuiScrollForward.
(tui_scroll_backward): Rename tuiScrollBackward.
(tui_scroll_left): Rename tuiScrollLeft.
(tui_scroll_right): Rename tuiScrollRight.
(tui_set_win_focus_to): Rename tuiSetWinFocusTo.
(tui_resize_all): Rename tuiResizeAll.
(tui_refresh_all_win): Rename tuiRefreshAll.
(tui_sigwinch_handler): Rename tuiSigwinchHandler.
* tui/tui-layout.c, * tui/tui-io.c: Update references.
* tui/tui-wingeneral.h, * tui/tui.c: Update references.
* tui/tui-disasm.c, * tui/tui-command.c: Update references.
2004-02-06 Andrew Cagney <cagney@redhat.com>
+ * tui/tui-win.h: Update copyright. Include "tui-data.h".
+ (struct tui_win_info): Declare.
+ (tui_scroll_forward): Rename tuiScrollForward.
+ (tui_scroll_backward): Rename tuiScrollBackward.
+ (tui_scroll_left): Rename tuiScrollLeft.
+ (tui_scroll_right): Rename tuiScrollRight.
+ (tui_set_win_focus_to): Rename tuiSetWinFocusTo.
+ (tui_resize_all): Rename tuiResizeAll.
+ (tui_refresh_all_win): Rename tuiRefreshAll.
+ (tui_sigwinch_handler): Rename tuiSigwinchHandler.
+ * tui/tui-layout.c, * tui/tui-io.c: Update references.
+ * tui/tui-wingeneral.h, * tui/tui.c: Update references.
+ * tui/tui-disasm.c, * tui/tui-command.c: Update references.
+
* tui/tui-windata.h: Update copyright. Include "tui-data.h".
(tui_erase_data_content): Rename tuiEraseDataContent.
(tui_display_all_data): Rename tuiDisplayAllData.
switch (chCopy)
{
case KEY_NPAGE:
- tuiScrollForward (winInfo, 0);
+ tui_scroll_forward (winInfo, 0);
break;
case KEY_PPAGE:
- tuiScrollBackward (winInfo, 0);
+ tui_scroll_backward (winInfo, 0);
break;
case KEY_DOWN:
case KEY_SF:
- tuiScrollForward (winInfo, 1);
+ tui_scroll_forward (winInfo, 1);
break;
case KEY_UP:
case KEY_SR:
- tuiScrollBackward (winInfo, 1);
+ tui_scroll_backward (winInfo, 1);
break;
case KEY_RIGHT:
- tuiScrollLeft (winInfo, 1);
+ tui_scroll_left (winInfo, 1);
break;
case KEY_LEFT:
- tuiScrollRight (winInfo, 1);
+ tui_scroll_right (winInfo, 1);
break;
case '\f':
- tuiRefreshAll ();
+ tui_refresh_all_win ();
break;
default:
c = chCopy;
** source view isn't split
*/
if (currentLayout () != SRC_DISASSEM_COMMAND && winWithFocus == srcWin)
- tuiSetWinFocusTo (disassemWin);
+ tui_set_win_focus_to (disassemWin);
return;
}
resetty ();
/* Force a refresh of the screen. */
- tuiRefreshAll ();
+ tui_refresh_all_win ();
/* Update cursor position on the screen. */
wmove (cmdWin->generic.handle,
{
if (tuiWinResized ())
{
- tuiRefreshAll ();
+ tui_refresh_all_win ();
dont_repeat ();
tuiSetWinResizedTo (FALSE);
return '\n';
switch (newLayout)
{
case SRC_COMMAND:
- tuiSetWinFocusTo (srcWin);
+ tui_set_win_focus_to (srcWin);
layoutDef->displayMode = SRC_WIN;
layoutDef->split = FALSE;
break;
** We still want to show the assembly though!
*/
addr = tui_get_begin_asm_address ();
- tuiSetWinFocusTo (disassemWin);
+ tui_set_win_focus_to (disassemWin);
layoutDef->displayMode = DISASSEM_WIN;
layoutDef->split = FALSE;
break;
*/
addr = tui_get_begin_asm_address ();
if (winWithFocus == srcWin)
- tuiSetWinFocusTo (srcWin);
+ tui_set_win_focus_to (srcWin);
else
- tuiSetWinFocusTo (disassemWin);
+ tui_set_win_focus_to (disassemWin);
layoutDef->split = TRUE;
break;
case SRC_DATA_COMMAND:
if (winWithFocus != dataWin)
- tuiSetWinFocusTo (srcWin);
+ tui_set_win_focus_to (srcWin);
else
- tuiSetWinFocusTo (dataWin);
+ tui_set_win_focus_to (dataWin);
layoutDef->displayMode = SRC_WIN;
layoutDef->split = FALSE;
break;
*/
addr = tui_get_begin_asm_address ();
if (winWithFocus != dataWin)
- tuiSetWinFocusTo (disassemWin);
+ tui_set_win_focus_to (disassemWin);
else
- tuiSetWinFocusTo (dataWin);
+ tui_set_win_focus_to (dataWin);
layoutDef->displayMode = DISASSEM_WIN;
layoutDef->split = FALSE;
break;
}
}
if (newWinWithFocus != (TuiWinInfoPtr) NULL)
- tuiSetWinFocusTo (newWinWithFocus);
+ tui_set_win_focus_to (newWinWithFocus);
/*
** Now update the window content
*/
if (layoutDef->split)
{
tui_set_layout (SRC_DISASSEM_COMMAND, TUI_UNDEFINED_REGS);
- tuiSetWinFocusTo (winList[layoutDef->displayMode]);
+ tui_set_win_focus_to (winList[layoutDef->displayMode]);
}
else
{
}
-/*
- ** tuiSetWinFocusTo
- ** Set the logical focus to winInfo
- */
+/* Set the logical focus to winInfo. */
void
-tuiSetWinFocusTo (TuiWinInfoPtr winInfo)
+tui_set_win_focus_to (TuiWinInfoPtr winInfo)
{
if (m_winPtrNotNull (winInfo))
{
} /* tuiSetWinFocusTo */
-/*
- ** tuiScrollForward().
- */
void
-tuiScrollForward (TuiWinInfoPtr winToScroll, int numToScroll)
+tui_scroll_forward (TuiWinInfoPtr winToScroll, int numToScroll)
{
if (winToScroll != cmdWin)
{
else if (winToScroll == dataWin)
tui_vertical_data_scroll (FORWARD_SCROLL, _numToScroll);
}
+}
- return;
-} /* tuiScrollForward */
-
-
-/*
- ** tuiScrollBackward().
- */
void
-tuiScrollBackward (TuiWinInfoPtr winToScroll, int numToScroll)
+tui_scroll_backward (TuiWinInfoPtr winToScroll, int numToScroll)
{
if (winToScroll != cmdWin)
{
else if (winToScroll == dataWin)
tui_vertical_data_scroll (BACKWARD_SCROLL, _numToScroll);
}
- return;
-} /* tuiScrollBackward */
+}
-/*
- ** tuiScrollLeft().
- */
void
-tuiScrollLeft (TuiWinInfoPtr winToScroll, int numToScroll)
+tui_scroll_left (TuiWinInfoPtr winToScroll, int numToScroll)
{
if (winToScroll != cmdWin)
{
if (winToScroll == srcWin || winToScroll == disassemWin)
tui_horizontal_source_scroll (winToScroll, LEFT_SCROLL, _numToScroll);
}
- return;
-} /* tuiScrollLeft */
+}
-/*
- ** tuiScrollRight().
- */
void
-tuiScrollRight (TuiWinInfoPtr winToScroll, int numToScroll)
+tui_scroll_right (TuiWinInfoPtr winToScroll, int numToScroll)
{
if (winToScroll != cmdWin)
{
if (winToScroll == srcWin || winToScroll == disassemWin)
tui_horizontal_source_scroll (winToScroll, RIGHT_SCROLL, _numToScroll);
}
- return;
-} /* tuiScrollRight */
+}
-/*
- ** tui_scroll().
- ** Scroll a window. Arguments are passed through a va_list.
- */
+/* Scroll a window. Arguments are passed through a va_list. */
void
tui_scroll (TuiScrollDirection direction,
TuiWinInfoPtr winToScroll,
switch (direction)
{
case FORWARD_SCROLL:
- tuiScrollForward (winToScroll, numToScroll);
+ tui_scroll_forward (winToScroll, numToScroll);
break;
case BACKWARD_SCROLL:
- tuiScrollBackward (winToScroll, numToScroll);
+ tui_scroll_backward (winToScroll, numToScroll);
break;
case LEFT_SCROLL:
- tuiScrollLeft (winToScroll, numToScroll);
+ tui_scroll_left (winToScroll, numToScroll);
break;
case RIGHT_SCROLL:
- tuiScrollRight (winToScroll, numToScroll);
+ tui_scroll_right (winToScroll, numToScroll);
break;
default:
break;
}
-/*
- ** tuiRefreshAll().
- */
void
-tuiRefreshAll (void)
+tui_refresh_all_win (void)
{
TuiWinType type;
The window name specified must be valid and visible.\n");
else
{
- tuiSetWinFocusTo (winInfo);
+ tui_set_win_focus_to (winInfo);
keypad (cmdWin->generic.handle, (winInfo != cmdWin));
}
/* Make sure the curses mode is enabled. */
tui_enable ();
- tuiRefreshAll ();
+ tui_refresh_all_win ();
}
/* TUI window generic functions.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ Copyright 1998, 1999, 2000, 2001, 2002, 2004 Free Software
+ Foundation, Inc.
+
Contributed by Hewlett-Packard Company.
This file is part of GDB.
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _TUI_WIN_H
-#define _TUI_WIN_H
-
-/*****************************************
-** TYPE DEFINITIONS **
-******************************************/
+#ifndef TUI_WIN_H
+#define TUI_WIN_H
+#include "tui/tui-data.h"
+struct tui_win_info;
-/*****************************************
-** PUBLIC FUNCTION EXTERNAL DECLS **
-******************************************/
-extern void tuiScrollForward (TuiWinInfoPtr, int);
-extern void tuiScrollBackward (TuiWinInfoPtr, int);
-extern void tuiScrollLeft (TuiWinInfoPtr, int);
-extern void tuiScrollRight (TuiWinInfoPtr, int);
-extern void tui_scroll (TuiScrollDirection, TuiWinInfoPtr, int);
-extern void tuiSetWinFocusTo (TuiWinInfoPtr);
-extern void tuiResizeAll (void);
-extern void tuiRefreshAll (void);
-extern void tuiSigwinchHandler (int);
+extern void tui_scroll_forward (struct tui_win_info *, int);
+extern void tui_scroll_backward (struct tui_win_info *, int);
+extern void tui_scroll_left (struct tui_win_info *, int);
+extern void tui_scroll_right (struct tui_win_info *, int);
+extern void tui_scroll (enum tui_scroll_direction, struct tui_win_info *, int);
+extern void tui_set_win_focus_to (struct tui_win_info *);
+extern void tui_resize_all (void);
+extern void tui_refresh_all_win (void);
+extern void tui_sigwinch_handler (int);
extern chtype tui_border_ulcorner;
extern chtype tui_border_urcorner;
extern int tui_border_attrs;
extern int tui_active_border_attrs;
-extern int tui_update_variables ();
+extern int tui_update_variables (void);
/* Update gdb's knowledge of the terminal size. */
extern void tui_update_gdb_sizes (void);
#endif
-/*_TUI_WIN_H*/
extern void tui_box_win (struct tui_gen_win_info *, int);
extern void tui_highlight_win (struct tui_win_info *);
extern void tui_check_and_display_highlight_if_needed (struct tui_win_info *);
-extern void tui_refresh_all (struct tui_win_info * *);
+extern void tui_refresh_all (struct tui_win_info **);
extern void tui_delete_win (WINDOW * window);
extern void tui_refresh_win (struct tui_gen_win_info *);
*/
if (tuiWinWithFocus () == disassemWin &&
currentLayout () != SRC_DISASSEM_COMMAND)
- tuiSetWinFocusTo (srcWin);
+ tui_set_win_focus_to (srcWin);
}
}
winInfo = tuiNextWin (tuiWinWithFocus ());
if (winInfo)
{
- tuiSetWinFocusTo (winInfo);
+ tui_set_win_focus_to (winInfo);
if (dataWin && dataWin->generic.isVisible)
tui_refresh_data_win ();
keypad (cmdWin->generic.handle, (winInfo != cmdWin));
tui_show_frame_info (0);
tui_set_layout (SRC_COMMAND, TUI_UNDEFINED_REGS);
- tuiSetWinFocusTo (srcWin);
+ tui_set_win_focus_to (srcWin);
keypad (cmdWin->generic.handle, TRUE);
wrefresh (cmdWin->generic.handle);
tui_finish_init = 0;
/* Restore TUI keymap. */
tui_set_key_mode (tui_current_key_mode);
- tuiRefreshAll ();
+ tui_refresh_all_win ();
/* Update gdb's knowledge of its terminal. */
target_terminal_save_ours ();