Standalone Pango, take two



Aloha,

here's take two for a standalone Pango module. The Pango module itself works fine already, I think. I imported it into GNOME SVN:

  svn co svn://svn.gnome.org/svn/perl-Pango/trunk perl-Pango

It will need Glib trunk:

  svn co svn://svn.gnome.org/svn/perl-Glib/trunk perl-Glib

Please test it.

The next step is to make Gtk2 use it. The attached patch does this. (The real patch would also remove Gtk2/xs/Pango*.xs and Gtk2/xs_files_pango*, but that would just needlessly blow up the patch.) Please test this too:

  svn co svn://svn.gnome.org/svn/perl-Gtk2/trunk perl-Gtk2
  cd perl-Gtk2
  patch -p0 < ~/standalone-pango-v3.patch

There are a few remaining I see:

â Performance: 'use Gtk2' got 3% slower on my machine. (That is, 'use Gtk2' now takes 1.03 times the time it takes without the patch.) Should we worry about that?

â The yellow-wiring foreach loop in Gtk2.pm worries me a bit:

  foreach my $key (keys %Pango::) {
    *{"Gtk2::Pango::" . $key} = *{"Pango::" . $key};
  }

It automatically maps everything from Pango::* to Gtk2::Pango::*. This includes some stuff that probably shouldn't be there, like BEGIN or bootstrap or dl_load_flags or EXPORT*. See the complete list:

  perl -MPango -le'map { print } keys %Pango::' | sort

More importantly even, the loop will also automatically map over any new API we add to Pango, thus indirectly changing Gtk2's API. Is it better to hardcode the stuff that should be mapped over?

â The yellow-wiring foreach loop somehow makes these two evaluate to true:

  Pango::Layout->isa (Gtk2::Pango::Layout::)
  Gtk2::Pango::Layout->isa (Pango::Layout::)

I don't understand why or how it does that. Is that a mechanism we can rely on? It is important that the two expressions are true for backwards compatibility. (I tested it with perl 5.8.8, 5.10.0, and blead -- it seems to work fine in every case.)

â The old POD and man pages Gtk2::Pango::* are basically gone. The attached patch adds some POD to xs/Gtk2.xs that makes the code generator create stub pages under Gtk2::Pango::* that explain the situation and link to the relevant Pango::* page. Is that good enough?

-Torsten
=== gtk2perl.h
==================================================================
--- gtk2perl.h  (/gtk2-perl/perl-Gtk2/trunk)    (revision 3257)
+++ gtk2perl.h  (/gtk2-perl/perl-Gtk2/branches/standalone-pango)        (revision 3257)
@@ -25,6 +25,7 @@
 #define _GTK2PERL_H_
 
 #include <gperl.h>
+#include <pango-perl.h>
 #include <gtk/gtk.h>
 
 #include "gtk2perl-versions.h"
=== maps_pango-1.0
==================================================================
--- maps_pango-1.0      (/gtk2-perl/perl-Gtk2/trunk)    (revision 3257)
+++ maps_pango-1.0      (/gtk2-perl/perl-Gtk2/branches/standalone-pango)        (revision 3257)
@@ -22,36 +22,36 @@
 # this file defines mappings only for types that existed in pango 1.0.x
 #
 
