Move content_in_use to tui_source_window class
authorTom Tromey <tom@tromey.com>
Fri, 28 Jun 2019 22:44:23 +0000 (16:44 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 17 Jul 2019 18:19:06 +0000 (12:19 -0600)
commita38da35d7bc89e4c2191d4f042912038c585f36d
tree412a0b17840b5e9b325b14ff6a63f9a560fdf75f
parentc2cd8994669f63eb415522352a5d5006d0fbfb48
Move content_in_use to tui_source_window class

From scanning the source now, it's clear that the content_in_use field
is only used for the source window.  This patch moves the field there,
and changes it to be a bool at the same time.  (A future patch will
clean this up further, removing the field entirely.)

gdb/ChangeLog
2019-07-17  Tom Tromey  <tom@tromey.com>

* tui/tui-winsource.c (tui_clear_source_content)
(tui_show_source_content, tui_show_exec_info_content)
(tui_clear_exec_info_content): Update.
* tui/tui-stack.c (tui_show_locator_content): Update.
(tui_show_frame_info): Update.
* tui/tui-source.h (tui_source_window): Don't declare.
* tui/tui-source.c (tui_source_window::showing_source_p): Rename
from tui_source_is_displayed.
* tui/tui-data.h (struct tui_gen_win_info) <content_in_use>:
Remove field.
(struct tui_source_window_base) <content_in_use>: New field.  Now
bool.
(struct tui_source_window) <showing_source_p>: New method.
(TUI_SRC_WIN): Change cast.
* tui/tui-data.c (tui_initialize_static_data): Update.
gdb/ChangeLog
gdb/tui/tui-data.c
gdb/tui/tui-data.h
gdb/tui/tui-source.c
gdb/tui/tui-source.h
gdb/tui/tui-stack.c
gdb/tui/tui-winsource.c