diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -7,9 +7,9 @@ //! platforms as possible. //! //! # Building a window -//! +//! //! There are two ways to create a window: -//! +//! //! - Calling `Window::new()`. //! - Calling `let builder = WindowBuilder::new()` then `builder.build()`. //! @@ -104,7 +104,7 @@ impl WindowBuilder { } /// Builds the window. - /// + /// /// Error should be very rare and only occur in case of permission denied, incompatible system, /// out of memory, etc. pub fn build(mut self) -> Result<Window, String> { @@ -129,16 +129,16 @@ impl WindowBuilder { /// /// ```ignore /// let window = Window::new().unwrap(); -/// +/// /// unsafe { window.make_current() }; -/// +/// /// loop { /// for event in window.poll_events() { /// // process events here /// _ => () /// } /// } -/// +/// /// // draw everything here /// /// window.swap_buffers(); @@ -159,7 +159,7 @@ impl Window { /// Creates a new OpenGL context, and a Window for platforms where this is appropriate. /// /// This function is equivalent to `WindowBuilder::new().build()`. - /// + /// /// Error should be very rare and only occur in case of permission denied, incompatible system, /// out of memory, etc. #[inline] @@ -249,7 +249,7 @@ impl Window { } /// Returns an iterator to all the events that are currently in the window's events queue. - /// + /// /// Contrary to `wait_events`, this function never blocks. #[inline] pub fn poll_events(&self) -> PollEventsIterator { @@ -258,7 +258,7 @@ impl Window { /// Waits for an event, then returns an iterator to all the events that are currently /// in the window's events queue. - /// + /// /// If there are no events in queue when you call the function, /// this function will block until there is one. #[inline] |