pub struct WindowOptions {Show 14 fields
pub logical_window_id: String,
pub title: String,
pub application_id: Option<String>,
pub app_icon: Option<AppIcon>,
pub inner_size: Option<LogicalSize<f64>>,
pub decorations: bool,
pub resizable: bool,
pub has_client_title_row: bool,
pub client_titlebar_key: Option<String>,
pub titlebar_draggable: bool,
pub corner_radius: f32,
pub transparent: bool,
pub start_hidden_until_first_frame: bool,
pub native_overlay: Option<NativeOverlayOptions>,
}Expand description
Host-neutral options used to build a native winit window.
Default creates a visible, decorated, resizable window titled
"Ailloli UI", with no requested size, application identity, icon, client
title row, or native overlay. Logical sizes and radii use Ailloli UI logical
pixels; the operating system chooses physical pixels from the monitor scale.
§Examples
use ailloli_ui_winit::WindowOptions;
let options = WindowOptions::default();
assert_eq!(options.title, "Ailloli UI");
assert!(options.resizable && options.decorations);
assert!(options.inner_size.is_none());Fields§
§logical_window_id: StringStable Ailloli UI id for targeted capture; empty means unspecified.
title: StringNative title-bar text; defaults to "Ailloli UI".
application_id: Option<String>Reverse-DNS application id used for native grouping; None omits it.
app_icon: Option<AppIcon>Effective app/window icon descriptor; None keeps the platform default.
inner_size: Option<LogicalSize<f64>>Requested logical client size; None lets the window manager choose.
decorations: boolWhether the operating system supplies native window decorations.
resizable: boolWhether the user may resize the window through native affordances.
has_client_title_row: booltrue when the Ailloli UI root is title row + content (AilloliUi / Custom chrome).
client_titlebar_key: Option<String>Internal view key for the client title row, when provided by the high-level app facade.
titlebar_draggable: boolDrag the window from the client title bar (Window::titlebar_draggable).
corner_radius: f32Logical corner radius from ailloli_ui::Window::radius; zero is square.
transparent: boolTransparent winit window background (rounded corners + client chrome).
Whether native visibility is deferred until the first rendered frame.
native_overlay: Option<NativeOverlayOptions>Native overlay geometry and platform policy; None creates a normal window.
Implementations§
Source§impl WindowOptions
Builder-style host-neutral window configuration.
impl WindowOptions
Builder-style host-neutral window configuration.
Sourcepub fn with_logical_inner_size(self, size: Size) -> Self
pub fn with_logical_inner_size(self, size: Size) -> Self
Sets the initial logical client size without exposing a winit DPI type to provider-neutral callers.
Each component is clamped to at least 1.0 logical pixel. NaN also
becomes 1.0; positive infinity remains infinite and may later be
rejected by the platform.
§Examples
use ailloli_ui_core::Size;
use ailloli_ui_winit::WindowOptions;
let options = WindowOptions::default()
.with_logical_inner_size(Size::new(0.0, 480.0));
let size = options.inner_size.unwrap();
assert_eq!((size.width, size.height), (1.0, 480.0));Trait Implementations§
Source§impl Clone for WindowOptions
impl Clone for WindowOptions
Source§fn clone(&self) -> WindowOptions
fn clone(&self) -> WindowOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WindowOptions
impl Debug for WindowOptions
Auto Trait Implementations§
impl Freeze for WindowOptions
impl RefUnwindSafe for WindowOptions
impl Send for WindowOptions
impl Sync for WindowOptions
impl Unpin for WindowOptions
impl UnwindSafe for WindowOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().