pub trait Runtime<T: UserEvent>: Debug + Sized + 'static {
    type Dispatcher: Dispatch<T, Runtime = Self>;
    type Handle: RuntimeHandle<T, Runtime = Self>;
    type GlobalShortcutManager: GlobalShortcutManager;
    type ClipboardManager: ClipboardManager;
    type TrayHandler: TrayHandle;
    type EventLoopProxy: EventLoopProxy<T>;

Show 13 methods fn new() -> Result<Self>; fn create_proxy(&self) -> Self::EventLoopProxy; fn handle(&self) -> Self::Handle; fn global_shortcut_manager(&self) -> Self::GlobalShortcutManager; fn clipboard_manager(&self) -> Self::ClipboardManager; fn create_window(
        &self,
        pending: PendingWindow<T, Self>
    ) -> Result<DetachedWindow<T, Self>>; fn system_tray(&self, system_tray: SystemTray) -> Result<Self::TrayHandler>; fn on_system_tray_event<F: Fn(TrayId, &SystemTrayEvent) + Send + 'static>(
        &mut self,
        f: F
    ); fn set_activation_policy(&mut self, activation_policy: ActivationPolicy); fn show(&self); fn hide(&self); fn run_iteration<F: Fn(RunEvent<T>) + 'static>(
        &mut self,
        callback: F
    ) -> RunIteration; fn run<F: FnMut(RunEvent<T>) + 'static>(self, callback: F);
}
Expand description

The webview runtime interface.

Required Associated Types§

The message dispatcher.

The runtime handle type.

The global shortcut manager type.

The clipboard manager type.

The tray handler type.

The proxy type.

Required Methods§

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

Creates an EventLoopProxy that can be used to dispatch user events to the main event loop.

Gets a runtime handle.

Gets the global shortcut manager.

Gets the clipboard manager.

Create a new webview window.

Available on crate feature system-tray only.

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

Available on crate feature system-tray only.

Registers a system tray event handler.

Available on macOS only.

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

Available on macOS only.

Shows the application, but does not automatically focus it.

Available on macOS only.

Hides the application.

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

Run the webview runtime.

Implementors§