2019-08-13 Tom Tromey <tom@tromey.com>
+ * tui/tui-layout.c (current_layout, tui_current_layout): Move from
+ tui-data.c.
+ (show_source_disasm_command, show_data)
+ (show_source_or_disasm_and_command): Don't use
+ tui_set_current_layout_to.
+ * tui/tui-data.h (tui_set_current_layout_to): Don't declare.
+ * tui/tui-data.c (current_layout, tui_current_layout): Move to
+ tui-layout.c.
+ (tui_set_current_layout_to): Remove.
+
+2019-08-13 Tom Tromey <tom@tromey.com>
+
* tui/tui-layout.c (tui_set_layout): Update.
* tui/tui-data.h (struct tui_layout_def): Remove.
(tui_layout_def): Don't declare.
/***************************
** Private data
****************************/
-static enum tui_layout_type current_layout = UNDEFINED_LAYOUT;
static int term_height, term_width;
static struct tui_locator_window _locator;
static std::vector<tui_source_window_base *> source_windows;
}
-/* Accessor for the current layout. */
-enum tui_layout_type
-tui_current_layout (void)
-{
- return current_layout;
-}
-
-
-/* Mutator for the current layout. */
-void
-tui_set_current_layout_to (enum tui_layout_type new_layout)
-{
- current_layout = new_layout;
-}
-
-
/*****************************
** OTHER PUBLIC FUNCTIONS
*****************************/
extern void tui_initialize_static_data (void);
extern struct tui_win_info *tui_partial_win_by_name (const char *);
extern enum tui_layout_type tui_current_layout (void);
-extern void tui_set_current_layout_to (enum tui_layout_type);
extern int tui_term_height (void);
extern void tui_set_term_height_to (int);
extern int tui_term_width (void);
static void extract_display_start_addr (struct gdbarch **, CORE_ADDR *);
+static enum tui_layout_type current_layout = UNDEFINED_LAYOUT;
+
+/* Accessor for the current layout. */
+enum tui_layout_type
+tui_current_layout (void)
+{
+ return current_layout;
+}
+
/***************************************
** DEFINITIONS
***************************************/
/* FIXME tui_cmd_window won't recreate the handle on
make_visible, so we need this instead. */
tui_make_window (TUI_CMD_WIN, DONT_BOX_WINDOW);
- tui_set_current_layout_to (SRC_DISASSEM_COMMAND);
+ current_layout = SRC_DISASSEM_COMMAND;
}
}
locator->make_visible (true);
tui_show_locator_content ();
tui_add_to_source_windows (base);
- tui_set_current_layout_to (new_layout);
+ current_layout = new_layout;
}
void
/* FIXME tui_cmd_window won't recreate the handle on
make_visible, so we need this instead. */
tui_make_window (TUI_CMD_WIN, DONT_BOX_WINDOW);
- tui_set_current_layout_to (layout_type);
+ current_layout = layout_type;
}
}