pub trait Runtime: Sized + 'static {
    type Dispatcher: Dispatch<Runtime = Self>;
    type Handle: RuntimeHandle<Runtime = Self>;
    type GlobalShortcutManager: GlobalShortcutManager + Clone + Send;
    type ClipboardManager: ClipboardManager + Clone + Send;
    type TrayHandler: TrayHandle + Clone + Send;
    fn new() -> Result<Self>;
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>>;
fn system_tray(&self, system_tray: SystemTray) -> Result<Self::TrayHandler>;
fn on_system_tray_event<F: Fn(&SystemTrayEvent) + Send + 'static>(
        &mut self,
        f: F
    ) -> Uuid;
fn set_activation_policy(&mut self, activation_policy: ActivationPolicy);
fn run_iteration<F: Fn(RunEvent) + 'static>(
        &mut self,
        callback: F
    ) -> RunIteration;
fn run<F: FnMut(RunEvent) + 'static>(self, callback: F); }
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.

Gets a runtime handle.

Gets the global shortcut manager.

Gets the clipboard manager.

Create a new webview window.

This is supported on crate feature system-tray only.

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

This is supported on crate feature system-tray only.

Registers a system tray event handler.

This is supported on macOS only.

Sets the activation policy for the application. It is set to NSApplicationActivationPolicyRegular by default.

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

Run the webview runtime.

Implementors