head 1.14; access; symbols rel-1-060:1.13 rel-1-053:1.13 rel-1-052:1.13 rel-1-045:1.12 rel-1-051:1.13 rel-1-044:1.12 stable-1-04:1.12.0.2 stable-1-02:1.10.0.4 rel-1-050:1.13 rel-1-043:1.12 rel-1-042:1.12 rel-1-041:1.12 rel-1-040:1.12 rel-1-023:1.10 rel-1-031:1.11 rel-1-022:1.10 rel-1-030:1.11 rel-1-021:1.10 stable-1-0:1.10.0.2 rel-1-02:1.10 rel-1-01:1.10 rel-1-00:1.10 rel-0-92:1.10 rel-0-91:1.10 rel-0-90:1.10 rel-0-04:1.9 rel-0-03:1.8 rel-0-02:1.6 rel-0-01:1.6; locks; strict; comment @ * @; 1.14 date 2008.10.05.19.59.41; author tsch; state Exp; branches; next 1.13; commitid jap73dqgVgT1Atlt; 1.13 date 2007.10.24.16.32.05; author tsch; state Exp; branches; next 1.12; commitid n4jyLFAXsD0mARCs; 1.12 date 2007.05.06.11.28.37; author tsch; state Exp; branches; next 1.11; 1.11 date 2006.12.28.18.53.09; author tsch; state Exp; branches; next 1.10; 1.10 date 2006.07.15.14.41.11; author tsch; state Exp; branches; next 1.9; 1.9 date 2006.05.07.14.17.39; author tsch; state Exp; branches; next 1.8; 1.8 date 2006.01.29.19.27.21; author tsch; state Exp; branches; next 1.7; commitid c9b43dd17164567; 1.7 date 2006.01.08.17.06.29; author tsch; state Exp; branches; next 1.6; commitid 64a343c146924567; 1.6 date 2005.07.12.20.29.47; author tsch; state Exp; branches; next 1.5; commitid 758542d428324567; 1.5 date 2005.02.06.16.21.26; author rwmcfa1; state Exp; branches; next 1.4; 1.4 date 2005.01.20.16.35.08; author cworth; state Exp; branches; next 1.3; 1.3 date 2004.11.11.02.20.32; author rwmcfa1; state Exp; branches; next 1.2; 1.2 date 2004.11.09.02.59.44; author rwmcfa1; state Exp; branches; next 1.1; 1.1 date 2004.11.05.01.34.04; author rwmcfa1; state Exp; branches; next ; desc @@ 1.14 log @In preparation of the move to SVN, use the Id keyword in place of Header. @ text @/* * Copyright (c) 2004-2005 by the cairo perl team (see the file README) * * Licensed under the LGPL, see LICENSE file for more information. * * $Id: /cvs/cairo/cairo-perl/cairo-perl.h,v 1.13 2007-10-24 16:32:05 tsch Exp $ * */ #ifndef _CAIRO_PERL_H_ #define _CAIRO_PERL_H_ #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include #ifdef CAIRO_HAS_PNG_SURFACE # include #endif #ifdef CAIRO_HAS_PS_SURFACE # include #endif #ifdef CAIRO_HAS_PDF_SURFACE # include #endif #ifdef CAIRO_HAS_SVG_SURFACE # include #endif #if CAIRO_HAS_FT_FONT # include #endif #include /* * standard object and struct handling */ void *cairo_object_from_sv (SV *sv, const char *package); SV *cairo_object_to_sv (void *object, const char *package); void *cairo_struct_from_sv (SV *sv, const char *package); SV *cairo_struct_to_sv (void *object, const char *package); /* * custom struct handling */ SV * newSVCairoFontExtents (cairo_font_extents_t *extents); SV * newSVCairoTextExtents (cairo_text_extents_t *extents); SV * newSVCairoGlyph (cairo_glyph_t *glyph); cairo_glyph_t * SvCairoGlyph (SV *sv); SV * newSVCairoPath (cairo_path_t *path); cairo_path_t * SvCairoPath (SV *sv); #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0) SV * newSVCairoRectangle (cairo_rectangle_t *rectangle); #endif /* * special treatment for surfaces */ SV * cairo_surface_to_sv (cairo_surface_t *surface); #undef newSVCairoSurface #undef newSVCairoSurface_noinc #define newSVCairoSurface(object) (cairo_surface_to_sv (cairo_surface_reference (object))) #define newSVCairoSurface_noinc(object) (cairo_surface_to_sv (object)) /* * special treatment for patterns */ SV * cairo_pattern_to_sv (cairo_pattern_t *surface); #undef newSVCairoPattern #undef newSVCairoPattern_noinc #define newSVCairoPattern(object) (cairo_pattern_to_sv (cairo_pattern_reference (object))) #define newSVCairoPattern_noinc(object) (cairo_pattern_to_sv (object)) #endif /* _CAIRO_PERL_H_ */ @ 1.13 log @ * Cairo.pm * Cairo.xs * CairoFt.xs * Makefile.PL * cairo-perl.h * cairo-perl.typemap * examples/freetype-font.pl * t/CairoFt.t: Add support for part of cairo's FreeType integration API. Currently, that's just Cairo::FtFontFace::create, which lets you create a cairo font face from a FreeType font face. @ text @d6 1 a6 1 * $Header: /cvs/cairo/cairo-perl/cairo-perl.h,v 1.12 2007-05-06 11:28:37 tsch Exp $ @ 1.12 log @ * Cairo.xs * CairoPattern.xs * Makefile.PL * cairo-perl.h * t/Cairo.t * t/CairoPattern.t: Use 1.4.0 in version checks. * Cairo.xs: If CAIRO_PERL_DEBUG is true, call cairo_debug_reset_static_data at exit. @ text @d6 1 a6 1 * $Header: /cvs/cairo/cairo-perl/cairo-perl.h,v 1.11 2006/12/28 18:53:09 tsch Exp $ d35 4 @ 1.11 log @ * Cairo.xs, cairo-perl.h, t/Cairo.t: Wrap and test cairo_copy_clip_rectangles and cairo_clip_extents. @ text @d6 1 a6 1 * $Header: /cvs/cairo/cairo-perl/cairo-perl.h,v 1.10 2006/07/15 14:41:11 tsch Exp $ d59 1 a59 1 #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 3, 0) /* FIXME: 1.4 */ @ 1.10 log @ * Cairo.pm, Cairo.xs, CairoPattern.xs, CairoSurface.xs, cairo-perl-private.h: Add cairo_perl_set_isa and use it for surfaces and patterns. * CairoSurface.xs, Makefile.PL, cairo-perl.h, t/CairoSurface.t: Add support for svg surfaces if available. * t/CairoSurface.t: Remove TODO block and revert workaround related to the weird unknown surface types. It's been fixed upstream: https://bugs.freedesktop.org/show_bug.cgi?id=7322 @ text @d6 1 a6 1 * $Header: /cvs/cairo/cairo-perl/cairo-perl.h,v 1.9 2006/05/07 14:17:39 tsch Exp $ d49 1 a49 1 SV * newSVCairoFontExtents (cairo_font_extents_t * extents); d51 1 a51 1 SV * newSVCairoTextExtents (cairo_text_extents_t * extents); d53 2 a54 2 SV * newSVCairoGlyph (cairo_glyph_t * glyph); cairo_glyph_t * SvCairoGlyph (SV * sv); d56 8 a63 2 SV * newSVCairoPath (cairo_path_t * path); cairo_path_t * SvCairoPath (SV * sv); @ 1.9 log @ * .cvsignore, MANIFEST.SKIP: Update. * Cairo.pm: Update copyright notice. * MANIFEST, cairo-perl-private.h: Add a private header file for non-public declarations that are used in more than one place. * MakeHelper.pm: Improve the enum converters to produce more useful error messages. * Makefile.PL: Incorporate a slightly modified patch from Christopher Oezbek to prompt the user if he wants to install EU::Depends and EU::PkgConfig if they can't be found. Require cairo >= 1.1.6. Update and rearrange enums. * cairo-perl.h, Cairo.xs: Move CAIRO_PERL_CALL_BOOT to Cairo.xs. * cairo-perl.h, CairoSurface.xs, CairoPattern.xs, Makefile.PL: Use cairo_surface_get_type and cairo_pattern_get_type to redo the sub-type handling for surfaces and patterns. * cairo-perl-private.h, Cairo.xs, CairoMatrix.xs, CairoPattern.xs: Add pcairo_copy_matrix and use it all over the place to make matrix handling more robust. * Cairo.xs, t/Cairo.t: Wrap cairo_version, cairo_version_string, cairo_push_group, cairo_push_group_with_content, cairo_pop_group, cairo_pop_group_to_source, cairo_new_sub_path, cairo_set_scaled_font, and cairo_get_group_target. * CairoFont.xs, t/CairoFont.t: Wrap cairo_font_face_get_type, cairo_scaled_font_get_type, cairo_scaled_font_text_extents, cairo_scaled_font_get_font_face, cairo_scaled_font_get_font_matrix, cairo_scaled_font_get_ctm, and cairo_scaled_font_get_font_options. * CairoPattern.xs, t/CairoPattern.t: Wrap cairo_pattern_get_type. * CairoSurface.xs, t/CairoSurface.t: Wrap cairo_surface_get_device_offset, cairo_surface_get_type, cairo_pdf_surface_set_size, cairo_ps_surface_set_dpi, cairo_ps_surface_set_size, cairo_ps_surface_dsc_comment, cairo_ps_surface_dsc_begin_setup, and cairo_ps_surface_dsc_begin_setup. @ text @d6 1 a6 1 * $Header: /cvs/cairo/cairo-perl/cairo-perl.h,v 1.8 2006/01/29 19:27:21 tsch Exp $ d31 4 @ 1.8 log @ * Cairo.pm, CairoPattern.xs, Makefile.PL, cairo-perl.h, t/CairoPattern.t: Add Cairo::SolidPattern::create_rgb and create_rgba. @ text @d6 1 a6 1 * $Header: /cvs/cairo/cairo-perl/cairo-perl.h,v 1.7 2006/01/08 17:06:29 tsch Exp $ d31 2 d56 1 a56 1 * support for custom surface types d58 5 a62 15 typedef cairo_surface_t cairo_image_surface_t; #define cairo_image_surface_reference cairo_surface_reference #define cairo_image_surface_destroy cairo_surface_destroy #ifdef CAIRO_HAS_PDF_SURFACE typedef cairo_surface_t cairo_pdf_surface_t; # define cairo_pdf_surface_reference cairo_surface_reference # define cairo_pdf_surface_destroy cairo_surface_destroy #endif #ifdef CAIRO_HAS_PS_SURFACE typedef cairo_surface_t cairo_ps_surface_t; # define cairo_ps_surface_reference cairo_surface_reference # define cairo_ps_surface_destroy cairo_surface_destroy #endif d65 1 a65 1 * support for custom pattern types d67 5 a71 39 typedef cairo_pattern_t cairo_solid_pattern_t; #define cairo_solid_pattern_reference cairo_pattern_reference #define cairo_solid_pattern_destroy cairo_pattern_destroy typedef cairo_pattern_t cairo_surface_pattern_t; #define cairo_surface_pattern_reference cairo_pattern_reference #define cairo_surface_pattern_destroy cairo_pattern_destroy typedef cairo_pattern_t cairo_gradient_t; #define cairo_gradient_reference cairo_pattern_reference #define cairo_gradient_destroy cairo_pattern_destroy typedef cairo_pattern_t cairo_linear_gradient_t; #define cairo_linear_gradient_reference cairo_pattern_reference #define cairo_linear_gradient_destroy cairo_pattern_destroy typedef cairo_pattern_t cairo_radial_gradient_t; #define cairo_radial_gradient_reference cairo_pattern_reference #define cairo_radial_gradient_destroy cairo_pattern_destroy #include /* call the boot code of a module by symbol rather than by name. * * in a perl extension which uses several xs files but only one pm, you * need to bootstrap the other xs files in order to get their functions * exported to perl. if the file has MODULE = Foo::Bar, the boot symbol * would be boot_Foo__Bar. * * copied/borrowed from gtk2-perl. */ void _cairo_perl_call_XS (pTHX_ void (*subaddr) (pTHX_ CV *), CV * cv, SV ** mark); #define CAIRO_PERL_CALL_BOOT(name) \ { \ extern XS(name); \ _cairo_perl_call_XS (aTHX_ name, cv, mark); \ } #define CAIRO_PERL_UNUSED(var) if (0) { (var) = (var); } @ 1.7 log @ * Cairo.pm: Make DynaLoader export all our symbols. * Cairo.xs, MakeHelper.pm, Makefile.PL, cairo-perl.h: Revamp the type conversion API. Instead of implementing everything in the typemap, we now have macros like newSVCairoPattern SvCairoPattern. These get exported, so other modules can make use of them. * cairo-perl.h: Remove the DBG macro. * cairo-perl.typemap: Use T_UV instead of T_IV for cairo_bool_t. @ text @d6 1 a6 1 * $Header: /cvs/cairo/cairo-perl/cairo-perl.h,v 1.6 2005/07/12 20:29:47 tsch Exp $ d59 1 d65 1 d75 4 d82 1 d86 1 d90 1 @ 1.6 log @ * Cairo.pm, Cairo.xs, t/Cairo.t: Replace the %backends hash with Cairo::HAS_PS_SURFACE, HAS_PDF_SURFACE, HAS_XLIB_SURFACE, HAS_FT_FONT and HAS_PNG_FUNCTIONS. * Cairo.pm, CairoPattern.xs, CairoSurface.xs, Makefile.PL: Implement the pattern and surface hierarchy suggested by the language bindings guidelines. * Cairo.xs: Use Cairo::Context for the namespace of cairo_t, instead of just Cairo, as suggested by the guidelines. * Cairo.xs, CairoFont.xs, CairoMatrix.xs, CairoPattern.xs, CairoSurface.xs, cairo-perl.h: Add new, remove old API. Shuffle some things around. * Cairo.xs: Convert font and text extents and glyphs to and from native Perl data structures. * Cairo.xs, cairo-perl.h, cairo-perl.typemap: Remove everything that cannot be used from Perl, like the XLib and Glitz stuff. * CairoPath.xs, t/CairoPath.t: Add support for cairo_path_t, including a nice tied interface that lets you iterate over paths as if they were normal array references. * MakeHelper.pm: Extend the typemap generator to support "const" and "_noinc" types. Change the enum handling to use the Glib convention, i.e. lowercase and hyphen instead of underscore. * Makefile.PL, README: Use ExtUtils::Depends. * examples/simple.pl, examples/png/caps_join.pl, examples/png/hering.pl, examples/png/outline.pl, examples/png/spiral.pl, examples/png/splines_tolerance.pl, examples/png/stars.pl: Update the examples to make them work again after all those API changes. * t/Cairo.t, t/CairoFont.t, CairoMatrix.t, CairoPattern.t, CairoSurface.t: Redo and/or expand the whole test suite. @ text @d6 1 a6 1 * $Header: /cvs/cairo/cairo-perl/cairo-perl.h,v 1.5 2005/02/06 16:21:26 rwmcfa1 Exp $ d31 8 a38 1 #include d88 1 a88 3 /* XXX: copied/borrowed from gtk2-perl * * call the boot code of a module by symbol rather than by name. d94 2 a105 6 #ifdef CAIRO_DEBUG # define DBG(format, args...) fprintf (stderr, format , ## args) #else # define DBG #endif @ 1.5 log @ * CairoSurface.xs: fixed a bug in wrapping of cairo_surface_xlib_create where the return value wasn't being caught in RETVAL. thank you -Wall -W * cairo-perl.h: wrapped new includes (prev log msg) in #ifdef HAS's so that we can build on systems where no all backends are supported. XS code already supports this. @ text @d2 1 a2 1 * Copyright (c) 2004 by the cairo perl team (see the file README) d6 1 a6 1 * $Header: /cvs/cairo/cairo-perl/cairo-perl.h,v 1.4 2005/01/20 16:35:08 cworth Exp $ a18 4 #ifdef CAIRO_HAS_GLITZ_SURFACE # include #endif d27 34 a60 2 #ifdef CAIRO_HAS_XLIB_SURFACE # include d63 17 a79 1 #define CAIRO_PERL_UNUSED(var) if (0) { (var) = (var); } a80 2 /* XXX: copied/borrowed from gtk2-perl */ void _cairo_perl_call_XS (pTHX_ void (*subaddr) (pTHX_ CV *), CV * cv, SV ** mark); d90 1 a90 1 d97 1 a97 2 #include d105 1 a105 18 /* XXX: both of these need extensive testing */ #define DOUBLES_DECLARE \ int i, n; double * pts; #define DOUBLES_SLURP_FROM_STACK(first) \ n = (items - first); \ pts = (double*)malloc (sizeof (double) * n); \ if (!pts) \ croak ("malloc failure for (%d) elements", n); \ for (i = first ; i < items ; i++) { \ pts[i-first] = SvIV (ST (i)); \ } #define DOUBLES_LEN n #define DOUBLES_ARRAY pts #define DOUBLES_CLEANUP \ free (pts); #endif /* _CAIRO_PERL_G_ */ @ 1.4 log @ * cairo-perl.h: Track split-up of cairo.h. @ text @d6 1 a6 1 * $Header: /mirrors/freedesktop/cairo/cairo-perl/cairo-perl.h,v 1.3 2004/11/11 02:20:32 rwmcfa1 Exp $ d18 16 a33 4 #include #include #include #include @ 1.3 log @ * TODO: initial import * Cairo.pm, Cairo.xs: added %backends facility * Cario.xs, CairoSurface.xs: stuff moved out of Cairo.xs that belonged here * Cairo.xs: fixed some OUTLIST stuff (IN_OUTLIST.) cairo_current_matrix fixed. * CairoPattern.xs: added class param to create_for_surface * Makefile.PL: seperated structs out of objects. add refs to object typemaps OUTPUT sections. don't return full strings for OUTPUT enum types. * cairo-perl.h: don't need stdio.h * t/Cairo.t: test most all of cairo type. 90% done. @ text @d6 1 a6 1 * $Header: /cvs/cairo/cairo-perl/cairo-perl.h,v 1.2 2004/11/09 02:59:44 rwmcfa1 Exp $ d18 4 @ 1.2 log @ * Cairo.xs, CairoMatrix.xs, CairoPattern.xs, CairoSurface.xs: all of the create functions have been cleaned up/fixed. debug prints removed. create's alised to new's where appropriate. * MANIFEST, MANIFEST.SKIP: ChangeLog added. build and CVS skipped * Makefile.PL, cairo-perl.h, Cairo.xs: new (write_)boot code added, in progress. use build dir for most of autogen'd stuff. fixed bug in enums creation (= -> ==) @ text @d6 1 a6 1 * $Header: /cvs/cairo/cairo-perl/cairo-perl.h,v 1.1 2004/11/05 01:34:04 rwmcfa1 Exp $ a16 1 #include @ 1.1 log @initial import @ text @d6 1 a6 1 * $Header:$ d20 20 d42 1 @