Allow TUI windows in Python
This patch adds support for writing new TUI windows in Python. 2020-02-22 Tom Tromey <tom@tromey.com> * NEWS: Add entry for gdb.register_window_type. * tui/tui-layout.h (window_factory): New typedef. (tui_register_window): Declare. * tui/tui-layout.c (saved_tui_windows): New global. (tui_apply_current_layout): Use it. (tui_register_window): New function. * python/python.c (do_start_initialization): Call gdbpy_initialize_tui. (python_GdbMethods): Add "register_window_type" function. * python/python-internal.h (gdbpy_register_tui_window) (gdbpy_initialize_tui): Declare. * python/py-tui.c: New file. * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-tui.c. gdb/doc/ChangeLog 2020-02-22 Tom Tromey <tom@tromey.com> * python.texi (Python API): Add menu item. (TUI Windows In Python): New node. gdb/testsuite/ChangeLog 2020-02-22 Tom Tromey <tom@tromey.com> * gdb.python/tui-window.exp: New file. * gdb.python/tui-window.py: New file. Change-Id: I85fbfb923a1840450a00a7dce113a05d7f048baa
This commit is contained in:
parent
fc96d20b2c
commit
01b1af321f
13 changed files with 783 additions and 4 deletions
|
@ -1769,7 +1769,8 @@ do_start_initialization ()
|
|||
|| gdbpy_initialize_event () < 0
|
||||
|| gdbpy_initialize_arch () < 0
|
||||
|| gdbpy_initialize_xmethods () < 0
|
||||
|| gdbpy_initialize_unwind () < 0)
|
||||
|| gdbpy_initialize_unwind () < 0
|
||||
|| gdbpy_initialize_tui () < 0)
|
||||
return false;
|
||||
|
||||
#define GDB_PY_DEFINE_EVENT_TYPE(name, py_name, doc, base) \
|
||||
|
@ -2122,6 +2123,13 @@ or None if not set." },
|
|||
"convenience_variable (NAME, VALUE) -> None.\n\
|
||||
Set the value of the convenience variable $NAME." },
|
||||
|
||||
#ifdef TUI
|
||||
{ "register_window_type", (PyCFunction) gdbpy_register_tui_window,
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
"register_window_type (NAME, CONSTRUCSTOR) -> None\n\
|
||||
Register a TUI window constructor." },
|
||||
#endif /* TUI */
|
||||
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue