Skip to main content

WindowConfig

Struct WindowConfig 

Source
pub struct WindowConfig { /* private fields */ }
Expand description

Unified declarative window creation settings normalized across desktop, mobile, tablet, and web.

Implementations§

Source§

impl WindowConfig

Convenience setters and safe optional accessors for WindowConfig.

Source

pub fn set_size(&mut self, width: u32, height: u32) -> &mut Self

Sets initial logical (width, height) clamped to at least 1x1.

§Arguments
  • &Self - Mutable window config.
  • u32 - Logical width.
  • u32 - Logical height.
§Returns
  • &mut Self - Mutable reference for fluent setter chaining.
Source

pub fn min_size_value(&self) -> Option<(u32, u32)>

Returns the optional minimum size tuple.

§Arguments
  • &Self - Window configuration.
§Returns
  • Option<(u32, u32)> - Minimum logical dimensions if set.
Source

pub fn max_size_value(&self) -> Option<(u32, u32)>

Returns the optional maximum size tuple.

§Arguments
  • &Self - Window configuration.
§Returns
  • Option<(u32, u32)> - Maximum logical dimensions if set.
Source

pub fn position_value(&self) -> Option<(i32, i32)>

Returns the optional initial window position.

§Arguments
  • &Self - Window configuration.
§Returns
  • Option<(i32, i32)> - Initial screen position if set.
Source

pub fn preferred_theme_value(&self) -> Option<ThemeMode>

Returns the optional preferred theme override.

§Arguments
  • &Self - Window configuration.
§Returns
  • Option<ThemeMode> - Preferred theme mode if set.
Source

pub fn icon_value(&self) -> Option<ImageBuffer>

Returns the optional decoded RGBA8 application icon bitmap.

§Arguments
  • &Self - Window configuration.
§Returns
  • Option<ImageBuffer> - Configured RGBA8 icon buffer if set.
Source

pub fn icon_path_value(&self) -> Option<String>

Returns the optional application icon asset path.

§Arguments
  • &Self - Window configuration.
§Returns
  • Option<String> - Configured icon asset path if set.
Source§

impl WindowConfig

Source

pub fn get_title(&self) -> &String

Source

pub fn get_mut_title(&mut self) -> &mut String

Source

pub fn set_title(&mut self, val: String) -> &mut Self

Source

pub fn get_width(&self) -> u32

Source

pub fn get_mut_width(&mut self) -> &mut u32

Source

pub fn set_width(&mut self, val: u32) -> &mut Self

Source

pub fn get_height(&self) -> u32

Source

pub fn get_mut_height(&mut self) -> &mut u32

Source

pub fn set_height(&mut self, val: u32) -> &mut Self

Source

pub fn get_mut_min_size(&mut self) -> &mut Option<(u32, u32)>

Source

pub fn set_min_size(&mut self, val: Option<(u32, u32)>) -> &mut Self

Source

pub fn get_mut_max_size(&mut self) -> &mut Option<(u32, u32)>

Source

pub fn set_max_size(&mut self, val: Option<(u32, u32)>) -> &mut Self

Source

pub fn get_mut_position(&mut self) -> &mut Option<(i32, i32)>

Source

pub fn set_position(&mut self, val: Option<(i32, i32)>) -> &mut Self

Source

pub fn get_resizable(&self) -> bool

Source

pub fn get_mut_resizable(&mut self) -> &mut bool

Source

pub fn set_resizable(&mut self, val: bool) -> &mut Self

Source

pub fn get_decorations(&self) -> bool

Source

pub fn get_mut_decorations(&mut self) -> &mut bool

Source

pub fn set_decorations(&mut self, val: bool) -> &mut Self

Source

pub fn get_transparent(&self) -> bool

Source

pub fn get_mut_transparent(&mut self) -> &mut bool

Source

pub fn set_transparent(&mut self, val: bool) -> &mut Self

Source

pub fn get_always_on_top(&self) -> bool

Source

pub fn get_mut_always_on_top(&mut self) -> &mut bool

Source

pub fn set_always_on_top(&mut self, val: bool) -> &mut Self

Source

pub fn get_fullscreen(&self) -> FullscreenMode

Source

pub fn get_mut_fullscreen(&mut self) -> &mut FullscreenMode

Source

pub fn set_fullscreen(&mut self, val: FullscreenMode) -> &mut Self

Source

pub fn get_immersive(&self) -> bool

Source

pub fn get_mut_immersive(&mut self) -> &mut bool

Source

pub fn set_immersive(&mut self, val: bool) -> &mut Self

Source

pub fn get_visible(&self) -> bool

Source

pub fn get_mut_visible(&mut self) -> &mut bool

Source

pub fn set_visible(&mut self, val: bool) -> &mut Self

Source

pub fn get_render(&self) -> RenderConfig

Source

pub fn get_mut_render(&mut self) -> &mut RenderConfig

Source

pub fn set_render(&mut self, val: RenderConfig) -> &mut Self

Source

pub fn get_orientation(&self) -> OrientationLock

Source

pub fn get_mut_orientation(&mut self) -> &mut OrientationLock

Source

pub fn set_orientation(&mut self, val: OrientationLock) -> &mut Self

Source

pub fn get_status_bar(&self) -> StatusBarStyle

Source

pub fn get_mut_status_bar(&mut self) -> &mut StatusBarStyle

Source

pub fn set_status_bar(&mut self, val: StatusBarStyle) -> &mut Self

Source

pub fn get_mut_preferred_theme(&mut self) -> &mut Option<ThemeMode>

Source

pub fn set_preferred_theme(&mut self, val: Option<ThemeMode>) -> &mut Self

Source

pub fn get_mut_icon(&mut self) -> &mut Option<ImageBuffer>

Source

pub fn set_icon(&mut self, val: Option<ImageBuffer>) -> &mut Self

Source

pub fn get_mut_icon_path(&mut self) -> &mut Option<String>

Source

pub fn set_icon_path(&mut self, val: Option<String>) -> &mut Self

Trait Implementations§

Source§

impl Clone for WindowConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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

Default WindowConfig with cross-platform sensible defaults.

Source§

fn default() -> Self

Creates a standard resizable 1280x800 decorated window configuration.

§Returns
  • Self - Default WindowConfig.
Source§

impl PartialEq for WindowConfig

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for WindowConfig

Auto Trait Implementations§

§

impl Forget for WindowConfig

§

impl Freeze for WindowConfig
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze, *const ArcInner<[u8]> is !null: Freeze, PhantomData<ArcInner<[u8]>>: Freeze,

§

impl Move for WindowConfig

§

impl RefUnwindSafe for WindowConfig

§

impl Send for WindowConfig
where RawVecInner: Send, Arc<[u8]>: Send,

§

impl Sync for WindowConfig
where RawVecInner: Sync, Arc<[u8]>: Sync,

§

impl Unpin for WindowConfig
where *const u8 is !null: Unpin, Arc<[u8]>: Unpin,

§

impl UnsafeUnpin for WindowConfig
where *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, *const ArcInner<[u8]> is !null: UnsafeUnpin, PhantomData<ArcInner<[u8]>>: UnsafeUnpin,

§

impl UnwindSafe for WindowConfig
where RawVecInner: UnwindSafe, Arc<[u8]>: UnwindSafe,

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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,

Source§

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>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.