-PANGO_TYPE_ALIGNMENT   PangoAlignment  GEnum   Gtk2::Pango::Alignment
-PANGO_TYPE_ATTR_LIST   PangoAttrList   GBoxed  Gtk2::Pango::AttrList
-PANGO_TYPE_ATTR_TYPE   PangoAttrType   GEnum   Gtk2::Pango::AttrType
-PANGO_TYPE_COLOR       PangoColor      GBoxed  Gtk2::Pango::Color
-PANGO_TYPE_CONTEXT     PangoContext    GObject Gtk2::Pango::Context
-PANGO_TYPE_COVERAGE_LEVEL      PangoCoverageLevel      GEnum   Gtk2::Pango::CoverageLevel
-PANGO_TYPE_DIRECTION   PangoDirection  GEnum   Gtk2::Pango::Direction
-PANGO_TYPE_FONT_DESCRIPTION    PangoFontDescription    GBoxed  Gtk2::Pango::FontDescription
-PANGO_TYPE_FONT_FACE   PangoFontFace   GObject Gtk2::Pango::FontFace
-PANGO_TYPE_FONT_FAMILY PangoFontFamily GObject Gtk2::Pango::FontFamily
-PANGO_TYPE_FONT_MAP    PangoFontMap    GObject Gtk2::Pango::FontMap
-PANGO_TYPE_FONT_MASK   PangoFontMask   GFlags  Gtk2::Pango::FontMask
-PANGO_TYPE_FONT_METRICS        PangoFontMetrics        GBoxed  Gtk2::Pango::FontMetrics
-PANGO_TYPE_FONT        PangoFont       GObject Gtk2::Pango::Font
-PANGO_TYPE_FONTSET     PangoFontset    GObject Gtk2::Pango::Fontset
-PANGO_TYPE_GLYPH_STRING        PangoGlyphString        GBoxed  Gtk2::Pango::GlyphString
-PANGO_TYPE_LANGUAGE    PangoLanguage   GBoxed  Gtk2::Pango::Language
-PANGO_TYPE_LAYOUT      PangoLayout     GObject Gtk2::Pango::Layout
-PANGO_TYPE_SCRIPT      PangoScript     GEnum   Gtk2::Pango::Script
-PANGO_TYPE_STRETCH     PangoStretch    GEnum   Gtk2::Pango::Stretch
-PANGO_TYPE_STYLE       PangoStyle      GEnum   Gtk2::Pango::Style
-PANGO_TYPE_TAB_ALIGN   PangoTabAlign   GEnum   Gtk2::Pango::TabAlign
-PANGO_TYPE_TAB_ARRAY   PangoTabArray   GBoxed  Gtk2::Pango::TabArray
-PANGO_TYPE_UNDERLINE   PangoUnderline  GEnum   Gtk2::Pango::Underline
-PANGO_TYPE_VARIANT     PangoVariant    GEnum   Gtk2::Pango::Variant
-PANGO_TYPE_WEIGHT      PangoWeight     GEnum   Gtk2::Pango::Weight
-PANGO_TYPE_WRAP_MODE   PangoWrapMode   GEnum   Gtk2::Pango::WrapMode
+PANGO_TYPE_ALIGNMENT   PangoAlignment  GEnumAlias      Gtk2::Pango::Alignment
+PANGO_TYPE_ATTR_LIST   PangoAttrList   GBoxedAlias     Gtk2::Pango::AttrList
+PANGO_TYPE_ATTR_TYPE   PangoAttrType   GEnumAlias      Gtk2::Pango::AttrType
+PANGO_TYPE_COLOR       PangoColor      GBoxedAlias     Gtk2::Pango::Color
+PANGO_TYPE_CONTEXT     PangoContext    GObjectAlias    Gtk2::Pango::Context
+PANGO_TYPE_COVERAGE_LEVEL      PangoCoverageLevel      GEnumAlias      Gtk2::Pango::CoverageLevel
+PANGO_TYPE_DIRECTION   PangoDirection  GEnumAlias      Gtk2::Pango::Direction
+PANGO_TYPE_FONT_DESCRIPTION    PangoFontDescription    GBoxedAlias     Gtk2::Pango::FontDescription
+PANGO_TYPE_FONT_FACE   PangoFontFace   GObjectAlias    Gtk2::Pango::FontFace
+PANGO_TYPE_FONT_FAMILY PangoFontFamily GObjectAlias    Gtk2::Pango::FontFamily
+PANGO_TYPE_FONT_MAP    PangoFontMap    GObjectAlias    Gtk2::Pango::FontMap
+PANGO_TYPE_FONT_MASK   PangoFontMask   GFlagsAlias     Gtk2::Pango::FontMask
+PANGO_TYPE_FONT_METRICS        PangoFontMetrics        GBoxedAlias     Gtk2::Pango::FontMetrics
+PANGO_TYPE_FONT        PangoFont       GObjectAlias    Gtk2::Pango::Font
+PANGO_TYPE_FONTSET     PangoFontset    GObjectAlias    Gtk2::Pango::Fontset
+PANGO_TYPE_GLYPH_STRING        PangoGlyphString        GBoxedAlias     Gtk2::Pango::GlyphString
+PANGO_TYPE_LANGUAGE    PangoLanguage   GBoxedAlias     Gtk2::Pango::Language
+PANGO_TYPE_LAYOUT      PangoLayout     GObjectAlias    Gtk2::Pango::Layout
+PANGO_TYPE_SCRIPT      PangoScript     GEnumAlias      Gtk2::Pango::Script
+PANGO_TYPE_STRETCH     PangoStretch    GEnumAlias      Gtk2::Pango::Stretch
+PANGO_TYPE_STYLE       PangoStyle      GEnumAlias      Gtk2::Pango::Style
+PANGO_TYPE_TAB_ALIGN   PangoTabAlign   GEnumAlias      Gtk2::Pango::TabAlign
+PANGO_TYPE_TAB_ARRAY   PangoTabArray   GBoxedAlias     Gtk2::Pango::TabArray
+PANGO_TYPE_UNDERLINE   PangoUnderline  GEnumAlias      Gtk2::Pango::Underline
+PANGO_TYPE_VARIANT     PangoVariant    GEnumAlias      Gtk2::Pango::Variant
+PANGO_TYPE_WEIGHT      PangoWeight     GEnumAlias      Gtk2::Pango::Weight
+PANGO_TYPE_WRAP_MODE   PangoWrapMode   GEnumAlias      Gtk2::Pango::WrapMode
 
 # custom types
