[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/dispextern.h
From: |
Jan Djärv |
Subject: |
[Emacs-diffs] Changes to emacs/src/dispextern.h |
Date: |
Sun, 20 Mar 2005 17:28:56 -0500 |
Index: emacs/src/dispextern.h
diff -c emacs/src/dispextern.h:1.199 emacs/src/dispextern.h:1.200
*** emacs/src/dispextern.h:1.199 Thu Mar 10 19:07:39 2005
--- emacs/src/dispextern.h Sun Mar 20 22:28:54 2005
***************
*** 27,32 ****
--- 27,43 ----
#ifdef HAVE_X_WINDOWS
#include <X11/Xlib.h>
+
+ #ifndef X_FONT_TYPE_DECL
+ #define X_FONT_TYPE_DECL
+ #ifdef HAVE_XFT
+ #include <X11/Xft/Xft.h>
+ typedef XftFont x_font_type;
+ #else
+ typedef XFontStruct x_font_type;
+ #endif
+ #endif /* not X_FONT_TYPE_DECL */
+
#ifdef USE_X_TOOLKIT
#include <X11/Intrinsic.h>
#endif /* USE_X_TOOLKIT */
***************
*** 34,39 ****
--- 45,51 ----
#else /* !HAVE_X_WINDOWS */
/* X-related stuff used by non-X gui code. */
+ typedef XFontStruct x_font_type;
typedef struct {
unsigned long pixel;
***************
*** 1146,1152 ****
struct face *face;
/* Font in which this string is to be drawn. */
! XFontStruct *font;
/* Font info for this string. */
struct font_info *font_info;
--- 1158,1164 ----
struct face *face;
/* Font in which this string is to be drawn. */
! x_font_type *font;
/* Font info for this string. */
struct font_info *font_info;
***************
*** 1417,1422 ****
--- 1429,1439 ----
#ifdef HAVE_WINDOW_SYSTEM
+ #ifdef HAVE_XFT
+ XftColor xft_fg;
+ XftColor xft_bg;
+ XftDraw *xft_draw;
+ #endif
/* If non-zero, this is a GC that we can use without modification for
drawing the characters in this face. */
GC gc;
***************
*** 1425,1431 ****
for some reason. This points to a `font' slot of a struct
font_info, and we should not call XFreeFont on it because the
font may still be used somewhere else. */
! XFontStruct *font;
/* Background stipple or bitmap used for this face. This is
an id as returned from load_pixmap. */
--- 1442,1448 ----
for some reason. This points to a `font' slot of a struct
font_info, and we should not call XFreeFont on it because the
font may still be used somewhere else. */
! x_font_type *font;
/* Background stipple or bitmap used for this face. This is
an id as returned from load_pixmap. */
***************
*** 1621,1631 ****
--- 1638,1656 ----
/* Prepare face FACE for use on frame F. This must be called before
using X resources of FACE. */
+ #ifdef HAVE_XFT
+ #define PREPARE_FACE_FOR_DISPLAY(F, FACE) \
+ if ((FACE)->xft_draw == 0 || (FACE)->gc == 0) \
+ prepare_face_for_display ((F), (FACE)); \
+ else \
+ (void) 0
+ #else
#define PREPARE_FACE_FOR_DISPLAY(F, FACE) \
if ((FACE)->gc == 0) \
prepare_face_for_display ((F), (FACE)); \
else \
(void) 0
+ #endif /* not HAVE_XFT */
/* Return a pointer to the face with ID on frame F, or null if such a
face doesn't exist. */
***************
*** 2277,2283 ****
/* Get metrics of character CHAR2B in FONT of type FONT_TYPE.
Value is null if CHAR2B is not contained in the font. */
! XCharStruct * (*per_char_metric) P_ ((XFontStruct *font, XChar2b *char2b,
int font_type));
/* Encode CHAR2B using encoding information from FONT_INFO. CHAR2B is
--- 2302,2310 ----
/* Get metrics of character CHAR2B in FONT of type FONT_TYPE.
Value is null if CHAR2B is not contained in the font. */
! XCharStruct * (*per_char_metric) P_ ((struct frame *f,
! x_font_type *font,
! XChar2b *char2b,
int font_type));
/* Encode CHAR2B using encoding information from FONT_INFO. CHAR2B is
***************
*** 2640,2646 ****
extern void reseat_at_previous_visible_line_start P_ ((struct it *));
extern int calc_pixel_width_or_height P_ ((double *, struct it *, Lisp_Object,
! /* XFontStruct */ void *, int, int
*));
#ifdef HAVE_WINDOW_SYSTEM
--- 2667,2673 ----
extern void reseat_at_previous_visible_line_start P_ ((struct it *));
extern int calc_pixel_width_or_height P_ ((double *, struct it *, Lisp_Object,
! /* x_font_type */ void *, int, int
*));
#ifdef HAVE_WINDOW_SYSTEM