Back to index

tetex-bin  3.0
display.h
Go to the documentation of this file.
00001 /* display.h -- How the display in Info is done.
00002    $Id: display.h,v 1.3 2004/04/11 17:56:45 karl Exp $
00003 
00004    This file is part of GNU Info, a program for reading online documentation
00005    stored in Info format.
00006 
00007    Copyright (C) 1993, 1997, 2004 Free Software Foundation, Inc.
00008 
00009    This program is free software; you can redistribute it and/or modify
00010    it under the terms of the GNU General Public License as published by
00011    the Free Software Foundation; either version 2, or (at your option)
00012    any later version.
00013 
00014    This program is distributed in the hope that it will be useful,
00015    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017    GNU General Public License for more details.
00018 
00019    You should have received a copy of the GNU General Public License
00020    along with this program; if not, write to the Free Software
00021    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00022 
00023    Written by Brian Fox (bfox@ai.mit.edu). */
00024 
00025 #ifndef INFO_DISPLAY_H
00026 #define INFO_DISPLAY_H
00027 
00028 #include "info-utils.h"
00029 #include "terminal.h"
00030 
00031 typedef struct {
00032   char *text;               /* Text of the line as it appears. */
00033   int textlen;                     /* Printable Length of TEXT. */
00034   int inverse;                     /* Non-zero means this line is inverse. */
00035 } DISPLAY_LINE;
00036 
00037 /* An array of display lines which tell us what is currently visible on
00038    the display.  */
00039 extern DISPLAY_LINE **the_display;
00040 
00041 /* Non-zero means do no output. */
00042 extern int display_inhibited;
00043 
00044 /* Non-zero if we didn't completely redisplay a window. */
00045 extern int display_was_interrupted_p;
00046 
00047 /* Initialize THE_DISPLAY to WIDTH and HEIGHT, with nothing in it. */
00048 extern void display_initialize_display (int width, int height);
00049 
00050 /* Clear all of the lines in DISPLAY making the screen blank. */
00051 extern void display_clear_display (DISPLAY_LINE **display);
00052 
00053 /* Update the windows pointed to by WINDOWS in THE_DISPLAY.  This actually
00054    writes the text on the screen. */
00055 extern void display_update_display (WINDOW *window);
00056 
00057 /* Display WIN on THE_DISPLAY.  Unlike display_update_display (), this
00058    function only does one window. */
00059 extern void display_update_one_window (WINDOW *win);
00060 
00061 /* Move the screen cursor to directly over the current character in WINDOW. */
00062 extern void display_cursor_at_point (WINDOW *window);
00063 
00064 /* Scroll the region of the_display starting at START, ending at END, and
00065    moving the lines AMOUNT lines.  If AMOUNT is less than zero, the lines
00066    are moved up in the screen, otherwise down.  Actually, it is possible
00067    for no scrolling to take place in the case that the terminal doesn't
00068    support it.  This doesn't matter to us. */
00069 extern void display_scroll_display (int start, int end, int amount);
00070 
00071 /* Try to scroll lines in WINDOW.  OLD_PAGETOP is the pagetop of WINDOW before
00072    having had its line starts recalculated.  OLD_STARTS is the list of line
00073    starts that used to appear in this window.  OLD_COUNT is the number of lines
00074    that appear in the OLD_STARTS array. */
00075 extern void display_scroll_line_starts (WINDOW *window, int old_pagetop,
00076     char **old_starts, int old_count);
00077 
00078 #endif /* not INFO_DISPLAY_H */