*** empty log message ***
[emacs.git] / src / dispextern.h
blob19a0bfcecfa14fc1027cac27080e4fd098a4343b
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)
9 any later version.
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;
28 #ifdef HAVE_X_WINDOWS
29 struct run
31 int begin_run;
32 int len;
33 int face_code; /* Also handles underlining. */
35 #endif
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. */
43 struct screen_glyphs
45 #ifdef MULTI_SCREEN
46 struct screen *screen; /* Screen these glyphs belong to. */
47 #endif /* MULTI_SCREEN */
48 int height;
49 int width;
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'. */
56 GLYPH **glyphs;
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. */
64 char *enable;
66 /* Everything on line n after column used[n] is considered blank. */
67 int *used;
69 /* highlight[n] != 0 iff line n is highlighted. */
70 char *highlight;
73 /* Buffer offset of this line's first char. */
74 int *bufp;
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 */
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
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 ();