Forum: Ruby-Gnome 2 gtk-webkit-ruby gem

E63ceac0a4a9a299a984f4ccc86fc3a4?d=identicon&s=25 Geoff Youngs (Guest)
on 2013-01-24 16:12
(Received via mailing list)
Hi,

Some of you may have come across it already, but I don't think I've
ever officially announced the gtk-webkit-ruby gem.

It's on github: http://github.com/geoffyoungs/gtk-webkit-ruby

I threw some bindings together for a project at work, but haven't
really had the time to properly release it or complete the API
coverage (it wraps some of the more useful stuff from the webkit
widget and has some JavaScriptCore bindings for direct Ruby<=>JS
calls).

Would anyone like to see it fixed up and added to the ruby-gnome2
project, or would it make more strategic sense to leave it out and
focus on gobject introspection as a more sustainable way to support
such libraries in future?  Any thoughts?

TTFN,


Geoff.
--
Random Musing - http://www.frafferz.com/
Geek Blog - http://geoffyoungs.github.com/
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2013-01-26 01:41
(Received via mailing list)
Hi,

In <CAPuFfEen+XFDbOtE+YOAW3vDRF+F5T+fAuWcLkoQ+K7Dt=3DDQ@mail.gmail.com>
  "[ruby-gnome2-devel-en] gtk-webkit-ruby gem" on Thu, 24 Jan 2013
15:11:15 +0000,
  Geoff Youngs <g@intersect-uk.co.uk> wrote:

> Some of you may have come across it already, but I don't think I've
> ever officially announced the gtk-webkit-ruby gem.
>
> It's on github: http://github.com/geoffyoungs/gtk-webkit-ruby
...
> Would anyone like to see it fixed up and added to the ruby-gnome2
> project, or would it make more strategic sense to leave it out and
> focus on gobject introspection as a more sustainable way to support
> such libraries in future?  Any thoughts?

If it is added to the Ruby-GNOME2 project, we want to use
GObject Introspection.

I created WebKitGTK+ bindings by Ruby/GObjectInstropection
to show the concept:
  https://github.com/ruby-gnome2/ruby-gnome2/tree/ma...

We can show WebKitGTK+ site by the following codes:

webkit-gtk.rb:
https://github.com/ruby-gnome2/ruby-gnome2/blob/ma...

  require "gobject-introspection"
  require "gtk3"

  module WebKitGtk
    class << self
      @initialized = false
      def init
        return if @initialized
        @initialized = true
        loader = Loader.new(self)
        loader.load("WebKit")
      end
    end

    class Loader < GObjectIntrospection::Loader
    end
  end

browser.rb:
https://github.com/ruby-gnome2/ruby-gnome2/blob/ma...

  require "webkit-gtk"

  WebKitGtk.init

  window = Gtk::Window.new
  window.signal_connect("destroy") do
    Gtk.main_quit
  end

  view = WebKitGtk::WebView.new
  view.load_uri("http://webkitgtk.org/")

  window.add(view)
  window.show_all

  Gtk.main


Thanks,
--
kou
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.