-PANGO_TYPE_ATTRIBUTE           PangoAttribute          GBoxed  Gtk2::Pango::Attribute
-PANGO_TYPE_ATTR_ITERATOR       PangoAttrIterator       GBoxed  Gtk2::Pango::AttrIterator
-PANGO_TYPE_LAYOUT_ITER         PangoLayoutIter         GBoxed  Gtk2::Pango::LayoutIter
-PANGO_TYPE_LAYOUT_LINE         PangoLayoutLine         GBoxed  Gtk2::Pango::LayoutLine
+PANGO_TYPE_ATTRIBUTE           PangoAttribute          GBoxedAlias     Gtk2::Pango::Attribute
+PANGO_TYPE_ATTR_ITERATOR       PangoAttrIterator       GBoxedAlias     Gtk2::Pango::AttrIterator
+PANGO_TYPE_LAYOUT_ITER         PangoLayoutIter         GBoxedAlias     Gtk2::Pango::LayoutIter
+PANGO_TYPE_LAYOUT_LINE         PangoLayoutLine         GBoxedAlias     Gtk2::Pango::LayoutLine
=== maps_pango-1.4
==================================================================
--- maps_pango-1.4      (/gtk2-perl/perl-Gtk2/trunk)    (revision 3257)
+++ maps_pango-1.4      (/gtk2-perl/perl-Gtk2/branches/standalone-pango)        (revision 3257)
@@ -22,4 +22,4 @@
 # this file defines mappings only for types that existed in pango 1.4.x
 #
 
-PANGO_TYPE_SCRIPT_ITER PangoScriptIter GBoxed  Gtk2::Pango::ScriptIter
+PANGO_TYPE_SCRIPT_ITER PangoScriptIter GBoxedAlias     Gtk2::Pango::ScriptIter
=== maps_pango-1.6
==================================================================
--- maps_pango-1.6      (/gtk2-perl/perl-Gtk2/trunk)    (revision 3257)
+++ maps_pango-1.6      (/gtk2-perl/perl-Gtk2/branches/standalone-pango)        (revision 3257)
@@ -22,5 +22,5 @@
 # this file defines mappings only for types that existed in pango 1.6.x
 #
 
-PANGO_TYPE_MATRIX      PangoMatrix     GBoxed  Gtk2::Pango::Matrix
-PANGO_TYPE_ELLIPSIZE_MODE      PangoEllipsizeMode      GEnum   Gtk2::Pango::EllipsizeMode
+PANGO_TYPE_MATRIX      PangoMatrix     GBoxedAlias     Gtk2::Pango::Matrix
+PANGO_TYPE_ELLIPSIZE_MODE      PangoEllipsizeMode      GEnumAlias      Gtk2::Pango::EllipsizeMode
=== maps_pango-1.8
==================================================================
--- maps_pango-1.8      (/gtk2-perl/perl-Gtk2/trunk)    (revision 3257)
+++ maps_pango-1.8      (/gtk2-perl/perl-Gtk2/branches/standalone-pango)        (revision 3257)
@@ -2,6 +2,6 @@
 # this file defines mappings only for types that existed in pango 1.8.x
 #
 
