Re: Standalone Pango



muppet wrote:
    /**
     * Set up package_name as a perl-level alias for gtype.
     */
    void gperl_register_flags_alias (GType gtype, const char *
package_name);

OK, I've implemented this.  See the attached type-aliases.patch.  It doesn't
add an alias variant for param specs because Pango doesn't need it.

And standalone-pango-v2.patch are the corresponding changes to Gtk2.  The
actual standalone Pango module is mainly the relevant *.xs and *.t files from
Gtk2 plus some build infrastructure, so I don't attach it.

All this seems to work pretty well.  I see only two remaining issues:

* We lose the Gtk2::Pango::* POD pages.  Since the XS files aren't there
anymore, these don't get created.  If we keep the XS files around but don't
compile them, I think we might be able to fool the doc generation stuff into
parsing them anyway.

* Is it too late to do such a big change?  The stable releases are due on
September 22.  We could postpone this to next cycle.

What do you think?

-- 
Bye,
-Torsten
Index: GBoxed.xs
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GBoxed.xs,v
retrieving revision 1.28
diff -u -d -p -r1.28 GBoxed.xs
--- GBoxed.xs   4 May 2008 12:49:53 -0000       1.28
+++ GBoxed.xs   2 Aug 2008 17:08:31 -0000
@@ -209,6 +209,44 @@ gperl_register_boxed (GType gtype,
        G_UNLOCK (info_by_package);
 }
 
+=item void gperl_register_boxed_alias (GType gtype, const char * package)
+
+Makes I<package> an alias for I<type>.  This means that the package name
+specified by I<package> will be mapped to I<type> by
+I<gperl_boxed_type_from_package>, but I<gperl_boxed_package_from_type> won't
+map I<type> to I<package>.  This is useful if you want to change the canonical
+package name of a type while preserving backwards compatibility with code which
+uses I<package> to specify I<type>.
+
+In order for this to make sense, another package name should be registered for
+I<type> with I<gperl_register_boxed>.
+
+=cut
+
+void
+gperl_register_boxed_alias (GType gtype,
+                           const char * package)
+{
+       BoxedInfo * boxed_info;
+
+       G_LOCK (info_by_gtype);
+       boxed_info = (BoxedInfo *)
+               g_hash_table_lookup (info_by_gtype, (gpointer) gtype);
+       G_UNLOCK (info_by_gtype);
+
+       if (!boxed_info) {
+               croak ("cannot register alias %s for the unregistered type %s",
+                      package, g_type_name (gtype));
+       }
+
+       G_LOCK (info_by_package);
+       /* associate package with the same boxed_info.  boxed_info is still
+          owned by info_by_gtype.  info_by_package doesn't have a
+          free-function installed, so that's ok. */
+       g_hash_table_insert (info_by_package, (char *) package, boxed_info);
+       G_UNLOCK (info_by_package);
+}
+
 =item GType gperl_boxed_type_from_package (const char * package)
 
 Look up the GType associated with package I<package>.  Returns 0 if I<type> is
Index: GObject.xs
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GObject.xs,v
retrieving revision 1.75
diff -u -d -p -r1.75 GObject.xs
--- GObject.xs  13 Jun 2008 10:38:59 -0000      1.75
+++ GObject.xs  2 Aug 2008 17:08:32 -0000
@@ -315,6 +315,44 @@ gperl_register_object (GType gtype,
                class_info_finish_loading (class_info);
 }
 
+=item void gperl_register_object_alias (GType gtype, const char * package)
+
+Makes I<package> an alias for I<type>.  This means that the package name
+specified by I<package> will be mapped to I<type> by
+I<gperl_object_type_from_package>, but I<gperl_object_package_from_type> won't
+map I<type> to I<package>.  This is useful if you want to change the canonical
+package name of a type while preserving backwards compatibility with code which
+uses I<package> to specify I<type>.
+
+In order for this to make sense, another package name should be registered for
+I<type> with I<gperl_register_object>.
+
+=cut
+
+void
+gperl_register_object_alias (GType gtype,
+                            const char * package)
+{
+       ClassInfo *class_info;
+
+       G_LOCK (types_by_type);
+       class_info = (ClassInfo *)
+               g_hash_table_lookup (types_by_type, (gpointer) gtype);
+       G_UNLOCK (types_by_type);
+
+       if (!class_info) {
+               croak ("cannot register alias %s for the unregistered type %s",
+                      package, g_type_name (gtype));
+       }
+
+       G_LOCK (types_by_package);
+       /* associate package with the same class_info.  class_info is still
+          owned by types_by_type.  types_by_package doesn't have a
+          free-function installed, so that's ok. */
+       g_hash_table_insert (types_by_package, (char *) package, class_info);
+       G_UNLOCK (types_by_package);
+}
+
 
 =item void gperl_register_sink_func (GType gtype, GPerlObjectSinkFunc func)
 
