Conflicts: .travis.yml Cargo.toml examples/fullscreen.rs src/api/android/mod.rs src/api/cocoa/headless.rs src/api/cocoa/helpers.rs src/api/cocoa/mod.rs src/api/glx/mod.rs src/api/osmesa/mod.rs src/api/win32/callback.rs src/headless.rs src/lib.rs src/platform/linux/mod.rs src/window.rs
This commit is contained in:
commit
7f6ae8910e
22 changed files with 332 additions and 194 deletions
|
|
@ -1,26 +1,16 @@
|
|||
use std::collections::vec_deque::IntoIter as VecDequeIter;
|
||||
use std::default::Default;
|
||||
|
||||
use CreationError;
|
||||
use CursorState;
|
||||
use Event;
|
||||
use MouseCursor;
|
||||
use Window;
|
||||
use WindowAttributes;
|
||||
use WindowBuilder;
|
||||
use native_monitor::NativeMonitorId;
|
||||
|
||||
use libc;
|
||||
use platform;
|
||||
|
||||
/// Object that allows you to build windows.
|
||||
pub struct WindowBuilder {
|
||||
/// The attributes to use to create the window.
|
||||
pub window: WindowAttributes,
|
||||
|
||||
/// Platform-specific configuration.
|
||||
platform_specific: platform::PlatformSpecificWindowBuilderAttributes,
|
||||
}
|
||||
|
||||
impl WindowBuilder {
|
||||
/// Initializes a new `WindowBuilder` with default values.
|
||||
#[inline]
|
||||
|
|
@ -60,8 +50,8 @@ impl WindowBuilder {
|
|||
|
||||
/// Requests a specific title for the window.
|
||||
#[inline]
|
||||
pub fn with_title(mut self, title: String) -> WindowBuilder {
|
||||
self.window.title = title;
|
||||
pub fn with_title<T: Into<String>>(mut self, title: T) -> WindowBuilder {
|
||||
self.window.title = title.into();
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue