(read_process_output): Deactivate the mark.
[bpt/emacs.git] / src / dispextern.h
CommitLineData
c22ca93b 1/* Interface definitions for display code.
c6c5df7f 2 Copyright (C) 1985, 1993 Free Software Foundation, Inc.
c22ca93b
JB
3
4This file is part of GNU Emacs.
5
6GNU Emacs is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
e5d77022 8the Free Software Foundation; either version 2, or (at your option)
c22ca93b
JB
9any later version.
10
11GNU Emacs is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
19
c22ca93b
JB
20/* Nonzero means last display completed and cursor is really at
21 cursX, cursY. Zero means it was preempted. */
22extern int display_completed;
23
24#ifdef HAVE_X_WINDOWS
9f2279ad
JA
25#include <X11/Xlib.h>
26
27struct face
28 {
29 /* If this is non-zero, it is a GC we can use without modification
42087301 30 to represent this face. */
9f2279ad 31 GC gc;
88fd275e
JB
32
33 /* If we have ever called get_cached_face on this face structure,
34 here is the index in face_vector of the face it returned. It
35 might not be valid any more, but it's a good place to start
36 looking; get_cached_face tries to use this to avoid searching
37 all of face_vector. */
38 int cached_index;
9f2279ad 39
42087301 40 /* Pixel value for foreground color. */
9f2279ad
JA
41 int foreground;
42
42087301 43 /* Pixel value for background color. */
9f2279ad
JA
44 int background;
45
42087301
RS
46 /* Font used for this face. */
47 XFontStruct *font;
9f2279ad 48
42087301 49 /* Background stipple or bitmap used for this face. */
9f2279ad 50 Pixmap stipple;
42087301
RS
51
52 /* Pixmap_depth. */
53 unsigned int pixmap_w, pixmap_h;
9f2279ad 54
42087301 55 /* Whether or not to underline text in this face. */
9f2279ad 56 char underline;
e5c8436a
JB
57
58 /* Does this face own its resources? (color, font, etcetera)
59 If this is a face which we computed by combining other faces,
60 then this is true, and we shouldn't free any of the resources
61 it refers to; the faces from which it was constructed own it.
62 On the other hand, if this is a face the user created and
63 filled in directly, then this is false, and we should free the
64 resources when we free it. */
65 char copy;
9f2279ad
JA
66 };
67
42087301 68/* Let's stop using this and get rid of it. */
9f2279ad
JA
69typedef struct face *FACE;
70
42087301 71#define NORMAL_FACE ((struct face *) 0)
9f2279ad
JA
72
73#define FACE_HAS_GC(f) ((f)->gc)
74#define FACE_GC(f) ((f)->gc)
75#define FACE_FOREGROUND(f) ((f)->foreground)
76#define FACE_BACKGROUND(f) ((f)->background)
77#define FACE_FONT(f) ((f)->font)
78#define FACE_STIPPLE(f) ((f)->stipple)
79#define FACE_UNDERLINE_P(f) ((f)->underline)
80
81#else /* Not X */
82
83typedef int FACE;
84
85#define NORMAL_FACE 0x0
86#define HIGHLIGHT_FACE 0x1
87#define UNDERLINE_FACE 0x2
88#define HIGHLIGHT_UNDERLINE_FACE 0x3
89
90#define FACE_HIGHLIGHT(f) ((f) & 0x1)
91#define FACE_UNDERLINE(f) ((f) & 0x2)
92#endif /* Not X */
93
c22ca93b 94
502b9b64 95/* This structure is used for the actual display of text on a frame.
c22ca93b
JB
96
97 There are two instantiations of it: the glyphs currently displayed,
98 and the glyphs we desire to display. The latter object is generated
42087301 99 from buffers being displayed. */
c22ca93b 100
502b9b64 101struct frame_glyphs
c22ca93b 102 {
502b9b64 103#ifdef MULTI_FRAME
42087301 104 struct frame *frame; /* Frame these glyphs belong to. */
502b9b64 105#endif /* MULTI_FRAME */
c22ca93b
JB
106 int height;
107 int width;
108
502b9b64 109 /* Contents of the frame.
265a9e55
JB
110 glyphs[V][H] is the glyph at position V, H.
111 Note that glyphs[V][-1],
112 glyphs[V][used[V]],
502b9b64 113 and glyphs[V][frame_width] are always '\0'. */
c22ca93b
JB
114 GLYPH **glyphs;
115 /* long vector from which the strings in `glyphs' are taken. */
116 GLYPH *total_contents;
117
502b9b64
JB
118 /* When representing a desired frame,
119 enable[n] == 0 means that line n is same as current frame.
8f607ef0 120 Between updates, all lines should be disabled.
502b9b64 121 When representing current frame contents,
265a9e55
JB
122 enable[n] == 0 means that line n is blank. */
123 char *enable;
124
125 /* Everything on line n after column used[n] is considered blank. */
126 int *used;
127
c22ca93b
JB
128 /* highlight[n] != 0 iff line n is highlighted. */
129 char *highlight;
130
42087301 131 /* Buffer offset of this line's first char. */
c22ca93b
JB
132 int *bufp;
133
134#ifdef HAVE_X_WINDOWS
42087301 135 /* Pixel position of top left corner of line. */
9f2279ad 136 short *top_left_x;
c22ca93b 137 short *top_left_y;
c22ca93b 138
42087301 139 /* Pixel width of line. */
9f2279ad
JA
140 short *pix_width;
141
42087301 142 /* Pixel height of line. */
9f2279ad 143 short *pix_height;
c22ca93b 144
42087301 145 /* Largest font ascent on this line. */
9f2279ad
JA
146 short *max_ascent;
147#endif /* HAVE_X_WINDOWS */
148 };
c22ca93b
JB
149
150extern void get_display_line ();
bf34ebcf 151extern Lisp_Object sit_for ();