[cairo-commit] cairo/src cairo_atsui_font.c, NONE, 1.1 cairo_quartz_surface.c, NONE, 1.1 cairo.h, 1.64, 1.65 cairoint.h, 1.81, 1.82

Marco Pesenti Gritti commit at pdx.freedesktop.org
Sun Jan 16 08:35:16 PST 2005


Committed by: marco

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv6308

Modified Files:
	cairo.h cairoint.h 
Added Files:
	cairo_atsui_font.c cairo_quartz_surface.c 
Log Message:
Add native Mac OS X support.


--- NEW FILE: cairo_atsui_font.c ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: cairo_quartz_surface.c ---
(This appears to be a binary file; contents omitted.)

Index: cairo.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo.h,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- cairo.h	13 Jan 2005 14:50:23 -0000	1.64
+++ cairo.h	16 Jan 2005 16:35:14 -0000	1.65
@@ -37,9 +37,15 @@
 #ifndef _CAIRO_H_
 #define _CAIRO_H_
 
-#include <cairo-features.h>
+#if !TARGET_OS_MAC
+	#include <cairo-features.h>
+	#include <pixman.h>
+#else
+	#include <Cairo/cairo-features.h>
+	#include <Cairo/pixman.h>
+#endif
+
 
-#include <pixman.h>
 #include <stdio.h>
 
 typedef struct _cairo cairo_t;
@@ -173,6 +179,16 @@
 			glitz_surface_t *surface);
 #endif /* CAIRO_HAS_GLITZ_SURFACE */
 
+#ifdef CAIRO_HAS_QUARTZ_SURFACE
+
+void
+cairo_set_target_quartz_context(   	cairo_t		*cr,
+					CGContextRef    context,
+					int		width,
+					int		height);
+
+#endif /* CAIRO_HAS_QUARTZ_SURFACE */
+
 typedef enum cairo_operator { 
     CAIRO_OPERATOR_CLEAR,
     CAIRO_OPERATOR_SRC,
@@ -507,6 +523,7 @@
 cairo_font_current_transform (cairo_font_t *font, 
 			      cairo_matrix_t *matrix);
 
+#if CAIRO_HAS_FT_FONT
 /* Fontconfig/Freetype platform-specific font interface */
 
 #include <fontconfig/fontconfig.h>
@@ -525,6 +542,8 @@
 FcPattern *
 cairo_ft_font_pattern (cairo_font_t  *ft_font);
 
+#endif  /* CAIRO_HAS_FT_FONT */
+
 /* Image functions */
 
 /* XXX: Eliminate width/height here */
@@ -813,6 +832,15 @@
 
 #endif /* CAIRO_HAS_GLITZ_SURFACE */
 
+#ifdef CAIRO_HAS_QUARTZ_SURFACE
+
+cairo_surface_t *
+cairo_quartz_surface_create (   CGContextRef    context,
+				int		width,
+				int		height);
+
+#endif /* CAIRO_HAS_QUARTZ_SURFACE */
+
 /* Matrix functions */
 
 /* XXX: Rename all of these to cairo_transform_t */

Index: cairoint.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairoint.h,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- cairoint.h	13 Jan 2005 14:50:23 -0000	1.81
+++ cairoint.h	16 Jan 2005 16:35:14 -0000	1.82
@@ -500,8 +500,16 @@
 } cairo_font_backend_t;
 
 /* concrete font backends */
+#ifdef CAIRO_HAS_FT_FONT
+
 extern const cairo_private struct _cairo_font_backend cairo_ft_font_backend;
 
+#elif defined(CAIRO_HAS_ATSUI_FONT)
+
+extern const cairo_private struct _cairo_font_backend cairo_atsui_font_backend;
+
+#endif
+
 typedef struct _cairo_surface_backend {
     cairo_surface_t *
     (*create_similar)		(void			*surface,
@@ -601,7 +609,6 @@
 				 int				source_y,
 				 const cairo_glyph_t		*glyphs,
 				 int				num_glyphs);
-
 } cairo_surface_backend_t;
 
 struct _cairo_matrix {
@@ -733,13 +740,23 @@
     cairo_box_t extents;
 } cairo_traps_t;
 
-#define CAIRO_FONT_FAMILY_DEFAULT  "serif"
 #define CAIRO_FONT_SLANT_DEFAULT   CAIRO_FONT_SLANT_NORMAL
 #define CAIRO_FONT_WEIGHT_DEFAULT  CAIRO_FONT_WEIGHT_NORMAL
 
+#ifdef CAIRO_HAS_FT_FONT
+
+#define CAIRO_FONT_FAMILY_DEFAULT  "serif"
+
 /* XXX: Platform-specific. Other platforms may want a different default */
 #define CAIRO_FONT_BACKEND_DEFAULT &cairo_ft_font_backend
 
+#elif defined(CAIRO_HAS_ATSUI_FONT)
+
+#define CAIRO_FONT_FAMILY_DEFAULT  "Monaco"
+
+#define CAIRO_FONT_BACKEND_DEFAULT &cairo_atsui_font_backend
+
+#endif
 
 #define CAIRO_GSTATE_OPERATOR_DEFAULT	CAIRO_OPERATOR_OVER
 #define CAIRO_GSTATE_TOLERANCE_DEFAULT	0.1




More information about the cairo-commit mailing list