From bfc5d3e63d0d2a511cfbbf08895be4a7031a248f Mon Sep 17 00:00:00 2001 From: Tomaka17 Date: Sat, 2 Aug 2014 11:04:48 +0200 Subject: with_monitor -> with_fullscreen --- examples/fullscreen.rs | 2 +- src/lib.rs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/fullscreen.rs b/examples/fullscreen.rs index 80e6089..e5f8fd4 100644 --- a/examples/fullscreen.rs +++ b/examples/fullscreen.rs @@ -23,7 +23,7 @@ fn main() { let window = init::WindowBuilder::new() .with_title("Hello world!".to_string()) - .with_monitor(monitor) + .with_fullscreen(monitor) .build() .unwrap(); diff --git a/src/lib.rs b/src/lib.rs index 356dbd5..b19da80 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -43,17 +43,22 @@ impl WindowBuilder { } } + /// Requests the window to be of specific dimensions. + /// + /// Width and height are in pixels. pub fn with_dimensions(mut self, width: uint, height: uint) -> WindowBuilder { self.dimensions = (width, height); self } + /// Requests a specific title for the window. pub fn with_title(mut self, title: String) -> WindowBuilder { self.title = title; self } - pub fn with_monitor(mut self, monitor: MonitorID) -> WindowBuilder { + /// Requests fullscreen mode. + pub fn with_fullscreen(mut self, monitor: MonitorID) -> WindowBuilder { let MonitorID(monitor) = monitor; self.monitor = Some(monitor); self -- cgit v1.2.3