Struct tauri_runtime_wry::WryDispatcher

source ·
pub struct WryDispatcher<T: UserEvent> { /* private fields */ }
Expand description

The Tauri Dispatch for Wry.

Implementations§

source§

impl<T: UserEvent> WryDispatcher<T>

source

pub fn with_webview<F: FnOnce(Webview) + Send + 'static>( &self, f: F ) -> Result<()>

Trait Implementations§

source§

impl<T: Clone + UserEvent> Clone for WryDispatcher<T>

source§

fn clone(&self) -> WryDispatcher<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + UserEvent> Debug for WryDispatcher<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: UserEvent> Dispatch<T> for WryDispatcher<T>

source§

fn is_devtools_open(&self) -> Result<bool>

Gets the devtools window’s current open state.

source§

fn is_decorated(&self) -> Result<bool>

Gets the window’s current decoration state.

source§

fn is_resizable(&self) -> Result<bool>

Gets the window’s current resizable state.

source§

fn is_maximizable(&self) -> Result<bool>

Gets the current native window’s maximize button state

source§

fn is_minimizable(&self) -> Result<bool>

Gets the current native window’s minimize button state

source§

fn is_closable(&self) -> Result<bool>

Gets the current native window’s close button state

source§

fn gtk_window(&self) -> Result<ApplicationWindow>

Returns the ApplicationWindow from gtk crate that is used by this window.

§

type Runtime = Wry<T>

The runtime this Dispatch runs under.
§

type WindowBuilder = WindowBuilderWrapper

The window builder type.
source§

fn run_on_main_thread<F: FnOnce() + Send + 'static>(&self, f: F) -> Result<()>

Run a task on the main thread.
source§

fn on_window_event<F: Fn(&WindowEvent) + Send + 'static>(&self, f: F) -> Uuid

Registers a window event handler.
source§

fn on_menu_event<F: Fn(&MenuEvent) + Send + 'static>(&self, f: F) -> Uuid

Registers a window event handler.
source§

fn open_devtools(&self)

Open the web inspector which is usually called devtools.
source§

fn close_devtools(&self)

Close the web inspector which is usually called devtools.
source§

fn url(&self) -> Result<Url>

Returns the webview’s current URL.
source§

fn scale_factor(&self) -> Result<f64>

Returns the scale factor that can be used to map logical pixels to physical pixels, and vice versa.
source§

fn inner_position(&self) -> Result<PhysicalPosition<i32>>

Returns the position of the top-left hand corner of the window’s client area relative to the top-left hand corner of the desktop.
source§

fn outer_position(&self) -> Result<PhysicalPosition<i32>>

Returns the position of the top-left hand corner of the window relative to the top-left hand corner of the desktop.
source§

fn inner_size(&self) -> Result<PhysicalSize<u32>>

Returns the physical size of the window’s client area. Read more
source§

fn outer_size(&self) -> Result<PhysicalSize<u32>>

Returns the physical size of the entire window. Read more
source§

fn is_fullscreen(&self) -> Result<bool>

Gets the window’s current fullscreen state.
source§

fn is_minimized(&self) -> Result<bool>

Gets the window’s current minimized state.
source§

fn is_maximized(&self) -> Result<bool>

Gets the window’s current maximized state.
source§

fn is_focused(&self) -> Result<bool>

Gets the window’s current focus state.
source§

fn is_visible(&self) -> Result<bool>

Gets the window’s current visibility state.
source§

fn title(&self) -> Result<String>

Gets the window’s current title.
source§

fn is_menu_visible(&self) -> Result<bool>

Gets the window menu current visibility state.
source§

fn current_monitor(&self) -> Result<Option<Monitor>>

Returns the monitor on which the window currently resides. Read more
source§

fn primary_monitor(&self) -> Result<Option<Monitor>>

Returns the primary monitor of the system. Read more
source§

fn available_monitors(&self) -> Result<Vec<Monitor>>

Returns the list of all the monitors available on the system.
source§

fn theme(&self) -> Result<Theme>

Returns the current window theme.
source§

fn raw_window_handle(&self) -> Result<RawWindowHandle>

source§

fn center(&self) -> Result<()>

Centers the window.
source§

fn print(&self) -> Result<()>

