From 99cf2944cb08237c79acbd9e03e62751e075438b Mon Sep 17 00:00:00 2001 From: Paul Rouget Date: Tue, 22 Sep 2015 09:27:53 +0200 Subject: [PATCH] add addSubview method --- src/appkit.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/appkit.rs b/src/appkit.rs index 919caa8..b3acf76 100644 --- a/src/appkit.rs +++ b/src/appkit.rs @@ -1171,6 +1171,7 @@ pub trait NSView { unsafe fn display_(self); unsafe fn setWantsBestResolutionOpenGLSurface_(self, flag: BOOL); unsafe fn convertPoint_fromView_(self, point: NSPoint, view: id) -> NSPoint; + unsafe fn addSubview_(self, view: id); } impl NSView for id { @@ -1201,6 +1202,11 @@ impl NSView for id { unsafe fn convertPoint_fromView_(self, point: NSPoint, view: id) -> NSPoint { msg_send![self, convertPoint:point fromView:view] } + + unsafe fn addSubview_(self, view: id) { + msg_send![self, addSubview:view] + } + } pub trait NSOpenGLView {