pub struct WindowConfig {Show 14 fields
pub position: Option<Delta<i32>>,
pub decorations: Decorations,
pub startup_mode: StartupMode,
pub embed: Option<u32>,
pub dynamic_padding: bool,
pub dynamic_title: bool,
pub identity: Identity,
pub opacity: Percentage,
pub blur: bool,
option_as_alt: OptionAsAlt,
pub resize_increments: bool,
padding: Delta<u16>,
dimensions: Dimensions,
decorations_theme_variant: Option<Theme>,
}Fields§
§position: Option<Delta<i32>>Initial position.
decorations: DecorationsDraw the window with title bar / borders.
startup_mode: StartupModeStartup mode.
embed: Option<u32>XEmbed parent.
dynamic_padding: boolSpread out additional padding evenly.
dynamic_title: boolUse dynamic title.
identity: IdentityInformation to identify a particular window.
opacity: PercentageBackground opacity from 0.0 to 1.0.
blur: boolRequest blur behind the window.
option_as_alt: OptionAsAltControls which Option key should be treated as Alt.
resize_increments: boolResize increments.
padding: Delta<u16>Pixel padding.
dimensions: DimensionsInitial dimensions.
decorations_theme_variant: Option<Theme>System decorations theme variant.
Implementations§
Source§impl WindowConfig
impl WindowConfig
pub fn dimensions(&self) -> Option<Dimensions>
pub fn padding(&self, scale_factor: f32) -> (f32, f32)
pub fn fullscreen(&self) -> Option<Fullscreen>
pub fn maximized(&self) -> bool
pub fn theme(&self) -> Option<WinitTheme>
Trait Implementations§
Source§impl Clone for WindowConfig
impl Clone for WindowConfig
Source§fn clone(&self) -> WindowConfig
fn clone(&self) -> WindowConfig
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WindowConfig
impl Debug for WindowConfig
Source§impl Default for WindowConfig
impl Default for WindowConfig
Source§impl<'de> Deserialize<'de> for WindowConfig
impl<'de> Deserialize<'de> for WindowConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for WindowConfig
impl PartialEq for WindowConfig
Source§impl<'de> SerdeReplace for WindowConfig
impl<'de> SerdeReplace for WindowConfig
impl StructuralPartialEq for WindowConfig
Auto Trait Implementations§
impl Freeze for WindowConfig
impl RefUnwindSafe for WindowConfig
impl Send for WindowConfig
impl Sync for WindowConfig
impl Unpin for WindowConfig
impl UnwindSafe for WindowConfig
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§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.