display.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* display.h -- How the display in Info is done.
  2. $Id$
  3. Copyright 1993, 1997, 2004, 2007, 2008, 2011, 2012, 2013, 2014, 2015
  4. Free Software Foundation, Inc.
  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. Originally written by Brian Fox. */
  16. #ifndef INFO_DISPLAY_H
  17. #define INFO_DISPLAY_H
  18. #include "info-utils.h"
  19. #include "terminal.h"
  20. typedef struct {
  21. char *text; /* Text of the line as it appears. */
  22. int textlen; /* Printable Length of TEXT. */
  23. int inverse; /* Screen line is either in inverse video, or
  24. 'text' does not represent what is on the screen. */
  25. } DISPLAY_LINE;
  26. /* An array of display lines which tell us what is currently visible on
  27. the display. */
  28. extern DISPLAY_LINE **the_display;
  29. /* Non-zero means do no output. */
  30. extern int display_inhibited;
  31. /* Non-zero if we didn't completely redisplay a window. */
  32. extern int display_was_interrupted_p;
  33. /* Initialize THE_DISPLAY to WIDTH and HEIGHT, with nothing in it. */
  34. void display_initialize_display (int width, int height);
  35. /* Clear all of the lines in DISPLAY making the screen blank. */
  36. void display_clear_display (DISPLAY_LINE **display);
  37. /* Update the windows on the display. */
  38. void display_update_display (void);
  39. /* Display WIN on THE_DISPLAY. Unlike display_update_display (), this
  40. function only does one window. */
  41. void display_update_one_window (WINDOW *win);
  42. /* Move the screen cursor to directly over the current character in WINDOW. */
  43. void display_cursor_at_point (WINDOW *window);
  44. /* Scroll the region of the_display starting at START, ending at END, and
  45. moving the lines AMOUNT lines. If AMOUNT is less than zero, the lines
  46. are moved up in the screen, otherwise down. Actually, it is possible
  47. for no scrolling to take place in the case that the terminal doesn't
  48. support it. This doesn't matter to us. */
  49. void display_scroll_display (int start, int end, int amount);
  50. /* Try to scroll lines in WINDOW. OLD_PAGETOP is the pagetop of WINDOW before
  51. having had its line starts recalculated. OLD_STARTS is the list of line
  52. starts that used to appear in this window. OLD_COUNT is the number of lines
  53. that appear in the OLD_STARTS array. */
  54. void display_scroll_line_starts (WINDOW *window, int old_pagetop,
  55. long *old_starts, int old_count);
  56. #endif /* not INFO_DISPLAY_H */