fltk-webview 0.1.1

Webview for embedded fltk windows
docs.rs failed to build fltk-webview-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: fltk-webview-0.3.1

fltk-webview

This provides webview functionality for embedded fltk windows. This currently works on Windows:

Usage

use fltk::{prelude::*, *};

fn main() {
    let app = app::App::default();
    let mut win = window::Window::default()
        .with_size(800, 600)
        .with_label("Webview");
    let mut wv_win = window::Window::default()
        .with_size(790, 590)
        .center_of_parent();
    win.end();
    win.show();
    
    let mut wv = fltk_webview::Webview::create(false, &mut wv_win);
    wv.navigate("http://google.com");

    app.run().unwrap();
}

Limitations

  • On windows, webview requires winrt headers, that means it's basically buildable with the MSVC toolchain. For Msys2/mingw, there are efforts to provide such headers, but nothing yet upstream.
  • On macos, unhandled objective-c exceptions can lead to application crashes.
  • On linux, I can't construct a GtkWindow from an FLTK window nor from an FLTK raw handle (xid). If you're able to do so, your help is needed!

alt_test