[cairo-commit] pycairo/cairo cairomodule.c, 1.37, 1.38 pycairo-private.h, 1.28, 1.29 pycairo.h, 1.36, 1.37

Steve Chaplin commit at pdx.freedesktop.org
Sun May 29 21:27:03 PDT 2005


Committed by: stevech1097

Update of /cvs/cairo/pycairo/cairo
In directory gabe:/tmp/cvs-serv14773/cairo

Modified Files:
	cairomodule.c pycairo-private.h pycairo.h 
Log Message:
SC

Index: cairomodule.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/cairomodule.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- cairomodule.c	29 May 2005 11:11:48 -0000	1.37
+++ cairomodule.c	30 May 2005 04:27:01 -0000	1.38
@@ -213,6 +213,62 @@
 	return;
 
     /* constants */
+#if CAIRO_HAS_ATSUI_FONT
+    PyModule_AddIntConstant(m, "HAS_ATSUI_FONT", 1);
+#else
+    PyModule_AddIntConstant(m, "HAS_ATSUI_FONT", 0);
+#endif
+#if CAIRO_HAS_FT_FONT
+    PyModule_AddIntConstant(m, "HAS_FT_FONT", 1);
+#else
+    PyModule_AddIntConstant(m, "HAS_FT_FONT", 0);
+#endif
+#if CAIRO_HAS_GLITZ_SURFACE
+    PyModule_AddIntConstant(m, "HAS_GLITZ_SURFACE", 1);
+#else
+    PyModule_AddIntConstant(m, "HAS_GLITZ_SURFACE", 0);
+#endif
+#if CAIRO_HAS_PDF_SURFACE
+    PyModule_AddIntConstant(m, "HAS_PDF_SURFACE", 1);
+#else
+    PyModule_AddIntConstant(m, "HAS_PDF_SURFACE", 0);
+#endif
+#if CAIRO_HAS_PS_SURFACE
+    PyModule_AddIntConstant(m, "HAS_PS_SURFACE", 1);
+#else
+    PyModule_AddIntConstant(m, "HAS_PS_SURFACE", 0);
+#endif
+#if CAIRO_HAS_PNG_SURFACE
+    PyModule_AddIntConstant(m, "HAS_PNG_SURFACE", 1);
+#else
+    PyModule_AddIntConstant(m, "HAS_PNG_SURFACE", 0);
+#endif
+#if CAIRO_HAS_QUARTZ_SURFACE
+    PyModule_AddIntConstant(m, "HAS_QUARTZ_SURFACE", 1);
+#else
+    PyModule_AddIntConstant(m, "HAS_QUARTZ_SURFACE", 0);
+#endif
+#if CAIRO_HAS_WIN32_FONT
+    PyModule_AddIntConstant(m, "HAS_WIN32_FONT", 1);
+#else
+    PyModule_AddIntConstant(m, "HAS_WIN32_FONT", 0);
+#endif
+#if CAIRO_HAS_WIN32_SURFACE
+    PyModule_AddIntConstant(m, "HAS_WIN32_SURFACE", 1);
+#else
+    PyModule_AddIntConstant(m, "HAS_WIN32_SURFACE", 0);
+#endif
+#if CAIRO_HAS_XCB_SURFACE
+    PyModule_AddIntConstant(m, "HAS_XCB_SURFACE", 1);
+#else
+    PyModule_AddIntConstant(m, "HAS_XCB_SURFACE", 0);
+#endif
+#if CAIRO_HAS_XLIB_SURFACE
+    PyModule_AddIntConstant(m, "HAS_XLIB_SURFACE", 1);
+#else
+    PyModule_AddIntConstant(m, "HAS_XLIB_SURFACE", 0);
+#endif
+
 #define CONSTANT(x) PyModule_AddIntConstant(m, #x, CAIRO_##x)
     CONSTANT(FORMAT_ARGB32);
     CONSTANT(FORMAT_RGB24);

Index: pycairo-private.h
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-private.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- pycairo-private.h	29 May 2005 11:11:48 -0000	1.28
+++ pycairo-private.h	30 May 2005 04:27:01 -0000	1.29
@@ -44,35 +44,48 @@
 extern PyObject *CairoError;
 
 extern PyTypeObject PycairoContext_Type;
