Enum bevy::window::WindowCommand
pub enum WindowCommand {
Show 17 variants
SetWindowMode {
mode: WindowMode,
resolution: UVec2,
},
SetTitle {
title: String,
},
SetScaleFactor {
scale_factor: f64,
},
SetResolution {
logical_resolution: Vec2,
scale_factor: f64,
},
SetPresentMode {
present_mode: PresentMode,
},
SetResizable {
resizable: bool,
},
SetDecorations {
decorations: bool,
},
SetCursorGrabMode {
grab_mode: CursorGrabMode,
},
SetCursorIcon {
icon: CursorIcon,
},
SetCursorVisibility {
visible: bool,
},
SetCursorPosition {
position: Vec2,
},
SetMaximized {
maximized: bool,
},
SetMinimized {
minimized: bool,
},
SetPosition {
monitor_selection: MonitorSelection,
position: IVec2,
},
Center(MonitorSelection),
SetResizeConstraints {
resize_constraints: WindowResizeConstraints,
},
Close,
}
Expand description
A command to be sent to a window.
Bevy apps don’t interact with this enum
directly. Instead, they should use the methods on Window
.
This enum
is meant for authors of windowing plugins. See the documentation on crate::WindowPlugin
for more information.
Variants§
SetWindowMode
Set the window’s WindowMode
.
SetTitle
Set the window’s title.
SetScaleFactor
Set the window’s scale factor.
SetResolution
Set the window’s resolution.
SetPresentMode
Fields
present_mode: PresentMode
Set the window’s PresentMode
.
SetResizable
Set whether or not the window is resizable.
SetDecorations
Set whether or not the window has decorations.
Examples of decorations include the close, full screen, and minimize buttons
SetCursorGrabMode
Fields
grab_mode: CursorGrabMode
Set whether or not the cursor’s position is locked.
SetCursorIcon
Fields
icon: CursorIcon
Set the cursor’s CursorIcon
.
SetCursorVisibility
Set whether or not the cursor is visible.
SetCursorPosition
Set the cursor’s position.
SetMaximized
Set whether or not the window is maximized.
SetMinimized
Set whether or not the window is minimized.
SetPosition
Set the window’s position on the selected monitor.
Center(MonitorSelection)
Sets the position of the window to be in the center of the selected monitor.
SetResizeConstraints
Fields
resize_constraints: WindowResizeConstraints
Set the window’s WindowResizeConstraints
Close
Trait Implementations§
§impl Debug for WindowCommand
impl Debug for WindowCommand
§impl PartialEq<WindowCommand> for WindowCommand
impl PartialEq<WindowCommand> for WindowCommand
§fn eq(&self, other: &WindowCommand) -> bool
fn eq(&self, other: &WindowCommand) -> bool
impl StructuralPartialEq for WindowCommand
Auto Trait Implementations§
impl RefUnwindSafe for WindowCommand
impl Send for WindowCommand
impl Sync for WindowCommand
impl Unpin for WindowCommand
impl UnwindSafe for WindowCommand
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for Twhere
U: ShaderType,
&'a T: for<'a> Into<U>,
impl<T, U> AsBindGroupShaderType<U> for Twhere
U: ShaderType,
&'a T: for<'a> Into<U>,
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist. Read more§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
. Read more§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more§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. Read more§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. Read more