mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-01 06:10:07 -04:00
Merge pull request #128 from glennw/inner-size-mac
Implement get_inner_size() for mac.
This commit is contained in:
@@ -268,7 +268,8 @@ impl Window {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_inner_size(&self) -> Option<(uint, uint)> {
|
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)> {
|
pub fn get_outer_size(&self) -> Option<(uint, uint)> {
|
||||||
|
|||||||
Reference in New Issue
Block a user