1 /* display.h -- How the display in Info is done.
2
3 Copyright 1993-2023 Free Software Foundation, Inc.
4
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
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 Originally written by Brian Fox. */
19
20 #ifndef INFO_DISPLAY_H
21 #define INFO_DISPLAY_H
22
23 #include "scan.h"
24 #include "terminal.h"
25
26 typedef struct {
27 char *text; /* Text of the line as it appears. */
28 int textlen; /* Printable Length of TEXT. */
29 int inverse; /* Screen line is either in inverse video, or
30 'text' does not represent what is on the screen. */
31 } DISPLAY_LINE;
32
33 /* An array of display lines which tell us what is currently visible on
34 the display. */
35 extern DISPLAY_LINE **the_display;
36
37 /* Non-zero means do no output. */
38 extern int display_inhibited;
39
40 /* Non-zero if we didn't completely redisplay a window. */
41 extern int display_was_interrupted_p;
42
43 /* Initialize THE_DISPLAY to WIDTH and HEIGHT, with nothing in it. */
44 void display_initialize_display (int width, int height);
45
46 /* Clear all of the lines in DISPLAY making the screen blank. */
47 void display_clear_display (DISPLAY_LINE **display);
48
49 /* Update the windows on the display. */
50 void display_update_display (void);
51
52 /* Display WIN on THE_DISPLAY. Unlike display_update_display (), this
53 function only does one window. */
54 void display_update_one_window (WINDOW *win);
55
56 /* Move the screen cursor to directly over the current character in WINDOW. */
57 void display_cursor_at_point (WINDOW *window);
58
59 /* Scroll the region of the_display starting at START, ending at END, and
60 moving the lines AMOUNT lines. If AMOUNT is less than zero, the lines
61 are moved up in the screen, otherwise down. Actually, it is possible
62 for no scrolling to take place in the case that the terminal doesn't
63 support it. This doesn't matter to us. */
64 void display_scroll_display (int start, int end, int amount);
65
66 /* Try to scroll lines in WINDOW. OLD_PAGETOP is the pagetop of WINDOW before
67 having had its line starts recalculated. OLD_STARTS is the list of line
68 starts that used to appear in this window. OLD_COUNT is the number of lines
69 that appear in the OLD_STARTS array. */
70 void display_scroll_line_starts (WINDOW *window, int old_pagetop,
71 long *old_starts, int old_count);
72
73 #endif /* not INFO_DISPLAY_H */