pub struct Wry { /* private fields */ }
This is supported on crate feature
wry
only.Expand description
A Tauri Runtime
wrapper around wry.
Trait Implementations
sourceimpl Runtime for Wry
impl Runtime for Wry
type Dispatcher = WryDispatcher
type Dispatcher = WryDispatcher
The message dispatcher.
type GlobalShortcutManager = GlobalShortcutManagerHandle
type GlobalShortcutManager = GlobalShortcutManagerHandle
The global shortcut manager type.
type ClipboardManager = ClipboardManagerWrapper
type ClipboardManager = ClipboardManagerWrapper
The clipboard manager type.
type TrayHandler = SystemTrayHandle
type TrayHandler = SystemTrayHandle
The tray handler type.
sourcepub fn new() -> Result<Wry, Error>
pub fn new() -> Result<Wry, Error>
Creates a new webview runtime. Must be used on the main thread.
sourcepub fn new_any_thread() -> Result<Wry, Error>
pub fn new_any_thread() -> Result<Wry, Error>
Creates a new webview runtime on any thread.
sourcepub fn global_shortcut_manager(&self) -> <Wry as Runtime>::GlobalShortcutManager
pub fn global_shortcut_manager(&self) -> <Wry as Runtime>::GlobalShortcutManager
Gets the global shortcut manager.
sourcepub fn clipboard_manager(&self) -> <Wry as Runtime>::ClipboardManager
pub fn clipboard_manager(&self) -> <Wry as Runtime>::ClipboardManager
Gets the clipboard manager.
sourcepub fn create_window(
&self,
pending: PendingWindow<Wry>
) -> Result<DetachedWindow<Wry>, Error>
pub fn create_window(
&self,
pending: PendingWindow<Wry>
) -> Result<DetachedWindow<Wry>, Error>
Create a new webview window.
sourcepub fn system_tray(
&self,
system_tray: SystemTray
) -> Result<<Wry as Runtime>::TrayHandler, Error>
pub fn system_tray(
&self,
system_tray: SystemTray
) -> Result<<Wry as Runtime>::TrayHandler, Error>
Adds the icon to the system tray with the specified menu items.
sourcepub fn on_system_tray_event<F>(&mut self, f: F) -> Uuid where
F: 'static + Fn(&SystemTrayEvent) + Send,
pub fn on_system_tray_event<F>(&mut self, f: F) -> Uuid where
F: 'static + Fn(&SystemTrayEvent) + Send,
Registers a system tray event handler.
sourcepub fn run_iteration<F>(&mut self, callback: F) -> RunIteration where
F: 'static + FnMut(RunEvent),
pub fn run_iteration<F>(&mut self, callback: F) -> RunIteration where
F: 'static + FnMut(RunEvent),
Runs the one step of the webview runtime event loop and returns control flow to the caller.
Auto Trait Implementations
impl !RefUnwindSafe for Wry
impl !Send for Wry
impl !Sync for Wry
impl Unpin for Wry
impl !UnwindSafe for Wry
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more