1 /* Interface definitions for display code.
2 Copyright (C) 1985, 1992 Free Software Foundation, Inc.
4 This file is part of GNU Emacs.
6 GNU Emacs is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Emacs is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Emacs; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
20 /* Nonzero means don't assume anything about current
21 contents of actual terminal screen */
22 extern int screen_garbaged
;
24 /* Nonzero means last display completed and cursor is really at
25 cursX, cursY. Zero means it was preempted. */
26 extern int display_completed
;
33 int face_code
; /* Also handles underlining. */
37 /* This structure is used for the actual display of text on a screen.
39 There are two instantiations of it: the glyphs currently displayed,
40 and the glyphs we desire to display. The latter object is generated
41 from buffers being displayed. */
46 struct screen
*screen
; /* Screen these glyphs belong to. */
47 #endif /* MULTI_SCREEN */
51 /* Contents of the screen.
52 glyphs[V][H] is the glyph at position V, H.
53 Note that glyphs[V][-1],
55 and glyphs[V][screen_width] are always '\0'. */
57 /* long vector from which the strings in `glyphs' are taken. */
58 GLYPH
*total_contents
;
60 /* When representing a desired screen,
61 enable[n] == 0 means that line n is same as current screen.
62 When representing current screen contents,
63 enable[n] == 0 means that line n is blank. */
66 /* Everything on line n after column used[n] is considered blank. */
69 /* highlight[n] != 0 iff line n is highlighted. */
73 /* Buffer offset of this line's first char. */
77 int *nruns
; /* N runs of differently displayed text. */
78 struct run
**face_list
;
79 short *top_left_x
; /* Pixel position of top left corner */
81 short *pix_width
; /* Pixel width of line. */
82 short *pix_height
; /* Pixel height of line. */
83 #endif /* HAVE_X_WINDOWS */
87 #define LINE_HEIGHT(s,n) (current_glyphs->pix_height[n])
88 #define LINE_WIDTH(s,n) (current_glyphs->pix_width[n])
91 #define LINE_HEIGHT(s,n) (FONT_HEIGHT((s)->display.x->font))
92 #define LINE_WIDTH(s,n) (FONT_HEIGHT((s)->display.x->font) \
93 * SCREEN_CURRENT_GLYPHS(s)->enable[(n)])
95 extern void get_display_line ();