pub trait Runtime: 'static {
    type Dispatcher: Dispatch;
    type Handle: RuntimeHandle;
    type GlobalShortcutManager: GlobalShortcutManager;
    type ClipboardManager: ClipboardManager;
    type TrayHandler: TrayHandle;
    fn new() -> Result<Self, Error>;
fn new_any_thread() -> Result<Self, Error>;
fn handle(&self) -> Self::Handle;
fn global_shortcut_manager(&self) -> Self::GlobalShortcutManager;
fn clipboard_manager(&self) -> Self::ClipboardManager;
fn create_window(
        &self,
        pending: PendingWindow<Self>
    ) -> Result<DetachedWindow<Self>, Error>;
fn system_tray(
        &self,
        system_tray: SystemTray
    ) -> Result<Self::TrayHandler, Error>;
fn on_system_tray_event<F>(&mut self, f: F) -> Uuid
    where
        F: 'static + Fn(&SystemTrayEvent) + Send
;
fn run_iteration<F>(&mut self, callback: F) -> RunIteration
    where
        F: 'static + Fn(RunEvent)
;
fn run<F>(self, callback: F)
    where
        F: 'static + FnMut(RunEvent)
; }
Expand description

The webview runtime interface.

Associated Types

The message dispatcher.

The runtime handle type.

The global shortcut manager type.

The clipboard manager type.

The tray handler type.

Required methods

Creates a new webview runtime. Must be used on the main thread.

Creates a new webview runtime on any thread.

Gets a runtime handle.

Gets the global shortcut manager.

Gets the clipboard manager.

Create a new webview window.

Adds the icon to the system tray with the specified menu items.

Registers a system tray event handler.

Runs the one step of the webview runtime event loop and returns control flow to the caller.

Run the webview runtime.

Implementors