annotate src/dispextern.h @ 302:7c3ce5b350b8

Initial revision
author Jim Blandy <jimb@redhat.com>
date Wed, 26 Jun 1991 21:34:53 +0000
parents 8b9aa51c8a69
children 33b259eda54d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
247
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1 /* Interface definitions for display code.
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
2 Copyright (C) 1985 Free Software Foundation, Inc.
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
3
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
4 This file is part of GNU Emacs.
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
5
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
6 GNU Emacs is free software; you can redistribute it and/or modify
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
8 the Free Software Foundation; either version 1, or (at your option)
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
9 any later version.
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
10
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11 GNU Emacs is distributed in the hope that it will be useful,
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14 GNU General Public License for more details.
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
17 along with GNU Emacs; see the file COPYING. If not, write to
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
19
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
20 /* Nonzero means don't assume anything about current
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21 contents of actual terminal screen */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
22 extern int screen_garbaged;
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
23
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
24 /* Nonzero means last display completed and cursor is really at
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25 cursX, cursY. Zero means it was preempted. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26 extern int display_completed;
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
27
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28 #ifdef HAVE_X_WINDOWS
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29 struct run
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30 {
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
31 int begin_run;
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
32 int len;
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
33 int face_code; /* Also handles underlining. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
34 };
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
35 #endif
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
36
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
37 /* This structure is used for the actual display of text on a screen.
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
38
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
39 There are two instantiations of it: the glyphs currently displayed,
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
40 and the glyphs we desire to display. The latter object is generated
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
41 from buffers being displayed. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
42
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43 struct screen_glyphs
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
44 {
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45 #ifdef MULTI_SCREEN
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
46 struct screen *screen; /* Screen these glyphs belong to. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47 #endif /* MULTI_SCREEN */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
48 int height;
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
49 int width;
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
50
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
51 int *used; /* Vector of widths (in chars) of lines. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
52 /* Vector of line contents.
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
53 m->glyphs[V][H] is the glyph at position V, H.
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
54 Note that ->glyphs[...][screen_width] is always 0
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
55 and so is ->glyphs[...][-1]. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
56 GLYPH **glyphs;
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
57 /* long vector from which the strings in `glyphs' are taken. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
58 GLYPH *total_contents;
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
59
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
60 /* highlight[n] != 0 iff line n is highlighted. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
61 char *highlight;
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
62
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
63 /* When representing a desired screen, enable[n] == 0 implies line
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
64 n is same as current screen. When representing current screen
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
65 contents, enable[n] == 0 implies line n is blank. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
66 char *enable;
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
67
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
68 /* Buffer offset of this line's first char. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
69 int *bufp;
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
70
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
71 #ifdef HAVE_X_WINDOWS
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
72 int *nruns; /* N runs of differently displayed text. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
73 struct run **face_list;
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
74 short *top_left_x; /* Pixel position of top left corner */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
75 short *top_left_y;
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
76 short *pix_width; /* Pixel width of line. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
77 short *pix_height; /* Pixel height of line. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
78 #endif /* HAVE_X_WINDOWS */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
79 };
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
80
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
81 #if 0
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
82 #define LINE_HEIGHT(s,n) (current_glyphs->pix_height[n])
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
83 #define LINE_WIDTH(s,n) (current_glyphs->pix_width[n])
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
84 #endif
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
85
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
86 #define LINE_HEIGHT(s,n) (FONT_HEIGHT((s)->display.x->font))
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
87 #define LINE_WIDTH(s,n) (FONT_HEIGHT((s)->display.x->font) \
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
88 * SCREEN_CURRENT_GLYPHS(s)->enable[(n)])
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
89
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
90 extern void get_display_line ();
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
91
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
92 /* Buffer used by `message' for formatting a message. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
93 extern char *message_buf;
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
94 extern int message_buf_size;