126208Swpaul/* display.h -- How the display in Info is done.
226208Swpaul   $Id: display.h,v 1.3 2004/04/11 17:56:45 karl Exp $
326208Swpaul
426208Swpaul   This file is part of GNU Info, a program for reading online documentation
526208Swpaul   stored in Info format.
626208Swpaul
726208Swpaul   Copyright (C) 1993, 1997, 2004 Free Software Foundation, Inc.
826208Swpaul
926208Swpaul   This program is free software; you can redistribute it and/or modify
1026208Swpaul   it under the terms of the GNU General Public License as published by
1126208Swpaul   the Free Software Foundation; either version 2, or (at your option)
1226208Swpaul   any later version.
1326208Swpaul
1426208Swpaul   This program is distributed in the hope that it will be useful,
1526208Swpaul   but WITHOUT ANY WARRANTY; without even the implied warranty of
1626208Swpaul   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1726208Swpaul   GNU General Public License for more details.
1826208Swpaul
1926208Swpaul   You should have received a copy of the GNU General Public License
2026208Swpaul   along with this program; if not, write to the Free Software
2126208Swpaul   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2226208Swpaul
2326208Swpaul   Written by Brian Fox (bfox@ai.mit.edu). */
2426208Swpaul
2526208Swpaul#ifndef INFO_DISPLAY_H
2626208Swpaul#define INFO_DISPLAY_H
2726208Swpaul
2826208Swpaul#include "info-utils.h"
2926208Swpaul#include "terminal.h"
301832Swollman
3126208Swpaultypedef struct {
3226208Swpaul  char *text;			/* Text of the line as it appears. */
3326208Swpaul  int textlen;			/* Printable Length of TEXT. */
3426208Swpaul  int inverse;			/* Non-zero means this line is inverse. */
3526208Swpaul} DISPLAY_LINE;
361832Swollman
3726208Swpaul/* An array of display lines which tell us what is currently visible on
3826208Swpaul   the display.  */
3926208Swpaulextern DISPLAY_LINE **the_display;
4026208Swpaul
4126208Swpaul/* Non-zero means do no output. */
4226208Swpaulextern int display_inhibited;
4326208Swpaul
441832Swollman/* Non-zero if we didn't completely redisplay a window. */
451832Swollmanextern int display_was_interrupted_p;
461832Swollman
471832Swollman/* Initialize THE_DISPLAY to WIDTH and HEIGHT, with nothing in it. */
4826208Swpaulextern void display_initialize_display (int width, int height);
4926208Swpaul
5026208Swpaul/* Clear all of the lines in DISPLAY making the screen blank. */
511832Swollmanextern void display_clear_display (DISPLAY_LINE **display);
521832Swollman
5326208Swpaul/* Update the windows pointed to by WINDOWS in THE_DISPLAY.  This actually
5426208Swpaul   writes the text on the screen. */
5526208Swpaulextern void display_update_display (WINDOW *window);
5626208Swpaul
5726208Swpaul/* Display WIN on THE_DISPLAY.  Unlike display_update_display (), this
58   function only does one window. */
59extern void display_update_one_window (WINDOW *win);
60
61/* Move the screen cursor to directly over the current character in WINDOW. */
62extern void display_cursor_at_point (WINDOW *window);
63
64/* Scroll the region of the_display starting at START, ending at END, and
65   moving the lines AMOUNT lines.  If AMOUNT is less than zero, the lines
66   are moved up in the screen, otherwise down.  Actually, it is possible
67   for no scrolling to take place in the case that the terminal doesn't
68   support it.  This doesn't matter to us. */
69extern void display_scroll_display (int start, int end, int amount);
70
71/* Try to scroll lines in WINDOW.  OLD_PAGETOP is the pagetop of WINDOW before
72   having had its line starts recalculated.  OLD_STARTS is the list of line
73   starts that used to appear in this window.  OLD_COUNT is the number of lines
74   that appear in the OLD_STARTS array. */
75extern void display_scroll_line_starts (WINDOW *window, int old_pagetop,
76    char **old_starts, int old_count);
77
78#endif /* not INFO_DISPLAY_H */
79