247
|
1 /* Interface definitions for display code.
|
732
|
2 Copyright (C) 1985, 1992 Free Software Foundation, Inc.
|
247
|
3
|
|
4 This file is part of GNU Emacs.
|
|
5
|
|
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
|
732
|
8 the Free Software Foundation; either version 2, or (at your option)
|
247
|
9 any later version.
|
|
10
|
|
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.
|
|
15
|
|
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. */
|
|
19
|
|
20 /* Nonzero means don't assume anything about current
|
764
|
21 contents of actual terminal frame */
|
|
22 extern int frame_garbaged;
|
247
|
23
|
|
24 /* Nonzero means last display completed and cursor is really at
|
|
25 cursX, cursY. Zero means it was preempted. */
|
|
26 extern int display_completed;
|
|
27
|
|
28 #ifdef HAVE_X_WINDOWS
|
|
29 struct run
|
|
30 {
|
|
31 int begin_run;
|
|
32 int len;
|
|
33 int face_code; /* Also handles underlining. */
|
|
34 };
|
|
35 #endif
|
|
36
|
764
|
37 /* This structure is used for the actual display of text on a frame.
|
247
|
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
|
764
|
43 struct frame_glyphs
|
247
|
44 {
|
764
|
45 #ifdef MULTI_FRAME
|
|
46 struct frame *frame; /* Frame these glyphs belong to. */
|
|
47 #endif /* MULTI_FRAME */
|
247
|
48 int height;
|
|
49 int width;
|
|
50
|
764
|
51 /* Contents of the frame.
|
485
|
52 glyphs[V][H] is the glyph at position V, H.
|
|
53 Note that glyphs[V][-1],
|
|
54 glyphs[V][used[V]],
|
764
|
55 and glyphs[V][frame_width] are always '\0'. */
|
247
|
56 GLYPH **glyphs;
|
|
57 /* long vector from which the strings in `glyphs' are taken. */
|
|
58 GLYPH *total_contents;
|
|
59
|
764
|
60 /* When representing a desired frame,
|
|
61 enable[n] == 0 means that line n is same as current frame.
|
|
62 When representing current frame contents,
|
485
|
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
|
247
|
69 /* highlight[n] != 0 iff line n is highlighted. */
|
|
70 char *highlight;
|
|
71
|
|
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) \
|
764
|
93 * FRAME_CURRENT_GLYPHS(s)->enable[(n)])
|
247
|
94
|
|
95 extern void get_display_line ();
|