Skip to content

Commit

Permalink
Merge pull request #17 from pcwalton/revamp
Browse files Browse the repository at this point in the history
Introduce a more convenient notation and embrace dynamic typing.
  • Loading branch information
metajack committed Nov 15, 2013
2 parents aeb2040 + 00afc29 commit 809e031
Show file tree
Hide file tree
Showing 5 changed files with 194 additions and 199 deletions.
10 changes: 3 additions & 7 deletions appkit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use base;
use base::{ObjCMethodCall, id};

pub type CGFloat = f32;

Expand Down Expand Up @@ -51,11 +51,7 @@ extern {
}

#[fixed_stack_segment]
pub fn NSApp() -> base::id {
unsafe {
let klass = do "NSApplicatoin".to_c_str().with_ref |s| { base::objc_getClass(s) };
let sel = do "sharedApplication".to_c_str().with_ref |s| { base::sel_registerName(s) };
base::objc_msgSend(klass, sel)
}
pub unsafe fn NSApp() -> id {
"NSApplication".send("sharedApplication", ())
}

Loading

0 comments on commit 809e031

Please sign in to comment.