comparison dstep/appkit/NSNibLoading.d @ 16:19885b43130e

Huge update, the bridge actually works now
author Jacob Carlborg <doob@me.com>
date Sun, 03 Jan 2010 22:06:11 +0100
parents
children
comparison
equal deleted inserted replaced
15:7ff919f595d5 16:19885b43130e
1 /**
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
3 * Authors: Jacob Carlborg
4 * Version: Initial created: Sep 24, 2009
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6 */
7 module dstep.appkit.NSNibLoading;
8
9 import dstep.foundation.NSDictionary;
10 import dstep.foundation.NSString;
11 import dstep.foundation.NSBundle;
12 import dstep.objc.bridge.Bridge;
13 import dstep.objc.objc;
14
15 const TNSNibLoading = `
16
17 static bool loadNibFile (NSString fileName, NSDictionary context, NSZone* zone)
18 {
19 return invokeObjcSelfClass!(bool, "loadNibFile:externalNameTable:withZone:", NSString, NSDictionary, NSZone*)(fileName, context, zone);
20 }
21
22 static bool loadNibNamed (NSString nibName, Object owner)
23 {
24 return invokeObjcSelfClass!(bool, "loadNibNamed:owner:", NSString, Object)(nibName, owner);
25 }
26
27 bool loadNibFile (NSString fileName, NSDictionary context, NSZone* zone)
28 {
29 return invokeObjcSelf!(bool, "loadNibFile:externalNameTable:withZone:", NSString, NSDictionary, NSZone*)(fileName, context, zone);
30 }
31
32 //mixin ObjcBindClassMethod!(loadNibFile, "loadNibFile:externalNameTable:withZone:");
33 //mixin ObjcBindClassMethod!(loadNibNamed, "loadNibNamed:owner:");
34 //mixin ObjcBindMethod!(loadNibFile, "loadNibFile:externalNameTable:withZone:");
35
36 `;
37
38 const TNSNibAwaking = `
39
40 void awakeFromNib ()
41 {
42 return invokeObjcSelf!(void, "awakeFromNib");
43 }
44
45 //mixin ObjcBindMethod!(awakeFromNib, "awakeFromNib");
46
47 `;
48