aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Partouche <david@manateedev.com>2014-11-19 16:55:44 +0100
committerDavid Partouche <david@manateedev.com>2014-11-19 16:55:44 +0100
commit29892fbb7c63406620b5dc95d1074a03b44d73b6 (patch)
tree8a1c918485bf29813a23897205872ee16d4c3679 /src
parentf9c9c201d730c1a305d31343edeabb18b01ed357 (diff)
downloadglutin-29892fbb7c63406620b5dc95d1074a03b44d73b6.tar.gz
glutin-29892fbb7c63406620b5dc95d1074a03b44d73b6.zip
Fixed some compilation errors on osx
Diffstat (limited to 'src')
-rw-r--r--src/osx/mod.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/osx/mod.rs b/src/osx/mod.rs
index 3b19b51..fb10a57 100644
--- a/src/osx/mod.rs
+++ b/src/osx/mod.rs
@@ -1,4 +1,5 @@
-use {CreationError, OsError, Event};
+use {CreationError, Event};
+use CreationError::OsError;
use libc;
use std::sync::atomic::AtomicBool;
@@ -18,7 +19,7 @@ use core_foundation::bundle::{CFBundleGetBundleWithIdentifier, CFBundleGetFuncti
use std::c_str::CString;
-use events::Event::{MouseInput, Pressed, Released, MouseMoved, ReceivedCharacter, KeyboardInput};
+use events::Event::{MouseInput, MouseMoved, ReceivedCharacter, KeyboardInput};
use events::ElementState::{Pressed, Released};
use events::MouseButton::{LeftMouseButton, RightMouseButton};
use events;
@@ -176,7 +177,7 @@ impl Window {
0
];
- let pixelformat = NSOpenGLPixelFormat::alloc(nil).initWithAttributes_(attributes);
+ let pixelformat = NSOpenGLPixelFormat::alloc(nil).initWithAttributes_(&attributes);
if pixelformat == nil {
return None;
}
@@ -268,22 +269,22 @@ impl Window {
events.push(KeyboardInput(Released, event.keycode() as u8, vkey));
},
NSFlagsChanged => {
- let shift_modifier = Window::modifier_event(event, appkit::NSShiftKeyMask as u64, events::LShift, shift_pressed);
+ let shift_modifier = Window::modifier_event(event, appkit::NSShiftKeyMask as u64, events::VirtualKeyCode::LShift, shift_pressed);
if shift_modifier.is_some() {
shift_pressed = !shift_pressed;
events.push(shift_modifier.unwrap());
}
- let ctrl_modifier = Window::modifier_event(event, appkit::NSControlKeyMask as u64, events::LControl, ctrl_pressed);
+ let ctrl_modifier = Window::modifier_event(event, appkit::NSControlKeyMask as u64, events::VirtualKeyCode::LControl, ctrl_pressed);
if ctrl_modifier.is_some() {
ctrl_pressed = !ctrl_pressed;
events.push(ctrl_modifier.unwrap());
}
- let win_modifier = Window::modifier_event(event, appkit::NSCommandKeyMask as u64, events::LWin, win_pressed);
+ let win_modifier = Window::modifier_event(event, appkit::NSCommandKeyMask as u64, events::VirtualKeyCode::LWin, win_pressed);
if win_modifier.is_some() {
win_pressed = !win_pressed;
events.push(win_modifier.unwrap());
}
- let alt_modifier = Window::modifier_event(event, appkit::NSAlternateKeyMask as u64, events::LAlt, alt_pressed);
+ let alt_modifier = Window::modifier_event(event, appkit::NSAlternateKeyMask as u64, events::VirtualKeyCode::LAlt, alt_pressed);
if alt_modifier.is_some() {
alt_pressed = !alt_pressed;
events.push(alt_modifier.unwrap());