1 // Copyright 2013 The Servo Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution.
3 //
4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7 // option. This file may not be copied, modified, or distributed
8 // except according to those terms.
9 
10 use objc::runtime;
11 
12 pub use objc::runtime::{BOOL, NO, YES};
13 
14 pub type Class = *mut runtime::Class;
15 #[allow(non_camel_case_types)]
16 pub type id = *mut runtime::Object;
17 pub type SEL = runtime::Sel;
18 
19 #[allow(non_upper_case_globals)]
20 pub const nil: id = 0 as id;
21 #[allow(non_upper_case_globals)]
22 pub const Nil: Class = 0 as Class;
23 
24 /// A convenience method to convert the name of a selector to the selector object.
25 #[inline]
selector(name: &str) -> SEL26 pub fn selector(name: &str) -> SEL {
27     runtime::Sel::register(name)
28 }
29