Index: GType.xs
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GType.xs,v
retrieving revision 1.93
diff -u -d -p -r1.93 GType.xs
--- GType.xs    13 Jul 2008 15:10:15 -0000      1.93
+++ GType.xs    2 Aug 2008 17:08:32 -0000
@@ -104,6 +104,45 @@ gperl_register_fundamental (GType gtype,
                gperl_set_isa (package, "Glib::Flags");
 }
 
+=item void gperl_register_fundamental_alias (GType gtype, const char * package)
+
+Makes I<package> an alias for I<type>.  This means that the package name
+specified by I<package> will be mapped to I<type> by
+I<gperl_fundamental_type_from_package>, but
+I<gperl_fundamental_package_from_type> won't map I<type> to I<package>.  This
+is useful if you want to change the canonical package name of a type while
+preserving backwards compatibility with code which uses I<package> to specify
+I<type>.
+
+In order for this to make sense, another package name should be registered for
+I<type> with I<gperl_register_fundamental> or
+I<gperl_register_fundamental_full>.
+
+=cut
+
+void
+gperl_register_fundamental_alias (GType gtype,
+                                 const char * package)
+{
+       const char * res;
+
+       G_LOCK (packages_by_type);
+       res = (const char *)
+               g_hash_table_lookup (packages_by_type, (gpointer) gtype);
+       G_UNLOCK (packages_by_type);
+
+       if (!res) {
+               croak ("cannot register alias %s for the unregistered type %s",
+                      package, g_type_name (gtype));
+       }
+
+       G_LOCK (types_by_package);
+       g_hash_table_insert (types_by_package,
+                            (char *) package,
+                            (gpointer) gtype);
+       G_UNLOCK (types_by_package);
+}
+
 =item GPerlValueWrapperClass
 
 Specifies the vtable that is to be used to convert fundamental types to and
Index: gperl.h
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/gperl.h,v
retrieving revision 1.54
diff -u -d -p -r1.54 gperl.h
--- gperl.h     7 Jan 2008 19:17:08 -0000       1.54
+++ gperl.h     2 Aug 2008 17:08:32 -0000
@@ -114,6 +114,7 @@ struct _GPerlValueWrapperClass {
 };
 
 void gperl_register_fundamental (GType gtype, const char * package);
+void gperl_register_fundamental_alias (GType gtype, const char * package);
 void gperl_register_fundamental_full (GType gtype, const char * package, GPerlValueWrapperClass * 
wrapper_class);
 
 GType gperl_fundamental_type_from_package (const char * package);
@@ -208,6 +209,7 @@ GPerlBoxedWrapperClass * gperl_default_b
 void gperl_register_boxed (GType gtype,
                           const char * package,
                           GPerlBoxedWrapperClass * wrapper_class);
+void gperl_register_boxed_alias (GType gtype, const char * package);
 
 SV * gperl_new_boxed (gpointer boxed, GType gtype, gboolean own);
 SV * gperl_new_boxed_copy (gpointer boxed, GType gtype);
@@ -222,6 +224,7 @@ const char * gperl_boxed_package_from_ty
  * GObject
  */
 void gperl_register_object (GType gtype, const char * package);
+void gperl_register_object_alias (GType gtype, const char * package);
 
 typedef void (*GPerlObjectSinkFunc) (GObject *);
 void gperl_register_sink_func (GType               gtype,
? t/pango-compat.t
Index: CodeGen.pm
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/CodeGen.pm,v
retrieving revision 1.26
diff -u -d -p -r1.26 CodeGen.pm
--- CodeGen.pm  22 Jun 2008 12:35:13 -0000      1.26
+++ CodeGen.pm  2 Aug 2008 17:08:47 -0000
@@ -11,6 +11,12 @@ our $VERSION = '0.03';
 
 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
 
@@ -227,6 +233,28 @@ gperl_register_object ($typemacro, \"$pa
 ";
 }
 
+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, ...)
 
Index: Gtk2.pm
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/Gtk2.pm,v
retrieving revision 1.125
diff -u -d -p -r1.125 Gtk2.pm
--- Gtk2.pm     22 Jun 2008 17:26:54 -0000      1.125
+++ Gtk2.pm     2 Aug 2008 17:08:47 -0000
@@ -28,6 +28,15 @@ use strict;
 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
Index: Makefile.PL
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/Makefile.PL,v
retrieving revision 1.148
diff -u -d -p -r1.148 Makefile.PL
--- Makefile.PL 22 Jun 2008 17:26:55 -0000      1.148
+++ Makefile.PL 2 Aug 2008 17:08:47 -0000
@@ -35,6 +35,7 @@ our %build_reqs = (
        'perl-ExtUtils-PkgConfig' => '1.030',
        'perl-Glib'               => '1.190',
        'perl-Cairo'              => '1.000',
+       'perl-Pango'              => '1.190',
        'Gtk+'                    => '2.0.0',
 );
 