-PANGO_TYPE_RENDERER            PangoRenderer           GObject         Gtk2::Pango::Renderer
+PANGO_TYPE_RENDERER            PangoRenderer           GObjectAlias            Gtk2::Pango::Renderer
 
-PANGO_TYPE_RENDER_PART         PangoRenderPart         GEnum           Gtk2::Pango::RenderPart
+PANGO_TYPE_RENDER_PART         PangoRenderPart         GEnumAlias              Gtk2::Pango::RenderPart
=== doctypes
==================================================================
--- doctypes    (/gtk2-perl/perl-Gtk2/trunk)    (revision 3257)
+++ doctypes    (/gtk2-perl/perl-Gtk2/branches/standalone-pango)        (revision 3257)
@@ -16,5 +16,3 @@
 GdkKeymap_orclass      Gtk2::Gdk::Keymap
 GdkPixbuf_noinc                Gtk2::Gdk::Pixbuf
 GdkPixbufFormat                hash reference
-PangoRectangle array reference
-PangoGlyph     integer
=== CodeGen.pm
==================================================================
--- CodeGen.pm  (/gtk2-perl/perl-Gtk2/trunk)    (revision 3257)
+++ CodeGen.pm  (/gtk2-perl/perl-Gtk2/branches/standalone-pango)        (revision 3257)
@@ -11,7 +11,13 @@
 
 Glib::CodeGen->add_type_handler (GtkObject => \&gen_gtkobject_stuff);
 
+Glib::CodeGen->add_type_handler (GEnumAlias => \&gen_fundamental_alias_stuff);
+Glib::CodeGen->add_type_handler (GFlagsAlias => \&gen_fundamental_alias_stuff);
+Glib::CodeGen->add_type_handler (GBoxedAlias => \&gen_boxed_alias_stuff);
+Glib::CodeGen->add_type_handler (GObjectAlias => \&gen_object_alias_stuff);
+Glib::CodeGen->add_type_handler (GInterfaceAlias => \&gen_object_alias_stuff);
 
+
 =head1 NAME
 
 Gtk2::CodeGen - code generation utilities for Glib-based bindings.
@@ -227,7 +233,29 @@
 ";
 }
 
+sub gen_alias_stuff {
+       my ($typemacro, $func, $package) = @_;
+       Glib::CodeGen::add_register "#ifdef $typemacro
+$func ($typemacro, \"$package\");
+#endif /* $typemacro */";
+}
 
+sub gen_fundamental_alias_stuff {
+       my ($typemacro, $classname, $root, $package) = @_;
+       gen_alias_stuff ($typemacro, 'gperl_register_fundamental_alias', $package);
+}
+
+sub gen_boxed_alias_stuff {
+       my ($typemacro, $classname, $root, $package) = @_;
+       gen_alias_stuff ($typemacro, 'gperl_register_boxed_alias', $package);
+}
+
+sub gen_object_alias_stuff {
+       my ($typemacro, $classname, $root, $package) = @_;
+       gen_alias_stuff ($typemacro, 'gperl_register_object_alias', $package);
+}
+
+
 =item Gtk2::CodeGen->generate_constants_wrappers (KEY => VAL, ...)
 
 Generates an XS file with XSUB wrappers for C constants.  The key-value pairs
=== Gtk2.pm
==================================================================
--- Gtk2.pm     (/gtk2-perl/perl-Gtk2/trunk)    (revision 3257)
+++ Gtk2.pm     (/gtk2-perl/perl-Gtk2/branches/standalone-pango)        (revision 3257)
@@ -28,7 +28,16 @@
 use warnings;
 
 use Glib;
+use Pango;
 
+# Backwards compatibility: create Gtk2::Pango aliases for everything in Pango
+{
+  no strict 'refs';
+  foreach my $key (keys %Pango::) {
+    *{"Gtk2::Pango::" . $key} = *{"Pango::" . $key};
+  }
+}
+
 # if the gtk+ we've been compiled against is at 2.8.0 or newer or if pango is
 # at 1.10.0 or newer, we need to import the Cairo module for the cairo glue in
 # gtk+ and pango.
=== Makefile.PL
==================================================================
--- Makefile.PL (/gtk2-perl/perl-Gtk2/trunk)    (revision 3257)
+++ Makefile.PL (/gtk2-perl/perl-Gtk2/branches/standalone-pango)        (revision 3257)
@@ -35,6 +35,7 @@
        'perl-ExtUtils-PkgConfig' => '1.030',
        'perl-Glib'               => '1.200',
        'perl-Cairo'              => '1.000',
+       'perl-Pango'              => '1.190',
        'Gtk+'                    => '2.0.0',
 );
 
