Cairo exports and more (was Re: [cairo] Re: Munging header files for export (and other) attributes)

Hans Breuer hans at breuer.org
Sun Sep 4 04:58:28 PDT 2005


On 01.09.2005 19:50, Carl Worth wrote:
[...]
> OK. That's far more than enough talk on this subject. Let's see a
> patch, get it into CVS, and move on. (And yes, I do realize that I'm
> the one to blame for dragging this out so much.)
> 
As usual the full patch to let me build cairo on win32 with
msvc is much bigger than just munging some headers.
Following the full ChangeLog entry and three pieces from the
patch (exports = munging headers, poratbility = non-gcc,
msc = makefiles for msvc build). The full patch is available
via http://hans.breuer.org/gtk/cairo.html

2005-09-03  Hans Breuer  <hans.breuer.org>

	* src/cairo.h src/cairo-debug.h src/cairo-ft.h src/cairo-glitz.h
	  src/cairo-pdf.h src/cairo-ps.h cairo-quartz.h src/cairo-win32.h
	  src/cairo-xlib.h src/cairo-xcb.h :
	added the ability to decorate public functions with attributes for
	export and calling convention

	* src/cairoint.h : protect gcc specific #warning with #ifdef __GNUC__

	* src/cairo-pdf-surface.c src/cairo-ps-surface.c : ifdef'ed out
	enough to make these backends build without freetype. [It is much
	more than the XXX suggest.]

	* src/makefile.msc pixman/src/makefile.msc : makefiles to build
	cairo with Microsoft toolchain - same approach as with Gtk+

	* pixman/src/pixman.h : when using msvc define int types like
	it is done in cairo-wideint.h instead of trying to include stdint.h



-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it.                -- Dilbert
-------------- next part --------------
diff --exclude-from=c:\util\tool\diff.ign -u --recursive --unidirectional-new-file from-cvs/cairo/cairo/pixman/src/makefile.msc my-gtk/cairo/cairo/pixman/src/makefile.msc
--- from-cvs/cairo/cairo/pixman/src/makefile.msc	Thu Jan 01 01:00:00 1970
+++ my-gtk/cairo/cairo/pixman/src/makefile.msc	Sat Sep 03 21:47:17 2005
@@ -0,0 +1,33 @@
+TOP = ..\..\..\..
+!INCLUDE $(TOP)\glib\build\win32\make.msc
+
+PACKAGE = pixman
+
+DEFINES = -DWIN32
+
+OBJECTS = \
+	fbcompose.obj \
+	fbedge.obj \
+	fbpict.obj \
+	fbtrap.obj \
+	icblt.obj \
+	icbltone.obj \
+	iccolor.obj \
+	icformat.obj \
+	icimage.obj \
+	icpixels.obj \
+	icrect.obj \
+	icstipple.obj \
+	ictransform.obj \
+	ictrap.obj \
+	ictri.obj \
+	icutil.obj \
+	pixregion.obj \
+	renderedge.obj \
+
+all : \
+	pixman.lib
+
+$(PACKAGE).lib : $(OBJECTS)
+	lib /out:$(PACKAGE).lib $(OBJECTS)
+
diff --exclude-from=c:\util\tool\diff.ign -u --recursive --unidirectional-new-file from-cvs/cairo/cairo/src/makefile.msc my-gtk/cairo/cairo/src/makefile.msc
--- from-cvs/cairo/cairo/src/makefile.msc	Thu Jan 01 01:00:00 1970
+++ my-gtk/cairo/cairo/src/makefile.msc	Sat Sep 03 22:01:04 2005
@@ -0,0 +1,113 @@
+TOP = ..\..\..
+PRJ_TOP = ..
+PACKAGE = libcairo
+PKG_VER = 1.0
+VERSION = 1.0.0
+!INCLUDE $(TOP)\glib\build\win32\make.msc
+
+# These definitions need to match cairo-features.h defines
+#ENABLE_FT2=1
+ENABLE_PNG=1
+
+DEFINES = -DHAVE_CONFIG_H -DWIN32 -DVERSION=\"$(VERSION)\" \
+	-Dsnprintf=_snprintf -Dinline=__inline \
+	-DCAIRO_EXPORT=__declspec(dllexport)
+
+INCLUDES = \
+	-I. -I$(PRJ_TOP) -I$(PRJ_TOP)\pixman\src \
+	$(FREETYPE2_CFLAGS) \
+	$(CAIRO_CFLAGS) \
+	$(FONTCONFIG_CFLAGS) \
+	$(XRENDER_CFLAGS) \
+	$(XCB_CFLAGS) \
+	$(PNG_CFLAGS) \
+	$(GL_CFLAGS)
+
+PKG_LINK = \
+	$(PRJ_TOP)\pixman\src\pixman.lib \
+	$(FREETYPE2_LIBS) $(FONTCONFIG_LIBS) \
+	$(PNG_LIBS)
+
+OBJECTS = \
+	cairo-arc.obj \
+	cairo-array.obj \
+#	cairo-atsui-font.obj \
+	cairo-cache.obj \
+	cairo-clip.obj \
+	cairo-color.obj \
+	cairo-debug.obj \
+	cairo-fixed.obj \
+	cairo-font-options.obj \
+	cairo-font.obj \
+!IFDEF ENABLE_FT2
+	cairo-font-subset.obj \
+	cairo-ft-font.obj \
+!ENDIF
+#	cairo-glitz-surface.obj \
+	cairo-gstate.obj \
+	cairo-hash.obj \
+	cairo-hull.obj \
+	cairo-image-surface.obj \
+	cairo-matrix.obj \
+	cairo-meta-surface.obj \
+	cairo-output-stream.obj \
+	cairo-path-bounds.obj \
+	cairo-path-data.obj \
+	cairo-path-fill.obj \
+	cairo-path-stroke.obj \
+	cairo-path.obj \
+	cairo-pattern.obj \
+	cairo-pdf-surface.obj \
+	cairo-pen.obj \
+!IFDEF ENABLE_PNG
+	cairo-png.obj \
+!ENDIF
+	cairo-polygon.obj \
+	cairo-ps-surface.obj \
+#	cairo-quartz-surface.obj \
+	cairo-region.obj \
+	cairo-scaled-font.obj \
+	cairo-slope.obj \
+	cairo-spline.obj \
+	cairo-surface.obj \
+	cairo-traps.obj \
+	cairo-unicode.obj \
+	cairo-wideint.obj \
+#	cairo-win32-font-subset.obj \
+	cairo-win32-font.obj \
+	cairo-win32-surface.obj \
+#	cairo-win32x-surface.obj \
+#	cairo-xcb-surface.obj \
+#	cairo-xlib-screen.obj \
+#	cairo-xlib-surface.obj \
+	cairo.obj \
+
+all : \
+	cairo-features.h \
+	$(PACKAGE).dll
+
+cairo-features.h: cairo-features.h.in
+	echo "You need to manually adapt cairo-features.h"
+
+RESOURCE = $(PACKAGE).res
+
+$(PACKAGE).lib : $(OBJECTS)
+	lib /out:$(PACKAGE).lib $(OBJECTS)
+
+$(PACKAGE).dll : $(OBJECTS)
+	$(CC) $(CFLAGS) -LD -Fe$(PACKAGE).dll $(OBJECTS) $(PKG_LINK) \
+	gdi32.lib user32.lib advapi32.lib wsock32.lib $(LDFLAGS)
+
+$(PACKAGE)-$(PKG_VER).dll : $(OBJECTS)
+	$(CC) $(CFLAGS) -LD -Fe$(PACKAGE)-$(PKG_VER).dll $(OBJECTS) $(PKG_LINK) \
+	gdi32.lib user32.lib advapi32.lib wsock32.lib $(LDFLAGS)
+
+$(PACKAGE).exe : $(OBJECTS) $(PACKAGE).def $(PACKAGE).res
+	$(CC) $(CFLAGS) -Fe$(PACKAGE).exe $(PACKAGE).res $(OBJECTS) $(PKG_LINK) \
+	user32.lib advapi32.lib shell32.lib wsock32.lib winspool.lib $(LDFLAGS) /def:$(PACKAGE).def
+
+.c.obj :
+	$(CC) $(CFLAGS) -GD -c $(PKG_CFLAGS) $<
+
+.cpp.obj :
+	$(CC) $(CFLAGS) -GD -c $(PKG_CFLAGS) $<
-------------- next part --------------
diff --exclude-from=c:\util\tool\diff.ign -u --recursive --unidirectional-new-file from-cvs/cairo/cairo/src/cairoint.h my-gtk/cairo/cairo/src/cairoint.h
--- from-cvs/cairo/cairo/src/cairoint.h	Sat Sep 03 14:20:03 2005
+++ my-gtk/cairo/cairo/src/cairoint.h	Sat Sep 03 19:47:33 2005
@@ -139,7 +139,11 @@
 #endif
 
 #ifndef CAIRO_MUTEX_DECLARE
