examples/04_webkit.rb in gir_ffi-gtk-0.8.0 vs examples/04_webkit.rb in gir_ffi-gtk-0.8.1
- old
+ new
@@ -1,16 +1,18 @@
#!/usr/bin/env ruby
#
-# Based on http://www.idle-hacking.com/2010/02/webkit-ruby-and-gtk/
+# Based on https://web.archive.org/web/20110228141616/http://www.idle-hacking.com/2010/02/webkit-ruby-and-gtk/
+#
+
require 'gir_ffi-gtk3'
-GirFFI.setup :WebKit, '3.0'
+GirFFI.setup :WebKit2, '4.0'
Gtk.init
win = Gtk::Window.new :toplevel
-wv = WebKit::WebView.new
+wv = WebKit2::WebView.new
win.add(wv)
win.show_all
-wv.open('http://www.google.com/')
-win.signal_connect("destroy") { Gtk.main_quit }
+wv.load_uri('http://www.google.com/')
+win.signal_connect('destroy') { Gtk.main_quit }
Gtk.main