aris
January 24, 2013, 4:12pm
1
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: GitHub - geoffyoungs/gtk-webkit-ruby: Ruby-GNOME2 compatible bindings for Gtk Webkit
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/
Hi,
In CAPuFfEen+XFDbOtE+YOAW3vDRF+F5T+fAuWcLkoQ+K7Dt=removed_email_address@domain.invalid
“[ruby-gnome2-devel-en] gtk-webkit-ruby gem” on Thu, 24 Jan 2013
15:11:15 +0000,
Geoff Y. [email protected] 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: GitHub - geoffyoungs/gtk-webkit-ruby: Ruby-GNOME2 compatible bindings for Gtk Webkit · GitHub
…
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:
ruby-gnome/webkit-gtk at main · ruby-gnome/ruby-gnome · GitHub
We can show WebKitGTK+ site by the following codes:
webkit-gtk.rb:
# Copyright (C) 2013-2024 Ruby-GNOME Project Team
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
require "gtk4"
module WebKitGtk
class << self
This file has been truncated. show original
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/master/webkit-gtk/sample/brower.rb
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