tui-io.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* TUI support I/O functions.
  2. Copyright (C) 1998-2022 Free Software Foundation, Inc.
  3. Contributed by Hewlett-Packard Company.
  4. This file is part of GDB.
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  15. #ifndef TUI_TUI_IO_H
  16. #define TUI_TUI_IO_H
  17. #include "gdb_curses.h"
  18. struct ui_out;
  19. class cli_ui_out;
  20. /* Print the string in the given curses window. If no window is
  21. provided, the command window is used. */
  22. extern void tui_puts (const char *, WINDOW * = nullptr);
  23. /* Print LENGTH characters from the buffer pointed to by BUF to the
  24. curses command window. */
  25. extern void tui_write (const char *buf, size_t length);
  26. /* Setup the IO for curses or non-curses mode. */
  27. extern void tui_setup_io (int mode);
  28. /* Initialize the IO for gdb in curses mode. */
  29. extern void tui_initialize_io (void);
  30. /* Readline callback.
  31. Redisplay the command line with its prompt after readline has
  32. changed the edited text. */
  33. extern void tui_redisplay_readline (void);
  34. /* Enter/leave reverse video mode. */
  35. extern void tui_set_reverse_mode (WINDOW *w, bool reverse);
  36. /* Apply STYLE to the window. */
  37. extern void tui_apply_style (WINDOW *w, ui_file_style style);
  38. extern struct ui_out *tui_out;
  39. extern cli_ui_out *tui_old_uiout;
  40. /* This should be called when the user has entered a command line in tui
  41. mode. Inject the newline into the output and move the cursor to the
  42. next line. */
  43. extern void tui_inject_newline_into_command_window ();
  44. #endif /* TUI_TUI_IO_H */