Struct tauri_utils::config::WindowConfig

source ·
pub struct WindowConfig {
Show 33 fields pub label: String, pub url: WindowUrl, pub user_agent: Option<String>, pub file_drop_enabled: bool, pub center: bool, pub x: Option<f64>, pub y: Option<f64>, pub width: f64, pub height: f64, pub min_width: Option<f64>, pub min_height: Option<f64>, pub max_width: Option<f64>, pub max_height: Option<f64>, pub resizable: bool, pub maximizable: bool, pub minimizable: bool, pub closable: bool, pub title: String, pub fullscreen: bool, pub focus: bool, pub transparent: bool, pub maximized: bool, pub visible: bool, pub decorations: bool, pub always_on_top: bool, pub content_protected: bool, pub skip_taskbar: bool, pub theme: Option<Theme>, pub title_bar_style: TitleBarStyle, pub hidden_title: bool, pub accept_first_mouse: bool, pub tabbing_identifier: Option<String>, pub additional_browser_args: Option<String>,
}
Expand description

The window configuration object.

See more: https://tauri.app/v1/api/config#windowconfig

Fields§

§label: String

The window identifier. It must be alphanumeric.

§url: WindowUrl

The window webview URL.

§user_agent: Option<String>

The user agent for the webview

§file_drop_enabled: bool

Whether the file drop is enabled or not on the webview. By default it is enabled.

Disabling it is required to use drag and drop on the frontend on Windows.

§center: bool

Whether or not the window starts centered or not.

§x: Option<f64>

The horizontal position of the window’s top left corner

§y: Option<f64>

The vertical position of the window’s top left corner

§width: f64

The window width.

§height: f64

The window height.

§min_width: Option<f64>

The min window width.

§min_height: Option<f64>

The min window height.

§max_width: Option<f64>

The max window width.

§max_height: Option<f64>

The max window height.

§resizable: bool

Whether the window is resizable or not. When resizable is set to false, native window’s maximize button is automatically disabled.

§maximizable: bool

Whether the window’s native maximize button is enabled or not. If resizable is set to false, this setting is ignored.

§Platform-specific

  • macOS: Disables the “zoom” button in the window titlebar, which is also used to enter fullscreen mode.
  • Linux / iOS / Android: Unsupported.
§minimizable: bool

Whether the window’s native minimize button is enabled or not.

§Platform-specific

  • Linux / iOS / Android: Unsupported.
§closable: bool

Whether the window’s native close button is enabled or not.

§Platform-specific

  • Linux: “GTK+ will do its best to convince the window manager not to show a close button. Depending on the system, this function may not have any effect when called on a window that is already visible”
  • iOS / Android: Unsupported.
§title: String

The window title.

§fullscreen: bool

Whether the window starts as fullscreen or not.

§focus: bool

Whether the window will be initially focused or not.

§transparent: bool

Whether the window is transparent or not.

Note that on macOS this requires the macos-private-api feature flag, enabled under tauri > macOSPrivateApi. WARNING: Using private APIs on macOS prevents your application from being accepted to the App Store.

§maximized: bool

Whether the window is maximized or not.

§visible: bool

Whether the window is visible or not.

§decorations: bool

Whether the window should have borders and bars.

§always_on_top: bool

Whether the window should always be on top of other windows.

§content_protected: bool

Prevents the window contents from being captured by other apps.

§skip_taskbar: bool

If true, hides the window icon from the taskbar on Windows and Linux.

§theme: Option<Theme>

The initial window theme. Defaults to the system theme. Only implemented on Windows and macOS 10.14+.

§title_bar_style: TitleBarStyle

The style of the macOS title bar.

§hidden_title: bool

If true, sets the window title to be hidden on macOS.

§accept_first_mouse: bool

Whether clicking an inactive window also clicks through to the webview on macOS.

§tabbing_identifier: Option<String>

Defines the window tabbing identifier for macOS.

Windows with matching tabbing identifiers will be grouped together. If the tabbing identifier is not set, automatic tabbing will be disabled.

§additional_browser_args: Option<String>

Defines additional browser arguments on Windows. By default wry passes --disable-features=msWebOOUI,msPdfOOUI,msSmartScreenProtection so if you use this method, you also need to disable these components by yourself if you want.

Trait Implementations§

source§

impl Clone for WindowConfig

source§

fn clone(&self) -> WindowConfig

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 Debug for WindowConfig

source§

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

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

impl Default for WindowConfig

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for WindowConfig

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for WindowConfig

source§

fn eq(&self, other: &WindowConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for WindowConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for WindowConfig

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,