Opens the dialog to prints the contents of the webview.
source§

fn request_user_attention( &self, request_type: Option<UserAttentionType> ) -> Result<()>

Requests user attention to the window. Read more
source§

fn create_window( &mut self, pending: PendingWindow<T, Self::Runtime> ) -> Result<DetachedWindow<T, Self::Runtime>>

Create a new webview window.
source§

fn set_resizable(&self, resizable: bool) -> Result<()>

Updates the window resizable flag.
source§

fn set_maximizable(&self, maximizable: bool) -> Result<()>

Updates the window’s native maximize button state. Read more
source§

fn set_minimizable(&self, minimizable: bool) -> Result<()>

Updates the window’s native minimize button state. Read more
source§

fn set_closable(&self, closable: bool) -> Result<()>

Updates the window’s native close button state. Read more
source§

fn set_title<S: Into<String>>(&self, title: S) -> Result<()>

Updates the window title.
source§

fn maximize(&self) -> Result<()>

Maximizes the window.
source§

fn unmaximize(&self) -> Result<()>

Unmaximizes the window.
source§

fn minimize(&self) -> Result<()>

Minimizes the window.
source§

fn unminimize(&self) -> Result<()>

Unminimizes the window.
source§

fn show_menu(&self) -> Result<()>

Shows the window menu.
source§

fn hide_menu(&self) -> Result<()>

Hides the window menu.
source§

fn show(&self) -> Result<()>

Shows the window.
source§

fn hide(&self) -> Result<()>

Hides the window.
source§

fn close(&self) -> Result<()>

Closes the window.
source§

fn set_decorations(&self, decorations: bool) -> Result<()>

Updates the hasDecorations flag.
source§

fn set_always_on_top(&self, always_on_top: bool) -> Result<()>

Updates the window alwaysOnTop flag.
source§

fn set_content_protected(&self, protected: bool) -> Result<()>

Prevents the window contents from being captured by other apps.
source§

fn set_size(&self, size: Size) -> Result<()>

Resizes the window.
source§

fn set_min_size(&self, size: Option<Size>) -> Result<()>

Updates the window min size.
source§

fn set_max_size(&self, size: Option<Size>) -> Result<()>

Updates the window max size.
source§

fn set_position(&self, position: Position) -> Result<()>

Updates the window position.
source§

fn set_fullscreen(&self, fullscreen: bool) -> Result<()>

Updates the window fullscreen state.
source§

fn set_focus(&self) -> Result<()>

Bring the window to front and focus.
source§

fn set_icon(&self, icon: Icon) -> Result<()>

Updates the window icon.
source§

fn set_skip_taskbar(&self, skip: bool) -> Result<()>

Whether to hide the window icon from the taskbar or not.
source§

fn set_cursor_grab(&self, grab: bool) -> Result<()>

Grabs the cursor, preventing it from leaving the window. Read more
source§

fn set_cursor_visible(&self, visible: bool) -> Result<()>

Modifies the cursor’s visibility. Read more
source§

fn set_cursor_icon(&self, icon: CursorIcon) -> Result<()>

source§

fn set_cursor_position<Pos: Into<Position>>(&self, position: Pos) -> Result<()>

Changes the position of the cursor in window coordinates.
source§

fn set_ignore_cursor_events(&self, ignore: bool) -> Result<()>

Ignores the window cursor events.
source§

fn start_dragging(&self) -> Result<()>

Starts dragging the window.
source§

fn eval_script<S: Into<String>>(&self, script: S) -> Result<()>

Executes javascript on the window this Dispatch represents.
source§

fn update_menu_item(&self, id: u16, update: MenuUpdate) -> Result<()>

Applies the specified update to the menu item associated with the given id.
source§

impl<T: UserEvent> Sync for WryDispatcher<T>

Auto Trait Implementations§

§

impl<T> Freeze for WryDispatcher<T>

§

impl<T> !RefUnwindSafe for WryDispatcher<T>

§

impl<T> Send for WryDispatcher<T>

§

impl<T> Unpin for WryDispatcher<T>
where T: Unpin,

§

impl<T> !UnwindSafe for WryDispatcher<T>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> UserEvent for T
where T: Debug + Clone + Send + 'static,