annotate src/dispextern.h @ 840:113281b361ec

*** empty log message ***
author Eric S. Raymond <esr@snark.thyrsus.com>
date Wed, 22 Jul 1992 02:58:21 +0000
parents bb24f1180bb6
children 7fd1c810daca
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.
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 485
diff changeset
2 Copyright (C) 1985, 1992 Free Software Foundation, Inc.
247
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
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 485
diff changeset
8 the Free Software Foundation; either version 2, or (at your option)
247
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
764
bb24f1180bb6 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 732
diff changeset
21 contents of actual terminal frame */
bb24f1180bb6 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 732
diff changeset
22 extern int frame_garbaged;
247
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
764
bb24f1180bb6 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 732
diff changeset
37 /* This structure is used for the actual display of text on a frame.
247
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
764
bb24f1180bb6 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 732
diff changeset
43 struct frame_glyphs
247
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
44 {
764
bb24f1180bb6 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 732
diff changeset
45 #ifdef MULTI_FRAME
bb24f1180bb6 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 732
diff changeset
46 struct frame *frame; /* Frame these glyphs belong to. */
bb24f1180bb6 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 732
diff changeset
47 #endif /* MULTI_FRAME */
247
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
764
bb24f1180bb6 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 732
diff changeset
51 /* Contents of the frame.
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 328
diff changeset
52 glyphs[V][H] is the glyph at position V, H.
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 328
diff changeset
53 Note that glyphs[V][-1],
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 328
diff changeset
54 glyphs[V][used[V]],
764
bb24f1180bb6 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 732
diff changeset
55 and glyphs[V][frame_width] are always '\0'. */
247
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
764
bb24f1180bb6 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 732
diff changeset
60 /* When representing a desired frame,
bb24f1180bb6 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 732
diff changeset
61 enable[n] == 0 means that line n is same as current frame.
bb24f1180bb6 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 732
diff changeset
62 When representing current frame contents,
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 328
diff changeset
63 enable[n] == 0 means that line n is blank. */
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 328
diff changeset
64 char *enable;
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 328
diff changeset
65
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 328
diff changeset
66 /* Everything on line n after column used[n] is considered blank. */
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 328
diff changeset
67 int *used;
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 328
diff changeset
68
247
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
69 /* highlight[n] != 0 iff line n is highlighted. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
70 char *highlight;
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
71
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
72
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
73 /* Buffer offset of this line's first char. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
74 int *bufp;
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
75
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
76 #ifdef HAVE_X_WINDOWS
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
77 int *nruns; /* N runs of differently displayed text. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
78 struct run **face_list;
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
79 short *top_left_x; /* Pixel position of top left corner */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
80 short *top_left_y;
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
81 short *pix_width; /* Pixel width of line. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
82 short *pix_height; /* Pixel height of line. */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
83 #endif /* HAVE_X_WINDOWS */
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
84 };
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
85
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
86 #if 0
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
87 #define LINE_HEIGHT(s,n) (current_glyphs->pix_height[n])
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
88 #define LINE_WIDTH(s,n) (current_glyphs->pix_width[n])
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
89 #endif
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
90
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
91 #define LINE_HEIGHT(s,n) (FONT_HEIGHT((s)->display.x->font))
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
92 #define LINE_WIDTH(s,n) (FONT_HEIGHT((s)->display.x->font) \
764
bb24f1180bb6 entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 732
diff changeset
93 * FRAME_CURRENT_GLYPHS(s)->enable[(n)])
247
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
94
8b9aa51c8a69 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
95 extern void get_display_line ();