Mercurial > projects > dstep
view dstep/appkit/NSNibLoading.d @ 27:57371c29ef73 default tip
ObjcWrap is now automatically mixed in. Added support for building as a dylib with DMD.
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Fri, 09 Apr 2010 23:00:22 +0200 |
parents | 19885b43130e |
children |
line wrap: on
line source
/** * Copyright: Copyright (c) 2009 Jacob Carlborg. * Authors: Jacob Carlborg * Version: Initial created: Sep 24, 2009 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) */ module dstep.appkit.NSNibLoading; import dstep.foundation.NSDictionary; import dstep.foundation.NSString; import dstep.foundation.NSBundle; import dstep.objc.bridge.Bridge; import dstep.objc.objc; const TNSNibLoading = ` static bool loadNibFile (NSString fileName, NSDictionary context, NSZone* zone) { return invokeObjcSelfClass!(bool, "loadNibFile:externalNameTable:withZone:", NSString, NSDictionary, NSZone*)(fileName, context, zone); } static bool loadNibNamed (NSString nibName, Object owner) { return invokeObjcSelfClass!(bool, "loadNibNamed:owner:", NSString, Object)(nibName, owner); } bool loadNibFile (NSString fileName, NSDictionary context, NSZone* zone) { return invokeObjcSelf!(bool, "loadNibFile:externalNameTable:withZone:", NSString, NSDictionary, NSZone*)(fileName, context, zone); } //mixin ObjcBindClassMethod!(loadNibFile, "loadNibFile:externalNameTable:withZone:"); //mixin ObjcBindClassMethod!(loadNibNamed, "loadNibNamed:owner:"); //mixin ObjcBindMethod!(loadNibFile, "loadNibFile:externalNameTable:withZone:"); `; const TNSNibAwaking = ` void awakeFromNib () { return invokeObjcSelf!(void, "awakeFromNib"); } //mixin ObjcBindMethod!(awakeFromNib, "awakeFromNib"); `;