comparison dstep/foundation/NSThread.d @ 15:7ff919f595d5

Added the Foundation framework, again
author Jacob Carlborg <doob@me.com>
date Mon, 03 Aug 2009 15:31:48 +0200
parents 89f3c3ef1fd2
children 19885b43130e
comparison
equal deleted inserted replaced
14:89f3c3ef1fd2 15:7ff919f595d5
30 { 30 {
31 mixin ObjcWrap; 31 mixin ObjcWrap;
32 32
33 static NSThread currentThread () 33 static NSThread currentThread ()
34 { 34 {
35 return invokeObjcSelfClass!(NSThread, "currentThread"return result is this.objcObject ? this : (result !is null ? new NSThread(result) : null); } 35 return invokeObjcSelfClass!(NSThread, "currentThread");
36 }
36 37
37 static void detachNewThreadSelector (SEL selector, Object target, Object argument) 38 static void detachNewThreadSelector (SEL selector, Object target, Object argument)
38 { 39 {
39 return invokeObjcSelfClass!(void, "detachNewThreadSelector:toTarget:withObject:", SEL, Object, Object)(selector, target, argument); 40 return invokeObjcSelfClass!(void, "detachNewThreadSelector:toTarget:withObject:", SEL, Object, Object)(selector, target, argument);
40 } 41 }
109 return invokeObjcSelfClass!(bool, "isMainThread"); 110 return invokeObjcSelfClass!(bool, "isMainThread");
110 } 111 }
111 112
112 static NSThread mainThread () 113 static NSThread mainThread ()
113 { 114 {
114 return invokeObjcSelfClass!(NSThread, "mainThread"return result is this.objcObject ? this : (result !is null ? new NSThread(result) : null); } 115 return invokeObjcSelfClass!(NSThread, "mainThread");
116 }
115 117
116 Object init () 118 Object init ()
117 { 119 {
118 return invokeObjcSelf!(Object, "init"); 120 return invokeObjcSelf!(Object, "init");
119 } 121 }