Commit | Line | Data |
---|---|---|
c22ca93b JB |
1 | /* Interface definitions for display code. |
2 | Copyright (C) 1985 Free Software Foundation, Inc. | |
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 | |
8 | the Free Software Foundation; either version 1, or (at your option) | |
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 | |
21 | contents of actual terminal screen */ | |
22 | extern int screen_garbaged; | |
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 | ||
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 | ||
43 | struct 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 | ||
51 | int *used; /* Vector of widths (in chars) of lines. */ | |
52 | /* Vector of line contents. | |
53 | m->glyphs[V][H] is the glyph at position V, H. | |
54 | Note that ->glyphs[...][screen_width] is always 0 | |
55 | and so is ->glyphs[...][-1]. */ | |
56 | GLYPH **glyphs; | |
57 | /* long vector from which the strings in `glyphs' are taken. */ | |
58 | GLYPH *total_contents; | |
59 | ||
60 | /* highlight[n] != 0 iff line n is highlighted. */ | |
61 | char *highlight; | |
62 | ||
63 | /* When representing a desired screen, enable[n] == 0 implies line | |
64 | n is same as current screen. When representing current screen | |
65 | contents, enable[n] == 0 implies line n is blank. */ | |
66 | char *enable; | |
67 | ||
68 | /* Buffer offset of this line's first char. */ | |
69 | int *bufp; | |
70 | ||
71 | #ifdef HAVE_X_WINDOWS | |
72 | int *nruns; /* N runs of differently displayed text. */ | |
73 | struct run **face_list; | |
74 | short *top_left_x; /* Pixel position of top left corner */ | |
75 | short *top_left_y; | |
76 | short *pix_width; /* Pixel width of line. */ | |
77 | short *pix_height; /* Pixel height of line. */ | |
78 | #endif /* HAVE_X_WINDOWS */ | |
79 | }; | |
80 | ||
81 | #if 0 | |
82 | #define LINE_HEIGHT(s,n) (current_glyphs->pix_height[n]) | |
83 | #define LINE_WIDTH(s,n) (current_glyphs->pix_width[n]) | |
84 | #endif | |
85 | ||
86 | #define LINE_HEIGHT(s,n) (FONT_HEIGHT((s)->display.x->font)) | |
87 | #define LINE_WIDTH(s,n) (FONT_HEIGHT((s)->display.x->font) \ | |
88 | * SCREEN_CURRENT_GLYPHS(s)->enable[(n)]) | |
89 | ||
90 | extern void get_display_line (); | |
91 | ||
92 | /* Buffer used by `message' for formatting a message. */ | |
93 | extern char *message_buf; | |
94 | extern int message_buf_size; |