diff options
Diffstat (limited to 'examples/window.rs')
-rw-r--r-- | examples/window.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/examples/window.rs b/examples/window.rs index 910d6e6..37966c4 100644 --- a/examples/window.rs +++ b/examples/window.rs @@ -1,7 +1,5 @@ -#![feature(phase)] - #[cfg(target_os = "android")] -#[phase(plugin, link)] +#[macro_use] extern crate android_glue; extern crate glutin; @@ -15,7 +13,7 @@ android_start!(main); fn main() { println!("This example requires glutin to be compiled with the `window` feature"); } #[cfg(feature = "window")] -fn resize_callback(width: uint, height: uint) { +fn resize_callback(width: u32, height: u32) { println!("Window resized to {}x{}", width, height); } @@ -23,7 +21,7 @@ fn resize_callback(width: uint, height: uint) { fn main() { let mut window = glutin::Window::new().unwrap(); window.set_title("A fantastic window!"); - window.set_window_resize_callback(Some(resize_callback as fn(uint, uint))); + window.set_window_resize_callback(Some(resize_callback as fn(u32, u32))); unsafe { window.make_current() }; let context = support::load(&window); @@ -32,6 +30,6 @@ fn main() { context.draw_frame((0.0, 1.0, 0.0, 1.0)); window.swap_buffers(); - println!("{}", window.wait_events().collect::<Vec<glutin::Event>>()); + println!("{:?}", window.wait_events().collect::<Vec<glutin::Event>>()); } } |