changeset 64423:94a250aa72e0

(struct _XGC): New struct. (GC): Use it. (GCForeground, GCBackground, GCFont): Use X11 mask values. (XCreateGC, XParseGeometry): Move externs to macterm.h.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Mon, 18 Jul 2005 05:39:27 +0000
parents d3239f455aaa
children feba2f2d875e
files src/macgui.h
diffstat 1 files changed, 16 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/macgui.h	Mon Jul 18 05:38:38 2005 +0000
+++ b/src/macgui.h	Mon Jul 18 05:39:27 2005 +0000
@@ -180,15 +180,24 @@
   XFontStruct *font;
 } XGCValues;
 
-typedef XGCValues *GC;
+typedef struct _XGC
+{
+  /* Original value.  */
+  XGCValues xgcv;
 
-extern XGCValues *
-XCreateGC (void *, Window, unsigned long, XGCValues *);
+  /* Cached data members follow.  */
 
-#define GCForeground 0x01
-#define GCBackground 0x02
-#define GCFont 0x03
-#define GCGraphicsExposures 0
+  /* QuickDraw foreground color.  */
+  RGBColor fore_color;
+
+  /* QuickDraw background color.  */
+  RGBColor back_color;
+} *GC;
+
+#define GCForeground            (1L<<2)
+#define GCBackground            (1L<<3)
+#define GCFont 			(1L<<14)
+#define GCGraphicsExposures	0
 
 /* Bit Gravity */
 
@@ -248,8 +257,6 @@
 #define PBaseSize	(1L << 8) /* program specified base for incrementing */
 #define PWinGravity	(1L << 9) /* program specified window gravity */
 
-extern int XParseGeometry ();
-
 typedef struct {
     int x, y;
     unsigned width, height;