NSApp testcase

This commit is contained in:
Patrick Walton
2012-04-04 19:48:53 -07:00
parent a39122e026
commit 837254a65e
+8
View File
@@ -1,6 +1,14 @@
import base::objc;
#[nolink]
#[link_args="-framework AppKit"]
native mod appkit {
fn NSBeep();
}
fn NSApp() -> base::id {
let klass = str::as_c_str("NSApplication") { |s| objc::objc_getClass(s) };
let sel = str::as_c_str("sharedApplication") { |s| objc::sel_registerName(s) };
ret objc::objc_msgSend(klass, sel);
}