@@ -42,6 +43,7 @@ our %PREREQ_PM = (
        '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 @@ unless (eval "use ExtUtils::Depends '$bu
            . "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 @@ mkdir 'build', 0777;
 # 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 @@ my @pango_version = split /\./, $pkgcfg_
 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 @@ if ($target =~ /x11/) {
        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 @@ Gtk2::CodeGen->generate_constants_wrappe
 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 @@ if (grep /enable[-_]faq/i, @ARGV)
 #
 # 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 @@ system "$^X tools/genkeysyms.pl >\"build
 # 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 @@ $gtk2->add_xs (@xs_files);
 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 @@ sub MY::postamble
                        '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...
Index: doctypes
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/doctypes,v
retrieving revision 1.4
diff -u -d -p -r1.4 doctypes
--- doctypes    19 Nov 2006 19:47:52 -0000      1.4
+++ doctypes    2 Aug 2008 17:08:47 -0000
@@ -16,5 +16,3 @@ GdkGeometry     Gtk2::Gdk::Geometry
 GdkKeymap_orclass      Gtk2::Gdk::Keymap
 GdkPixbuf_noinc                Gtk2::Gdk::Pixbuf
 GdkPixbufFormat                hash reference
-PangoRectangle array reference
-PangoGlyph     integer
Index: gtk2perl.h
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/gtk2perl.h,v
retrieving revision 1.46
diff -u -d -p -r1.46 gtk2perl.h
--- gtk2perl.h  7 Jan 2008 19:54:48 -0000       1.46
+++ gtk2perl.h  2 Aug 2008 17:08:47 -0000
@@ -25,6 +25,7 @@
 #define _GTK2PERL_H_
 
 #include <gperl.h>
+#include <pango-perl.h>
 #include <gtk/gtk.h>
 
 #include "gtk2perl-versions.h"
Index: maps_pango-1.0
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/maps_pango-1.0,v
retrieving revision 1.5
diff -u -d -p -r1.5 maps_pango-1.0
--- maps_pango-1.0      19 Nov 2006 19:47:52 -0000      1.5
+++ maps_pango-1.0      2 Aug 2008 17:08:47 -0000
@@ -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
Index: maps_pango-1.10
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/maps_pango-1.10,v
retrieving revision 1.1
diff -u -d -p -r1.1 maps_pango-1.10
--- maps_pango-1.10     29 Sep 2005 22:43:30 -0000      1.1
+++ maps_pango-1.10     2 Aug 2008 17:08:47 -0000
@@ -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
Index: maps_pango-1.16
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/maps_pango-1.16,v
retrieving revision 1.2
diff -u -d -p -r1.2 maps_pango-1.16
--- maps_pango-1.16     25 Feb 2007 14:47:56 -0000      1.2
+++ maps_pango-1.16     2 Aug 2008 17:08:47 -0000
@@ -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
Index: maps_pango-1.18
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/maps_pango-1.18,v
retrieving revision 1.1
diff -u -d -p -r1.1 maps_pango-1.18
--- maps_pango-1.18     22 Jul 2007 10:59:09 -0000      1.1
+++ maps_pango-1.18     2 Aug 2008 17:08:47 -0000
@@ -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
Index: maps_pango-1.4
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/maps_pango-1.4,v
retrieving revision 1.1
diff -u -d -p -r1.1 maps_pango-1.4
--- maps_pango-1.4      30 Oct 2004 17:13:17 -0000      1.1
+++ maps_pango-1.4      2 Aug 2008 17:08:47 -0000
@@ -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
Index: maps_pango-1.6
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/maps_pango-1.6,v
retrieving revision 1.1
diff -u -d -p -r1.1 maps_pango-1.6
--- maps_pango-1.6      30 Oct 2004 17:13:17 -0000      1.1
+++ maps_pango-1.6      2 Aug 2008 17:08:47 -0000
@@ -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
Index: maps_pango-1.8
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/maps_pango-1.8,v
retrieving revision 1.1
diff -u -d -p -r1.1 maps_pango-1.8
--- maps_pango-1.8      2 Apr 2005 17:03:33 -0000       1.1
+++ maps_pango-1.8      2 Aug 2008 17:08:47 -0000
@@ -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
Index: xs/Gtk2.xs
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/Gtk2.xs,v
retrieving revision 1.45
diff -u -d -p -r1.45 Gtk2.xs
--- xs/Gtk2.xs  9 Dec 2007 15:06:54 -0000       1.45
+++ xs/Gtk2.xs  2 Aug 2008 17:08:47 -0000
@@ -122,7 +122,6 @@ BOOT:
        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. */
@@ -594,35 +593,3 @@ void
 gtk_propagate_event (widget, event)
        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!
-
-=for object Gtk2::Pango::version
-=cut
-
-=for see_also Gtk2::version
-=cut
-
-=for see_also Glib::version
-=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.
-=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


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