+#  ifdef __GNUC__
 # warning "No mutex declarations, assuming single-threaded code"
+#  else
+#  pragma message("No mutex declarations, assuming single-threaded code")
+#  endif
 # define CAIRO_MUTEX_DECLARE(name)
 # define CAIRO_MUTEX_DECLARE_GLOBAL(name)
 # define CAIRO_MUTEX_LOCK(name)
diff --exclude-from=c:\util\tool\diff.ign -u --recursive --unidirectional-new-file from-cvs/cairo/cairo/pixman/src/pixman.h my-gtk/cairo/cairo/pixman/src/pixman.h
--- from-cvs/cairo/cairo/pixman/src/pixman.h	Wed Aug 10 21:36:51 2005
+++ my-gtk/cairo/cairo/pixman/src/pixman.h	Sat Sep 03 21:37:09 2005
@@ -87,7 +87,21 @@
 # if defined (__OpenBSD__) || defined (_AIX)
 #  include <inttypes.h>
 # else 
-#  include <stdint.h>
+#  if defined (_MSC_VER)
+    typedef __int8 int8_t;
+    typedef unsigned __int8 uint8_t;
+    typedef __int16 int16_t;
+    typedef unsigned __int16 uint16_t;
+    typedef __int32 int32_t;
+    typedef unsigned __int32 uint32_t;
+    typedef __int64 int64_t;
+    typedef unsigned __int64 uint64_t;
+#   ifndef HAVE_UINT64_T
+#    define HAVE_UINT64_T 1
+#   endif
+#  else
+#   include <stdint.h>
+#  endif
 # endif
 #endif
 
-------------- next part --------------
diff --exclude-from=c:\util\tool\diff.ign -u --recursive --unidirectional-new-file from-cvs/cairo/cairo/src/cairo-debug.h my-gtk/cairo/cairo/src/cairo-debug.h
--- from-cvs/cairo/cairo/src/cairo-debug.h	Mon Aug 01 22:33:47 2005
+++ my-gtk/cairo/cairo/src/cairo-debug.h	Sat Sep 03 21:03:12 2005
@@ -40,7 +40,7 @@
 
 CAIRO_BEGIN_DECLS
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_debug_reset_static_data (void);
 
 CAIRO_END_DECLS
