webkit-gtk2 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +43 -0
- data/lib/webkit-gtk2.rb +37 -0
- data/sample/brower.rb +36 -0
- data/test/run-test.rb +58 -0
- data/test/webkit-gtk-test-utils.rb +21 -0
- metadata +97 -0
data/Rakefile
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
#
|
3
|
+
# Copyright (C) 2013 Ruby-GNOME2 Project Team
|
4
|
+
#
|
5
|
+
# This library is free software; you can redistribute it and/or
|
6
|
+
# modify it under the terms of the GNU Lesser General Public
|
7
|
+
# License as published by the Free Software Foundation; either
|
8
|
+
# version 2.1 of the License, or (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This library is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
# Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public
|
16
|
+
# License along with this library; if not, write to the Free Software
|
17
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
|
19
|
+
$LOAD_PATH.unshift("./../glib2/lib")
|
20
|
+
require "gnome2-raketask"
|
21
|
+
|
22
|
+
|
23
|
+
package = GNOME2Package.new do |_package|
|
24
|
+
_package.summary = "Ruby/WebKitGtk2 is a Ruby binding of WebKitGTK+ for Gtk 2.0 Toolkit"
|
25
|
+
_package.description = "Ruby/WebKitGtk2 is a Ruby binding of WebKitGTK+ for Gtk 2.0 Toolkit"
|
26
|
+
_package.dependency.gem.runtime = ["gobject-introspection", "gtk2"]
|
27
|
+
_package.dependency.gem.development = ["test-unit-notify"]
|
28
|
+
_package.win32.packages = []
|
29
|
+
_package.win32.dependencies = []
|
30
|
+
_package.win32.build_dependencies = ["glib2", "gobject-introspection"]
|
31
|
+
_package.win32.build_packages = []
|
32
|
+
end
|
33
|
+
package.define_tasks
|
34
|
+
|
35
|
+
|
36
|
+
namespace :dependency do
|
37
|
+
desc "Install dependencies"
|
38
|
+
task :install do
|
39
|
+
# TODO: Install gir1.2-webkit-1.0 on Debian.
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
task :build => "dependency:install"
|
data/lib/webkit-gtk2.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# Copyright (C) 2013 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
require "gobject-introspection"
|
18
|
+
require "gtk2"
|
19
|
+
|
20
|
+
base_dir = Pathname.new(__FILE__).dirname.dirname.dirname.expand_path
|
21
|
+
vendor_dir = base_dir + "vendor" + "local"
|
22
|
+
vendor_bin_dir = vendor_dir + "bin"
|
23
|
+
GLib.prepend_environment_path(vendor_bin_dir)
|
24
|
+
|
25
|
+
module WebKitGtk2
|
26
|
+
@initialized = false
|
27
|
+
class << self
|
28
|
+
def init
|
29
|
+
return if @initialized
|
30
|
+
@initialized = true
|
31
|
+
Loader.load("WebKit", self, :version => "1.0")
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
class Loader < GObjectIntrospection::Loader
|
36
|
+
end
|
37
|
+
end
|
data/sample/brower.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# Copyright (C) 2013 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
require "webkit-gtk2"
|
18
|
+
|
19
|
+
WebKitGtk2.init
|
20
|
+
|
21
|
+
window = Gtk::Window.new
|
22
|
+
window.signal_connect("destroy") do
|
23
|
+
Gtk.main_quit
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
scrolled_window = Gtk::ScrolledWindow.new
|
28
|
+
|
29
|
+
view = WebKitGtk2::WebView.new
|
30
|
+
view.load_uri("http://webkitgtk.org/")
|
31
|
+
|
32
|
+
scrolled_window.add(view)
|
33
|
+
window.add(scrolled_window)
|
34
|
+
window.show_all
|
35
|
+
|
36
|
+
Gtk.main
|
data/test/run-test.rb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Copyright (C) 2013 Ruby-GNOME2 Project Team
|
4
|
+
#
|
5
|
+
# This library is free software; you can redistribute it and/or
|
6
|
+
# modify it under the terms of the GNU Lesser General Public
|
7
|
+
# License as published by the Free Software Foundation; either
|
8
|
+
# version 2.1 of the License, or (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This library is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
# Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public
|
16
|
+
# License along with this library; if not, write to the Free Software
|
17
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
|
19
|
+
ruby_gnome2_base = File.join(File.dirname(__FILE__), "..", "..")
|
20
|
+
ruby_gnome2_base = File.expand_path(ruby_gnome2_base)
|
21
|
+
|
22
|
+
glib_base = File.join(ruby_gnome2_base, "glib2")
|
23
|
+
gio_base = File.join(ruby_gnome2_base, "gio2")
|
24
|
+
atk_base = File.join(ruby_gnome2_base, "atk")
|
25
|
+
pango_base = File.join(ruby_gnome2_base, "pango")
|
26
|
+
gdk2_base = File.join(ruby_gnome2_base, "gdk2")
|
27
|
+
gtk2_base = File.join(ruby_gnome2_base, "gtk2")
|
28
|
+
gobject_introspection_base = File.join(ruby_gnome2_base, "gobject-introspection")
|
29
|
+
|
30
|
+
modules = [
|
31
|
+
[glib_base, "glib2"],
|
32
|
+
[gio_base, "gio2"],
|
33
|
+
[atk_base, "atk"],
|
34
|
+
[pango_base, "pango"],
|
35
|
+
[gdk3_base, "gdk2"],
|
36
|
+
[gtk3_base, "gtk2"],
|
37
|
+
[gobject_introspection_base, "gobject-introspection"],
|
38
|
+
]
|
39
|
+
modules.each do |target, module_name|
|
40
|
+
if system("which make > /dev/null")
|
41
|
+
`make -C #{target.dump} > /dev/null` or exit(false)
|
42
|
+
end
|
43
|
+
$LOAD_PATH.unshift(File.join(target, "ext", module_name))
|
44
|
+
$LOAD_PATH.unshift(File.join(target, "lib"))
|
45
|
+
end
|
46
|
+
|
47
|
+
$LOAD_PATH.unshift(File.join(glib_base, "test"))
|
48
|
+
require "glib-test-init"
|
49
|
+
|
50
|
+
$LOAD_PATH.unshift(File.join(gobject_introspection_base, "test"))
|
51
|
+
require "gobject-introspection-test-utils"
|
52
|
+
|
53
|
+
$LOAD_PATH.unshift(File.join(clutter_base, "test"))
|
54
|
+
require "webkit-gtk-test-utils"
|
55
|
+
|
56
|
+
require "webkit-gtk"
|
57
|
+
|
58
|
+
exit Test::Unit::AutoRunner.run(true)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Copyright (C) 2013 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
require "test-unit"
|
18
|
+
require "test/unit/notify"
|
19
|
+
|
20
|
+
module WebKitGtkTestUtils
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: webkit-gtk2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.2.4
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- The Ruby-GNOME2 Project Team
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-03-24 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: gobject-introspection
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 1.2.4
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.2.4
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: gtk2
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 1.2.4
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.2.4
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: test-unit-notify
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
description: Ruby/WebKitGtk2 is a Ruby binding of WebKitGTK+ for Gtk 2.0 Toolkit
|
63
|
+
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
64
|
+
executables: []
|
65
|
+
extensions: []
|
66
|
+
extra_rdoc_files: []
|
67
|
+
files:
|
68
|
+
- Rakefile
|
69
|
+
- lib/webkit-gtk2.rb
|
70
|
+
- sample/brower.rb
|
71
|
+
- test/run-test.rb
|
72
|
+
- test/webkit-gtk-test-utils.rb
|
73
|
+
homepage: http://ruby-gnome2.sourceforge.jp/
|
74
|
+
licenses: []
|
75
|
+
post_install_message:
|
76
|
+
rdoc_options: []
|
77
|
+
require_paths:
|
78
|
+
- lib
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
81
|
+
requirements:
|
82
|
+
- - ! '>='
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: 1.8.5
|
85
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
87
|
+
requirements:
|
88
|
+
- - ! '>='
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
requirements: []
|
92
|
+
rubyforge_project:
|
93
|
+
rubygems_version: 1.8.23
|
94
|
+
signing_key:
|
95
|
+
specification_version: 3
|
96
|
+
summary: Ruby/WebKitGtk2 is a Ruby binding of WebKitGTK+ for Gtk 2.0 Toolkit
|
97
|
+
test_files: []
|