Webview Engines

Linux

The plugin uses (webkitgtk as an underlying engine on Linux. Windowing (in headless mode too) is handled by gtk.

headless

Default mode. Implemented by using gtk::OffscreenWindow as a canvas, where the webview is initialized.


#![allow(unused)]
fn main() {
extern crate bevy;
extern crate bevy_webview;
use bevy::prelude::*;
use bevy_webview::prelude::*;
let webview_plugin = WebviewPlugin::with_engine(webview_engine::headless);

App::new()
    // initializations...
   .add_plugin(webview_plugin);
}

windowed

For debugging purposes. This will start the webview in a windowed mode. Implemented by using gtk::Window.


#![allow(unused)]
fn main() {
extern crate bevy;
extern crate bevy_webview;
use bevy::prelude::*;
use bevy_webview::prelude::*;
let webview_plugin = WebviewPlugin::with_engine(webview_engine::windowed);

App::new()
    // initializations...
   .add_plugin(webview_plugin);
}

Windows

The plugin uses WebView2 as an underlying webview engine on Windows. Windowing is handled by Win32 C++ API.

Integrating an own engine

It is also possible to use your own webview engine. For now, see the dummy.rs -example for API usage.

Unimplemented

Help needed! Currently the following platforms are unimplemented.

  • Mac
  • IOS
  • Android