Change how TUI windows are instantiated
authorTom Tromey <tom@tromey.com>
Sat, 22 Feb 2020 18:48:26 +0000 (11:48 -0700)
committerTom Tromey <tom@tromey.com>
Sat, 22 Feb 2020 18:48:38 +0000 (11:48 -0700)
commit0240c8f11b06a33a043bacbe2b9e723ae6ad573c
treee49c7e36b94e02187f30bf53047ac9f867ecee73
parentfdb01f0ce44653180af9d3d4f264c0ddb2d1261d
Change how TUI windows are instantiated

This adds a new global that maps from window names to window
constructor functions, and then changes tui_get_window_by_name and
validate_window_name to use it.  This is another step toward
user-defined window types.

gdb/ChangeLog
2020-02-22  Tom Tromey  <tom@tromey.com>

* tui/tui-layout.c (make_standard_window, get_locator_window): New
functions.
(known_window_types): New global.
(tui_get_window_by_name): Reimplement.
(initialize_known_windows): New function.
(validate_window_name): Rewrite.
(_initialize_tui_layout): Call initialize_known_windows.

Change-Id: I9037aac550299b9d945899220a30c2d3af9dd0de
gdb/ChangeLog
gdb/tui/tui-layout.c