Trait tauri_runtime::Runtime [−][src]
pub trait Runtime: Sized + 'static { type Dispatcher: Dispatch<Runtime = Self>; fn new() -> Result<Self>; fn create_window<P: Params<Runtime = Self>>(
&self,
pending: PendingWindow<P>
) -> Result<DetachedWindow<P>>; fn system_tray<I: MenuId>(
&self,
icon: Icon,
menu: Vec<SystemTrayMenuItem<I>>
) -> Result<()>; fn on_system_tray_event<F: Fn(&SystemTrayEvent) + Send + 'static>(
&mut self,
f: F
) -> Uuid; fn run(self); }
Expand description
The webview runtime interface.
Associated Types
type Dispatcher: Dispatch<Runtime = Self>
[src]
Expand description
The message dispatcher.
Required methods
fn new() -> Result<Self>
[src]
Expand description
Creates a new webview runtime.
fn create_window<P: Params<Runtime = Self>>(
&self,
pending: PendingWindow<P>
) -> Result<DetachedWindow<P>>
[src]
&self,
pending: PendingWindow<P>
) -> Result<DetachedWindow<P>>
Expand description
Create a new webview window.
fn system_tray<I: MenuId>(
&self,
icon: Icon,
menu: Vec<SystemTrayMenuItem<I>>
) -> Result<()>
[src]
&self,
icon: Icon,
menu: Vec<SystemTrayMenuItem<I>>
) -> Result<()>
This is supported on crate feature
system-tray
only.Expand description
Adds the icon to the system tray with the specified menu items.
fn on_system_tray_event<F: Fn(&SystemTrayEvent) + Send + 'static>(
&mut self,
f: F
) -> Uuid
[src]
&mut self,
f: F
) -> Uuid
This is supported on crate feature
system-tray
only.Expand description
Registers a system tray event handler.
fn run(self)
[src]
Expand description
Run the webview runtime.