diff --git a/Cargo.toml b/Cargo.toml index de25f59..9643938 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,3 +10,4 @@ crate-type = ["rlib"] [dependencies] bitflags = "0.1" +libc = "*" diff --git a/src/appkit.rs b/src/appkit.rs index ea6f6f6..6c2d7fe 100644 --- a/src/appkit.rs +++ b/src/appkit.rs @@ -1033,7 +1033,7 @@ impl NSWindow for id { } unsafe fn mouseLocationOutsideOfEventStream(self) -> NSPoint { - msg_send_stret()(self, selector("mouseLocationOutsideOfEventStream")) + msg_send()(self, selector("mouseLocationOutsideOfEventStream")) } unsafe fn setAcceptsMouseMovedEvents_(self, acceptMouseMovedEvents: BOOL) { @@ -1635,7 +1635,7 @@ pub trait NSEvent { unsafe fn modifierFlags(self) -> NSEventModifierFlags; unsafe fn timestamp(self) -> NSTimeInterval; // NOTE: renamed from `- type` due to Rust keyword collision - unsafe fn event_type(self) -> NSEventType; + unsafe fn eventType(self) -> NSEventType; unsafe fn window(self) -> id /* (NSWindow *) */; unsafe fn windowNumber(self) -> NSInteger; unsafe fn eventRef(self) -> *const libc::c_void; @@ -1847,7 +1847,7 @@ impl NSEvent for id { } unsafe fn locationInWindow(self) -> NSPoint { - msg_send_stret()(self, selector("locationInWindow")) + msg_send()(self, selector("locationInWindow")) } unsafe fn modifierFlags(self) -> NSEventModifierFlags { @@ -1859,8 +1859,8 @@ impl NSEvent for id { } // NOTE: renamed from `- type` due to Rust keyword collision - unsafe fn event_type(self) -> NSEventType { - msg_send()(self, selector("event_type")) + unsafe fn eventType(self) -> NSEventType { + msg_send()(self, selector("type")) } unsafe fn window(self) -> id /* (NSWindow *) */ { @@ -1918,7 +1918,7 @@ impl NSEvent for id { } unsafe fn mouseLocation(_: Self) -> NSPoint { - msg_send_stret()(class("NSEvent"), selector("mouseLocation")) + msg_send()(class("NSEvent"), selector("mouseLocation")) } unsafe fn buttonNumber(self) -> NSInteger { @@ -2056,7 +2056,7 @@ impl NSEvent for id { } unsafe fn tilt(self) -> NSPoint { - msg_send_stret()(self, selector("tilt")) + msg_send()(self, selector("tilt")) } unsafe fn vendorDefined(self) -> id { @@ -2464,4 +2464,4 @@ impl NSTabViewItem for id { unsafe fn setTooltip_(self,toolTip:id){ msg_send()(self,selector("setTooltip:"),toolTip) } -} \ No newline at end of file +}