diff --exclude-from=c:\util\tool\diff.ign -u --recursive --unidirectional-new-file from-cvs/cairo/cairo/src/cairo-ft.h my-gtk/cairo/cairo/src/cairo-ft.h
--- from-cvs/cairo/cairo/src/cairo-ft.h	Thu Jul 28 22:24:54 2005
+++ my-gtk/cairo/cairo/src/cairo-ft.h	Sat Sep 03 21:07:20 2005
@@ -49,21 +49,21 @@
 
 CAIRO_BEGIN_DECLS
 
-cairo_font_face_t *
+CAIRO_EXPORT cairo_font_face_t * CAIRO_CALL
 cairo_ft_font_face_create_for_pattern (FcPattern *pattern);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_ft_font_options_substitute (const cairo_font_options_t *options,
 				  FcPattern                  *pattern);
 
-cairo_font_face_t *
+CAIRO_EXPORT cairo_font_face_t * CAIRO_CALL
 cairo_ft_font_face_create_for_ft_face (FT_Face         face,
 				       int             load_flags);
 
-FT_Face
+CAIRO_EXPORT FT_Face CAIRO_CALL
 cairo_ft_scaled_font_lock_face (cairo_scaled_font_t *scaled_font);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_ft_scaled_font_unlock_face (cairo_scaled_font_t *scaled_font);
 
 CAIRO_END_DECLS
diff --exclude-from=c:\util\tool\diff.ign -u --recursive --unidirectional-new-file from-cvs/cairo/cairo/src/cairo-glitz.h my-gtk/cairo/cairo/src/cairo-glitz.h
--- from-cvs/cairo/cairo/src/cairo-glitz.h	Fri May 20 12:42:50 2005
+++ my-gtk/cairo/cairo/src/cairo-glitz.h	Sat Sep 03 22:13:15 2005
@@ -45,7 +45,7 @@
 
 CAIRO_BEGIN_DECLS
 
-cairo_surface_t *
+CAIRO_EXPORT cairo_surface_t * CAIRO_CALL
 cairo_glitz_surface_create (glitz_surface_t *surface);
 
 CAIRO_END_DECLS
diff --exclude-from=c:\util\tool\diff.ign -u --recursive --unidirectional-new-file from-cvs/cairo/cairo/src/cairo-pdf.h my-gtk/cairo/cairo/src/cairo-pdf.h
--- from-cvs/cairo/cairo/src/cairo-pdf.h	Fri May 20 12:42:51 2005
+++ my-gtk/cairo/cairo/src/cairo-pdf.h	Sat Sep 03 20:48:36 2005
@@ -43,18 +43,18 @@
 
 CAIRO_BEGIN_DECLS
 
-cairo_surface_t *
+CAIRO_EXPORT cairo_surface_t * CAIRO_CALL
 cairo_pdf_surface_create (const char   *filename,
 			  double	width_in_points,
 			  double	height_in_points);
 
-cairo_surface_t *
+CAIRO_EXPORT cairo_surface_t * CAIRO_CALL
 cairo_pdf_surface_create_for_stream (cairo_write_func_t	write_func,
 				     void	       *closure,
 				     double		width_in_points,
 				     double		height_in_points);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_pdf_surface_set_dpi (cairo_surface_t     *surface,
 			   double		x_dpi,
 			   double		y_dpi);
diff --exclude-from=c:\util\tool\diff.ign -u --recursive --unidirectional-new-file from-cvs/cairo/cairo/src/cairo-ps.h my-gtk/cairo/cairo/src/cairo-ps.h
--- from-cvs/cairo/cairo/src/cairo-ps.h	Fri May 20 12:42:51 2005
+++ my-gtk/cairo/cairo/src/cairo-ps.h	Sat Sep 03 20:49:40 2005
@@ -47,18 +47,18 @@
 
 /* PS-surface functions */
 
-cairo_surface_t *
+CAIRO_EXPORT cairo_surface_t * CAIRO_CALL
 cairo_ps_surface_create (const char *filename,
 			 double	     width_in_points,
 			 double	     height_in_points);
 
-cairo_surface_t *
+CAIRO_EXPORT cairo_surface_t * CAIRO_CALL
 cairo_ps_surface_create_for_stream (cairo_write_func_t	write_func,
 				    void	       *closure,
 				    double		width_in_points,
 				    double		height_in_points);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_ps_surface_set_dpi (cairo_surface_t      *surface,
 			  double		x_dpi,
 			  double		y_dpi);
diff --exclude-from=c:\util\tool\diff.ign -u --recursive --unidirectional-new-file from-cvs/cairo/cairo/src/cairo-quartz.h my-gtk/cairo/cairo/src/cairo-quartz.h
--- from-cvs/cairo/cairo/src/cairo-quartz.h	Thu Jul 28 22:24:57 2005
+++ my-gtk/cairo/cairo/src/cairo-quartz.h	Sat Sep 03 22:15:08 2005
@@ -45,7 +45,7 @@
 
 CAIRO_BEGIN_DECLS
 
-cairo_surface_t *
+CAIRO_EXPORT cairo_surface_t * CAIRO_CALL
 cairo_quartz_surface_create (CGContextRef    context,
 			     int	     width,
 			     int	     height);