-extern PyTypeObject PycairoFontFace_Type;
-extern PyTypeObject PycairoMatrix_Type;
-extern PyTypeObject PycairoPath_Type;
-extern PyTypeObject PycairoPattern_Type;
-extern PyTypeObject PycairoScaledFont_Type;
-
-extern PyTypeObject PycairoSurface_Type;
-extern PyTypeObject PycairoImageSurface_Type;
-extern PyTypeObject PycairoPDFSurface_Type;
-extern PyTypeObject PycairoPSSurface_Type;
-extern PyTypeObject PycairoWin32Surface_Type;
-
 PyObject *PycairoContext_FromContext (cairo_t *ctx, PyObject *base);
+
+extern PyTypeObject PycairoFontFace_Type;
 PyObject *PycairoFontFace_FromFontFace (cairo_font_face_t *font_face);
+
+extern PyTypeObject PycairoMatrix_Type;
 PyObject *PycairoMatrix_FromMatrix (const cairo_matrix_t *matrix);
+
+extern PyTypeObject PycairoPath_Type;
 PyObject *PycairoPath_FromPath (cairo_path_t *path);
+
+extern PyTypeObject PycairoPattern_Type;
 PyObject *PycairoPattern_FromPattern (cairo_pattern_t *pattern);
+
+extern PyTypeObject PycairoScaledFont_Type;
 PyObject *PycairoScaledFont_FromScaledFont (cairo_scaled_font_t *scaled_font);
 
+extern PyTypeObject PycairoSurface_Type;
 PyObject *PycairoSurface_FromSurface (cairo_surface_t *surface, 
 				      PyObject *base);
+
+extern PyTypeObject PycairoImageSurface_Type;
 PyObject *PycairoImageSurface_FromImageSurface (cairo_surface_t *surface, 
 						PyObject *base);
+
+#if CAIRO_HAS_PDF_SURFACE
+extern PyTypeObject PycairoPDFSurface_Type;
 PyObject *PycairoPDFSurface_FromPDFSurface (cairo_surface_t *surface, 
 					    PyObject *base);
+#endif
+
+#if CAIRO_HAS_PS_SURFACE
+extern PyTypeObject PycairoPSSurface_Type;
 PyObject *PycairoPSSurface_FromPSSurface (cairo_surface_t *surface, 
 					  PyObject *base);
+#endif
+
+#if CAIRO_HAS_WIN32_SURFACE
+extern PyTypeObject PycairoWin32Surface_Type;
 PyObject *PycairoWin32Surface_FromWin32Surface (cairo_surface_t *surface, 
 						PyObject *base);
+#endif
 
 int Pycairo_Check_Status (cairo_status_t status);
 

Index: pycairo.h
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- pycairo.h	29 May 2005 11:11:48 -0000	1.36
+++ pycairo.h	30 May 2005 04:27:01 -0000	1.37
@@ -136,14 +136,23 @@
 #define PycairoImageSurface_Type    *(Pycairo_CAPI->ImageSurface_Type)
 #define PycairoImageSurface_FromImageSurface \
         (Pycairo_CAPI->ImageSurface_FromImageSurface)
+
+#if CAIRO_HAS_PDF_SURFACE
 #define PycairoPDFSurface_Type      *(Pycairo_CAPI->PDFSurface_Type)
 #define PycairoPDFSurface_FromPDFSurface \
         (Pycairo_CAPI->PDFSurface_FromPDFSurface)
+#endif
+
+#if CAIRO_HAS_PS_SURFACE
 #define PycairoPSSurface_Type       *(Pycairo_CAPI->PSSurface_Type)
 #define PycairoPSSurface_FromPSSurface (Pycairo_CAPI->PSSurface_FromPSSurface)
+#endif
+
+#if CAIRO_HAS_WIN32_SURFACE
 #define PycairoWin32Surface_Type    *(Pycairo_CAPI->Win32Surface_Type)
 #define PycairoWin32Surface_FromPSSurface \
         (Pycairo_CAPI->Win32Surface_FromWin32Surface)
+#endif
 
 #define Pycairo_Check_Status         (Pycairo_CAPI->Check_Status)
 




More information about the cairo-commit mailing list