Module: Roxane
- Defined in:
- lib/roxane.rb,
lib/roxane/ffi.rb,
lib/roxane/gtk.rb,
lib/roxane/webkit.rb,
lib/roxane/window.rb,
lib/roxane/version.rb,
lib/roxane/static_server.rb
Overview
Roxane — a pure-Ruby desktop shell. A native window hosting the operating
system's webview (WebView2 / WKWebView / WebKitGTK, via the webview C library),
bridged to Ruby with an invoke/emit operation channel. The host/transport only:
it serves whatever web frontend you give it and is agnostic to look-and-feel.
Named for Cyrano's Roxane.
Defined Under Namespace
Modules: FFI, GLib, Gtk, WebKit Classes: Error, StaticServer, Window
Constant Summary collapse
- VERSION =
"0.0.3"
Class Method Summary collapse
- .bundled_library ⇒ Object
- .default_library_name ⇒ Object
-
.library_path ⇒ Object
Path to the libwebview shared library: an explicit override wins, then a vendored (precompiled) copy shipped with the gem, then the platform's default name resolved by the system loader.
Class Method Details
.bundled_library ⇒ Object
23 24 25 26 27 |
# File 'lib/roxane.rb', line 23 def self.bundled_library platform_dir = File.join(__dir__, "..", "vendor", Gem::Platform.local.to_s) Dir[File.join(platform_dir, "libwebview.{so,dylib,dll}*")].sort.first || Dir[File.join(__dir__, "..", "vendor", "**", "libwebview.{so,dylib,dll}*")].sort.first end |
.default_library_name ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/roxane.rb', line 29 def self.default_library_name case RbConfig::CONFIG["host_os"] when /darwin/ then "libwebview.dylib" when /mswin|mingw|cygwin/ then "webview.dll" else "libwebview.so" end end |
.library_path ⇒ Object
Path to the libwebview shared library: an explicit override wins, then a vendored (precompiled) copy shipped with the gem, then the platform's default name resolved by the system loader.
19 20 21 |
# File 'lib/roxane.rb', line 19 def self.library_path ENV["ROXANE_LIBWEBVIEW"] || bundled_library || default_library_name end |