diff --exclude-from=c:\util\tool\diff.ign -u --recursive --unidirectional-new-file from-cvs/cairo/cairo/src/cairo-win32.h my-gtk/cairo/cairo/src/cairo-win32.h
--- from-cvs/cairo/cairo/src/cairo-win32.h	Fri May 20 12:42:53 2005
+++ my-gtk/cairo/cairo/src/cairo-win32.h	Sat Sep 03 20:51:23 2005
@@ -44,20 +44,20 @@
 
 CAIRO_BEGIN_DECLS
 
-cairo_surface_t *
+CAIRO_EXPORT cairo_surface_t * CAIRO_CALL
 cairo_win32_surface_create (HDC hdc);
 
-cairo_font_face_t *
+CAIRO_EXPORT cairo_font_face_t * CAIRO_CALL
 cairo_win32_font_face_create_for_logfontw (LOGFONTW *logfont);
 
-cairo_status_t
+CAIRO_EXPORT cairo_status_t CAIRO_CALL
 cairo_win32_scaled_font_select_font (cairo_scaled_font_t *scaled_font,
 				     HDC                  hdc);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_win32_scaled_font_done_font (cairo_scaled_font_t *scaled_font);
 
-double
+CAIRO_EXPORT double CAIRO_CALL
 cairo_win32_scaled_font_get_metrics_factor (cairo_scaled_font_t *scaled_font);
 
 CAIRO_END_DECLS
diff --exclude-from=c:\util\tool\diff.ign -u --recursive --unidirectional-new-file from-cvs/cairo/cairo/src/cairo-xcb.h my-gtk/cairo/cairo/src/cairo-xcb.h
--- from-cvs/cairo/cairo/src/cairo-xcb.h	Sun May 29 23:59:38 2005
+++ my-gtk/cairo/cairo/src/cairo-xcb.h	Sat Sep 03 22:11:35 2005
@@ -45,20 +45,20 @@
 
 CAIRO_BEGIN_DECLS
 
-cairo_surface_t *
+CAIRO_EXPORT cairo_surface_t * CAIRO_CALL
 cairo_xcb_surface_create (XCBConnection *c,
 			  XCBDRAWABLE	 drawable,
 			  XCBVISUALTYPE *visual,
 			  int		 width,
 			  int		 height);
 
-cairo_surface_t *
+CAIRO_EXPORT cairo_surface_t * CAIRO_CALL
 cairo_xcb_surface_create_for_bitmap (XCBConnection *c,
 				     XCBPIXMAP	    bitmap,
 				     int	    width,
 				     int	    height);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_xcb_surface_set_size (cairo_surface_t *surface,
 			    int		     width,
 			    int		     height);
diff --exclude-from=c:\util\tool\diff.ign -u --recursive --unidirectional-new-file from-cvs/cairo/cairo/src/cairo-xlib.h my-gtk/cairo/cairo/src/cairo-xlib.h
--- from-cvs/cairo/cairo/src/cairo-xlib.h	Thu Jul 28 22:24:58 2005
+++ my-gtk/cairo/cairo/src/cairo-xlib.h	Sat Sep 03 22:10:11 2005
@@ -45,26 +45,26 @@
 
 CAIRO_BEGIN_DECLS
 
-cairo_surface_t *
+CAIRO_EXPORT cairo_surface_t * CAIRO_CALL
 cairo_xlib_surface_create (Display     *dpy,
 			   Drawable	drawable,
 			   Visual      *visual,
 			   int		width,
 			   int		height);
 
-cairo_surface_t *
+CAIRO_EXPORT cairo_surface_t * CAIRO_CALL
 cairo_xlib_surface_create_for_bitmap (Display  *dpy,
 				      Pixmap	bitmap,
 				      Screen	*screen,
 				      int	width,
 				      int	height);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_xlib_surface_set_size (cairo_surface_t *surface,
 			     int              width,
 			     int              height);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_xlib_surface_set_drawable (cairo_surface_t *surface,
 				 Drawable	  drawable,
 				 int              width,
diff --exclude-from=c:\util\tool\diff.ign -u --recursive --unidirectional-new-file from-cvs/cairo/cairo/src/cairo.h my-gtk/cairo/cairo/src/cairo.h
--- from-cvs/cairo/cairo/src/cairo.h	Fri Aug 26 16:23:09 2005
+++ my-gtk/cairo/cairo/src/cairo.h	Sat Sep 03 20:45:40 2005
@@ -52,10 +52,28 @@
 	CAIRO_VERSION_MINOR,                    \
 	CAIRO_VERSION_MICRO)
 
-int
+/* Every exported symbol should be decorated with this macro.
+ * It gets defined by the build system on poor platforms where
+ * exporting *all* functions possible is not the default.
+ * It should *not* be defined in cairo-features.h cause usually
+ * the definition needs to be different between exporting while
+ * *building* the library and importing while using it. 
+ */
+#ifndef CAIRO_EXPORT
+#define CAIRO_EXPORT
+#endif
+/* Every exported function should also carry this modifier
+ * to allow to declare the functions calling convention explicit.
+ * If necessary the definition belongs into cairo-features.h
+ */
+#ifndef CAIRO_CALL
+#define CAIRO_CALL
+#endif
+
+CAIRO_EXPORT int CAIRO_CALL
 cairo_version (void);
 
-const char*
+CAIRO_EXPORT const char* CAIRO_CALL
 cairo_version_string (void);
 
 /**
@@ -237,26 +255,26 @@
 					     unsigned int	length);
 
 /* Functions for manipulating state objects */
-cairo_t *
+CAIRO_EXPORT cairo_t * CAIRO_CALL
 cairo_create (cairo_surface_t *target);
 
