pub struct WindowBuilder { /* private fields */ }
Expand description
Builder for windows that are used to render a frame within the RenderContext.
Implementations§
Source§impl WindowBuilder
impl WindowBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
A new window builder will be 480x360 by default and have the name “Window”. After customizing the window with whatever properties your application needs, you can supply it an event loop to process the events that will be generated by the window.
Sourcepub fn with_name(self, name: &str) -> Self
pub fn with_name(self, name: &str) -> Self
The name to be displayed in the title bar of the window.
Sourcepub fn with_dimensions(self, width: u32, height: u32) -> Self
pub fn with_dimensions(self, width: u32, height: u32) -> Self
Specify the dimensions for the window (Defaults to 480 x 360).
pub fn with_vsync(self, vsync: bool) -> Self
pub fn build(self, event_loop: &mut Loop<Events>) -> Window
Auto Trait Implementations§
impl Freeze for WindowBuilder
impl RefUnwindSafe for WindowBuilder
impl Send for WindowBuilder
impl Sync for WindowBuilder
impl Unpin for WindowBuilder
impl UnwindSafe for WindowBuilder
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