aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseph Arceneaux1992-10-14 23:00:18 +0000
committerJoseph Arceneaux1992-10-14 23:00:18 +0000
commit9f2279add745cb44f375017a980d00d86bbaaaaa (patch)
tree8b3ed4ceaddb5ca0eca53654d4e30757ee5aa717
parent9d46c2e6bb7cb529c0a9faa9c0ebae1431889a38 (diff)
downloademacs-9f2279add745cb44f375017a980d00d86bbaaaaa.tar.gz
emacs-9f2279add745cb44f375017a980d00d86bbaaaaa.zip
* dispextern.h: New element of frame structure `max_ascent'.
Removed elements `nruns' and `face_list'. LINE_HEIGHT and LINE_WIDTH macros removed. New struct face with associated typedef FACE declared, along with accessing macros.
-rw-r--r--src/dispextern.h82
1 files changed, 60 insertions, 22 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index 87a84ad4d4d..a1ea0c8fb86 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -26,13 +26,55 @@ extern int frame_garbaged;
26extern int display_completed; 26extern int display_completed;
27 27
28#ifdef HAVE_X_WINDOWS 28#ifdef HAVE_X_WINDOWS
29struct run 29#include <X11/Xlib.h>
30{ 30
31 int begin_run; 31struct face
32 int len; 32 {
33 int face_code; /* Also handles underlining. */ 33 /* If this is non-zero, it is a GC we can use without modification
34}; 34 to represent this face. */
35#endif 35 GC gc;
36
37 /* Pixel value for foreground color. */
38 int foreground;
39
40 /* Pixel value for background color. */
41 int background;
42
43 /* Font used for this face */
44 XFontStruct font;
45
46 /* Background stipple or bitmap used for this face. */
47 Pixmap stipple;
48
49 /* Whether or not to underline text in this face. */
50 char underline;
51 };
52
53typedef struct face *FACE;
54
55#define NORMAL_FACE ((FACE *) 0)
56
57#define FACE_HAS_GC(f) ((f)->gc)
58#define FACE_GC(f) ((f)->gc)
59#define FACE_FOREGROUND(f) ((f)->foreground)
60#define FACE_BACKGROUND(f) ((f)->background)
61#define FACE_FONT(f) ((f)->font)
62#define FACE_STIPPLE(f) ((f)->stipple)
63#define FACE_UNDERLINE_P(f) ((f)->underline)
64
65#else /* Not X */
66
67typedef int FACE;
68
69#define NORMAL_FACE 0x0
70#define HIGHLIGHT_FACE 0x1
71#define UNDERLINE_FACE 0x2
72#define HIGHLIGHT_UNDERLINE_FACE 0x3
73
74#define FACE_HIGHLIGHT(f) ((f) & 0x1)
75#define FACE_UNDERLINE(f) ((f) & 0x2)
76#endif /* Not X */
77
36 78
37/* This structure is used for the actual display of text on a frame. 79/* This structure is used for the actual display of text on a frame.
38 80
@@ -69,27 +111,23 @@ struct frame_glyphs
69 /* highlight[n] != 0 iff line n is highlighted. */ 111 /* highlight[n] != 0 iff line n is highlighted. */
70 char *highlight; 112 char *highlight;
71 113
72
73 /* Buffer offset of this line's first char. */ 114 /* Buffer offset of this line's first char. */
74 int *bufp; 115 int *bufp;
75 116
76#ifdef HAVE_X_WINDOWS 117#ifdef HAVE_X_WINDOWS
77 int *nruns; /* N runs of differently displayed text. */ 118 /* Pixel position of top left corner of line. */
78 struct run **face_list; 119 short *top_left_x;
79 short *top_left_x; /* Pixel position of top left corner */
80 short *top_left_y; 120 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 121
86#if 0 122 /* Pixel width of line. */
87#define LINE_HEIGHT(s,n) (current_glyphs->pix_height[n]) 123 short *pix_width;
88#define LINE_WIDTH(s,n) (current_glyphs->pix_width[n]) 124
89#endif 125 /* Pixel height of line. */
126 short *pix_height;
90 127
91#define LINE_HEIGHT(s,n) (FONT_HEIGHT((s)->display.x->font)) 128 /* Largest font ascent on this line. */
92#define LINE_WIDTH(s,n) (FONT_HEIGHT((s)->display.x->font) \ 129 short *max_ascent;
93 * FRAME_CURRENT_GLYPHS(s)->enable[(n)]) 130#endif /* HAVE_X_WINDOWS */
131 };
94 132
95extern void get_display_line (); 133extern void get_display_line ();