comparison dstep/foundation/NSHost.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 7ff919f595d5
children b9de51448c6b
comparison
equal deleted inserted replaced
15:7ff919f595d5 16:19885b43130e
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.foundation.NSHost; 7 module dstep.foundation.NSHost;
8 8
9 import dstep.foundation.NSArray; 9 import dstep.foundation.NSArray;
10 import dstep.foundation.NSMutableArray;
11 import dstep.foundation.NSObject; 10 import dstep.foundation.NSObject;
12 import dstep.foundation.NSString; 11 import dstep.foundation.NSString;
13 import dstep.objc.bridge.Bridge; 12 import dstep.objc.bridge.Bridge;
14 import dstep.objc.objc : id; 13 import dstep.objc.objc;
15 14
16 class NSHost : NSObject 15 class NSHost : NSObject
17 { 16 {
18 mixin ObjcWrap; 17 mixin (ObjcWrap);
18
19 this ()
20 {
21 super(typeof(this).alloc.init.objcObject);
22 }
23
24 typeof(this) init ()
25 {
26 return invokeObjcSelf!(typeof(this), "init");
27 }
19 28
20 static NSHost currentHost () 29 static NSHost currentHost ()
21 { 30 {
22 return invokeObjcSelfClass!(NSHost, "currentHost"); 31 return invokeObjcSuperClass!(NSHost, "currentHost");
23 } 32 }
24 33
25 static NSHost hostWithName (NSString name) 34 static NSHost hostWithName (NSString name)
26 { 35 {
27 return invokeObjcSelfClass!(NSHost, "hostWithName:", NSString)(name); 36 return invokeObjcSuperClass!(NSHost, "hostWithName:", NSString)(name);
28 } 37 }
29 38
30 static NSHost hostWithAddress (NSString address) 39 static NSHost hostWithAddress (NSString address)
31 { 40 {
32 return invokeObjcSelfClass!(NSHost, "hostWithAddress:", NSString)(address); 41 return invokeObjcSuperClass!(NSHost, "hostWithAddress:", NSString)(address);
33 } 42 }
34 43
35 static void setHostCacheEnabled (bool flag) 44 static void setHostCacheEnabled (bool flag)
36 { 45 {
37 return invokeObjcSelfClass!(void, "setHostCacheEnabled:", bool)(flag); 46 return invokeObjcSuperClass!(void, "setHostCacheEnabled:", bool)(flag);
38 } 47 }
39 48
40 static bool isHostCacheEnabled () 49 static bool isHostCacheEnabled ()
41 { 50 {
42 return invokeObjcSelfClass!(bool, "isHostCacheEnabled"); 51 return invokeObjcSuperClass!(bool, "isHostCacheEnabled");
43 } 52 }
44 53
45 static void flushHostCache () 54 static void flushHostCache ()
46 { 55 {
47 return invokeObjcSelfClass!(void, "flushHostCache"); 56 return invokeObjcSuperClass!(void, "flushHostCache");
48 } 57 }
49 58
50 bool isEqualToHost (NSHost aHost) 59 bool isEqualToHost (NSHost aHost)
51 { 60 {
52 return invokeObjcSelf!(bool, "isEqualToHost:", NSHost)(aHost); 61 return invokeObjcSelf!(bool, "isEqualToHost:", NSHost)(aHost);