*** empty log message ***
[bpt/emacs.git] / src / dispextern.h
CommitLineData
c22ca93b 1/* Interface definitions for display code.
e5d77022 2 Copyright (C) 1985, 1992 Free Software Foundation, Inc.
c22ca93b
JB
3
4This file is part of GNU Emacs.
5
6GNU Emacs is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
e5d77022 8the Free Software Foundation; either version 2, or (at your option)
c22ca93b
JB
9any later version.
10
11GNU Emacs is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
19
20/* Nonzero means don't assume anything about current
21 contents of actual terminal screen */
22extern int screen_garbaged;
23
24/* Nonzero means last display completed and cursor is really at
25 cursX, cursY. Zero means it was preempted. */
26extern int display_completed;
27
28#ifdef HAVE_X_WINDOWS
29struct run
30{
31 int begin_run;
32 int len;
33 int face_code; /* Also handles underlining. */
34};
35#endif
36
37/* This structure is used for the actual display of text on a screen.
38
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. */
42
43struct screen_glyphs
44 {
45#ifdef MULTI_SCREEN
46 struct screen *screen; /* Screen these glyphs belong to. */
47#endif /* MULTI_SCREEN */
48 int height;
49 int width;
50
265a9e55
JB
51 /* Contents of the screen.
52 glyphs[V][H] is the glyph at position V, H.
53 Note that glyphs[V][-1],
54 glyphs[V][used[V]],
55 and glyphs[V][screen_width] are always '\0'. */
c22ca93b
JB
56 GLYPH **glyphs;
57 /* long vector from which the strings in `glyphs' are taken. */
58 GLYPH *total_contents;
59
265a9e55
JB
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. */
64 char *enable;
65
66 /* Everything on line n after column used[n] is considered blank. */
67 int *used;
68
c22ca93b
JB
69 /* highlight[n] != 0 iff line n is highlighted. */
70 char *highlight;
71
c22ca93b
JB
72
73 /* Buffer offset of this line's first char. */
74 int *bufp;
75
76#ifdef HAVE_X_WINDOWS
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 */
80 short *top_left_y;
81 short *pix_width; /* Pixel width of line. */
82 short *pix_height; /* Pixel height of line. */
83#endif /* HAVE_X_WINDOWS */
84 };
85
86#if 0
87#define LINE_HEIGHT(s,n) (current_glyphs->pix_height[n])
88#define LINE_WIDTH(s,n) (current_glyphs->pix_width[n])
89#endif
90
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)])
94
95extern void get_display_line ();