diff options
-rw-r--r-- | Cargo.toml | 6 | ||||
-rw-r--r-- | build.rs | 1 | ||||
-rw-r--r-- | src/lib.rs | 4 | ||||
-rw-r--r-- | src/win32/callback.rs | 5 | ||||
-rw-r--r-- | src/win32/mod.rs | 8 | ||||
-rw-r--r-- | src/x11/window/mod.rs | 2 | ||||
-rw-r--r-- | src/x11/window/monitor.rs | 2 |
7 files changed, 17 insertions, 11 deletions
@@ -1,7 +1,7 @@ [package] name = "glutin" -version = "0.0.10" +version = "0.0.13" authors = ["tomaka <pierre.krieger1708@gmail.com>"] description = "Cross-plaform OpenGL context provider. Important: the crates.io only supports Windows and Linux for the moment." keywords = ["windowing", "opengl"] @@ -42,10 +42,10 @@ version = "0" [target.x86_64-apple-darwin.dependencies.glutin_core_graphics] version = "0" -[target.i686-apple-darwin.dependencies.core_foundation] +[target.i686-apple-darwin.dependencies.glutin_core_foundation] version = "0" -[target.x86_64-apple-darwin.dependencies.core_foundation] +[target.x86_64-apple-darwin.dependencies.glutin_core_foundation] version = "0" [target.i686-pc-windows-gnu.dependencies] @@ -1,4 +1,3 @@ -#![feature(path)] extern crate gl_generator; extern crate khronos_api; @@ -211,7 +211,9 @@ pub struct PixelFormat { } /// Attributes -struct BuilderAttribs<'a> { +// FIXME: remove `pub` (https://github.com/rust-lang/rust/issues/23585) +#[doc(hidden)] +pub struct BuilderAttribs<'a> { #[allow(dead_code)] headless: bool, strict: bool, diff --git a/src/win32/callback.rs b/src/win32/callback.rs index 5423fc3..f9ec653 100644 --- a/src/win32/callback.rs +++ b/src/win32/callback.rs @@ -36,8 +36,9 @@ fn send_event(input_window: winapi::HWND, event: Event) { /// This is the callback that is called by `DispatchMessage` in the events loop. /// /// Returning 0 tells the Win32 API that the message has been processed. -pub extern "system" fn callback(window: winapi::HWND, msg: winapi::UINT, - wparam: winapi::WPARAM, lparam: winapi::LPARAM) -> winapi::LRESULT +pub unsafe extern "system" fn callback(window: winapi::HWND, msg: winapi::UINT, + wparam: winapi::WPARAM, lparam: winapi::LPARAM) + -> winapi::LRESULT { match msg { winapi::WM_DESTROY => { diff --git a/src/win32/mod.rs b/src/win32/mod.rs index 8ba5ed5..07f76e8 100644 --- a/src/win32/mod.rs +++ b/src/win32/mod.rs @@ -49,7 +49,9 @@ unsafe impl Send for Window {} unsafe impl Sync for Window {} /// A simple wrapper that destroys the context when it is destroyed. -struct ContextWrapper(pub winapi::HGLRC); +// FIXME: remove `pub` (https://github.com/rust-lang/rust/issues/23585) +#[doc(hidden)] +pub struct ContextWrapper(pub winapi::HGLRC); impl Drop for ContextWrapper { fn drop(&mut self) { @@ -60,7 +62,9 @@ impl Drop for ContextWrapper { } /// A simple wrapper that destroys the window when it is destroyed. -struct WindowWrapper(pub winapi::HWND, pub winapi::HDC); +// FIXME: remove `pub` (https://github.com/rust-lang/rust/issues/23585) +#[doc(hidden)] +pub struct WindowWrapper(pub winapi::HWND, pub winapi::HDC); impl Drop for WindowWrapper { fn drop(&mut self) { diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs index 7845d07..385a913 100644 --- a/src/x11/window/mod.rs +++ b/src/x11/window/mod.rs @@ -348,7 +348,7 @@ impl Window { return Err(OsError(format!("Could not query the video modes"))); } - for i in range(0, mode_num) { + for i in 0..mode_num { let mode: ffi::XF86VidModeModeInfo = ptr::read(*modes.offset(i as isize) as *const _); if mode.hdisplay == dimensions.0 as u16 && mode.vdisplay == dimensions.1 as u16 { best_mode = i; diff --git a/src/x11/window/monitor.rs b/src/x11/window/monitor.rs index 77ac4ec..1dc0350 100644 --- a/src/x11/window/monitor.rs +++ b/src/x11/window/monitor.rs @@ -18,7 +18,7 @@ pub fn get_available_monitors() -> VecDeque<MonitorID> { }; let mut monitors = VecDeque::new(); - monitors.extend(range(0, nb_monitors).map(|i| MonitorID(i as u32))); + monitors.extend((0..nb_monitors).map(|i| MonitorID(i as u32))); monitors } |