From b321255fc2697dff61b208e925e68d713822b3ca Mon Sep 17 00:00:00 2001 From: Jeff Muizelaar Date: Wed, 7 Feb 2018 13:53:08 -0500 Subject: [PATCH] Add convertRectToBacking to NSView --- cocoa/src/appkit.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cocoa/src/appkit.rs b/cocoa/src/appkit.rs index c159b1a..bb5f40d 100644 --- a/cocoa/src/appkit.rs +++ b/cocoa/src/appkit.rs @@ -1673,6 +1673,7 @@ pub trait NSView: Sized { unsafe fn widthAnchor(self) -> id; unsafe fn heightAnchor(self) -> id; + unsafe fn convertRectToBacking(self, rect: NSRect) -> NSRect; } impl NSView for id { @@ -1743,6 +1744,10 @@ impl NSView for id { unsafe fn heightAnchor(self) -> id { msg_send![self, heightAnchor] } + + unsafe fn convertRectToBacking(self, rect: NSRect) -> NSRect { + msg_send![self, convertRectToBacking:rect] + } } pub type NSAutoresizingMaskOptions = u64;