From d8a1fe5c97b18832b52a2e33f553ade69baf6c76 Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Fri, 21 Nov 2014 07:47:08 +1000 Subject: Implement get_inner_size() for mac. --- src/osx/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osx/mod.rs b/src/osx/mod.rs index 64cc529..0b4a508 100644 --- a/src/osx/mod.rs +++ b/src/osx/mod.rs @@ -268,7 +268,8 @@ impl Window { } pub fn get_inner_size(&self) -> Option<(uint, uint)> { - unimplemented!() + let rect = unsafe { NSView::frame(self.view) }; + Some((rect.size.width as uint, rect.size.height as uint)) } pub fn get_outer_size(&self) -> Option<(uint, uint)> { -- cgit v1.2.3