[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xfaces.c
From: |
Dave Love |
Subject: |
[Emacs-diffs] Changes to emacs/src/xfaces.c |
Date: |
Thu, 09 May 2002 13:57:27 -0400 |
Index: emacs/src/xfaces.c
diff -c emacs/src/xfaces.c:1.251 emacs/src/xfaces.c:1.252
*** emacs/src/xfaces.c:1.251 Fri Apr 19 14:36:58 2002
--- emacs/src/xfaces.c Fri Apr 26 19:39:05 2002
***************
*** 234,265 ****
#define FONT_WIDTH FONT_MAX_WIDTH
#endif /* WINDOWSNT */
! #ifdef macintosh
#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
#include "buffer.h"
#include "dispextern.h"
--- 234,244 ----
#define FONT_WIDTH FONT_MAX_WIDTH
#endif /* WINDOWSNT */
! #ifdef MAC_OS
#include "macterm.h"
#define x_display_info mac_display_info
#define check_x check_mac
! #endif /* MAC_OS */
#include "buffer.h"
#include "dispextern.h"
***************
*** 814,819 ****
--- 793,824 ----
#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,1388 ****
else if (FRAME_W32_P (f))
return w32_defined_color (f, color_name, color_def, alloc);
#endif
! #ifdef macintosh
else if (FRAME_MAC_P (f))
return mac_defined_color (f, color_name, color_def, alloc);
#endif
--- 1387,1393 ----
else if (FRAME_W32_P (f))
return w32_defined_color (f, color_name, color_def, alloc);
#endif
! #ifdef MAC_OS
else if (FRAME_MAC_P (f))
return mac_defined_color (f, color_name, color_def, alloc);
#endif
***************
*** 1889,1895 ****
font height, then for weight, then for slant.' This variable can be
set via set-face-font-sort-order. */
! #ifdef macintosh
static int font_sort_order[4] = {
XLFD_SWIDTH, XLFD_POINT_SIZE, XLFD_WEIGHT, XLFD_SLANT
};
--- 1894,1900 ----
font height, then for weight, then for slant.' This variable can be
set via set-face-font-sort-order. */
! #ifdef MAC_OS
static int font_sort_order[4] = {
XLFD_SWIDTH, XLFD_POINT_SIZE, XLFD_WEIGHT, XLFD_SLANT
};
***************
*** 4341,4347 ****
{
Lisp_Object value = Qnil;
#ifndef WINDOWSNT
! #ifndef macintosh
CHECK_STRING (resource);
CHECK_STRING (class);
CHECK_LIVE_FRAME (frame);
--- 4346,4352 ----
{
Lisp_Object value = Qnil;
#ifndef WINDOWSNT
! #ifndef MAC_OS
CHECK_STRING (resource);
CHECK_STRING (class);
CHECK_LIVE_FRAME (frame);
***************
*** 4349,4355 ****
value = display_x_get_resource (FRAME_X_DISPLAY_INFO (XFRAME (frame)),
resource, class, Qnil, Qnil);
UNBLOCK_INPUT;
! #endif /* not macintosh */
#endif /* not WINDOWSNT */
return value;
}
--- 4354,4360 ----
value = display_x_get_resource (FRAME_X_DISPLAY_INFO (XFRAME (frame)),
resource, class, Qnil, Qnil);
UNBLOCK_INPUT;
! #endif /* not MAC_OS */
#endif /* not WINDOWSNT */
return value;
}
***************
*** 4997,5003 ****
#ifdef WINDOWSNT
xgcv.font = face->font;
#endif
! #ifdef macintosh
xgcv.font = face->font;
#endif
mask |= GCFont;
--- 5002,5008 ----
#ifdef WINDOWSNT
xgcv.font = face->font;
#endif
! #ifdef MAC_OS
xgcv.font = face->font;
#endif
mask |= GCFont;
***************
*** 6428,6434 ****
face->fontset = make_fontset_for_ascii_face (f, fontset);
face->font = NULL; /* to force realize_face to load font */
! #ifdef macintosh
/* Load the font if it is specified in ATTRS. This fixes
changing frame font on the Mac. */
if (STRINGP (attrs[LFACE_FONT_INDEX]))
--- 6433,6439 ----
face->fontset = make_fontset_for_ascii_face (f, fontset);
face->font = NULL; /* to force realize_face to load font */
! #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]))