summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2005-01-20 08:28:54 +0000
committerCarl Worth <cworth@cworth.org>2005-01-20 08:28:54 +0000
commitb646ecfe08601af5587b0f3e10e0bf2e62e355c6 (patch)
tree5c319aaf6b34055ec80bf84aa9372ab07b8ea966
parent68d5ba661d5d0ba0a604a3c947f43f629a6a6bb9 (diff)
Track various renamings.
Insert new includes for backend-specific header files. Remove redundant include of cairo-features.h. Rename header-exclusion macro from _CAIRO_H_ to CAIRO_H. Remove platform-specific grubbing for cairo-features.h and pixman.h in odd places. Remove all backend-specific prototypes, (as they are now in their own header files). Remove deprecated Remove printf. Convert to utf-8. Use the proper name for multiple-header exclusion (CAIRO_FEATURES_H). Track rename of FREETYPE_FONT_FEATURE to FT_FONT_FEATURE. Split cairo.h up into cairo.h, cairo-ft.h, cairo-glitz.h, cairo-pdf.h, cairo-png.h, cairo-ps.h, cairo-xcb.h, cairo-xlib.h. Update for rename of cairo_wideint.h to cairo-wideint.h. Rename CAIRO_HAS_FREETYPE_FONT to CAIRO_HAS_FT_FONT, (to match cairo_ft_font functions and cairo-ft.h). Update for public header files now in /cairo.
-rw-r--r--ChangeLog45
-rw-r--r--cairo.pc.in3
-rw-r--r--configure.in10
-rw-r--r--src/Makefile.am27
-rw-r--r--src/cairo-features.h.in8
-rw-r--r--src/cairo-ft-font.c2
-rw-r--r--src/cairo-ft.h62
-rw-r--r--src/cairo-glitz-surface.c1
-rw-r--r--src/cairo-glitz.h53
-rw-r--r--src/cairo-pdf-surface.c4
-rw-r--r--src/cairo-pdf.h62
-rw-r--r--src/cairo-png.h59
-rw-r--r--src/cairo-ps-surface.c1
-rw-r--r--src/cairo-ps.h63
-rw-r--r--src/cairo-quartz.h56
-rw-r--r--src/cairo-xcb.h54
-rw-r--r--src/cairo-xlib-surface.c1
-rw-r--r--src/cairo-xlib.h71
-rw-r--r--src/cairo.c2
-rw-r--r--src/cairo.h197
-rw-r--r--src/cairo_ft_font.c2
-rw-r--r--src/cairo_gdip_font.cpp1
-rw-r--r--src/cairo_gdip_surface.cpp1
-rw-r--r--src/cairo_glitz_surface.c1
-rw-r--r--src/cairo_pdf_surface.c4
-rw-r--r--src/cairo_png_surface.c1
-rw-r--r--src/cairo_ps_surface.c1
-rw-r--r--src/cairo_wideint.h285
-rw-r--r--src/cairo_xlib_surface.c1
-rw-r--r--src/cairoint.h6
30 files changed, 580 insertions, 504 deletions
diff --git a/ChangeLog b/ChangeLog
index 99eb96d2..8bf26e37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,47 @@
+2005-01-20 Carl Worth <cworth@cworth.org>
+
+ * src/cairoint.h: Track various renamings.
+
+ * src/cairo_xlib_surface.c:
+ * src/cairo_ps_surface.c:
+ * src/cairo_png_surface.c:
+ * src/cairo_pdf_surface.c:
+ * src/cairo_glitz_surface.c:
+ * src/cairo_ft_font.c: Insert new includes for backend-specific
+ header files.
+
+ * src/cairo_gdip_surface.cpp:
+ * src/cairo_gdip_font.cpp: Remove redundant include of
+ cairo-features.h.
+
+ * src/cairo.h (CAIRO_H): Rename header-exclusion macro from
+ _CAIRO_H_ to CAIRO_H.
+ Remove platform-specific grubbing for cairo-features.h and
+ pixman.h in odd places.
+
+ Remove all backend-specific prototypes, (as they are now in their
+ own header files).
+
+ Remove deprecated
+
+ * src/cairo.c (cairo_sane_state): Remove printf.
+
+ * src/cairo-features.h.in: Convert to utf-8. Use the proper name
+ for multiple-header exclusion (CAIRO_FEATURES_H). Track rename of
+ FREETYPE_FONT_FEATURE to FT_FONT_FEATURE.
+
+ * src/Makefile.am (cairoinclude_HEADERS): Split cairo.h up into
+ cairo.h, cairo-ft.h, cairo-glitz.h, cairo-pdf.h, cairo-png.h,
+ cairo-ps.h, cairo-xcb.h, cairo-xlib.h.
+ Update for rename of cairo_wideint.h to cairo-wideint.h.
+
+ * configure.in: Rename CAIRO_HAS_FREETYPE_FONT to
+ CAIRO_HAS_FT_FONT, (to match cairo_ft_font functions and
+ cairo-ft.h).
+
+ * cairo.pc.in (Cflags): Update for public header files now in
+ ${includedir}/cairo.
+
2005-01-19 Carl Worth <cworth@cworth.org>
* src/cairo_matrix.c (cairo_matrix_get_affine):
@@ -80,7 +124,6 @@
* src/cairo_gstate.c: (_cairo_gstate_glyph_extents):
Was using the wrong extents variable.
->>>>>>> 1.305
2005-01-13 David Reveman <c99drn@cs.umu.se>
* src/cairo_xcb_surface.c: Replace struct cairo_surface_backend with
diff --git a/cairo.pc.in b/cairo.pc.in
index 4457b5d2..4e420b20 100644
--- a/cairo.pc.in
+++ b/cairo.pc.in
@@ -9,5 +9,4 @@ Version: @VERSION@
Requires: fontconfig libpixman @XRENDER_REQUIRES@ @PNG_REQUIRES@ @GLITZ_REQUIRES@
Libs: @FREETYPE_LIBS@ -L${libdir} -lcairo
-Cflags: @FREETYPE_CFLAGS@ -I${includedir}
-
+Cflags: @FREETYPE_CFLAGS@ -I${includedir}/cairo
diff --git a/configure.in b/configure.in
index e9fa90fb..fe1ab19c 100644
--- a/configure.in
+++ b/configure.in
@@ -273,13 +273,13 @@ CAIRO_CFLAGS="$CAIRO_CFLAGS $FREETYPE_CFLAGS"
CAIRO_LIBS="$CAIRO_LIBS $FREETYPE_LIBS"
if test "x$use_freetype" != "xyes"; then
- FREETYPE_FONT_FEATURE=CAIRO_HAS_NO_FREETYPE_FONT
- AM_CONDITIONAL(CAIRO_HAS_FREETYPE_FONT, false)
+ FT_FONT_FEATURE=CAIRO_HAS_NO_FT_FONT
+ AM_CONDITIONAL(CAIRO_HAS_FT_FONT, false)
else
- FREETYPE_FONT_FEATURE=CAIRO_HAS_FREETYPE_FONT
- AM_CONDITIONAL(CAIRO_HAS_FREETYPE_FONT, true)
+ FT_FONT_FEATURE=CAIRO_HAS_FT_FONT
+ AM_CONDITIONAL(CAIRO_HAS_FT_FONT, true)
fi
-AC_SUBST(FREETYPE_FONT_FEATURE)
+AC_SUBST(FT_FONT_FEATURE)
dnl ===========================================================================
diff --git a/src/Makefile.am b/src/Makefile.am
index d0135b81..e5d99ff9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,28 +1,39 @@
+cairoincludedir = $(includedir)/cairo
+cairoinclude_HEADERS = \
+ cairo.h \
+ cairo-features.h\
+ cairo-ft.h \
+ cairo-glitz.h \
+ cairo-pdf.h \
+ cairo-png.h \
+ cairo-ps.h \
+ cairo-xcb.h \
+ cairo-xlib.h
+
lib_LTLIBRARIES = libcairo.la
-include_HEADERS = cairo.h cairo-features.h
if CAIRO_HAS_PS_SURFACE
-libcairo_ps_sources = cairo_ps_surface.c
+libcairo_ps_sources = cairo_ps_surface.c cairo-ps.h
endif
if CAIRO_HAS_PDF_SURFACE
-libcairo_pdf_sources = cairo_pdf_surface.c
+libcairo_pdf_sources = cairo_pdf_surface.c cairo-pdf.h
endif
if CAIRO_HAS_PNG_SURFACE
-libcairo_png_sources = cairo_png_surface.c
+libcairo_png_sources = cairo_png_surface.c cairo-png.h
endif
if CAIRO_HAS_XLIB_SURFACE
-libcairo_xlib_sources = cairo_xlib_surface.c
+libcairo_xlib_sources = cairo_xlib_surface.c cairo-xlib.h
endif
if CAIRO_HAS_XCB_SURFACE
-libcairo_xcb_sources = cairo_xcb_surface.c
+libcairo_xcb_sources = cairo_xcb_surface.c cairo-xcb.h
endif
if CAIRO_HAS_GLITZ_SURFACE
-libcairo_glitz_sources = cairo_glitz_surface.c
+libcairo_glitz_sources = cairo_glitz_surface.c cairo-glitz.h
endif
# These names match automake style variable definition conventions so
@@ -57,7 +68,7 @@ libcairo_la_SOURCES = \
cairo_traps.c \
cairo_pattern.c \
cairo_wideint.c \
- cairo_wideint.h \
+ cairo-wideint.h \
$(libcairo_ps_sources) \
$(libcairo_pdf_sources) \
$(libcairo_png_sources) \
diff --git a/src/cairo-features.h.in b/src/cairo-features.h.in
index ec6d4241..c3d01690 100644
--- a/src/cairo-features.h.in
+++ b/src/cairo-features.h.in
@@ -1,6 +1,6 @@
/* cairo - a vector graphics library with display and print output
*
- * Copyright © 2003 University of Southern California
+ * Copyright © 2003 University of Southern California
*
* This library is free software; you can redistribute it and/or
* modify it either under the terms of the GNU Lesser General Public
@@ -34,8 +34,8 @@
* Carl Worth <cworth@east.isi.edu>
*/
-#ifndef _CAIRO_CONFIG_H_
-#define _CAIRO_CONFIG_H_
+#ifndef CAIRO_FEATURES_H
+#define CAIRO_FEATURES_H
#define @PS_SURFACE_FEATURE@
@@ -49,7 +49,7 @@
#define @GLITZ_SURFACE_FEATURE@
-#define @FREETYPE_FONT_FEATURE@
+#define @FT_FONT_FEATURE@
#define @ATSUI_FONT_FEATURE@
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 2b1016c5..b928b04f 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -23,6 +23,8 @@
*/
#include "cairoint.h"
+#include "cairo-ft.h"
+
#include <fontconfig/fontconfig.h>
#include <fontconfig/fcfreetype.h>
diff --git a/src/cairo-ft.h b/src/cairo-ft.h
new file mode 100644
index 00000000..57d439ab
--- /dev/null
+++ b/src/cairo-ft.h
@@ -0,0 +1,62 @@
+/* cairo - a vector graphics library with display and print output
+ *
+ * Copyright © 2002 University of Southern California
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it either under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
+ * notice, a recipient may use your version of this file under either
+ * the MPL or the LGPL.
+ *
+ * You should have received a copy of the LGPL along with this library
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the MPL along with this library
+ * in the file COPYING-MPL-1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
+ * the specific language governing rights and limitations.
+ *
+ * The Original Code is the cairo graphics library.
+ *
+ * The Initial Developer of the Original Code is University of Southern
+ * California.
+ *
+ * Contributor(s):
+ * Carl D. Worth <cworth@isi.edu>
+ */
+
+#include <cairo.h>
+
+#ifndef CAIRO_FT_H
+#define CAIRO_FT_H
+#ifdef CAIRO_HAS_FT_FONT
+
+/* Fontconfig/Freetype platform-specific font interface */
+
+#include <fontconfig/fontconfig.h>
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+cairo_font_t *
+cairo_ft_font_create (FT_Library ft_library, FcPattern *pattern);
+
+cairo_font_t *
+cairo_ft_font_create_for_ft_face (FT_Face face);
+
+FT_Face
+cairo_ft_font_face (cairo_font_t *ft_font);
+
+FcPattern *
+cairo_ft_font_pattern (cairo_font_t *ft_font);
+
+#endif /* CAIRO_HAS_FT_FONT */
+#endif /* CAIRO_FT_H */
diff --git a/src/cairo-glitz-surface.c b/src/cairo-glitz-surface.c
index 8a71b689..69fc82f2 100644
--- a/src/cairo-glitz-surface.c
+++ b/src/cairo-glitz-surface.c
@@ -25,6 +25,7 @@
*/
#include "cairoint.h"
+#include "cairo-glitz.h"
#define GLITZ_FIXED_TO_FLOAT(f) \
(((glitz_float_t) (f)) / 65536)
diff --git a/src/cairo-glitz.h b/src/cairo-glitz.h
new file mode 100644
index 00000000..350d1023
--- /dev/null
+++ b/src/cairo-glitz.h
@@ -0,0 +1,53 @@
+/* cairo - a vector graphics library with display and print output
+ *
+ * Copyright © 2002 University of Southern California
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it either under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
+ * notice, a recipient may use your version of this file under either
+ * the MPL or the LGPL.
+ *
+ * You should have received a copy of the LGPL along with this library
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the MPL along with this library
+ * in the file COPYING-MPL-1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
+ * the specific language governing rights and limitations.
+ *
+ * The Original Code is the cairo graphics library.
+ *
+ * The Initial Developer of the Original Code is University of Southern
+ * California.
+ *
+ * Contributor(s):
+ * Carl D. Worth <cworth@isi.edu>
+ */
+
+#include <cairo.h>
+
+#ifndef CAIRO_GLITZ_H
+#define CAIRO_GLITZ_H
+#ifdef CAIRO_HAS_GLITZ_SURFACE
+
+#include <glitz.h>
+
+void
+cairo_set_target_glitz (cairo_t *cr,
+ glitz_surface_t *surface);
+
+cairo_surface_t *
+cairo_glitz_surface_create (glitz_surface_t *surface);
+
+#endif /* CAIRO_HAS_GLITZ_SURFACE */
+#endif /* CAIRO_GLITZ_H */
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 5be9121b..23230aa7 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -35,6 +35,10 @@
*/
#include "cairoint.h"
+#include "cairo-pdf.h"
+/* XXX: This seems broken to me. What about users without freetype
+ * that want to use a cairo PDF surface? */
+#include "cairo-ft.h"
#include <ft2build.h>
#include FT_FREETYPE_H
diff --git a/src/cairo-pdf.h b/src/cairo-pdf.h
new file mode 100644
index 00000000..0f624af3
--- /dev/null
+++ b/src/cairo-pdf.h
@@ -0,0 +1,62 @@
+/* cairo - a vector graphics library with display and print output
+ *
+ * Copyright © 2002 University of Southern California
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it either under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
+ * notice, a recipient may use your version of this file under either
+ * the MPL or the LGPL.
+ *
+ * You should have received a copy of the LGPL along with this library
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the MPL along with this library
+ * in the file COPYING-MPL-1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
+ * the specific language governing rights and limitations.
+ *
+ * The Original Code is the cairo graphics library.
+ *
+ * The Initial Developer of the Original Code is University of Southern
+ * California.
+ *
+ * Contributor(s):
+ * Carl D. Worth <cworth@isi.edu>
+ */
+
+#include <cairo.h>
+
+#ifndef CAIRO_PDF_H
+#define CAIRO_PDF_H
+#ifdef CAIRO_HAS_PDF_SURFACE
+
+#include <stdio.h>
+
+void
+cairo_set_target_pdf (cairo_t *cr,
+ FILE *file,
+ double width_inches,
+ double height_inches,
+ double x_pixels_per_inch,
+ double y_pixels_per_inch);
+
+
+cairo_surface_t *
+cairo_pdf_surface_create (FILE *file,
+ double width_inches,
+ double height_inches,
+ double x_pixels_per_inch,
+ double y_pixels_per_inch);
+
+#endif /* CAIRO_HAS_PDF_SURFACE */
+#endif /* CAIRO_PDF_H */
diff --git a/src/cairo-png.h b/src/cairo-png.h
new file mode 100644
index 00000000..766d6f91
--- /dev/null
+++ b/src/cairo-png.h
@@ -0,0 +1,59 @@
+/* cairo - a vector graphics library with display and print output
+ *
+ * Copyright © 2002 University of Southern California
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it either under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
+ * notice, a recipient may use your version of this file under either
+ * the MPL or the LGPL.
+ *
+ * You should have received a copy of the LGPL along with this library
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the MPL along with this library
+ * in the file COPYING-MPL-1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
+ * the specific language governing rights and limitations.
+ *
+ * The Original Code is the cairo graphics library.
+ *
+ * The Initial Developer of the Original Code is University of Southern
+ * California.
+ *
+ * Contributor(s):
+ * Carl D. Worth <cworth@isi.edu>
+ */
+
+#include <cairo.h>
+
+#ifndef CAIRO_PNG_H
+#define CAIRO_PNG_H
+#ifdef CAIRO_HAS_PNG_SURFACE
+
+#include <stdio.h>
+
+void
+cairo_set_target_png (cairo_t *cr,
+ FILE *file,
+ cairo_format_t format,
+ int width,
+ int height);
+
+cairo_surface_t *
+cairo_png_surface_create (FILE *file,
+ cairo_format_t format,
+ int width,
+ int height);
+
+#endif /* CAIRO_HAS_PNG_SURFACE */
+#endif /* CAIRO_PNG_H */
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 5851322d..4da8162c 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -35,6 +35,7 @@
*/
#include "cairoint.h"
+#include "cairo-ps.h"
#include <time.h>
#include <zlib.h>
diff --git a/src/cairo-ps.h b/src/cairo-ps.h
new file mode 100644
index 00000000..ae8e7219
--- /dev/null
+++ b/src/cairo-ps.h
@@ -0,0 +1,63 @@
+/* cairo - a vector graphics library with display and print output
+ *
+ * Copyright © 2002 University of Southern California
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it either under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
+ * notice, a recipient may use your version of this file under either
+ * the MPL or the LGPL.
+ *
+ * You should have received a copy of the LGPL along with this library
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the MPL along with this library
+ * in the file COPYING-MPL-1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
+ * the specific language governing rights and limitations.
+ *
+ * The Original Code is the cairo graphics library.
+ *
+ * The Initial Developer of the Original Code is University of Southern
+ * California.
+ *
+ * Contributor(s):
+ * Carl D. Worth <cworth@isi.edu>
+ */
+
+#include <cairo.h>
+
+#ifndef CAIRO_PS_H
+#define CAIRO_PS_H
+#ifdef CAIRO_HAS_PS_SURFACE
+
+#include <stdio.h>
+
+void
+cairo_set_target_ps (cairo_t *cr,
+ FILE *file,
+ double width_inches,
+ double height_inches,
+ double x_pixels_per_inch,
+ double y_pixels_per_inch);
+
+/* PS-surface functions */
+
+cairo_surface_t *
+cairo_ps_surface_create (FILE *file,
+ double width_inches,
+ double height_inches,
+ double x_pixels_per_inch,
+ double y_pixels_per_inch);
+
+#endif /* CAIRO_HAS_PS_SURFACE */
+#endif /* CAIRO_PS_H */
diff --git a/src/cairo-quartz.h b/src/cairo-quartz.h
new file mode 100644
index 00000000..572356fd
--- /dev/null
+++ b/src/cairo-quartz.h
@@ -0,0 +1,56 @@
+/* cairo - a vector graphics library with display and print output
+ *
+ * Copyright © 2002 University of Southern California
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it either under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
+ * notice, a recipient may use your version of this file under either
+ * the MPL or the LGPL.
+ *
+ * You should have received a copy of the LGPL along with this library
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the MPL along with this library
+ * in the file COPYING-MPL-1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
+ * the specific language governing rights and limitations.
+ *
+ * The Original Code is the cairo graphics library.
+ *
+ * The Initial Developer of the Original Code is University of Southern
+ * California.
+ *
+ * Contributor(s):
+ * Carl D. Worth <cworth@isi.edu>
+ */
+
+#include <cairo.h>
+
+#ifndef CAIRO_QUARTZ_H
+#define CAIRO_QUARTZ_H
+#ifdef CAIRO_HAS_QUARTZ_SURFACE
+
+void
+cairo_set_target_quartz_context( cairo_t *cr,
+ CGContextRef context,
+ int width,
+ int height);
+
+cairo_surface_t *
+cairo_quartz_surface_create ( CGContextRef context,
+ int width,
+ int height);
+
+#endif /* CAIRO_HAS_QUARTZ_SURFACE */
+#endif /* CAIRO_QUARTZ_H */
+
diff --git a/src/cairo-xcb.h b/src/cairo-xcb.h
new file mode 100644
index 00000000..27ebad52
--- /dev/null
+++ b/src/cairo-xcb.h
@@ -0,0 +1,54 @@
+/* cairo - a vector graphics library with display and print output
+ *
+ * Copyright © 2002 University of Southern California
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it either under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
+ * notice, a recipient may use your version of this file under either
+ * the MPL or the LGPL.
+ *
+ * You should have received a copy of the LGPL along with this library
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the MPL along with this library
+ * in the file COPYING-MPL-1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
+ * the specific language governing rights and limitations.
+ *
+ * The Original Code is the cairo graphics library.
+ *
+ * The Initial Developer of the Original Code is University of Southern
+ * California.
+ *
+ * Contributor(s):
+ * Carl D. Worth <cworth@isi.edu>
+ */
+
+#include <cairo.h>
+
+#ifndef CAIRO_XCB_H
+#define CAIRO_XCB_H
+#ifdef CAIRO_HAS_XCB_SURFACE
+
+#include <X11/XCB/xcb.h>
+#include <X11/XCB/render.h>
+
+void
+cairo_set_target_xcb (cairo_t *cr,
+ XCBConnection *dpy,
+ XCBDRAWABLE drawable,
+ XCBVISUALTYPE *visual,
+ cairo_format_t format);
+
+#endif /* CAIRO_HAS_XCB_SURFACE */
+#endif /* CAIRO_XCB_H */
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index 1867d598..d9d74f58 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -35,6 +35,7 @@
*/
#include "cairoint.h"
+#include "cairo-xlib.h"
void
cairo_set_target_drawable (cairo_t *cr,
diff --git a/src/cairo-xlib.h b/src/cairo-xlib.h
new file mode 100644
index 00000000..4f241b03
--- /dev/null
+++ b/src/cairo-xlib.h
@@ -0,0 +1,71 @@
+/* cairo - a vector graphics library with display and print output
+ *
+ * Copyright © 2002 University of Southern California
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it either under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
+ * notice, a recipient may use your version of this file under either
+ * the MPL or the LGPL.
+ *
+ * You should have received a copy of the LGPL along with this library
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the MPL along with this library
+ * in the file COPYING-MPL-1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
+ * the specific language governing rights and limitations.
+ *
+ * The Original Code is the cairo graphics library.
+ *
+ * The Initial Developer of the Original Code is University of Southern
+ * California.
+ *
+ * Contributor(s):
+ * Carl D. Worth <cworth@isi.edu>
+ */
+
+#include <cairo.h>
+
+#ifndef CAIRO_XLIB_H
+#define CAIRO_XLIB_H
+#ifdef CAIRO_HAS_XLIB_SURFACE
+
+#include <X11/extensions/Xrender.h>
+
+/* XXX: This shold be renamed to cairo_set_target_xlib to match the
+ * other backends */
+void
+cairo_set_target_drawable (cairo_t *cr,
+ Display *dpy,
+ Drawable drawable);
+
+/* XXX: This is a mess from the user's POV. Should the Visual or the
+ cairo_format_t control what render format is used? Maybe I can have
+ cairo_surface_create_for_window with a visual, and
+ cairo_surface_create_for_pixmap with a cairo_format_t. Would that work?
+*/
+cairo_surface_t *
+cairo_xlib_surface_create (Display *dpy,
+ Drawable drawable,
+ Visual *visual,
+ cairo_format_t format,
+ Colormap colormap);
+
+/* XXX: This has been proposed
+cairo_status_t
+cairo_xlib_surface_set_size (cairo_surface_t *surface, int width, int height);
+*/
+
+#endif /* CAIRO_HAS_XLIB_SURFACE */
+#endif /* CAIRO_XLIB_H */
+
diff --git a/src/cairo.c b/src/cairo.c
index 577c4198..20d94938 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -39,7 +39,6 @@
#define CAIRO_TOLERANCE_MINIMUM 0.0002 /* We're limited by 16 bits of sub-pixel precision */
-
#ifdef CAIRO_DO_SANITY_CHECKING
#include <assert.h>
static int
@@ -59,7 +58,6 @@ cairo_sane_state (cairo_t *cr)
case CAIRO_STATUS_NULL_POINTER:
break;
default:
- printf ("cairo status is bad: %d\n", cr->status);
return 0;
}
return 1;
diff --git a/src/cairo.h b/src/cairo.h
index dc7efd09..b7bcc1db 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -34,19 +34,11 @@
* Carl D. Worth <cworth@isi.edu>
*/
-#ifndef _CAIRO_H_
-#define _CAIRO_H_
-
-#if !TARGET_OS_MAC
- #include <cairo-features.h>
- #include <pixman.h>
-#else
- #include <Cairo/cairo-features.h>
- #include <Cairo/pixman.h>
-#endif
-
+#ifndef CAIRO_H
+#define CAIRO_H
-#include <stdio.h>
+#include <cairo-features.h>
+#include <pixman.h>
typedef struct _cairo cairo_t;
typedef struct _cairo_surface cairo_surface_t;
@@ -104,91 +96,6 @@ cairo_set_target_image (cairo_t *cr,
int height,
int stride);
-#ifdef CAIRO_HAS_PS_SURFACE
-
-#include <stdio.h>
-
-void
-cairo_set_target_ps (cairo_t *cr,
- FILE *file,
- double width_inches,
- double height_inches,
- double x_pixels_per_inch,
- double y_pixels_per_inch);
-
-#endif /* CAIRO_HAS_PS_SURFACE */
-
-#ifdef CAIRO_HAS_PDF_SURFACE
-
-#include <stdio.h>
-
-void
-cairo_set_target_pdf (cairo_t *cr,
- FILE *file,
- double width_inches,
- double height_inches,
- double x_pixels_per_inch,
- double y_pixels_per_inch);
-
-#endif /* CAIRO_HAS_PDF_SURFACE */
-
-#ifdef CAIRO_HAS_PNG_SURFACE
-
-#include <stdio.h>
-
-void
-cairo_set_target_png (cairo_t *cr,
- FILE *file,
- cairo_format_t format,
- int width,
- int height);
-
-#endif /* CAIRO_HAS_PNG_SURFACE */
-
-#ifdef CAIRO_HAS_XLIB_SURFACE
-
-#include <X11/extensions/Xrender.h>
-
-/* XXX: This shold be renamed to cairo_set_target_xlib to match the
- * other backends */
-void
-cairo_set_target_drawable (cairo_t *cr,
- Display *dpy,
- Drawable drawable);
-#endif /* CAIRO_HAS_XLIB_SURFACE */
-
-#ifdef CAIRO_HAS_XCB_SURFACE
-
-#include <X11/XCB/xcb.h>
-#include <X11/XCB/render.h>
-
-void
-cairo_set_target_xcb (cairo_t *cr,
- XCBConnection *dpy,
- XCBDRAWABLE drawable,
- XCBVISUALTYPE *visual,
- cairo_format_t format);
-#endif /* CAIRO_HAS_XCB_SURFACE */
-
-#ifdef CAIRO_HAS_GLITZ_SURFACE
-
-#include <glitz.h>
-
-void
-cairo_set_target_glitz (cairo_t *cr,
- 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,
@@ -523,27 +430,6 @@ void
cairo_font_current_transform (cairo_font_t *font,
cairo_matrix_t *matrix);
-#ifdef CAIRO_HAS_FREETYPE_FONT
-/* Fontconfig/Freetype platform-specific font interface */
-
-#include <fontconfig/fontconfig.h>
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-cairo_font_t *
-cairo_ft_font_create (FT_Library ft_library, FcPattern *pattern);
-
-cairo_font_t *
-cairo_ft_font_create_for_ft_face (FT_Face face);
-
-FT_Face
-cairo_ft_font_face (cairo_font_t *ft_font);
-
-FcPattern *
-cairo_ft_font_pattern (cairo_font_t *ft_font);
-
-#endif /* CAIRO_HAS_FREETYPE_FONT */
-
/* Image functions */
/* XXX: Eliminate width/height here */
@@ -768,79 +654,6 @@ cairo_pattern_set_filter (cairo_pattern_t *pattern, cairo_filter_t filter);
cairo_filter_t
cairo_pattern_get_filter (cairo_pattern_t *pattern);
-#ifdef CAIRO_HAS_PS_SURFACE
-
-/* PS-surface functions */
-
-cairo_surface_t *
-cairo_ps_surface_create (FILE *file,
- double width_inches,
- double height_inches,
- double x_pixels_per_inch,
- double y_pixels_per_inch);
-
-#endif /* CAIRO_HAS_PS_SURFACE */
-
-#ifdef CAIRO_HAS_PDF_SURFACE
-
-cairo_surface_t *
-cairo_pdf_surface_create (FILE *file,
- double width_inches,
- double height_inches,
- double x_pixels_per_inch,
- double y_pixels_per_inch);
-
-#endif /* CAIRO_HAS_PDF_SURFACE */
-
-#ifdef CAIRO_HAS_PNG_SURFACE
-
-/* PNG-surface functions */
-
-cairo_surface_t *
-cairo_png_surface_create (FILE *file,
- cairo_format_t format,
- int width,
- int height);
-
-#endif /* CAIRO_HAS_PNG_SURFACE */
-
-#ifdef CAIRO_HAS_XLIB_SURFACE
-
-/* XXX: This is a mess from the user's POV. Should the Visual or the
- cairo_format_t control what render format is used? Maybe I can have
- cairo_surface_create_for_window with a visual, and
- cairo_surface_create_for_pixmap with a cairo_format_t. Would that work?
-*/
-cairo_surface_t *
-cairo_xlib_surface_create (Display *dpy,
- Drawable drawable,
- Visual *visual,
- cairo_format_t format,
- Colormap colormap);
-
-/* XXX: This has been proposed
-cairo_status_t
-cairo_xlib_surface_set_size (cairo_surface_t *surface, int width, int height);
-*/
-
-#endif /* CAIRO_HAS_XLIB_SURFACE */
-
-#ifdef CAIRO_HAS_GLITZ_SURFACE
-
-cairo_surface_t *
-cairo_glitz_surface_create (glitz_surface_t *surface);
-
-#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 */
@@ -915,4 +728,4 @@ cairo_matrix_transform_point (cairo_matrix_t *matrix, double *x, double *y);
}
#endif
-#endif
+#endif /* CAIRO_H */
diff --git a/src/cairo_ft_font.c b/src/cairo_ft_font.c
index 2b1016c5..b928b04f 100644
--- a/src/cairo_ft_font.c
+++ b/src/cairo_ft_font.c
@@ -23,6 +23,8 @@
*/
#include "cairoint.h"
+#include "cairo-ft.h"
+
#include <fontconfig/fontconfig.h>
#include <fontconfig/fcfreetype.h>
diff --git a/src/cairo_gdip_font.cpp b/src/cairo_gdip_font.cpp
index 7414ce5d..e932e3ba 100644
--- a/src/cairo_gdip_font.cpp
+++ b/src/cairo_gdip_font.cpp
@@ -34,7 +34,6 @@
*/
extern "C" {
-#include "cairo-features.h"
#include "cairoint.h"
}
diff --git a/src/cairo_gdip_surface.cpp b/src/cairo_gdip_surface.cpp
index d7f98c5d..ec1982b5 100644
--- a/src/cairo_gdip_surface.cpp
+++ b/src/cairo_gdip_surface.cpp
@@ -34,7 +34,6 @@
*/
extern "C" {
-#include "cairo-features.h"
#include "cairoint.h"
}
diff --git a/src/cairo_glitz_surface.c b/src/cairo_glitz_surface.c
index 8a71b689..69fc82f2 100644
--- a/src/cairo_glitz_surface.c
+++ b/src/cairo_glitz_surface.c
@@ -25,6 +25,7 @@
*/
#include "cairoint.h"
+#include "cairo-glitz.h"
#define GLITZ_FIXED_TO_FLOAT(f) \
(((glitz_float_t) (f)) / 65536)
diff --git a/src/cairo_pdf_surface.c b/src/cairo_pdf_surface.c
index 5be9121b..23230aa7 100644
--- a/src/cairo_pdf_surface.c
+++ b/src/cairo_pdf_surface.c
@@ -35,6 +35,10 @@
*/
#include "cairoint.h"
+#include "cairo-pdf.h"
+/* XXX: This seems broken to me. What about users without freetype
+ * that want to use a cairo PDF surface? */
+#include "cairo-ft.h"
#include <ft2build.h>
#include FT_FREETYPE_H
diff --git a/src/cairo_png_surface.c b/src/cairo_png_surface.c
index 4c689d59..2279b07a 100644
--- a/src/cairo_png_surface.c
+++ b/src/cairo_png_surface.c
@@ -38,6 +38,7 @@
#include <png.h>
#include "cairoint.h"
+#include "cairo-png.h"
static const cairo_surface_backend_t cairo_png_surface_backend;
diff --git a/src/cairo_ps_surface.c b/src/cairo_ps_surface.c
index 5851322d..4da8162c 100644
--- a/src/cairo_ps_surface.c
+++ b/src/cairo_ps_surface.c
@@ -35,6 +35,7 @@
*/
#include "cairoint.h"
+#include "cairo-ps.h"
#include <time.h>
#include <zlib.h>
diff --git a/src/cairo_wideint.h b/src/cairo_wideint.h
deleted file mode 100644
index e3c26e31..00000000
--- a/src/cairo_wideint.h
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * $Id: cairo_wideint.h,v 1.6 2005-01-19 15:11:14 cworth Exp $
- *
- * Copyright © 2004 Keith Packard
- *
- * This library is free software; you can redistribute it and/or
- * modify it either under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation
- * (the "LGPL") or, at your option, under the terms of the Mozilla
- * Public License Version 1.1 (the "MPL"). If you do not alter this
- * notice, a recipient may use your version of this file under either
- * the MPL or the LGPL.
- *
- * You should have received a copy of the LGPL along with this library
- * in the file COPYING-LGPL-2.1; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- * You should have received a copy of the MPL along with this library
- * in the file COPYING-MPL-1.1
- *
- * The contents of this file are subject to the Mozilla Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
- * OF ANY KIND, either express or implied. See the LGPL or the MPL for
- * the specific language governing rights and limitations.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Keith Packard
- *
- * Contributor(s):
- * Keith R. Packard <keithp@keithp.com>
- *
- */
-
-#ifndef CAIRO_WIDEINT_H
-#define CAIRO_WIDEINT_H
-
-#include <stdint.h>
-
-/*
- * 64-bit datatypes. Two separate implementations, one using
- * built-in 64-bit signed/unsigned types another implemented
- * as a pair of 32-bit ints
- */
-
-#define I cairo_private
-
-#if !HAVE_UINT64_T
-
-typedef struct _cairo_uint64 {
- uint32_t lo, hi;
-} cairo_uint64_t, cairo_int64_t;
-
-cairo_uint64_t I _cairo_uint32_to_uint64 (uint32_t i);
-#define _cairo_uint64_to_uint32(a) ((a).lo)
-cairo_uint64_t I _cairo_uint64_add (cairo_uint64_t a, cairo_uint64_t b);
-cairo_uint64_t I _cairo_uint64_sub (cairo_uint64_t a, cairo_uint64_t b);
-cairo_uint64_t I _cairo_uint64_mul (cairo_uint64_t a, cairo_uint64_t b);
-cairo_uint64_t I _cairo_uint32x32_64_mul (uint32_t a, uint32_t b);
-cairo_uint64_t I _cairo_uint64_lsl (cairo_uint64_t a, int shift);
-cairo_uint64_t I _cairo_uint64_rsl (cairo_uint64_t a, int shift);
-cairo_uint64_t I _cairo_uint64_rsa (cairo_uint64_t a, int shift);
-int I _cairo_uint64_lt (cairo_uint64_t a, cairo_uint64_t b);
-int I _cairo_uint64_eq (cairo_uint64_t a, cairo_uint64_t b);
-cairo_uint64_t I _cairo_uint64_negate (cairo_uint64_t a);
-#define _cairo_uint64_negative(a) (((int32_t) ((a).hi)) < 0)
-cairo_uint64_t I _cairo_uint64_not (cairo_uint64_t a);
-
-#define _cairo_uint64_to_int64(i) (i)
-#define _cairo_int64_to_uint64(i) (i)
-
-cairo_int64_t I _cairo_int32_to_int64(int32_t i);
-#define _cairo_int64_to_int32(a) ((int32_t) _cairo_uint64_to_uint32(a))
-#define _cairo_int64_add(a,b) _cairo_uint64_add (a,b)
-#define _cairo_int64_sub(a,b) _cairo_uint64_sub (a,b)
-#define _cairo_int64_mul(a,b) _cairo_uint64_mul (a,b)
-int I _cairo_int32x32_64_mul (int32_t a, int32_t b);
-int I _cairo_int64_lt (cairo_uint64_t a, cairo_uint64_t b);
-#define _cairo_int64_eq(a,b) _cairo_uint64_eq (a,b)
-#define _cairo_int64_lsl(a,b) _cairo_uint64_lsl (a,b)
-#define _cairo_int64_rsl(a,b) _cairo_uint64_rsl (a,b)
-#define _cairo_int64_rsa(a,b) _cairo_uint64_rsa (a,b)
-#define _cairo_int64_negate(a) _cairo_uint64_negate(a)
-#define _cairo_int64_negative(a) (((int32_t) ((a).hi)) < 0)
-#define _cairo_int64_not(a) _cairo_uint64_not(a)
-
-#else
-
-typedef uint64_t cairo_uint64_t;
-typedef int64_t cairo_int64_t;
-
-#define _cairo_uint32_to_uint64(i) ((uint64_t) (i))
-#define _cairo_uint64_to_uint32(i) ((uint32_t) (i))
-#define _cairo_uint64_add(a,b) ((a) + (b))
-#define _cairo_uint64_sub(a,b) ((a) - (b))
-#define _cairo_uint64_mul(a,b) ((a) * (b))
-#define _cairo_uint32x32_64_mul(a,b) ((uint64_t) (a) * (b))
-#define _cairo_uint64_lsl(a,b) ((a) << (b))
-#define _cairo_uint64_rsl(a,b) ((uint64_t) (a) >> (b))
-#define _cairo_uint64_rsa(a,b) ((uint64_t) ((int64_t) (a) >> (b)))
-#define _cairo_uint64_lt(a,b) ((a) < (b))
-#define _cairo_uint64_eq(a,b) ((a) == (b))
-#define _cairo_uint64_negate(a) ((uint64_t) -((int64_t) (a)))
-#define _cairo_uint64_negative(a) ((int64_t) (a) < 0)
-#define _cairo_uint64_not(a) (~(a))
-
-#define _cairo_uint64_to_int64(i) ((int64_t) (i))
-#define _cairo_int64_to_uint64(i) ((uint64_t) (i))
-
-#define _cairo_int32_to_int64(i) ((int64_t) (i))
-#define _cairo_int64_to_int32(i) ((int32_t) (i))
-#define _cairo_int64_add(a,b) ((a) + (b))
-#define _cairo_int64_sub(a,b) ((a) - (b))
-#define _cairo_int64_mul(a,b) ((a) * (b))
-#define _cairo_int32x32_64_mul(a,b) ((int64_t) (a) * (b))
-#define _cairo_int64_lt(a,b) ((a) < (b))
-#define _cairo_int64_eq(a,b) ((a) == (b))
-#define _cairo_int64_lsl(a,b) ((a) << (b))
-#define _cairo_int64_rsl(a,b) ((int64_t) ((uint64_t) (a) >> (b)))
-#define _cairo_int64_rsa(a,b) ((int64_t) (a) >> (b))
-#define _cairo_int64_negate(a) (-(a))
-#define _cairo_int64_negative(a) ((a) < 0)
-#define _cairo_int64_not(a) (~(a))
-
-#endif
-
-/*
- * 64-bit comparisions derived from lt or eq
- */
-#define _cairo_uint64_le(a,b) (!_cairo_uint64_gt(a,b))
-#define _cairo_uint64_ne(a,b) (!_cairo_uint64_eq(a,b))
-#define _cairo_uint64_ge(a,b) (!_cairo_uint64_lt(a,b))
-#define _cairo_uint64_gt(a,b) _cairo_uint64_lt(b,a)
-
-#define _cairo_int64_le(a,b) (!_cairo_int64_gt(a,b))
-#define _cairo_int64_ne(a,b) (!_cairo_int64_eq(a,b))
-#define _cairo_int64_ge(a,b) (!_cairo_int64_lt(a,b))
-#define _cairo_int64_gt(a,b) _cairo_int64_lt(b,a)
-
-/*
- * As the C implementation always computes both, create
- * a function which returns both for the 'native' type as well
- */
-
-typedef struct _cairo_uquorem64 {
- cairo_uint64_t quo;
- cairo_uint64_t rem;
-} cairo_uquorem64_t;
-
-typedef struct _cairo_quorem64 {
- cairo_int64_t quo;
- cairo_int64_t rem;
-} cairo_quorem64_t;
-
-cairo_uquorem64_t I
-_cairo_uint64_divrem (cairo_uint64_t num, cairo_uint64_t den);
-
-cairo_quorem64_t I
-_cairo_int64_divrem (cairo_int64_t num, cairo_int64_t den);
-
-/*
- * 128-bit datatypes. Again, provide two implementations in
- * case the machine has a native 128-bit datatype. GCC supports int128_t
- * on ia64
- */
-
-#if !HAVE_UINT128_T
-
-typedef struct cairo_uint128 {
- cairo_uint64_t lo, hi;
-} cairo_uint128_t, cairo_int128_t;
-
-cairo_uint128_t I _cairo_uint32_to_uint128 (uint32_t i);
-cairo_uint128_t I _cairo_uint64_to_uint128 (cairo_uint64_t i);
-#define _cairo_uint128_to_uint64(a) ((a).lo)
-#define _cairo_uint128_to_uint32(a) _cairo_uint64_to_uint32(_cairo_uint128_to_uint64(a))
-cairo_uint128_t I _cairo_uint128_add (cairo_uint128_t a, cairo_uint128_t b);
-cairo_uint128_t I _cairo_uint128_sub (cairo_uint128_t a, cairo_uint128_t b);
-cairo_uint128_t I _cairo_uint128_mul (cairo_uint128_t a, cairo_uint128_t b);
-cairo_uint128_t I _cairo_uint64x64_128_mul (cairo_uint64_t a, cairo_uint64_t b);
-cairo_uint128_t I _cairo_uint128_lsl (cairo_uint128_t a, int shift);
-cairo_uint128_t I _cairo_uint128_rsl (cairo_uint128_t a, int shift);
-cairo_uint128_t I _cairo_uint128_rsa (cairo_uint128_t a, int shift);
-int I _cairo_uint128_lt (cairo_uint128_t a, cairo_uint128_t b);
-int I _cairo_uint128_eq (cairo_uint128_t a, cairo_uint128_t b);
-cairo_uint128_t I _cairo_uint128_negate (cairo_uint128_t a);
-#define _cairo_uint128_negative(a) (_cairo_uint64_negative(a.hi))
-cairo_uint128_t I _cairo_uint128_not (cairo_uint128_t a);
-
-#define _cairo_uint128_to_int128_(i) (i)
-#define _cairo_int128_to_uint128(i) (i)
-
-cairo_int128_t I _cairo_int32_to_int128 (int32_t i);
-cairo_int128_t I _cairo_int64_to_int128 (cairo_int64_t i);
-#define _cairo_int128_to_int64(a) ((cairo_int64_t) (a).lo)
-#define _cairo_int128_to_int32(a) _cairo_int64_to_int32(_cairo_int128_to_int64(a))
-#define _cairo_int128_add(a,b) _cairo_uint128_add(a,b)
-#define _cairo_int128_sub(a,b) _cairo_uint128_sub(a,b)
-#define _cairo_int128_mul(a,b) _cairo_uint128_mul(a,b)
-cairo_uint128_t I _cairo_int64x64_128_mul (cairo_int64_t a, cairo_int64_t b);
-#define _cairo_int128_lsl(a,b) _cairo_uint128_lsl(a,b)
-#define _cairo_int128_rsl(a,b) _cairo_uint128_rsl(a,b)
-#define _cairo_int128_rsa(a,b) _cairo_uint128_rsa(a,b)
-int I _cairo_int128_lt (cairo_int128_t a, cairo_int128_t b);
-#define _cairo_int128_eq(a,b) _cairo_uint128_eq (a,b)
-#define _cairo_int128_negate(a) _cairo_uint128_negate(a)
-#define _cairo_int128_negative(a) (_cairo_uint128_negative(a))
-#define _cairo_int128_not(a) _cairo_uint128_not(a)
-
-#else /* !HAVE_UINT128_T */
-
-typedef uint128_t cairo_uint128_t;
-typedef int128_t cairo_int128_t;
-
-#define _cairo_uint32_to_uint128(i) ((uint128_t) (i))
-#define _cairo_uint64_to_uint128(i) ((uint128_t) (i))
-#define _cairo_uint128_to_uint64(i) ((uint64_t) (i))
-#define _cairo_uint128_to_uint32(i) ((uint32_t) (i))
-#define _cairo_uint128_add(a,b) ((a) + (b))
-#define _cairo_uint128_sub(a,b) ((a) - (b))
-#define _cairo_uint128_mul(a,b) ((a) * (b))
-#define _cairo_uint64x64_128_mul(a,b) ((uint128_t) (a) * (b))
-#define _cairo_uint128_lsl(a,b) ((a) << (b))
-#define _cairo_uint128_rsl(a,b) ((uint128_t) (a) >> (b))
-#define _cairo_uint128_rsa(a,b) ((uint128_t) ((int128_t) (a) >> (b)))
-#define _cairo_uint128_lt(a,b) ((a) < (b))
-#define _cairo_uint128_eq(a,b) ((a) == (b))
-#define _cairo_uint128_negate(a) ((uint128_t) -((int128_t) (a)))
-#define _cairo_uint128_negative(a) ((int128_t) (a) < 0)
-#define _cairo_uint128_not(a) (~(a))
-
-#define _cairo_uint128_to_int128(i) ((int128_t) (i))
-#define _cairo_int128_to_uint128(i) ((uint128_t) (i))
-
-#define _cairo_int32_to_int128(i) ((int128_t) (i))
-#define _cairo_int64_to_int128(i) ((int128_t) (i))
-#define _cairo_int128_to_int64(i) ((int64_t) (i))
-#define _cairo_int128_to_int32(i) ((int32_t) (i))
-#define _cairo_int128_add(a,b) ((a) + (b))
-#define _cairo_int128_sub(a,b) ((a) - (b))
-#define _cairo_int128_mul(a,b) ((a) * (b))
-#define _cairo_int64x64_128_mul(a,b) ((int128_t) (a) * (b))
-#define _cairo_int128_lt(a,b) ((a) < (b))
-#define _cairo_int128_eq(a,b) ((a) == (b))
-#define _cairo_int128_lsl(a,b) ((a) << (b))
-#define _cairo_int128_rsl(a,b) ((int128_t) ((uint128_t) (a) >> (b)))
-#define _cairo_int128_rsa(a,b) ((int128_t) (a) >> (b))
-#define _cairo_int128_negate(a) (-(a))
-#define _cairo_int128_negative(a) ((a) < 0)
-#define _cairo_int128_not(a) (~(a))
-
-#endif /* HAVE_UINT128_T */
-
-typedef struct _cairo_uquorem128 {
- cairo_uint128_t quo;
- cairo_uint128_t rem;
-} cairo_uquorem128_t;
-
-typedef struct _cairo_quorem128 {
- cairo_int128_t quo;
- cairo_int128_t rem;
-} cairo_quorem128_t;
-
-cairo_uquorem128_t I
-_cairo_uint128_divrem (cairo_uint128_t num, cairo_uint128_t den);
-
-cairo_quorem128_t I
-_cairo_int128_divrem (cairo_int128_t num, cairo_int128_t den);
-
-#define _cairo_uint128_le(a,b) (!_cairo_uint128_gt(a,b))
-#define _cairo_uint128_ne(a,b) (!_cairo_uint128_eq(a,b))
-#define _cairo_uint128_ge(a,b) (!_cairo_uint128_lt(a,b))
-#define _cairo_uint128_gt(a,b) _cairo_uint128_lt(b,a)
-
-#define _cairo_int128_le(a,b) (!_cairo_int128_gt(a,b))
-#define _cairo_int128_ne(a,b) (!_cairo_int128_eq(a,b))
-#define _cairo_int128_ge(a,b) (!_cairo_int128_lt(a,b))
-#define _cairo_int128_gt(a,b) _cairo_int128_lt(b,a)
-
-#undef I
-
-#endif /* CAIRO_WIDEINT_H */
diff --git a/src/cairo_xlib_surface.c b/src/cairo_xlib_surface.c
index 1867d598..d9d74f58 100644
--- a/src/cairo_xlib_surface.c
+++ b/src/cairo_xlib_surface.c
@@ -35,6 +35,7 @@
*/
#include "cairoint.h"
+#include "cairo-xlib.h"
void
cairo_set_target_drawable (cairo_t *cr,
diff --git a/src/cairoint.h b/src/cairoint.h
index d10ed952..6f9d5061 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -108,7 +108,7 @@
#define __attribute__(x)
#endif
-#include "cairo_wideint.h"
+#include "cairo-wideint.h"
typedef int32_t cairo_fixed_16_16_t;
typedef cairo_int64_t cairo_fixed_32_32_t;
@@ -501,7 +501,7 @@ typedef struct _cairo_font_backend {
} cairo_font_backend_t;
/* concrete font backends */
-#ifdef CAIRO_HAS_FREETYPE_FONT
+#ifdef CAIRO_HAS_FT_FONT
extern const cairo_private struct _cairo_font_backend cairo_ft_font_backend;
@@ -746,7 +746,7 @@ typedef struct _cairo_traps {
#define CAIRO_FONT_SLANT_DEFAULT CAIRO_FONT_SLANT_NORMAL
#define CAIRO_FONT_WEIGHT_DEFAULT CAIRO_FONT_WEIGHT_NORMAL
-#ifdef CAIRO_HAS_FREETYPE_FONT
+#ifdef CAIRO_HAS_FT_FONT
#define CAIRO_FONT_FAMILY_DEFAULT "serif"