pub struct KonWindow { /* private fields */ }Expand description
Window wrapper providing engine-level window operations
Wraps winit’s Window and provides a simplified API for common window management tasks like setting title, resizing, and querying window properties.
Implementations§
Source§impl KonWindow
impl KonWindow
Sourcepub fn set_config(&self, config: WindowConfig)
pub fn set_config(&self, config: WindowConfig)
Sourcepub fn size(&self) -> WindowSize
pub fn size(&self) -> WindowSize
Returns the window’s content area size
Sourcepub fn set_size(&self, size: WindowSize)
pub fn set_size(&self, size: WindowSize)
Sets the window’s content area size
Sourcepub fn outer_size(&self) -> WindowSize
pub fn outer_size(&self) -> WindowSize
Returns the window’s total size including decorations
Sourcepub fn position(&self) -> Option<WindowPosition>
pub fn position(&self) -> Option<WindowPosition>
Returns the window’s position on screen
Sourcepub fn set_position(&self, position: WindowPosition)
pub fn set_position(&self, position: WindowPosition)
Sets the window’s position on screen
Sourcepub fn set_resizable(&self, resizable: bool)
pub fn set_resizable(&self, resizable: bool)
Sets whether the window is resizable
Sourcepub fn is_resizable(&self) -> bool
pub fn is_resizable(&self) -> bool
Returns whether the window is resizable
Sourcepub fn set_fullscreen(&self, mode: Option<Fullscreen>)
pub fn set_fullscreen(&self, mode: Option<Fullscreen>)
Sets fullscreen mode
Sourcepub fn fullscreen(&self) -> Option<Fullscreen>
pub fn fullscreen(&self) -> Option<Fullscreen>
Returns current fullscreen mode
Sourcepub fn is_maximized(&self) -> bool
pub fn is_maximized(&self) -> bool
Returns whether the window is maximized
Sourcepub fn set_visible(&self, visible: bool)
pub fn set_visible(&self, visible: bool)
Shows or hides the window
Sourcepub fn is_visible(&self) -> Option<bool>
pub fn is_visible(&self) -> Option<bool>
Returns whether the window is visible
Returns None if visibility state cannot be determined.
Sourcepub fn set_min_size(&self, size: WindowSize)
pub fn set_min_size(&self, size: WindowSize)
Sets minimum window size
Sourcepub fn set_max_size(&self, size: WindowSize)
pub fn set_max_size(&self, size: WindowSize)
Sets maximum window size
Sourcepub fn scale_factor(&self) -> f64
pub fn scale_factor(&self) -> f64
Returns the window’s DPI scale factor
Sourcepub fn set_always_on_top(&self, always_on_top: bool)
pub fn set_always_on_top(&self, always_on_top: bool)
Sets whether the window stays on top of others
Sourcepub fn set_decorations(&self, decorations: bool)
pub fn set_decorations(&self, decorations: bool)
Shows or hides window decorations (title bar, borders)
Sourcepub fn has_decorations(&self) -> bool
pub fn has_decorations(&self) -> bool
Returns whether decorations are visible
Auto Trait Implementations§
impl Freeze for KonWindow
impl !RefUnwindSafe for KonWindow
impl Send for KonWindow
impl Sync for KonWindow
impl Unpin for KonWindow
impl !UnwindSafe for KonWindow
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> 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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.