@@ -42,6 +43,7 @@
        'ExtUtils::Depends'   => $build_reqs{'perl-ExtUtils-Depends'},
        'ExtUtils::PkgConfig' => $build_reqs{'perl-ExtUtils-PkgConfig'},
        'Glib'                => $build_reqs{'perl-Glib'},
+       'Pango'               => $build_reqs{'perl-Pango'},
 );
 
 # Writing a fake Makefile ensures that CPAN will pick up the correct
@@ -50,6 +52,7 @@
            . "use ExtUtils::PkgConfig '$build_reqs{'perl-ExtUtils-PkgConfig'}';"
            . "use Glib '$build_reqs{'perl-Glib'}';"
            . "use Glib::MakeHelper;" # for do_pod_files()
+           . "use Pango '$build_reqs{'perl-Pango'}';"
            . "1") {
        warn "$ \n";
        WriteMakefile(
@@ -69,20 +72,18 @@
 # look for our packages.  if they can't be found, warn and exit with status 0
 # to indicate to CPAN testers that their system isn't supported.
 #
-my (%pkgcfg_gtk, %pkgcfg_pango);
+my %pkgcfg_gtk;
 unless (eval { %pkgcfg_gtk = ExtUtils::PkgConfig->find ("gtk+-2.0 >= $build_reqs{'Gtk+'}");
-               %pkgcfg_pango = ExtUtils::PkgConfig->find ('pango');
-               1; })
+                1; })
 {
        warn $@;
        exit 0;
 }
 
 #
-# retrieve gtk's and pango's version
+# retrieve gtk's version
 #
 my @gtk_version = split /\./, $pkgcfg_gtk{modversion};
-my @pango_version = split /\./, $pkgcfg_pango{modversion};
 
 #
 # decide what files to use in the build based on the version we found.
@@ -90,7 +91,6 @@
 our @xs_files = ();
 our @xs_lists = (
        Glib::MakeHelper->select_files_by_version ("xs_files", @gtk_version),
-       Glib::MakeHelper->select_files_by_version ("xs_files_pango", @pango_version),
 );
 foreach my $filename (@xs_lists) {
        my @names = Glib::MakeHelper->read_source_list_file ($filename);
@@ -102,10 +102,9 @@
        push @xs_files, 'xs/GdkX11.xs';
 }
 
-# if gtk+ >= 2.8 or pango >= 1.10, we depend on Cairo
+# if gtk+ >= 2.8, we depend on Cairo
 my $have_cairo = 0;