-cairo_t *
+CAIRO_EXPORT cairo_t * CAIRO_CALL
 cairo_reference (cairo_t *cr);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_destroy (cairo_t *cr);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_save (cairo_t *cr);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_restore (cairo_t *cr);
 
 /* XXX: I want to rethink this API
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_push_group (cairo_t *cr);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_pop_group (cairo_t *cr);
 */
 
@@ -282,27 +300,27 @@
     CAIRO_OPERATOR_SATURATE
 } cairo_operator_t;
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_set_operator (cairo_t *cr, cairo_operator_t op);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_set_source (cairo_t *cr, cairo_pattern_t *source);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_set_source_rgb (cairo_t *cr, double red, double green, double blue);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_set_source_rgba (cairo_t *cr,
 		       double red, double green, double blue,
 		       double alpha);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_set_source_surface (cairo_t	  *cr,
 			  cairo_surface_t *surface,
 			  double	   x,
 			  double	   y);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_set_tolerance (cairo_t *cr, double tolerance);
 
 /**
@@ -325,7 +343,7 @@
     CAIRO_ANTIALIAS_SUBPIXEL
 } cairo_antialias_t;
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_set_antialias (cairo_t *cr, cairo_antialias_t antialias);
 
 /**
@@ -354,10 +372,10 @@
     CAIRO_FILL_RULE_EVEN_ODD
 } cairo_fill_rule_t;
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_set_fill_rule (cairo_t *cr, cairo_fill_rule_t fill_rule);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_set_line_width (cairo_t *cr, double width);
 
 
@@ -375,7 +393,7 @@
     CAIRO_LINE_CAP_SQUARE
 } cairo_line_cap_t;
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_set_line_cap (cairo_t *cr, cairo_line_cap_t line_cap);
 
 typedef enum _cairo_line_join {
@@ -384,173 +402,173 @@
     CAIRO_LINE_JOIN_BEVEL
 } cairo_line_join_t;
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_set_line_join (cairo_t *cr, cairo_line_join_t line_join);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_set_dash (cairo_t	*cr,
 		double	*dashes,
 		int	 num_dashes,
 		double	 offset);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_set_miter_limit (cairo_t *cr, double limit);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_translate (cairo_t *cr, double tx, double ty);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_scale (cairo_t *cr, double sx, double sy);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_rotate (cairo_t *cr, double angle);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_transform (cairo_t	      *cr,
 		 const cairo_matrix_t *matrix);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_set_matrix (cairo_t	       *cr,
 		  const cairo_matrix_t *matrix);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_identity_matrix (cairo_t *cr);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_user_to_device (cairo_t *cr, double *x, double *y);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_user_to_device_distance (cairo_t *cr, double *dx, double *dy);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_device_to_user (cairo_t *cr, double *x, double *y);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_device_to_user_distance (cairo_t *cr, double *dx, double *dy);
 
 /* Path creation functions */
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_new_path (cairo_t *cr);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_move_to (cairo_t *cr, double x, double y);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_line_to (cairo_t *cr, double x, double y);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_curve_to (cairo_t *cr,
 		double x1, double y1,
 		double x2, double y2,
 		double x3, double y3);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_arc (cairo_t *cr,
 	   double xc, double yc,
 	   double radius,
 	   double angle1, double angle2);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_arc_negative (cairo_t *cr,
 		    double xc, double yc,
 		    double radius,
 		    double angle1, double angle2);
 
 /* XXX: NYI
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_arc_to (cairo_t *cr,
 	      double x1, double y1,
 	      double x2, double y2,
 	      double radius);
 */
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_rel_move_to (cairo_t *cr, double dx, double dy);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_rel_line_to (cairo_t *cr, double dx, double dy);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_rel_curve_to (cairo_t *cr,
 		    double dx1, double dy1,
 		    double dx2, double dy2,
 		    double dx3, double dy3);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_rectangle (cairo_t *cr,
 		 double x, double y,
 		 double width, double height);
 
 /* XXX: NYI
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_stroke_to_path (cairo_t *cr);
 */
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_close_path (cairo_t *cr);
 
 /* Painting functions */
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_paint (cairo_t *cr);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_paint_with_alpha (cairo_t *cr,
 			double   alpha);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_mask (cairo_t         *cr,
 	    cairo_pattern_t *pattern);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_mask_surface (cairo_t         *cr,
 		    cairo_surface_t *surface,
 		    double           surface_x,
 		    double           surface_y);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_stroke (cairo_t *cr);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_stroke_preserve (cairo_t *cr);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_fill (cairo_t *cr);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_fill_preserve (cairo_t *cr);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_copy_page (cairo_t *cr);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_show_page (cairo_t *cr);
 
 /* Insideness testing */
-cairo_bool_t
+CAIRO_EXPORT cairo_bool_t CAIRO_CALL
 cairo_in_stroke (cairo_t *cr, double x, double y);
 
-cairo_bool_t
+CAIRO_EXPORT cairo_bool_t CAIRO_CALL
 cairo_in_fill (cairo_t *cr, double x, double y);
 
 /* Rectangular extents */
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_stroke_extents (cairo_t *cr,
 		      double *x1, double *y1,
 		      double *x2, double *y2);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_fill_extents (cairo_t *cr,
 		    double *x1, double *y1,
 		    double *x2, double *y2);
 
 /* Clipping */
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_reset_clip (cairo_t *cr);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_clip (cairo_t *cr);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_clip_preserve (cairo_t *cr);
 
 /* Font/Text functions */
@@ -777,130 +795,130 @@
 
 typedef struct _cairo_font_options cairo_font_options_t;
 
-cairo_font_options_t *
+CAIRO_EXPORT cairo_font_options_t * CAIRO_CALL
 cairo_font_options_create (void);
 
