142660Smarkm/* display.h -- How the display in Info is done.
2146515Sru   $Id: display.h,v 1.3 2004/04/11 17:56:45 karl Exp $
321495Sjmacd
442660Smarkm   This file is part of GNU Info, a program for reading online documentation
521495Sjmacd   stored in Info format.
621495Sjmacd
7146515Sru   Copyright (C) 1993, 1997, 2004 Free Software Foundation, Inc.
821495Sjmacd
921495Sjmacd   This program is free software; you can redistribute it and/or modify
1021495Sjmacd   it under the terms of the GNU General Public License as published by
1121495Sjmacd   the Free Software Foundation; either version 2, or (at your option)
1221495Sjmacd   any later version.
1321495Sjmacd
1421495Sjmacd   This program is distributed in the hope that it will be useful,
1521495Sjmacd   but WITHOUT ANY WARRANTY; without even the implied warranty of
1621495Sjmacd   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1721495Sjmacd   GNU General Public License for more details.
1821495Sjmacd
1921495Sjmacd   You should have received a copy of the GNU General Public License
2021495Sjmacd   along with this program; if not, write to the Free Software
2121495Sjmacd   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2221495Sjmacd
2321495Sjmacd   Written by Brian Fox (bfox@ai.mit.edu). */
2421495Sjmacd
2542660Smarkm#ifndef INFO_DISPLAY_H
2642660Smarkm#define INFO_DISPLAY_H
2721495Sjmacd
2821495Sjmacd#include "info-utils.h"
2921495Sjmacd#include "terminal.h"
3021495Sjmacd
3121495Sjmacdtypedef struct {
3221495Sjmacd  char *text;			/* Text of the line as it appears. */
3321495Sjmacd  int textlen;			/* Printable Length of TEXT. */
3421495Sjmacd  int inverse;			/* Non-zero means this line is inverse. */
3521495Sjmacd} DISPLAY_LINE;
3621495Sjmacd
3721495Sjmacd/* An array of display lines which tell us what is currently visible on
3821495Sjmacd   the display.  */
3921495Sjmacdextern DISPLAY_LINE **the_display;
4021495Sjmacd
4121495Sjmacd/* Non-zero means do no output. */
4221495Sjmacdextern int display_inhibited;
4321495Sjmacd
4421495Sjmacd/* Non-zero if we didn't completely redisplay a window. */
4521495Sjmacdextern int display_was_interrupted_p;
4621495Sjmacd
4721495Sjmacd/* Initialize THE_DISPLAY to WIDTH and HEIGHT, with nothing in it. */
48146515Sruextern void display_initialize_display (int width, int height);
4921495Sjmacd
5021495Sjmacd/* Clear all of the lines in DISPLAY making the screen blank. */
51146515Sruextern void display_clear_display (DISPLAY_LINE **display);
5221495Sjmacd
5321495Sjmacd/* Update the windows pointed to by WINDOWS in THE_DISPLAY.  This actually
5421495Sjmacd   writes the text on the screen. */
55146515Sruextern void display_update_display (WINDOW *window);
5621495Sjmacd
5721495Sjmacd/* Display WIN on THE_DISPLAY.  Unlike display_update_display (), this
5821495Sjmacd   function only does one window. */
59146515Sruextern void display_update_one_window (WINDOW *win);
6021495Sjmacd
6121495Sjmacd/* Move the screen cursor to directly over the current character in WINDOW. */
62146515Sruextern void display_cursor_at_point (WINDOW *window);
6321495Sjmacd
6421495Sjmacd/* Scroll the region of the_display starting at START, ending at END, and
6521495Sjmacd   moving the lines AMOUNT lines.  If AMOUNT is less than zero, the lines
6621495Sjmacd   are moved up in the screen, otherwise down.  Actually, it is possible
6721495Sjmacd   for no scrolling to take place in the case that the terminal doesn't
6821495Sjmacd   support it.  This doesn't matter to us. */
69146515Sruextern void display_scroll_display (int start, int end, int amount);
7021495Sjmacd
7121495Sjmacd/* Try to scroll lines in WINDOW.  OLD_PAGETOP is the pagetop of WINDOW before
7221495Sjmacd   having had its line starts recalculated.  OLD_STARTS is the list of line
7321495Sjmacd   starts that used to appear in this window.  OLD_COUNT is the number of lines
7421495Sjmacd   that appear in the OLD_STARTS array. */
75146515Sruextern void display_scroll_line_starts (WINDOW *window, int old_pagetop,
76146515Sru    char **old_starts, int old_count);
7721495Sjmacd
7842660Smarkm#endif /* not INFO_DISPLAY_H */
79