Struct kludgine::app::WindowAttributes
source · pub struct WindowAttributes {Show 19 fields
pub inner_size: Option<Size>,
pub min_inner_size: Option<Size>,
pub max_inner_size: Option<Size>,
pub position: Option<Position>,
pub resizable: bool,
pub enabled_buttons: WindowButtons,
pub title: String,
pub fullscreen: Option<Fullscreen>,
pub maximized: bool,
pub visible: bool,
pub transparent: bool,
pub decorations: bool,
pub window_icon: Option<Icon>,
pub preferred_theme: Option<Theme>,
pub resize_increments: Option<Size>,
pub content_protected: bool,
pub window_level: WindowLevel,
pub active: bool,
pub app_name: Option<String>,
}
Expand description
Attributes of a desktop window.
This structure is equivalent to [winit::window::WindowAttributes
] except
that parent_window
accepts a Window
rather than relying on raw window
handle.
Fields§
§inner_size: Option<Size>
The inner size of the window.
min_inner_size: Option<Size>
The minimum inner size of the window.
max_inner_size: Option<Size>
The maximum inner size of the window.
position: Option<Position>
The position of the top-left of the frame of the window.
resizable: bool
If true, the window can be resized by the user.
The collection of window buttons that are enabled.
title: String
The title of the window.
fullscreen: Option<Fullscreen>
The full screen configuration for the window.
maximized: bool
The maximized state of the window.
visible: bool
The visibility state of the window.
transparent: bool
If true, the window’s chrome will be hidden and only areas that have been drawn to will be opaque.
decorations: bool
Controls the visibility of the window decorations.
window_icon: Option<Icon>
The window’s icon.
preferred_theme: Option<Theme>
The window’s preferred theme.
resize_increments: Option<Size>
The increments in which the window will be allowed to resize by the user.
content_protected: bool
If true, the contents of the window will be prevented from being captured by other applications when supported.
window_level: WindowLevel
The level of the window.
active: bool
Whether the window is active or not.
app_name: Option<String>
Name of the application
WM_CLASS
on X11- application ID on wayland
- class name on windows
Trait Implementations§
source§impl Debug for WindowAttributes
impl Debug for WindowAttributes
source§impl Default for WindowAttributes
impl Default for WindowAttributes
source§fn default() -> WindowAttributes
fn default() -> WindowAttributes
Auto Trait Implementations§
impl !RefUnwindSafe for WindowAttributes
impl Send for WindowAttributes
impl Sync for WindowAttributes
impl Unpin for WindowAttributes
impl !UnwindSafe for WindowAttributes
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
§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.