-cairo_font_options_t *
+CAIRO_EXPORT cairo_font_options_t * CAIRO_CALL
 cairo_font_options_copy (const cairo_font_options_t *original);
 
-void 
+CAIRO_EXPORT void CAIRO_CALL
 cairo_font_options_destroy (cairo_font_options_t *options);
 
-cairo_status_t
+CAIRO_EXPORT cairo_status_t CAIRO_CALL
 cairo_font_options_status (cairo_font_options_t *options);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_font_options_merge (cairo_font_options_t       *options,
 			  const cairo_font_options_t *other);
-cairo_bool_t
+CAIRO_EXPORT cairo_bool_t CAIRO_CALL
 cairo_font_options_equal (const cairo_font_options_t *options,
 			  const cairo_font_options_t *other);
 
-unsigned long
+CAIRO_EXPORT unsigned long CAIRO_CALL
 cairo_font_options_hash (const cairo_font_options_t *options);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_font_options_set_antialias (cairo_font_options_t *options,
 				  cairo_antialias_t     antialias);
-cairo_antialias_t
+CAIRO_EXPORT cairo_antialias_t CAIRO_CALL
 cairo_font_options_get_antialias (const cairo_font_options_t *options);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_font_options_set_subpixel_order (cairo_font_options_t   *options,
 				       cairo_subpixel_order_t  subpixel_order);
-cairo_subpixel_order_t
+CAIRO_EXPORT cairo_subpixel_order_t CAIRO_CALL
 cairo_font_options_get_subpixel_order (const cairo_font_options_t *options);
 			 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_font_options_set_hint_style (cairo_font_options_t *options,
 				   cairo_hint_style_t     hint_style);
-cairo_hint_style_t
+CAIRO_EXPORT cairo_hint_style_t CAIRO_CALL
 cairo_font_options_get_hint_style (const cairo_font_options_t *options);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_font_options_set_hint_metrics (cairo_font_options_t *options,
 				     cairo_hint_metrics_t  hint_metrics);
-cairo_hint_metrics_t
+CAIRO_EXPORT cairo_hint_metrics_t CAIRO_CALL
 cairo_font_options_get_hint_metrics (const cairo_font_options_t *options);
 
 
 /* This interface is for dealing with text as text, not caring about the
    font object inside the the cairo_t. */
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_select_font_face (cairo_t              *cr, 
 			const char           *family, 
 			cairo_font_slant_t   slant, 
 			cairo_font_weight_t  weight);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_set_font_size (cairo_t *cr, double size);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_set_font_matrix (cairo_t		    *cr,
 		       const cairo_matrix_t *matrix);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_get_font_matrix (cairo_t *cr,
 		       cairo_matrix_t *matrix);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_set_font_options (cairo_t                    *cr,
 			const cairo_font_options_t *options);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_get_font_options (cairo_t              *cr,
 			cairo_font_options_t *options);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_show_text (cairo_t *cr, const char *utf8);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_show_glyphs (cairo_t *cr, cairo_glyph_t *glyphs, int num_glyphs);
 
-cairo_font_face_t *
+CAIRO_EXPORT cairo_font_face_t * CAIRO_CALL
 cairo_get_font_face (cairo_t *cr);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_font_extents (cairo_t              *cr, 
 		    cairo_font_extents_t *extents);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_set_font_face (cairo_t *cr, cairo_font_face_t *font_face);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_text_extents (cairo_t              *cr,
 		    const char    	 *utf8,
 		    cairo_text_extents_t *extents);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_glyph_extents (cairo_t               *cr,
 		     cairo_glyph_t         *glyphs, 
 		     int                   num_glyphs,
 		     cairo_text_extents_t  *extents);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_text_path  (cairo_t *cr, const char *utf8);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_glyph_path (cairo_t *cr, cairo_glyph_t *glyphs, int num_glyphs);
 
 /* Generic identifier for a font style */
 
-cairo_font_face_t *
+CAIRO_EXPORT cairo_font_face_t * CAIRO_CALL
 cairo_font_face_reference (cairo_font_face_t *font_face);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_font_face_destroy (cairo_font_face_t *font_face);
 
-cairo_status_t
+CAIRO_EXPORT cairo_status_t CAIRO_CALL
 cairo_font_face_status (cairo_font_face_t *font_face);
 
-void *
+CAIRO_EXPORT void * CAIRO_CALL
 cairo_font_face_get_user_data (cairo_font_face_t	   *font_face,
 			       const cairo_user_data_key_t *key);
 
