Trait tauri::Runtime [−][src]
pub trait Runtime: 'static { type Dispatcher: Dispatch; type Handle: RuntimeHandle; type GlobalShortcutManager: GlobalShortcutManager + Clone + Send; type ClipboardManager: ClipboardManager + Clone + Send; type TrayHandler: TrayHandle + Clone + Send; fn new() -> 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<F>(self, callback: F)
where
F: 'static + Fn(RunEvent); }
Expand description
The webview runtime interface.
Associated Types
type Dispatcher: Dispatch
type Dispatcher: Dispatch
The message dispatcher.
type Handle: RuntimeHandle
type Handle: RuntimeHandle
The runtime handle type.
The global shortcut manager type.
type ClipboardManager: ClipboardManager + Clone + Send
type ClipboardManager: ClipboardManager + Clone + Send
The clipboard manager type.
type TrayHandler: TrayHandle + Clone + Send
type TrayHandler: TrayHandle + Clone + Send
The tray handler type.
Required methods
fn global_shortcut_manager(&self) -> Self::GlobalShortcutManager
fn global_shortcut_manager(&self) -> Self::GlobalShortcutManager
Gets the global shortcut manager.
fn clipboard_manager(&self) -> Self::ClipboardManager
fn clipboard_manager(&self) -> Self::ClipboardManager
Gets the clipboard manager.
fn create_window(
&self,
pending: PendingWindow<Self>
) -> Result<DetachedWindow<Self>, Error>
fn create_window(
&self,
pending: PendingWindow<Self>
) -> Result<DetachedWindow<Self>, Error>
Create a new webview window.
fn system_tray(
&self,
system_tray: SystemTray
) -> Result<Self::TrayHandler, Error>
fn system_tray(
&self,
system_tray: SystemTray
) -> Result<Self::TrayHandler, Error>
Adds the icon to the system tray with the specified menu items.
fn on_system_tray_event<F>(&mut self, f: F) -> Uuid where
F: 'static + Fn(&SystemTrayEvent) + Send,
fn on_system_tray_event<F>(&mut self, f: F) -> Uuid where
F: 'static + Fn(&SystemTrayEvent) + Send,
Registers a system tray event handler.