Re: Announcing: Perl bindings for LibSoup



On Wed, May 25, 2011 at 00:14, Torsten Schoenfeld <kaffeetisch gmx de> wrote:
On 24.05.2011 22:54, Emmanuel Rodriguez wrote:


But since WebKit also supports gobject-introspection, why not use it that
way as well? ÂIt's still a little rough around the edges, but here's your
browser.pl example ported to use the introspection stuff.


I've been playing a bit with the introspection and with the sample
browser. It does make things easier, that's nice.

One thing that I've not been able to do is to use Cairo with the
introspection framework. For instance if I take your example and load
cairo and I can't use it.

use Cairo;

$view->signal_connect('notify::load-status' => sub {
    my $uri = $view->get_uri or return;
    return unless $view->get_load_status eq 'finished';

    my ($width, $height) = ($view->get_allocated_width,
$view->get_allocated_height);

    # Save a screenshot as Pdf
    my $surface = Cairo::PdfSurface->create("a.pdf", 1.0 * $width, 1.0
* $height);
    my $cr = Cairo::Context->create($surface);
    $view->draw($cr);
});


This code always gives me:

*** unhandled exception in callback:
***   internal problem: GType CairoContext (146796864) has not been
registered with GPerl at
/usr/local/lib/perl/5.10.1/Glib/Object/Introspection.pm line 62.
***  ignoring at
/usr/local/lib/perl/5.10.1/Glib/Object/Introspection.pm line 62.


Is it possible to use Cairo with the introspection framework?

-- 
Emmanuel Rodriguez



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