-cairo_status_t
+CAIRO_EXPORT cairo_status_t CAIRO_CALL
 cairo_font_face_set_user_data (cairo_font_face_t	   *font_face,
 			       const cairo_user_data_key_t *key,
 			       void			   *user_data,
@@ -908,26 +926,26 @@
 
 /* Portable interface to general font features. */
 
-cairo_scaled_font_t *
+CAIRO_EXPORT cairo_scaled_font_t * CAIRO_CALL
 cairo_scaled_font_create (cairo_font_face_t          *font_face,
 			  const cairo_matrix_t       *font_matrix,
 			  const cairo_matrix_t       *ctm,
 			  const cairo_font_options_t *options);
 
-cairo_scaled_font_t *
+CAIRO_EXPORT cairo_scaled_font_t * CAIRO_CALL
 cairo_scaled_font_reference (cairo_scaled_font_t *scaled_font);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_scaled_font_destroy (cairo_scaled_font_t *scaled_font);
 
-cairo_status_t
+CAIRO_EXPORT cairo_status_t CAIRO_CALL
 cairo_scaled_font_status (cairo_scaled_font_t *scaled_font);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_scaled_font_extents (cairo_scaled_font_t  *scaled_font,
 			   cairo_font_extents_t *extents);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_scaled_font_glyph_extents (cairo_scaled_font_t   *scaled_font,
 				 cairo_glyph_t         *glyphs, 
 				 int                   num_glyphs,
@@ -935,42 +953,42 @@
 
 /* Query functions */
 
-cairo_operator_t
+CAIRO_EXPORT cairo_operator_t CAIRO_CALL
 cairo_get_operator (cairo_t *cr);
 
-cairo_pattern_t *
+CAIRO_EXPORT cairo_pattern_t * CAIRO_CALL
 cairo_get_source (cairo_t *cr);
 
-double
+CAIRO_EXPORT double CAIRO_CALL
 cairo_get_tolerance (cairo_t *cr);
 
-cairo_antialias_t
+CAIRO_EXPORT cairo_antialias_t CAIRO_CALL
 cairo_get_antialias (cairo_t *cr);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_get_current_point (cairo_t *cr, double *x, double *y);
 
-cairo_fill_rule_t
+CAIRO_EXPORT cairo_fill_rule_t CAIRO_CALL
 cairo_get_fill_rule (cairo_t *cr);
 
-double
+CAIRO_EXPORT double CAIRO_CALL
 cairo_get_line_width (cairo_t *cr);
 
-cairo_line_cap_t
+CAIRO_EXPORT cairo_line_cap_t CAIRO_CALL
 cairo_get_line_cap (cairo_t *cr);
 
-cairo_line_join_t
+CAIRO_EXPORT cairo_line_join_t CAIRO_CALL
 cairo_get_line_join (cairo_t *cr);
 
-double
+CAIRO_EXPORT double CAIRO_CALL
 cairo_get_miter_limit (cairo_t *cr);
 
 /* XXX: How to do cairo_get_dash??? Do we want to switch to a cairo_dash object? */
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_get_matrix (cairo_t *cr, cairo_matrix_t *matrix);
 
-cairo_surface_t *
+CAIRO_EXPORT cairo_surface_t * CAIRO_CALL
 cairo_get_target (cairo_t *cr);
 
 typedef enum _cairo_path_data_type {
@@ -1075,25 +1093,25 @@
     int num_data;
 } cairo_path_t;
 
-cairo_path_t *
+CAIRO_EXPORT cairo_path_t * CAIRO_CALL
 cairo_copy_path (cairo_t *cr);
 
-cairo_path_t *
+CAIRO_EXPORT cairo_path_t * CAIRO_CALL
 cairo_copy_path_flat (cairo_t *cr);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_append_path (cairo_t	*cr,
 		   cairo_path_t *path);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_path_destroy (cairo_path_t *path);
 
 /* Error status queries */
 
-cairo_status_t
+CAIRO_EXPORT cairo_status_t CAIRO_CALL
 cairo_status (cairo_t *cr);
 
-const char *
+CAIRO_EXPORT const char * CAIRO_CALL
 cairo_status_to_string (cairo_status_t status);
 
 /* Surface manipulation */
@@ -1118,65 +1136,65 @@
     CAIRO_CONTENT_COLOR_ALPHA	= 0x3000
 } cairo_content_t;
 
-cairo_surface_t *
+CAIRO_EXPORT cairo_surface_t * CAIRO_CALL
 cairo_surface_create_similar (cairo_surface_t  *other,
 			      cairo_content_t	content,
 			      int		width,
 			      int		height);
 
-cairo_surface_t *
+CAIRO_EXPORT cairo_surface_t * CAIRO_CALL
 cairo_surface_reference (cairo_surface_t *surface);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_surface_destroy (cairo_surface_t *surface);
 
-cairo_status_t
+CAIRO_EXPORT cairo_status_t CAIRO_CALL
 cairo_surface_status (cairo_surface_t *surface);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_surface_finish (cairo_surface_t *surface);
 
 #if CAIRO_HAS_PNG_FUNCTIONS
 
-cairo_status_t
+CAIRO_EXPORT cairo_status_t CAIRO_CALL
 cairo_surface_write_to_png (cairo_surface_t	*surface,
 			    const char		*filename);
 
-cairo_status_t
+CAIRO_EXPORT cairo_status_t CAIRO_CALL
 cairo_surface_write_to_png_stream (cairo_surface_t	*surface,
 				   cairo_write_func_t	write_func,
 				   void			*closure);
 
 #endif
 
-void *
+CAIRO_EXPORT void * CAIRO_CALL
 cairo_surface_get_user_data (cairo_surface_t		 *surface,
 			     const cairo_user_data_key_t *key);
 
-cairo_status_t
+CAIRO_EXPORT cairo_status_t CAIRO_CALL
 cairo_surface_set_user_data (cairo_surface_t		 *surface,
 			     const cairo_user_data_key_t *key,
 			     void			 *user_data,
 			     cairo_destroy_func_t	 destroy);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_surface_get_font_options (cairo_surface_t      *surface,
 				cairo_font_options_t *options);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_surface_flush (cairo_surface_t *surface);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_surface_mark_dirty (cairo_surface_t *surface);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_surface_mark_dirty_rectangle (cairo_surface_t *surface,
 				    int              x,
 				    int              y,
 				    int              width,
 				    int              height);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_surface_set_device_offset (cairo_surface_t *surface,
 				 double           x_offset,
 				 double           y_offset);
@@ -1212,30 +1230,30 @@
     CAIRO_FORMAT_A1
 } cairo_format_t;
 
