pub struct WidgetWindowConfig {Show 20 fields
pub label: String,
pub url: Option<String>,
pub width: f64,
pub height: f64,
pub x: Option<f64>,
pub y: Option<f64>,
pub always_on_top: bool,
pub skip_taskbar: bool,
pub group: Option<String>,
pub widget_id: Option<String>,
pub instance: Option<String>,
pub size: Option<String>,
pub layer: Option<WindowLayer>,
pub click_through: Option<bool>,
pub focusable: Option<bool>,
pub all_workspaces: Option<bool>,
pub shadow: Option<bool>,
pub effects: Option<WindowEffectHint>,
pub placement: Option<WidgetPlacement>,
pub remember_position: Option<bool>,
}Expand description
Configuration for creating a desktop widget window.
When url is omitted the plugin serves its built-in renderer
automatically (via a custom URI-scheme protocol). In that case
group tells the renderer which config to load, and size
selects the layout family ("small", "medium", or "large").
Fields§
§label: StringTauri window label (must be unique).
url: Option<String>Frontend route or URL. Leave empty / omit to use the built-in widget renderer that ships with the plugin.
width: f64Window width in logical pixels.
height: f64Window height in logical pixels.
x: Option<f64>Optional X position.
y: Option<f64>Optional Y position.
always_on_top: boolKeep the widget above other windows.
skip_taskbar: boolHide from the taskbar / dock.
group: Option<String>Widget group identifier — passed to the built-in renderer so it
knows which config to load via get_widget_config.
widget_id: Option<String>Widget identity within the group (required for built-in renderer).
instance: Option<String>Placement id for the built-in renderer: reads config:{widgetId}#{instance}
first and fills {{instance}}. Defaults to none.
size: Option<String>Size family the renderer should display: "small", "medium",
or "large". Defaults to "small" when omitted.
layer: Option<WindowLayer>Stacking layer. Unset: top when alwaysOnTop, else desktop on Linux (the
historical DESKTOP pin) and normal on macOS / Windows.
click_through: Option<bool>Let clicks pass through to whatever is below. Default false.
focusable: Option<bool>Whether the window can take keyboard focus. Default true.
all_workspaces: Option<bool>Show on every virtual desktop / Space. Default: true for the desktop layer.
shadow: Option<bool>System window shadow (macOS / Windows). Default: platform default.
effects: Option<WindowEffectHint>Backdrop material hint (macOS vibrancy, Windows 11 mica / acrylic). Needs a transparent window; ignored where the platform has no such material (Linux).
placement: Option<WidgetPlacement>Place relative to a monitor’s work area instead of absolute x / y.
remember_position: Option<bool>Remember where the user moved the window (per label) and restore it next time.
Default true; a remembered position wins over x / y / placement while it
is still on a connected monitor.
Trait Implementations§
Source§impl Clone for WidgetWindowConfig
impl Clone for WidgetWindowConfig
Source§impl Debug for WidgetWindowConfig
impl Debug for WidgetWindowConfig
Source§impl Default for WidgetWindowConfig
impl Default for WidgetWindowConfig
Source§impl<'de> Deserialize<'de> for WidgetWindowConfig
impl<'de> Deserialize<'de> for WidgetWindowConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for WidgetWindowConfig
Available on crate feature schema only.
impl JsonSchema for WidgetWindowConfig
schema only.Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more