logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Gtk3::WebKit2 - WebKit2 bindings for Perl

Authors

       Emmanuel Rodriguez <potyl@cpan.org>.

Bugs

       For any kind of help or support simply send a mail to the gtk-perl mailing list
       (gtk-perl-list@gnome.org).

Description

       This module provides the Perl bindings for the Gtk3 port of WebKit2.

Installation

"Headless"Debianbasedsystems(incUbuntu)
       If you are running an X Server (desktop environment) then you should be fine.  If you are trying to
       install this on a "headless" server, then you will need a framebuffer display to take the place of the X
       server.

       The xvfb-run command can do this for you.

       With Ubuntu 12.04 LTS, you'll need these (or more recent) extra deb packages:

           xvfb libgirepository1.0-dev pkg-config libgtk-3-dev libglib2.0-dev libglib2.0-0 gir1.2-webkit2-4.1

       At which point everything should "just work".

Name

       Gtk3::WebKit2 - WebKit2 bindings for Perl

Synopsis

               use Gtk3 -init;
               use Gtk3::WebKit2;

               my ($url) = shift @ARGV || 'http://search.cpan.org/';

               my $window = Gtk3::Window->new('toplevel');
               $window->set_default_size(800, 600);
               $window->signal_connect(destroy => sub { Gtk3->main_quit() });

               # Create a WebKit2 widget
               my $view = Gtk3::WebKit2::WebView->new();

               # Load a page
               $view->load_uri($url);

               # Pack the widgets together
               my $scrolls = Gtk3::ScrolledWindow->new();
               $scrolls->add($view);
               $window->add($scrolls);
               $window->show_all();

               Gtk3->main();

See Also