tui-wingeneral.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* General window behavior.
  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_WINGENERAL_H
  16. #define TUI_TUI_WINGENERAL_H
  17. #include "gdb_curses.h"
  18. struct tui_win_info;
  19. extern void tui_unhighlight_win (struct tui_win_info *);
  20. extern void tui_highlight_win (struct tui_win_info *);
  21. extern void tui_refresh_all ();
  22. /* An RAII class that suppresses output on construction (calling
  23. wnoutrefresh on the existing windows), and then flushes the output
  24. (via doupdate) when destroyed. */
  25. class tui_suppress_output
  26. {
  27. public:
  28. tui_suppress_output ();
  29. ~tui_suppress_output ();
  30. DISABLE_COPY_AND_ASSIGN (tui_suppress_output);
  31. private:
  32. /* Save the state of the suppression global. */
  33. bool m_saved_suppress;
  34. };
  35. /* Call wrefresh on the given window. However, if output is being
  36. suppressed via tui_suppress_output, do not call wrefresh. */
  37. extern void tui_wrefresh (WINDOW *win);
  38. #endif /* TUI_TUI_WINGENERAL_H */