Standalone Pango



Aloha,

I started working on creating a standalone version of our pango bindings.  I
think it's nearly complete by now, but there's at least one remaining issue.

I use Chia-liang Kao's suggestion for aliasing the old Gtk2::Pango::* names to
their new Pango::* counterparts:

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

This doesn't cover Glib::Object's package-name-to-type registry, though.  That
means that things like

  Glib::Object::new ('Gtk2::Pango::Layout')

or

  Gtk2::TreeStore->new ('Gtk2::Pango::Weight')

stop working because those names are not registered with Glib anymore.

As far as I can tell, simply continuing to call gperl_register_* for the old
names will not work: the type registry in Glib::Object is not set up to handle
anything but a one-to-one relationship between package names and types.

Does anyone have any suggestion for how to solve this?

-- 
Bye,
-Torsten




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