pub struct WryHandle<T: UserEvent> { /* private fields */ }
Expand description
A handle to the Wry runtime.
Implementations§
Source§impl<T: UserEvent> WryHandle<T>
impl<T: UserEvent> WryHandle<T>
Sourcepub fn create_tao_window<F: FnOnce() -> (String, TaoWindowBuilder) + Send + 'static>(
&self,
f: F,
) -> Result<Weak<Window>>
pub fn create_tao_window<F: FnOnce() -> (String, TaoWindowBuilder) + Send + 'static>( &self, f: F, ) -> Result<Weak<Window>>
Creates a new tao window using a callback, and returns its window id.
Sourcepub fn window_id(&self, window_id: TaoWindowId) -> WindowId
pub fn window_id(&self, window_id: TaoWindowId) -> WindowId
Gets the [WebviewId'] associated with the given [
WindowId`].
Sourcepub fn send_event(&self, message: Message<T>) -> Result<()>
pub fn send_event(&self, message: Message<T>) -> Result<()>
Send a message to the event loop.
pub fn plugin<P: PluginBuilder<T> + 'static>(&mut self, plugin: P)
Trait Implementations§
Source§impl<T: UserEvent> RuntimeHandle<T> for WryHandle<T>
impl<T: UserEvent> RuntimeHandle<T> for WryHandle<T>
type Runtime = Wry<T>
Source§fn create_proxy(&self) -> EventProxy<T>
fn create_proxy(&self) -> EventProxy<T>
Creates an
EventLoopProxy
that can be used to dispatch user events to the main event loop.Source§fn create_window<F: Fn(RawWindow<'_>) + Send + 'static>(
&self,
pending: PendingWindow<T, Self::Runtime>,
after_window_creation: Option<F>,
) -> Result<DetachedWindow<T, Self::Runtime>>
fn create_window<F: Fn(RawWindow<'_>) + Send + 'static>( &self, pending: PendingWindow<T, Self::Runtime>, after_window_creation: Option<F>, ) -> Result<DetachedWindow<T, Self::Runtime>>
Create a new window.
Source§fn create_webview(
&self,
window_id: WindowId,
pending: PendingWebview<T, Self::Runtime>,
) -> Result<DetachedWebview<T, Self::Runtime>>
fn create_webview( &self, window_id: WindowId, pending: PendingWebview<T, Self::Runtime>, ) -> Result<DetachedWebview<T, Self::Runtime>>
Create a new webview.
Source§fn run_on_main_thread<F: FnOnce() + Send + 'static>(&self, f: F) -> Result<()>
fn run_on_main_thread<F: FnOnce() + Send + 'static>(&self, f: F) -> Result<()>
Run a task on the main thread.
fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError>
fn primary_monitor(&self) -> Option<Monitor>
fn monitor_from_point(&self, x: f64, y: f64) -> Option<Monitor>
fn available_monitors(&self) -> Vec<Monitor>
fn cursor_position(&self) -> Result<PhysicalPosition<f64>>
fn set_theme(&self, theme: Option<Theme>)
impl<T: UserEvent> Sync for WryHandle<T>
Auto Trait Implementations§
impl<T> Freeze for WryHandle<T>
impl<T> !RefUnwindSafe for WryHandle<T>
impl<T> Send for WryHandle<T>
impl<T> Unpin for WryHandle<T>where
T: Unpin,
impl<T> !UnwindSafe for WryHandle<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)