comparison dstep/objc/bridge/Bridge.d @ 11:07194b026fa4

Added bindings to a couple of frameworks, new license + some other things
author Jacob Carlborg <doob@me.com>
date Sat, 01 Aug 2009 15:03:28 +0200
parents 9fd439a28ce3
children 19885b43130e
comparison
equal deleted inserted replaced
10:27e00625790b 11:07194b026fa4
3 * Authors: Jacob Carlborg 3 * Authors: Jacob Carlborg
4 * Version: Initial created: Feb 4, 2009 4 * Version: Initial created: Feb 4, 2009
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) 5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6 */ 6 */
7 module dstep.objc.bridge.Bridge; 7 module dstep.objc.bridge.Bridge;
8
9 import mambo.io;
10 8
11 version (Tango) 9 version (Tango)
12 { 10 {
13 import tango.core.Memory; 11 import tango.core.Memory;
14 import tango.core.Traits : ParameterTupleOf, ReturnTypeOf; 12 import tango.core.Traits : ParameterTupleOf, ReturnTypeOf;
87 this (id object) 85 this (id object)
88 { 86 {
89 super(object); 87 super(object);
90 } 88 }
91 89
92 static typeof(this) alloc () 90 /*static typeof(this) alloc ()
93 { 91 {
94 return invokeObjcSelfClass!(typeof(this), "alloc"); 92 return invokeObjcSelfClass!(typeof(this), "alloc");
95 } 93 }*/
96 94
97 typeof(this) init () 95 /*typeof(this) init ()
98 { 96 {
99 id ret = invokeObjcSelf!(id, "init"); 97 id ret = invokeObjcSelf!(id, "init");
100 98
101 if (!ret) 99 if (!ret)
102 return null; 100 return null;
109 107
110 auto object = new typeof(this) (ret); 108 auto object = new typeof(this) (ret);
111 object.dObject = this; 109 object.dObject = this;
112 110
113 return object; 111 return object;
114 } 112 }*/
115 113
116 mixin ObjcSubclassInitializer!("D_" ~ name, name); 114 mixin ObjcSubclassInitializer!("D_" ~ name, name);
117 } 115 }
118 116
119 struct ObjcMethodDeclaration (alias imp, R, string name, ARGS...) 117 struct ObjcMethodDeclaration (alias imp, R, string name, ARGS...)