Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSConnection.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 |
---|---|
39 super(id); | 39 super(id); |
40 } | 40 } |
41 | 41 |
42 public void addRequestMode (NSString rmode) | 42 public void addRequestMode (NSString rmode) |
43 { | 43 { |
44 OS.objc_msgSend(this.id, OS.sel_addRequestMode_1, rmode !is null ? rmode.id : null); | 44 OS.objc_msgSend(this.id_, OS.sel_addRequestMode_1, rmode !is null ? rmode.id_ : null); |
45 } | 45 } |
46 | 46 |
47 public void addRunLoop (NSRunLoop runloop) | 47 public void addRunLoop (NSRunLoop runloop) |
48 { | 48 { |
49 OS.objc_msgSend(this.id, OS.sel_addRunLoop_1, runloop !is null ? runloop.id : null); | 49 OS.objc_msgSend(this.id_, OS.sel_addRunLoop_1, runloop !is null ? runloop.id_ : null); |
50 } | 50 } |
51 | 51 |
52 public static NSArray allConnections () | 52 public static NSArray allConnections () |
53 { | 53 { |
54 objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_allConnections); | 54 objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_allConnections); |
56 } | 56 } |
57 | 57 |
58 public static id connectionWithReceivePort (NSPort receivePort, NSPort sendPort) | 58 public static id connectionWithReceivePort (NSPort receivePort, NSPort sendPort) |
59 { | 59 { |
60 objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_connectionWithReceivePort_1sendPort_1, | 60 objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_connectionWithReceivePort_1sendPort_1, |
61 receivePort !is null ? receivePort.id : null, sendPort !is null ? sendPort.id : null); | 61 receivePort !is null ? receivePort.id_ : null, sendPort !is null ? sendPort.id_ : null); |
62 return result !is null ? new id(result) : null; | 62 return result !is null ? new id(result) : null; |
63 } | 63 } |
64 | 64 |
65 public static id static_connectionWithRegisteredName_host_ (NSString name, NSString hostName) | 65 public static id static_connectionWithRegisteredName_host_ (NSString name, NSString hostName) |
66 { | 66 { |
67 objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_connectionWithRegisteredName_1host_1, name !is null ? name.id : null, | 67 objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_connectionWithRegisteredName_1host_1, name !is null ? name.id_ : null, |
68 hostName !is null ? hostName.id : null); | 68 hostName !is null ? hostName.id_ : null); |
69 return result !is null ? new id(result) : null; | 69 return result !is null ? new id(result) : null; |
70 } | 70 } |
71 | 71 |
72 public static id static_connectionWithRegisteredName_host_usingNameServer_ (NSString name, NSString hostName, NSPortNameServer server) | 72 public static id static_connectionWithRegisteredName_host_usingNameServer_ (NSString name, NSString hostName, NSPortNameServer server) |
73 { | 73 { |
74 objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_connectionWithRegisteredName_1host_1usingNameServer_1, | 74 objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_connectionWithRegisteredName_1host_1usingNameServer_1, |
75 name !is null ? name.id : null, hostName !is null ? hostName.id : null, server !is null ? server.id : null); | 75 name !is null ? name.id_ : null, hostName !is null ? hostName.id_ : null, server !is null ? server.id_ : null); |
76 return result !is null ? new id(result) : null; | 76 return result !is null ? new id(result) : null; |
77 } | 77 } |
78 | 78 |
79 public static id currentConversation () | 79 public static id currentConversation () |
80 { | 80 { |
88 return result !is null ? new NSConnection(result) : null; | 88 return result !is null ? new NSConnection(result) : null; |
89 } | 89 } |
90 | 90 |
91 public id delegatee () | 91 public id delegatee () |
92 { | 92 { |
93 objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); | 93 objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate); |
94 return result !is null ? new id(result) : null; | 94 return result !is null ? new id(result) : null; |
95 } | 95 } |
96 | 96 |
97 public void enableMultipleThreads () | 97 public void enableMultipleThreads () |
98 { | 98 { |
99 OS.objc_msgSend(this.id, OS.sel_enableMultipleThreads); | 99 OS.objc_msgSend(this.id_, OS.sel_enableMultipleThreads); |
100 } | 100 } |
101 | 101 |
102 public bool independentConversationQueueing () | 102 public bool independentConversationQueueing () |
103 { | 103 { |
104 return OS.objc_msgSend(this.id, OS.sel_independentConversationQueueing) !is null; | 104 return OS.objc_msgSend(this.id_, OS.sel_independentConversationQueueing) !is null; |
105 } | 105 } |
106 | 106 |
107 public id initWithReceivePort (NSPort receivePort, NSPort sendPort) | 107 public id initWithReceivePort (NSPort receivePort, NSPort sendPort) |
108 { | 108 { |
109 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithReceivePort_1sendPort_1, receivePort !is null ? receivePort.id : null, | 109 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithReceivePort_1sendPort_1, receivePort !is null ? receivePort.id_ : null, |
110 sendPort !is null ? sendPort.id : null); | 110 sendPort !is null ? sendPort.id_ : null); |
111 return result !is null ? new id(result) : null; | 111 return result !is null ? new id(result) : null; |
112 } | 112 } |
113 | 113 |
114 public void invalidate () | 114 public void invalidate () |
115 { | 115 { |
116 OS.objc_msgSend(this.id, OS.sel_invalidate); | 116 OS.objc_msgSend(this.id_, OS.sel_invalidate); |
117 } | 117 } |
118 | 118 |
119 public bool isValid () | 119 public bool isValid () |
120 { | 120 { |
121 return OS.objc_msgSend(this.id, OS.sel_isValid) !is null; | 121 return OS.objc_msgSend(this.id_, OS.sel_isValid) !is null; |
122 } | 122 } |
123 | 123 |
124 public NSArray localObjects () | 124 public NSArray localObjects () |
125 { | 125 { |
126 objc.id result = OS.objc_msgSend(this.id, OS.sel_localObjects); | 126 objc.id result = OS.objc_msgSend(this.id_, OS.sel_localObjects); |
127 return result !is null ? new NSArray(result) : null; | 127 return result !is null ? new NSArray(result) : null; |
128 } | 128 } |
129 | 129 |
130 public bool multipleThreadsEnabled () | 130 public bool multipleThreadsEnabled () |
131 { | 131 { |
132 return OS.objc_msgSend(this.id, OS.sel_multipleThreadsEnabled) !is null; | 132 return OS.objc_msgSend(this.id_, OS.sel_multipleThreadsEnabled) !is null; |
133 } | 133 } |
134 | 134 |
135 public NSPort receivePort () | 135 public NSPort receivePort () |
136 { | 136 { |
137 objc.id result = OS.objc_msgSend(this.id, OS.sel_receivePort); | 137 objc.id result = OS.objc_msgSend(this.id_, OS.sel_receivePort); |
138 return result !is null ? new NSPort(result) : null; | 138 return result !is null ? new NSPort(result) : null; |
139 } | 139 } |
140 | 140 |
141 public bool registerName_ (NSString name) | 141 public bool registerName_ (NSString name) |
142 { | 142 { |
143 return OS.objc_msgSend(this.id, OS.sel_registerName_1, name !is null ? name.id : null) !is null; | 143 return OS.objc_msgSend(this.id_, OS.sel_registerName_1, name !is null ? name.id_ : null) !is null; |
144 } | 144 } |
145 | 145 |
146 public bool registerName_withNameServer_ (NSString name, NSPortNameServer server) | 146 public bool registerName_withNameServer_ (NSString name, NSPortNameServer server) |
147 { | 147 { |
148 return OS.objc_msgSend(this.id, OS.sel_registerName_1withNameServer_1, name !is null ? name.id : null, server !is null ? server.id : null) !is null; | 148 return OS.objc_msgSend(this.id_, OS.sel_registerName_1withNameServer_1, name !is null ? name.id_ : null, server !is null ? server.id_ : null) !is null; |
149 } | 149 } |
150 | 150 |
151 public NSArray remoteObjects () | 151 public NSArray remoteObjects () |
152 { | 152 { |
153 objc.id result = OS.objc_msgSend(this.id, OS.sel_remoteObjects); | 153 objc.id result = OS.objc_msgSend(this.id_, OS.sel_remoteObjects); |
154 return result !is null ? new NSArray(result) : null; | 154 return result !is null ? new NSArray(result) : null; |
155 } | 155 } |
156 | 156 |
157 public void removeRequestMode (NSString rmode) | 157 public void removeRequestMode (NSString rmode) |
158 { | 158 { |
159 OS.objc_msgSend(this.id, OS.sel_removeRequestMode_1, rmode !is null ? rmode.id : null); | 159 OS.objc_msgSend(this.id_, OS.sel_removeRequestMode_1, rmode !is null ? rmode.id_ : null); |
160 } | 160 } |
161 | 161 |
162 public void removeRunLoop (NSRunLoop runloop) | 162 public void removeRunLoop (NSRunLoop runloop) |
163 { | 163 { |
164 OS.objc_msgSend(this.id, OS.sel_removeRunLoop_1, runloop !is null ? runloop.id : null); | 164 OS.objc_msgSend(this.id_, OS.sel_removeRunLoop_1, runloop !is null ? runloop.id_ : null); |
165 } | 165 } |
166 | 166 |
167 public double replyTimeout () | 167 public double replyTimeout () |
168 { | 168 { |
169 return OS.objc_msgSend_fpret(this.id, OS.sel_replyTimeout); | 169 return OS.objc_msgSend_fpret(this.id_, OS.sel_replyTimeout); |
170 } | 170 } |
171 | 171 |
172 public NSArray requestModes () | 172 public NSArray requestModes () |
173 { | 173 { |
174 objc.id result = OS.objc_msgSend(this.id, OS.sel_requestModes); | 174 objc.id result = OS.objc_msgSend(this.id_, OS.sel_requestModes); |
175 return result !is null ? new NSArray(result) : null; | 175 return result !is null ? new NSArray(result) : null; |
176 } | 176 } |
177 | 177 |
178 public double requestTimeout () | 178 public double requestTimeout () |
179 { | 179 { |
180 return OS.objc_msgSend_fpret(this.id, OS.sel_requestTimeout); | 180 return OS.objc_msgSend_fpret(this.id_, OS.sel_requestTimeout); |
181 } | 181 } |
182 | 182 |
183 public id rootObject () | 183 public id rootObject () |
184 { | 184 { |
185 objc.id result = OS.objc_msgSend(this.id, OS.sel_rootObject); | 185 objc.id result = OS.objc_msgSend(this.id_, OS.sel_rootObject); |
186 return result !is null ? new id(result) : null; | 186 return result !is null ? new id(result) : null; |
187 } | 187 } |
188 | 188 |
189 public NSDistantObject rootProxy () | 189 public NSDistantObject rootProxy () |
190 { | 190 { |
191 objc.id result = OS.objc_msgSend(this.id, OS.sel_rootProxy); | 191 objc.id result = OS.objc_msgSend(this.id_, OS.sel_rootProxy); |
192 return result !is null ? new NSDistantObject(result) : null; | 192 return result !is null ? new NSDistantObject(result) : null; |
193 } | 193 } |
194 | 194 |
195 public static NSDistantObject static_rootProxyForConnectionWithRegisteredName_host_ (NSString name, NSString hostName) | 195 public static NSDistantObject static_rootProxyForConnectionWithRegisteredName_host_ (NSString name, NSString hostName) |
196 { | 196 { |
197 objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_rootProxyForConnectionWithRegisteredName_1host_1, | 197 objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_rootProxyForConnectionWithRegisteredName_1host_1, |
198 name !is null ? name.id : null, hostName !is null ? hostName.id : null); | 198 name !is null ? name.id_ : null, hostName !is null ? hostName.id_ : null); |
199 return result !is null ? new NSDistantObject(result) : null; | 199 return result !is null ? new NSDistantObject(result) : null; |
200 } | 200 } |
201 | 201 |
202 public static NSDistantObject static_rootProxyForConnectionWithRegisteredName_host_usingNameServer_ (NSString name, NSString hostName, | 202 public static NSDistantObject static_rootProxyForConnectionWithRegisteredName_host_usingNameServer_ (NSString name, NSString hostName, |
203 NSPortNameServer server) | 203 NSPortNameServer server) |
204 { | 204 { |
205 objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_rootProxyForConnectionWithRegisteredName_1host_1usingNameServer_1, | 205 objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_rootProxyForConnectionWithRegisteredName_1host_1usingNameServer_1, |
206 name !is null ? name.id : null, hostName !is null ? hostName.id : null, server !is null ? server.id : null); | 206 name !is null ? name.id_ : null, hostName !is null ? hostName.id_ : null, server !is null ? server.id_ : null); |
207 return result !is null ? new NSDistantObject(result) : null; | 207 return result !is null ? new NSDistantObject(result) : null; |
208 } | 208 } |
209 | 209 |
210 public void runInNewThread () | 210 public void runInNewThread () |
211 { | 211 { |
212 OS.objc_msgSend(this.id, OS.sel_runInNewThread); | 212 OS.objc_msgSend(this.id_, OS.sel_runInNewThread); |
213 } | 213 } |
214 | 214 |
215 public NSPort sendPort () | 215 public NSPort sendPort () |
216 { | 216 { |
217 objc.id result = OS.objc_msgSend(this.id, OS.sel_sendPort); | 217 objc.id result = OS.objc_msgSend(this.id_, OS.sel_sendPort); |
218 return result !is null ? new NSPort(result) : null; | 218 return result !is null ? new NSPort(result) : null; |
219 } | 219 } |
220 | 220 |
221 public static id static_serviceConnectionWithName_rootObject_ (NSString name, id root) | 221 public static id static_serviceConnectionWithName_rootObject_ (NSString name, id root) |
222 { | 222 { |
223 objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_serviceConnectionWithName_1rootObject_1, name !is null ? name.id : null, | 223 objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_serviceConnectionWithName_1rootObject_1, name !is null ? name.id_ : null, |
224 root !is null ? root.id : null); | 224 root !is null ? root.id_ : null); |
225 return result !is null ? new id(result) : null; | 225 return result !is null ? new id(result) : null; |
226 } | 226 } |
227 | 227 |
228 public static id static_serviceConnectionWithName_rootObject_usingNameServer_ (NSString name, id root, NSPortNameServer server) | 228 public static id static_serviceConnectionWithName_rootObject_usingNameServer_ (NSString name, id root, NSPortNameServer server) |
229 { | 229 { |
230 objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_serviceConnectionWithName_1rootObject_1usingNameServer_1, | 230 objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_serviceConnectionWithName_1rootObject_1usingNameServer_1, |
231 name !is null ? name.id : null, root !is null ? root.id : null, server !is null ? server.id : null); | 231 name !is null ? name.id_ : null, root !is null ? root.id_ : null, server !is null ? server.id_ : null); |
232 return result !is null ? new id(result) : null; | 232 return result !is null ? new id(result) : null; |
233 } | 233 } |
234 | 234 |
235 public void setDelegate (id anObject) | 235 public void setDelegate (id anObject) |
236 { | 236 { |
237 OS.objc_msgSend(this.id, OS.sel_setDelegate_1, anObject !is null ? anObject.id : null); | 237 OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null); |
238 } | 238 } |
239 | 239 |
240 public void setIndependentConversationQueueing (bool yorn) | 240 public void setIndependentConversationQueueing (bool yorn) |
241 { | 241 { |
242 OS.objc_msgSend(this.id, OS.sel_setIndependentConversationQueueing_1, yorn); | 242 OS.objc_msgSend(this.id_, OS.sel_setIndependentConversationQueueing_1, yorn); |
243 } | 243 } |
244 | 244 |
245 public void setReplyTimeout (double ti) | 245 public void setReplyTimeout (double ti) |
246 { | 246 { |
247 OS.objc_msgSend(this.id, OS.sel_setReplyTimeout_1, ti); | 247 OS.objc_msgSend(this.id_, OS.sel_setReplyTimeout_1, ti); |
248 } | 248 } |
249 | 249 |
250 public void setRequestTimeout (double ti) | 250 public void setRequestTimeout (double ti) |
251 { | 251 { |
252 OS.objc_msgSend(this.id, OS.sel_setRequestTimeout_1, ti); | 252 OS.objc_msgSend(this.id_, OS.sel_setRequestTimeout_1, ti); |
253 } | 253 } |
254 | 254 |
255 public void setRootObject (id anObject) | 255 public void setRootObject (id anObject) |
256 { | 256 { |
257 OS.objc_msgSend(this.id, OS.sel_setRootObject_1, anObject !is null ? anObject.id : null); | 257 OS.objc_msgSend(this.id_, OS.sel_setRootObject_1, anObject !is null ? anObject.id_ : null); |
258 } | 258 } |
259 | 259 |
260 public NSDictionary statistics () | 260 public NSDictionary statistics () |
261 { | 261 { |
262 objc.id result = OS.objc_msgSend(this.id, OS.sel_statistics); | 262 objc.id result = OS.objc_msgSend(this.id_, OS.sel_statistics); |
263 return result !is null ? new NSDictionary(result) : null; | 263 return result !is null ? new NSDictionary(result) : null; |
264 } | 264 } |
265 | 265 |
266 } | 266 } |