Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSConditionLock.d @ 1:8b48be5454ce
The internal cocoa classes compile now
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Tue, 19 Aug 2008 17:35:17 +0200 |
parents | 380af2bdd8e5 |
children | f565d3a95c0a |
comparison
equal
deleted
inserted
replaced
0:380af2bdd8e5 | 1:8b48be5454ce |
---|---|
34 super(id); | 34 super(id); |
35 } | 35 } |
36 | 36 |
37 public NSInteger condition () | 37 public NSInteger condition () |
38 { | 38 { |
39 return OS.objc_msgSend(this.id, OS.sel_condition); | 39 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_condition); |
40 } | 40 } |
41 | 41 |
42 public id initWithCondition (NSInteger condition) | 42 public id initWithCondition (NSInteger condition) |
43 { | 43 { |
44 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithCondition_1, condition); | 44 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCondition_1, condition); |
45 return result !is null ? new id(result) : null; | 45 return result !is null ? new id(result) : null; |
46 } | 46 } |
47 | 47 |
48 public bool lockBeforeDate (NSDate limit) | 48 public bool lockBeforeDate (NSDate limit) |
49 { | 49 { |
50 return OS.objc_msgSend(this.id, OS.sel_lockBeforeDate_1, limit !is null ? limit.id : null) !is null; | 50 return OS.objc_msgSend(this.id_, OS.sel_lockBeforeDate_1, limit !is null ? limit.id_ : null) !is null; |
51 } | 51 } |
52 | 52 |
53 public void lockWhenCondition_ (NSInteger condition) | 53 public void lockWhenCondition_ (NSInteger condition) |
54 { | 54 { |
55 OS.objc_msgSend(this.id, OS.sel_lockWhenCondition_1, condition); | 55 OS.objc_msgSend(this.id_, OS.sel_lockWhenCondition_1, condition); |
56 } | 56 } |
57 | 57 |
58 public bool lockWhenCondition_beforeDate_ (NSInteger condition, NSDate limit) | 58 public bool lockWhenCondition_beforeDate_ (NSInteger condition, NSDate limit) |
59 { | 59 { |
60 return OS.objc_msgSend(this.id, OS.sel_lockWhenCondition_1beforeDate_1, condition, limit !is null ? limit.id : null) !is null; | 60 return OS.objc_msgSend(this.id_, OS.sel_lockWhenCondition_1beforeDate_1, condition, limit !is null ? limit.id_ : null) !is null; |
61 } | 61 } |
62 | 62 |
63 public NSString name () | 63 public NSString name () |
64 { | 64 { |
65 objc.id result = OS.objc_msgSend(this.id, OS.sel_name); | 65 objc.id result = OS.objc_msgSend(this.id_, OS.sel_name); |
66 return result !is null ? new NSString(result) : null; | 66 return result !is null ? new NSString(result) : null; |
67 } | 67 } |
68 | 68 |
69 public void setName (NSString n) | 69 public void setName (NSString n) |
70 { | 70 { |
71 OS.objc_msgSend(this.id, OS.sel_setName_1, n !is null ? n.id : null); | 71 OS.objc_msgSend(this.id_, OS.sel_setName_1, n !is null ? n.id_ : null); |
72 } | 72 } |
73 | 73 |
74 public bool tryLock () | 74 public bool tryLock () |
75 { | 75 { |
76 return OS.objc_msgSend(this.id, OS.sel_tryLock) !is null; | 76 return OS.objc_msgSend(this.id_, OS.sel_tryLock) !is null; |
77 } | 77 } |
78 | 78 |
79 public bool tryLockWhenCondition (NSInteger condition) | 79 public bool tryLockWhenCondition (NSInteger condition) |
80 { | 80 { |
81 return OS.objc_msgSend(this.id, OS.sel_tryLockWhenCondition_1, condition) !is null; | 81 return OS.objc_msgSend(this.id_, OS.sel_tryLockWhenCondition_1, condition) !is null; |
82 } | 82 } |
83 | 83 |
84 public void unlockWithCondition (NSInteger condition) | 84 public void unlockWithCondition (NSInteger condition) |
85 { | 85 { |
86 OS.objc_msgSend(this.id, OS.sel_unlockWithCondition_1, condition); | 86 OS.objc_msgSend(this.id_, OS.sel_unlockWithCondition_1, condition); |
87 } | 87 } |
88 | 88 |
89 } | 89 } |