webview_ruby 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +1 -1
- data/ext/Rakefile +9 -1
- data/lib/webview_ruby/version.rb +1 -1
- data/lib/webview_ruby.rb +2 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69ed78c9c7afed75c8371b7050fa0373f7fae112bc140164b76a8c8b6534e52a
|
4
|
+
data.tar.gz: fc3f1e3044c93f0c27e003071a9c251910b97da3c5c076d7d67b7cc3aafc4def
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cccf1db60986874ed631c835296705532825a04d76c4dc82d2b392ec5bad7e42a2cda539168d05dd1404fe8229e9b26dfba5bf5a59b03576f6ffb2e049d4cc5
|
7
|
+
data.tar.gz: ae0a5ad8841ac6deb689c3830b55e3210c4514d21894ba5987dd4263866b77f7ef642fbe718c64f863b417ff9eb1ee4fc29fb351f87c55748f91944dbe7162ee
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
WebViewRuby is a library that provide bindings for [webview/webview](https://github.com/webview/webview) a tiny tiny cross-platform webview library to build modern cross-platform GUIs. Webview uses Cocoa/WebKit on macOS, gtk-webkit2 on Linux and Edge on Windows 10.
|
4
4
|
|
5
|
-
IMPORTANT: Compilation may not work on windows
|
5
|
+
IMPORTANT: Compilation may not work on windows right now. Follow the progress [here](https://github.com/Maaarcocr/webview_ruby/issues/1)
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
data/ext/Rakefile
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
require 'ffi-compiler/compile_task'
|
2
|
+
require 'rbconfig'
|
2
3
|
|
3
4
|
FFI::Compiler::CompileTask.new('webview-ext') do |c|
|
5
|
+
if RbConfig::CONFIG['host_os'] =~ /darwin/
|
4
6
|
c.cxxflags << "-std=c++11"
|
5
7
|
c.ldflags << "-framework WebKit"
|
6
|
-
|
8
|
+
elsif RbConfig::CONFIG['host_os'] =~ /linux/
|
9
|
+
c.cxxflags << `pkg-config --cflags gtk+-3.0 webkit2gtk-4.0`.strip
|
10
|
+
c.ldflags << `pkg-config --libs gtk+-3.0 webkit2gtk-4.0`.strip
|
11
|
+
else
|
12
|
+
puts "Unsupported operating system prolly windows, check rake file in ext directory in source code and add correct flags from here https://github.com/webview/webview#webview-for-cc-developers "
|
13
|
+
end
|
14
|
+
end
|
data/lib/webview_ruby/version.rb
CHANGED
data/lib/webview_ruby.rb
CHANGED
@@ -24,6 +24,7 @@ module WebviewRuby
|
|
24
24
|
|
25
25
|
def initialize(debug:false)
|
26
26
|
@is_running = false
|
27
|
+
@bindings = {}
|
27
28
|
@window = WebviewRuby.webview_create(debug ? 1 : 0, nil)
|
28
29
|
end
|
29
30
|
|
@@ -67,6 +68,7 @@ module WebviewRuby
|
|
67
68
|
terminate
|
68
69
|
end
|
69
70
|
end
|
71
|
+
@bindings[callback] = true # save a reference
|
70
72
|
WebviewRuby.webview_bind(@window, name, callback, nil)
|
71
73
|
end
|
72
74
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webview_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marco Concetto Rudilosso
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
requirements: []
|
99
|
-
rubygems_version: 3.3.
|
99
|
+
rubygems_version: 3.3.11
|
100
100
|
signing_key:
|
101
101
|
specification_version: 4
|
102
102
|
summary: Ruby bindings for webview
|