Struct winit::WindowBuilder
[−]
[src]
pub struct WindowBuilder { pub window: WindowAttributes, // some fields omitted }
Object that allows you to build windows.
Fields
window: WindowAttributes
The attributes to use to create the window.
Methods
impl WindowBuilder
[src]
pub fn new() -> WindowBuilder
[src]
Initializes a new WindowBuilder
with default values.
pub fn with_dimensions(self, width: u32, height: u32) -> WindowBuilder
[src]
Requests the window to be of specific dimensions.
Width and height are in pixels.
pub fn with_min_dimensions(self, width: u32, height: u32) -> WindowBuilder
[src]
Sets a minimum dimension size for the window
Width and height are in pixels.
pub fn with_max_dimensions(self, width: u32, height: u32) -> WindowBuilder
[src]
Sets a maximum dimension size for the window
Width and height are in pixels.
pub fn with_title<T: Into<String>>(self, title: T) -> WindowBuilder
[src]
Requests a specific title for the window.
pub fn with_fullscreen(self, monitor: Option<MonitorId>) -> WindowBuilder
[src]
Sets the window fullscreen state. None means a normal window, Some(MonitorId) means a fullscreen window on that specific monitor
pub fn with_maximized(self, maximized: bool) -> WindowBuilder
[src]
Requests maximized mode.
pub fn with_visibility(self, visible: bool) -> WindowBuilder
[src]
Sets whether the window will be initially hidden or visible.
pub fn with_transparency(self, transparent: bool) -> WindowBuilder
[src]
Sets whether the background of the window should be transparent.
pub fn with_decorations(self, decorations: bool) -> WindowBuilder
[src]
Sets whether the window should have a border, a title bar, etc.
pub fn with_multitouch(self) -> WindowBuilder
[src]
Enables multitouch.
pub fn build(self, events_loop: &EventsLoop) -> Result<Window, CreationError>
[src]
Builds the window.
Error should be very rare and only occur in case of permission denied, incompatible system, out of memory, etc.
Trait Implementations
impl WindowBuilderExt for WindowBuilder
[src]
fn with_activation_policy(
self,
activation_policy: ActivationPolicy
) -> WindowBuilder
[src]
self,
activation_policy: ActivationPolicy
) -> WindowBuilder
Sets the activation policy for the window being built
fn with_movable_by_window_background(
self,
movable_by_window_background: bool
) -> WindowBuilder
[src]
self,
movable_by_window_background: bool
) -> WindowBuilder
Enables click-and-drag behavior for the entire window, not just the titlebar
fn with_titlebar_transparent(self, titlebar_transparent: bool) -> WindowBuilder
[src]
Makes the titlebar transparent and allows the content to appear behind it
[src]
Hides the window titlebar
[src]
Hides the window titlebar buttons
[src]
Hides the window title
fn with_fullsize_content_view(
self,
fullsize_content_view: bool
) -> WindowBuilder
[src]
self,
fullsize_content_view: bool
) -> WindowBuilder
Makes the window content appear behind the titlebar
impl Clone for WindowBuilder
[src]
fn clone(&self) -> WindowBuilder
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more