-if (($gtk_version[0] > 2 || ($gtk_version[0] == 2 && $gtk_version[1] >= 8)) ||
-    ($pango_version[0] > 1 || ($pango_version[0] == 1 && $pango_version[1] >= 10))) {
+if ($gtk_version[0] > 2 || ($gtk_version[0] == 2 && $gtk_version[1] >= 8)) {
        $PREREQ_PM{Cairo} = $build_reqs{'perl-Cairo'};
        unless (eval "use Cairo '$build_reqs{'perl-Cairo'}'; 1;") {
                warn "$ \n";
@@ -133,11 +132,10 @@
 push @xs_files, $gtk_constants_file;
 
 #
-# create version macros for pango and atk
+# create version macros for atk
 #
 ExtUtils::PkgConfig->write_version_macros(
        "build/gtk2perl-versions.h",
-       pango => "PANGO",
        atk => "ATK",
 );
 
@@ -215,12 +213,16 @@
 #
 # all possible maps must be available at xsubpp time, as xsubpp processes
 # all code, even inside #ifdefs.
+#
+# For backwards compatibility, the pango maps must be included so that the
+# Gtk2::Pango::* names are registered with Glib.  These maps have special types
+# (GObjectAlias, for example) that are handled by our own Gtk2::CodeGen.
+#
 Gtk2::CodeGen->parse_maps ('gtk2perl', input => [<maps-[0-9]\.[0-9]*>,
                                                  <maps_pango-[0-9]\.[0-9]*>]);
 # but for enums.pod, we only want to document the stuff we can actually
 # query from this target library.
 our @used_maps = Glib::MakeHelper->select_files_by_version ("maps", @gtk_version);
-our @used_maps_pango = Glib::MakeHelper->select_files_by_version ("maps_pango", @pango_version);
 
 # one more command generates code to boot all the various extra XS modules.
 # we need this because we have lots of XS files without corresponding PMs to
@@ -238,7 +240,10 @@
 # will chain from this one.
 #
 
-my @deps = $have_cairo ? qw/Glib Cairo/ : qw/Glib/;
+my @deps = qw/Glib Pango/;
+if ($have_cairo) {
+  push @deps, qw/Cairo/;
+}
 our $gtk2 = ExtUtils::Depends->new ('Gtk2', @deps);
 
 # Glib added -I. for us, but we'll need to add -I./build so we can get to
@@ -251,8 +256,7 @@
 my $cwd = cwd();
 $gtk2->add_typemaps (map {File::Spec->catfile($cwd,$_)}
                     'build/gtk2perl.typemap',
-                     'gdk.typemap', 'gtk.typemap', 'pango.typemap'
-                    );
+                     'gdk.typemap', 'gtk.typemap');
 
 $gtk2->install (qw(gtk2perl.h
                    build/gtk2perl-autogen.h
@@ -334,14 +338,15 @@
                        'PERL_EXTUTILS_PKGCONFIG' => 
                                $build_reqs{'perl-ExtUtils-PkgConfig'},
                        'PERL_GLIB' => $build_reqs{'perl-Glib'},
+                       'PERL_PANGO' => $build_reqs{'perl-Pango'},
                   )
                 . " 
 # rebuild the makefile if the file lists change
 Makefile : ".join(" ", @xs_lists)."
 
-\$(INST_LIB)/\$(FULLEXT)/enums.pod : \$(BLIB_DONE) @used_maps @used_maps_pango tools/podifyenums.pl
+\$(INST_LIB)/\$(FULLEXT)/enums.pod : \$(BLIB_DONE) @used_maps tools/podifyenums.pl
        \$(NOECHO) \$(ECHO) Creating enum POD...
-       \$(NOECHO) \$(PERLRUNINST) -M\$(NAME) tools/podifyenums.pl \$(NAME) @used_maps @used_maps_pango > \$@
+       \$(NOECHO) \$(PERLRUNINST) -M\$(NAME) tools/podifyenums.pl \$(NAME) @used_maps > \$@
 
 build/stock_items.podi: \$(BLIB_DONE) tools/podifystockitems.pl
        \$(NOECHO) \$(ECHO) Creating stock items POD...
=== xs/Gtk2.xs
==================================================================
--- xs/Gtk2.xs  (/gtk2-perl/perl-Gtk2/trunk)    (revision 3257)
+++ xs/Gtk2.xs  (/gtk2-perl/perl-Gtk2/branches/standalone-pango)        (revision 3257)
@@ -122,7 +122,6 @@
        gperl_handle_logs_for ("Gtk");
        gperl_handle_logs_for ("Gdk");
        gperl_handle_logs_for ("GdkPixbuf");
-       gperl_handle_logs_for ("Pango");
 
        /* make sure that we're running/linked against a version at least as 
         * new as we built against, otherwise bad things can happen. */
@@ -595,34 +594,833 @@
        GtkWidget * widget
        GdkEvent * event
 
-MODULE = Gtk2          PACKAGE = Gtk2::Pango           PREFIX = PANGO_
+# --------------------------------------------------------------------------- #
 
-# Don't doc these in Gtk2::Pango, or we'll clobber the docs for the
-# pango constants module!
+MODULE = Gtk2  PACKAGE = Gtk2::Pango
 
-=for object Gtk2::Pango::version
+# All the stuff below is to create POD stubs for Gtk2::Pango::* that link to
+# the new Pango::* POD pages.
+
+=for object Gtk2::Pango::AttrBackground
 =cut
 
-=for see_also Gtk2::version
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
 =cut
 
-=for see_also Glib::version
+=for see_also Pango::AttrBackground
 =cut
 
-=for apidoc
-=for signature (MAJOR, MINOR, MICRO) = Gtk2::Pango->GET_VERSION_INFO
-Fetch as a list the version of pango with which Gtk2 was built.
+
+=for object Gtk2::Pango::AttrColor
 =cut
-void
-GET_VERSION_INFO (class)
-    PPCODE:
-       EXTEND (SP, 3);
-       PUSHs (sv_2mortal (newSViv (PANGO_MAJOR_VERSION)));
-       PUSHs (sv_2mortal (newSViv (PANGO_MINOR_VERSION)));
-       PUSHs (sv_2mortal (newSViv (PANGO_MICRO_VERSION)));
-       PERL_UNUSED_VAR (ax);
 
-bool
-PANGO_CHECK_VERSION (class, int major, int minor, int micro)
-    C_ARGS:
-       major, minor, micro
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrColor
+=cut
+
+
+=for object Gtk2::Pango::AttrFallback
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrFallback
+=cut
+
+
+=for object Gtk2::Pango::AttrFamily
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrFamily
+=cut
+
+
+=for object Gtk2::Pango::AttrFontDesc
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrFontDesc
+=cut
+
+
+=for object Gtk2::Pango::AttrForeground
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrForeground
+=cut
+
+
+=for object Gtk2::Pango::AttrGravity
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrGravity
+=cut
+
+
+=for object Gtk2::Pango::AttrGravityHint
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrGravityHint
+=cut
+
+
+=for object Gtk2::Pango::Attribute
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::Attribute
+=cut
+
+
+=for object Gtk2::Pango::AttrInt
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrInt
+=cut
+
+
+=for object Gtk2::Pango::AttrIterator
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrIterator
+=cut
+
+
+=for object Gtk2::Pango::AttrLanguage
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrLanguage
+=cut
+
+
+=for object Gtk2::Pango::AttrLetterSpacing
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrLetterSpacing
+=cut
+
+
+=for object Gtk2::Pango::AttrList
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrList
+=cut
+
+
+=for object Gtk2::Pango::AttrRise
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrRise
+=cut
+
+
+=for object Gtk2::Pango::AttrScale
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrScale
+=cut
+
+
+=for object Gtk2::Pango::AttrShape
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrShape
+=cut
+
+
+=for object Gtk2::Pango::AttrSize
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrSize
+=cut
+
+
+=for object Gtk2::Pango::AttrStretch
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrStretch
+=cut
+
+
+=for object Gtk2::Pango::AttrStrikethrough
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrStrikethrough
+=cut
+
+
+=for object Gtk2::Pango::AttrStrikethroughColor
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrStrikethroughColor
+=cut
+
+
+=for object Gtk2::Pango::AttrString
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrString
+=cut
+
+
+=for object Gtk2::Pango::AttrStyle
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrStyle
+=cut
+
+
+=for object Gtk2::Pango::AttrUnderline
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrUnderline
+=cut
+
+
+=for object Gtk2::Pango::AttrUnderlineColor
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrUnderlineColor
+=cut
+
+
+=for object Gtk2::Pango::AttrVariant
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrVariant
+=cut
+
+
+=for object Gtk2::Pango::AttrWeight
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::AttrWeight
+=cut
+
+
+=for object Gtk2::Pango::Cairo
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::Cairo
+=cut
+
+
+=for object Gtk2::Pango::Cairo::Context
+=cut
+
+=for object Gtk2::Pango::Cairo::Font
+=cut
+
+=for object Gtk2::Pango::Cairo::FontMap
+=cut
+
+=for object Gtk2::Pango::Color
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::Color
+=cut
+
+
+=for object Gtk2::Pango::Context
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::Context
+=cut
+
+
+=for object Gtk2::Pango::Font
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::Font
+=cut
+
+
+=for object Gtk2::Pango::FontDescription
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::FontDescription
+=cut
+
+
+=for object Gtk2::Pango::FontFace
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::FontFace
+=cut
+
+
+=for object Gtk2::Pango::FontFamily
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::FontFamily
+=cut
+
+
+=for object Gtk2::Pango::FontMap
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::FontMap
+=cut
+
+
+=for object Gtk2::Pango::FontMetrics
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::FontMetrics
+=cut
+
+
+=for object Gtk2::Pango::Fontset
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::Fontset
+=cut
+
+
+=for object Gtk2::Pango::Gravity
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::Gravity
+=cut
+
+
+=for object Gtk2::Pango::Language
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::Language
+=cut
+
+
+=for object Gtk2::Pango::Layout
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::Layout
+=cut
+
+
+=for object Gtk2::Pango::LayoutIter
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::LayoutIter
+=cut
+
+
+=for object Gtk2::Pango::LayoutLine
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::LayoutLine
+=cut
+
+
+=for object Gtk2::Pango::Matrix
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::Matrix
+=cut
+
+
+=for object Gtk2::Pango::Renderer
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::Renderer
+=cut
+
+
+=for object Gtk2::Pango::Script
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::Script
+=cut
+
+
+=for object Gtk2::Pango::ScriptIter
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::ScriptIter
+=cut
+
+
+=for object Gtk2::Pango::TabArray
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::TabArray
+=cut
+
+
+=for object Gtk2::Pango::version
+=cut
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+As of Gtk2 1.220, pango bindings are provided by the standalone Pango module.
+This namespace is provided for backwards compatibility.  The relevent
+documentation moved to Pango and is linked to below.
+
+=cut
+
+=for see_also Pango::version
+=cut
=== maps_pango-1.10
==================================================================
--- maps_pango-1.10     (/gtk2-perl/perl-Gtk2/trunk)    (revision 3257)
+++ maps_pango-1.10     (/gtk2-perl/perl-Gtk2/branches/standalone-pango)        (revision 3257)
@@ -2,4 +2,4 @@
 # this file defines mappings only for types that existed in pango 1.10.x
 #
 
-PANGO_TYPE_CAIRO_FONT_MAP      PangoCairoFontMap       GInterface      Gtk2::Pango::Cairo::FontMap
+PANGO_TYPE_CAIRO_FONT_MAP      PangoCairoFontMap       GInterfaceAlias Gtk2::Pango::Cairo::FontMap
=== t/pango-compat.t
==================================================================
--- t/pango-compat.t    (/gtk2-perl/perl-Gtk2/trunk)    (revision 3257)
+++ t/pango-compat.t    (/gtk2-perl/perl-Gtk2/branches/standalone-pango)        (revision 3257)
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use Gtk2::TestHelper tests => 3;
+
+# Make sure that the old names for interface, object, boxed, and fundamental
+# types work
+is (eval {
+  Gtk2::TreeStore->new (qw/Gtk2::Pango::Cairo::FontMap
+                           Gtk2::Pango::Layout
+                           Gtk2::Pango::Color
+                           Gtk2::Pango::Weight
+                           Gtk2::Pango::FontMask/);
+  1;
+}, 1);
+
+# Make sure that objects of some type also appear to be of the old type
+my $label = Gtk2::Label->new ();
+my $layout = $label->get_layout ();
+isa_ok ($layout, qw/Gtk2::Pango::Layout/);
+isa_ok ($layout, qw/Pango::Layout/);
+
+__END__
+
+Copyright (C) 2008 by the gtk2-perl team (see the file AUTHORS for the
+full list).  See LICENSE for more information.
=== maps_pango-1.16
==================================================================
--- maps_pango-1.16     (/gtk2-perl/perl-Gtk2/trunk)    (revision 3257)
+++ maps_pango-1.16     (/gtk2-perl/perl-Gtk2/branches/standalone-pango)        (revision 3257)
@@ -2,5 +2,5 @@
 # this file defines mappings only for types that existed in pango 1.16.x
 #
 
-PANGO_TYPE_GRAVITY     PangoGravity            GEnum   Gtk2::Pango::Gravity
-PANGO_TYPE_GRAVITY_HINT        PangoGravityHint        GEnum   Gtk2::Pango::GravityHint
+PANGO_TYPE_GRAVITY     PangoGravity            GEnumAlias      Gtk2::Pango::Gravity
+PANGO_TYPE_GRAVITY_HINT        PangoGravityHint        GEnumAlias      Gtk2::Pango::GravityHint
=== maps_pango-1.18
==================================================================
--- maps_pango-1.18     (/gtk2-perl/perl-Gtk2/trunk)    (revision 3257)
+++ maps_pango-1.18     (/gtk2-perl/perl-Gtk2/branches/standalone-pango)        (revision 3257)
@@ -2,4 +2,4 @@
 # this file defines mappings only for types that existed in pango 1.18.x
 #
 
-PANGO_TYPE_CAIRO_FONT  PangoCairoFont  GInterface      Gtk2::Pango::Cairo::Font
+PANGO_TYPE_CAIRO_FONT  PangoCairoFont  GInterfaceAlias Gtk2::Pango::Cairo::Font


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]