Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSRunLoop.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 |
---|---|
38 super(id); | 38 super(id); |
39 } | 39 } |
40 | 40 |
41 public void acceptInputForMode (NSString mode, NSDate limitDate) | 41 public void acceptInputForMode (NSString mode, NSDate limitDate) |
42 { | 42 { |
43 OS.objc_msgSend(this.id, OS.sel_acceptInputForMode_1beforeDate_1, mode !is null ? mode.id : null, limitDate !is null ? limitDate.id : null); | 43 OS.objc_msgSend(this.id_, OS.sel_acceptInputForMode_1beforeDate_1, mode !is null ? mode.id_ : null, limitDate !is null ? limitDate.id_ : null); |
44 } | 44 } |
45 | 45 |
46 public void addPort (NSPort aPort, NSString mode) | 46 public void addPort (NSPort aPort, NSString mode) |
47 { | 47 { |
48 OS.objc_msgSend(this.id, OS.sel_addPort_1forMode_1, aPort !is null ? aPort.id : null, mode !is null ? mode.id : null); | 48 OS.objc_msgSend(this.id_, OS.sel_addPort_1forMode_1, aPort !is null ? aPort.id_ : null, mode !is null ? mode.id_ : null); |
49 } | 49 } |
50 | 50 |
51 public void addTimer (NSTimer timer, NSString mode) | 51 public void addTimer (NSTimer timer, NSString mode) |
52 { | 52 { |
53 OS.objc_msgSend(this.id, OS.sel_addTimer_1forMode_1, timer !is null ? timer.id : null, mode !is null ? mode.id : null); | 53 OS.objc_msgSend(this.id_, OS.sel_addTimer_1forMode_1, timer !is null ? timer.id_ : null, mode !is null ? mode.id_ : null); |
54 } | 54 } |
55 | 55 |
56 public void cancelPerformSelector (objc.SEL aSelector, id target, id arg) | 56 public void cancelPerformSelector (objc.SEL aSelector, id target, id arg) |
57 { | 57 { |
58 OS.objc_msgSend(this.id, OS.sel_cancelPerformSelector_1target_1argument_1, aSelector, target !is null ? target.id : null, | 58 OS.objc_msgSend(this.id_, OS.sel_cancelPerformSelector_1target_1argument_1, aSelector, target !is null ? target.id_ : null, |
59 arg !is null ? arg.id : null); | 59 arg !is null ? arg.id_ : null); |
60 } | 60 } |
61 | 61 |
62 public void cancelPerformSelectorsWithTarget (id target) | 62 public void cancelPerformSelectorsWithTarget (id target) |
63 { | 63 { |
64 OS.objc_msgSend(this.id, OS.sel_cancelPerformSelectorsWithTarget_1, target !is null ? target.id : null); | 64 OS.objc_msgSend(this.id_, OS.sel_cancelPerformSelectorsWithTarget_1, target !is null ? target.id_ : null); |
65 } | 65 } |
66 | 66 |
67 public void configureAsServer () | 67 public void configureAsServer () |
68 { | 68 { |
69 OS.objc_msgSend(this.id, OS.sel_configureAsServer); | 69 OS.objc_msgSend(this.id_, OS.sel_configureAsServer); |
70 } | 70 } |
71 | 71 |
72 public NSString currentMode () | 72 public NSString currentMode () |
73 { | 73 { |
74 objc.id result = OS.objc_msgSend(this.id, OS.sel_currentMode); | 74 objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentMode); |
75 return result !is null ? new NSString(result) : null; | 75 return result !is null ? new NSString(result) : null; |
76 } | 76 } |
77 | 77 |
78 public static NSRunLoop currentRunLoop () | 78 public static NSRunLoop currentRunLoop () |
79 { | 79 { |
81 return result !is null ? new NSRunLoop(result) : null; | 81 return result !is null ? new NSRunLoop(result) : null; |
82 } | 82 } |
83 | 83 |
84 public CFRunLoopRef getCFRunLoop () | 84 public CFRunLoopRef getCFRunLoop () |
85 { | 85 { |
86 return OS.objc_msgSend(this.id, OS.sel_getCFRunLoop); | 86 return cast(CFRunLoopRef) OS.objc_msgSend(this.id_, OS.sel_getCFRunLoop); |
87 } | 87 } |
88 | 88 |
89 public NSDate limitDateForMode (NSString mode) | 89 public NSDate limitDateForMode (NSString mode) |
90 { | 90 { |
91 objc.id result = OS.objc_msgSend(this.id, OS.sel_limitDateForMode_1, mode !is null ? mode.id : null); | 91 objc.id result = OS.objc_msgSend(this.id_, OS.sel_limitDateForMode_1, mode !is null ? mode.id_ : null); |
92 return result !is null ? new NSDate(result) : null; | 92 return result !is null ? new NSDate(result) : null; |
93 } | 93 } |
94 | 94 |
95 public static NSRunLoop mainRunLoop () | 95 public static NSRunLoop mainRunLoop () |
96 { | 96 { |
98 return result !is null ? new NSRunLoop(result) : null; | 98 return result !is null ? new NSRunLoop(result) : null; |
99 } | 99 } |
100 | 100 |
101 public void performSelector (objc.SEL aSelector, id target, id arg, NSUInteger order, NSArray modes) | 101 public void performSelector (objc.SEL aSelector, id target, id arg, NSUInteger order, NSArray modes) |
102 { | 102 { |
103 OS.objc_msgSend(this.id, OS.sel_performSelector_1target_1argument_1order_1modes_1, aSelector, target !is null ? target.id : null, | 103 OS.objc_msgSend(this.id_, OS.sel_performSelector_1target_1argument_1order_1modes_1, aSelector, target !is null ? target.id_ : null, |
104 arg !is null ? arg.id : null, order, modes !is null ? modes.id : null); | 104 arg !is null ? arg.id_ : null, order, modes !is null ? modes.id_ : null); |
105 } | 105 } |
106 | 106 |
107 public void removePort (NSPort aPort, NSString mode) | 107 public void removePort (NSPort aPort, NSString mode) |
108 { | 108 { |
109 OS.objc_msgSend(this.id, OS.sel_removePort_1forMode_1, aPort !is null ? aPort.id : null, mode !is null ? mode.id : null); | 109 OS.objc_msgSend(this.id_, OS.sel_removePort_1forMode_1, aPort !is null ? aPort.id_ : null, mode !is null ? mode.id_ : null); |
110 } | 110 } |
111 | 111 |
112 public void run () | 112 public void run () |
113 { | 113 { |
114 OS.objc_msgSend(this.id, OS.sel_run); | 114 OS.objc_msgSend(this.id_, OS.sel_run); |
115 } | 115 } |
116 | 116 |
117 public bool runMode (NSString mode, NSDate limitDate) | 117 public bool runMode (NSString mode, NSDate limitDate) |
118 { | 118 { |
119 return OS.objc_msgSend(this.id, OS.sel_runMode_1beforeDate_1, mode !is null ? mode.id : null, limitDate !is null ? limitDate.id : null) !is null; | 119 return OS.objc_msgSend(this.id_, OS.sel_runMode_1beforeDate_1, mode !is null ? mode.id_ : null, limitDate !is null ? limitDate.id_ : null) !is null; |
120 } | 120 } |
121 | 121 |
122 public void runUntilDate (NSDate limitDate) | 122 public void runUntilDate (NSDate limitDate) |
123 { | 123 { |
124 OS.objc_msgSend(this.id, OS.sel_runUntilDate_1, limitDate !is null ? limitDate.id : null); | 124 OS.objc_msgSend(this.id_, OS.sel_runUntilDate_1, limitDate !is null ? limitDate.id_ : null); |
125 } | 125 } |
126 | 126 |
127 } | 127 } |