Add NSRange

This commit is contained in:
Felix Kaaman
2016-02-27 21:27:34 +01:00
parent 9933690479
commit ff18c50631
+16
View File
@@ -89,6 +89,22 @@ impl NSRect {
}
}
#[repr(C)]
pub struct NSRange {
pub location: NSUInteger,
pub length: NSUInteger,
}
impl NSRange {
#[inline]
pub fn new(location: NSUInteger, length: NSUInteger) -> NSRange {
NSRange {
location: location,
length: length
}
}
}
unsafe impl objc::Encode for NSRect {
fn encode() -> objc::Encoding {
let encoding = format!("{{CGRect={}{}}}",