summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Arceneaux <jla@gnu.org>1992-10-14 23:00:18 +0000
committerJoseph Arceneaux <jla@gnu.org>1992-10-14 23:00:18 +0000
commit9f2279add745cb44f375017a980d00d86bbaaaaa (patch)
tree8b3ed4ceaddb5ca0eca53654d4e30757ee5aa717
parent9d46c2e6bb7cb529c0a9faa9c0ebae1431889a38 (diff)
downloademacs-9f2279add745cb44f375017a980d00d86bbaaaaa.tar.gz
* 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;
extern int display_completed;
#ifdef HAVE_X_WINDOWS
-struct run
-{
- int begin_run;
- int len;
- int face_code; /* Also handles underlining. */
-};
-#endif
+#include <X11/Xlib.h>
+
+struct face
+ {
+ /* If this is non-zero, it is a GC we can use without modification
+ to represent this face. */
+ GC gc;
+
+ /* Pixel value for foreground color. */
+ int foreground;
+
+ /* Pixel value for background color. */
+ int background;
+
+ /* Font used for this face */
+ XFontStruct font;
+
+ /* Background stipple or bitmap used for this face. */
+ Pixmap stipple;
+
+ /* Whether or not to underline text in this face. */
+ char underline;
+ };
+
+typedef struct face *FACE;
+
+#define NORMAL_FACE ((FACE *) 0)
+
+#define FACE_HAS_GC(f) ((f)->gc)
+#define FACE_GC(f) ((f)->gc)
+#define FACE_FOREGROUND(f) ((f)->foreground)
+#define FACE_BACKGROUND(f) ((f)->background)
+#define FACE_FONT(f) ((f)->font)
+#define FACE_STIPPLE(f) ((f)->stipple)
+#define FACE_UNDERLINE_P(f) ((f)->underline)
+
+#else /* Not X */
+
+typedef int FACE;
+
+#define NORMAL_FACE 0x0
+#define HIGHLIGHT_FACE 0x1
+#define UNDERLINE_FACE 0x2
+#define HIGHLIGHT_UNDERLINE_FACE 0x3
+
+#define FACE_HIGHLIGHT(f) ((f) & 0x1)
+#define FACE_UNDERLINE(f) ((f) & 0x2)
+#endif /* Not X */
+
/* This structure is used for the actual display of text on a frame.
@@ -69,27 +111,23 @@ struct frame_glyphs
/* highlight[n] != 0 iff line n is highlighted. */
char *highlight;
-
/* Buffer offset of this line's first char. */
int *bufp;
#ifdef HAVE_X_WINDOWS
- int *nruns; /* N runs of differently displayed text. */
- struct run **face_list;
- short *top_left_x; /* Pixel position of top left corner */
+ /* Pixel position of top left corner of line. */
+ short *top_left_x;
short *top_left_y;
- short *pix_width; /* Pixel width of line. */
- short *pix_height; /* Pixel height of line. */
-#endif /* HAVE_X_WINDOWS */
- };
-#if 0
-#define LINE_HEIGHT(s,n) (current_glyphs->pix_height[n])
-#define LINE_WIDTH(s,n) (current_glyphs->pix_width[n])
-#endif
+ /* Pixel width of line. */
+ short *pix_width;
+
+ /* Pixel height of line. */
+ short *pix_height;
-#define LINE_HEIGHT(s,n) (FONT_HEIGHT((s)->display.x->font))
-#define LINE_WIDTH(s,n) (FONT_HEIGHT((s)->display.x->font) \
- * FRAME_CURRENT_GLYPHS(s)->enable[(n)])
+ /* Largest font ascent on this line. */
+ short *max_ascent;
+#endif /* HAVE_X_WINDOWS */
+ };
extern void get_display_line ();