Mercurial > emacs
diff src/xfaces.c @ 44890:01b93e5e53a7
Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
lisp/ChangeLog, and src/ChangeLog for list of changes.
author | Andrew Choi <akochoi@shaw.ca> |
---|---|
date | Fri, 26 Apr 2002 23:39:06 +0000 |
parents | 413dd322c77d |
children | 8c610da8ea94 |
line wrap: on
line diff
--- a/src/xfaces.c Fri Apr 26 22:33:33 2002 +0000 +++ b/src/xfaces.c Fri Apr 26 23:39:06 2002 +0000 @@ -234,32 +234,11 @@ #define FONT_WIDTH FONT_MAX_WIDTH #endif /* WINDOWSNT */ -#ifdef macintosh +#ifdef MAC_OS #include "macterm.h" #define x_display_info mac_display_info #define check_x check_mac - -extern XGCValues *XCreateGC (void *, WindowPtr, unsigned long, XGCValues *); - -static INLINE GC -x_create_gc (f, mask, xgcv) - struct frame *f; - unsigned long mask; - XGCValues *xgcv; -{ - GC gc; - gc = XCreateGC (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), mask, xgcv); - return gc; -} - -static INLINE void -x_free_gc (f, gc) - struct frame *f; - GC gc; -{ - XFreeGC (FRAME_MAC_DISPLAY (f), gc); -} -#endif +#endif /* MAC_OS */ #include "buffer.h" #include "dispextern.h" @@ -814,6 +793,32 @@ #endif /* WINDOWSNT */ +#ifdef MAC_OS +/* Mac OS emulation of GCs */ + +extern XGCValues *XCreateGC (void *, Window, unsigned long, XGCValues *); + +static INLINE GC +x_create_gc (f, mask, xgcv) + struct frame *f; + unsigned long mask; + XGCValues *xgcv; +{ + GC gc; + gc = XCreateGC (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), mask, xgcv); + return gc; +} + +static INLINE void +x_free_gc (f, gc) + struct frame *f; + GC gc; +{ + XFreeGC (FRAME_MAC_DISPLAY (f), gc); +} + +#endif /* MAC_OS */ + /* Like stricmp. Used to compare parts of font names which are in ISO8859-1. */ @@ -1382,7 +1387,7 @@ else if (FRAME_W32_P (f)) return w32_defined_color (f, color_name, color_def, alloc); #endif -#ifdef macintosh +#ifdef MAC_OS else if (FRAME_MAC_P (f)) return mac_defined_color (f, color_name, color_def, alloc); #endif @@ -1889,7 +1894,7 @@ font height, then for weight, then for slant.' This variable can be set via set-face-font-sort-order. */ -#ifdef macintosh +#ifdef MAC_OS static int font_sort_order[4] = { XLFD_SWIDTH, XLFD_POINT_SIZE, XLFD_WEIGHT, XLFD_SLANT }; @@ -4341,7 +4346,7 @@ { Lisp_Object value = Qnil; #ifndef WINDOWSNT -#ifndef macintosh +#ifndef MAC_OS CHECK_STRING (resource); CHECK_STRING (class); CHECK_LIVE_FRAME (frame); @@ -4349,7 +4354,7 @@ value = display_x_get_resource (FRAME_X_DISPLAY_INFO (XFRAME (frame)), resource, class, Qnil, Qnil); UNBLOCK_INPUT; -#endif /* not macintosh */ +#endif /* not MAC_OS */ #endif /* not WINDOWSNT */ return value; } @@ -4997,7 +5002,7 @@ #ifdef WINDOWSNT xgcv.font = face->font; #endif -#ifdef macintosh +#ifdef MAC_OS xgcv.font = face->font; #endif mask |= GCFont; @@ -6428,7 +6433,7 @@ face->fontset = make_fontset_for_ascii_face (f, fontset); face->font = NULL; /* to force realize_face to load font */ -#ifdef macintosh +#ifdef MAC_OS /* Load the font if it is specified in ATTRS. This fixes changing frame font on the Mac. */ if (STRINGP (attrs[LFACE_FONT_INDEX]))