-cairo_surface_t *
+CAIRO_EXPORT cairo_surface_t * CAIRO_CALL
 cairo_image_surface_create (cairo_format_t	format,
 			    int			width,
 			    int			height);
 
-cairo_surface_t *
+CAIRO_EXPORT cairo_surface_t * CAIRO_CALL
 cairo_image_surface_create_for_data (unsigned char	       *data,
 				     cairo_format_t		format,
 				     int			width,
 				     int			height,
 				     int			stride);
 
-int
+CAIRO_EXPORT int CAIRO_CALL
 cairo_image_surface_get_width (cairo_surface_t *surface);
 
-int
+CAIRO_EXPORT int CAIRO_CALL
 cairo_image_surface_get_height (cairo_surface_t *surface);
 
 #if CAIRO_HAS_PNG_FUNCTIONS
 
-cairo_surface_t *
+CAIRO_EXPORT cairo_surface_t * CAIRO_CALL
 cairo_image_surface_create_from_png (const char	*filename);
 
-cairo_surface_t *
+CAIRO_EXPORT cairo_surface_t * CAIRO_CALL
 cairo_image_surface_create_from_png_stream (cairo_read_func_t	read_func,
 					    void		*closure);
 
@@ -1243,49 +1261,49 @@
 
 /* Pattern creation functions */
 
-cairo_pattern_t *
+CAIRO_EXPORT cairo_pattern_t * CAIRO_CALL
 cairo_pattern_create_rgb (double red, double green, double blue);
 
-cairo_pattern_t *
+CAIRO_EXPORT cairo_pattern_t * CAIRO_CALL
 cairo_pattern_create_rgba (double red, double green, double blue,
 			   double alpha);
 
-cairo_pattern_t *
+CAIRO_EXPORT cairo_pattern_t * CAIRO_CALL
 cairo_pattern_create_for_surface (cairo_surface_t *surface);
 
-cairo_pattern_t *
+CAIRO_EXPORT cairo_pattern_t * CAIRO_CALL
 cairo_pattern_create_linear (double x0, double y0,
 			     double x1, double y1);
 
-cairo_pattern_t *
+CAIRO_EXPORT cairo_pattern_t * CAIRO_CALL
 cairo_pattern_create_radial (double cx0, double cy0, double radius0,
 			     double cx1, double cy1, double radius1);
 
-cairo_pattern_t *
+CAIRO_EXPORT cairo_pattern_t * CAIRO_CALL
 cairo_pattern_reference (cairo_pattern_t *pattern);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_pattern_destroy (cairo_pattern_t *pattern);
   
-cairo_status_t
+CAIRO_EXPORT cairo_status_t CAIRO_CALL
 cairo_pattern_status (cairo_pattern_t *pattern);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_pattern_add_color_stop_rgb (cairo_pattern_t *pattern,
 				  double offset,
 				  double red, double green, double blue);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_pattern_add_color_stop_rgba (cairo_pattern_t *pattern,
 				   double offset,
 				   double red, double green, double blue,
 				   double alpha);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_pattern_set_matrix (cairo_pattern_t      *pattern,
 			  const cairo_matrix_t *matrix);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_pattern_get_matrix (cairo_pattern_t *pattern,
 			  cairo_matrix_t  *matrix);
 
@@ -1295,10 +1313,10 @@
     CAIRO_EXTEND_REFLECT
 } cairo_extend_t;
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_pattern_set_extend (cairo_pattern_t *pattern, cairo_extend_t extend);
 
-cairo_extend_t
+CAIRO_EXPORT cairo_extend_t CAIRO_CALL
 cairo_pattern_get_extend (cairo_pattern_t *pattern);
 
 typedef enum _cairo_filter {
@@ -1310,59 +1328,59 @@
     CAIRO_FILTER_GAUSSIAN
 } cairo_filter_t;
   
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_pattern_set_filter (cairo_pattern_t *pattern, cairo_filter_t filter);
 
-cairo_filter_t
+CAIRO_EXPORT cairo_filter_t CAIRO_CALL
 cairo_pattern_get_filter (cairo_pattern_t *pattern);
 
 /* Matrix functions */
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_matrix_init (cairo_matrix_t *matrix,
 		   double  xx, double  yx,
 		   double  xy, double  yy,
 		   double  x0, double  y0);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_matrix_init_identity (cairo_matrix_t *matrix);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_matrix_init_translate (cairo_matrix_t *matrix,
 			     double tx, double ty);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_matrix_init_scale (cairo_matrix_t *matrix,
 			 double sx, double sy);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_matrix_init_rotate (cairo_matrix_t *matrix,
 			  double radians);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_matrix_translate (cairo_matrix_t *matrix, double tx, double ty);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_matrix_scale (cairo_matrix_t *matrix, double sx, double sy);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_matrix_rotate (cairo_matrix_t *matrix, double radians);
 
-cairo_status_t
+CAIRO_EXPORT cairo_status_t CAIRO_CALL
 cairo_matrix_invert (cairo_matrix_t *matrix);
 
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_matrix_multiply (cairo_matrix_t	    *result,
 		       const cairo_matrix_t *a,
 		       const cairo_matrix_t *b);
 
 /* XXX: Need a new name here perhaps. */
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_matrix_transform_distance (const cairo_matrix_t *matrix,
 				 double *dx, double *dy);
 
 /* XXX: Need a new name here perhaps. */
-void
+CAIRO_EXPORT void CAIRO_CALL
 cairo_matrix_transform_point (const cairo_matrix_t *matrix,
 			      double *x, double *y);
 


More information about the cairo mailing list