comparison dstep/foundation/NSAppleEventDescriptor.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
16 { 16 {
17 mixin ObjcWrap; 17 mixin ObjcWrap;
18 18
19 static NSAppleEventDescriptor nullDescriptor () 19 static NSAppleEventDescriptor nullDescriptor ()
20 { 20 {
21 return invokeObjcSelfClass!(NSAppleEventDescriptor, "nullDescriptor"return result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null); } 21 return invokeObjcSelfClass!(NSAppleEventDescriptor, "nullDescriptor");
22 }
22 23
23 static NSAppleEventDescriptor descriptorWithDescriptorType (uint descriptorType, void* bytes, NSUInteger byteCount) 24 static NSAppleEventDescriptor descriptorWithDescriptorType (uint descriptorType, void* bytes, NSUInteger byteCount)
24 { 25 {
25 return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithDescriptorType:bytes:length:", uint, void*, NSUInteger)(descriptorType, bytes, byteCountreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null); } 26 return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithDescriptorType:bytes:length:", uint, void*, NSUInteger)(descriptorType, bytes, byteCount);
27 }
26 28
27 static NSAppleEventDescriptor descriptorWithDescriptorType (uint descriptorType, NSData data) 29 static NSAppleEventDescriptor descriptorWithDescriptorType (uint descriptorType, NSData data)
28 { 30 {
29 return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithDescriptorType:data:", uint, NSData)(descriptorType, datareturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null); } 31 return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithDescriptorType:data:", uint, NSData)(descriptorType, data);
32 }
30 33
31 static NSAppleEventDescriptor descriptorWithBoolean (ubyte boolean) 34 static NSAppleEventDescriptor descriptorWithBoolean (ubyte boolean)
32 { 35 {
33 return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithBoolean:", ubyte)(booleanreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null); } 36 return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithBoolean:", ubyte)(boolean);
37 }
34 38
35 static NSAppleEventDescriptor descriptorWithEnumCode (uint enumerator) 39 static NSAppleEventDescriptor descriptorWithEnumCode (uint enumerator)
36 { 40 {
37 return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithEnumCode:", uint)(enumeratorreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null); } 41 return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithEnumCode:", uint)(enumerator);
42 }
38 43
39 static NSAppleEventDescriptor descriptorWithInt32 (int signedInt) 44 static NSAppleEventDescriptor descriptorWithInt32 (int signedInt)
40 { 45 {
41 return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithInt32:", int)(signedIntreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null); } 46 return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithInt32:", int)(signedInt);
47 }
42 48
43 static NSAppleEventDescriptor descriptorWithTypeCode (uint typeCode) 49 static NSAppleEventDescriptor descriptorWithTypeCode (uint typeCode)
44 { 50 {
45 return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithTypeCode:", uint)(typeCodereturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null); } 51 return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithTypeCode:", uint)(typeCode);
52 }
46 53
47 static NSAppleEventDescriptor descriptorWithString (NSString string) 54 static NSAppleEventDescriptor descriptorWithString (NSString string)
48 { 55 {
49 return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithString:", NSString)(stringreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null); } 56 return invokeObjcSelfClass!(NSAppleEventDescriptor, "descriptorWithString:", NSString)(string);
57 }
50 58
51 static NSAppleEventDescriptor appleEventWithEventClass (uint eventClass, uint eventID, NSAppleEventDescriptor targetDescriptor, short returnID, int transactionID) 59 static NSAppleEventDescriptor appleEventWithEventClass (uint eventClass, uint eventID, NSAppleEventDescriptor targetDescriptor, short returnID, int transactionID)
52 { 60 {
53 return invokeObjcSelfClass!(NSAppleEventDescriptor, "appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:", uint, uint, NSAppleEventDescriptor, short, int)(eventClass, eventID, targetDescriptor, returnID, transactionIDreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null); } 61 return invokeObjcSelfClass!(NSAppleEventDescriptor, "appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:", uint, uint, NSAppleEventDescriptor, short, int)(eventClass, eventID, targetDescriptor, returnID, transactionID);
62 }
54 63
55 static NSAppleEventDescriptor listDescriptor () 64 static NSAppleEventDescriptor listDescriptor ()
56 { 65 {
57 return invokeObjcSelfClass!(NSAppleEventDescriptor, "listDescriptor"return result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null); } 66 return invokeObjcSelfClass!(NSAppleEventDescriptor, "listDescriptor");
67 }
58 68
59 static NSAppleEventDescriptor recordDescriptor () 69 static NSAppleEventDescriptor recordDescriptor ()
60 { 70 {
61 return invokeObjcSelfClass!(NSAppleEventDescriptor, "recordDescriptor"return result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null); } 71 return invokeObjcSelfClass!(NSAppleEventDescriptor, "recordDescriptor");
72 }
62 73
63 Object initWithAEDescNoCopy (AEDesc* aeDesc) 74 Object initWithAEDescNoCopy (AEDesc* aeDesc)
64 { 75 {
65 return invokeObjcSelf!(Object, "initWithAEDescNoCopy:", AEDesc*)(aeDesc); 76 return invokeObjcSelf!(Object, "initWithAEDescNoCopy:", AEDesc*)(aeDesc);
66 } 77 }
221 return invokeObjcSelf!(void, "setParamDescriptor:forKeyword:", NSAppleEventDescriptor, uint)(descriptor, keyword); 232 return invokeObjcSelf!(void, "setParamDescriptor:forKeyword:", NSAppleEventDescriptor, uint)(descriptor, keyword);
222 } 233 }
223 234
224 NSAppleEventDescriptor paramDescriptorForKeyword (uint keyword) 235 NSAppleEventDescriptor paramDescriptorForKeyword (uint keyword)
225 { 236 {
226 id result = invokeObjcSelf!(id, "paramDescriptorForKeyword:", uint)(keywordreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null); } 237 id result = invokeObjcSelf!(id, "paramDescriptorForKeyword:", uint)(keyword);
238 return result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);
239 }
227 240
228 void removeParamDescriptorWithKeyword (uint keyword) 241 void removeParamDescriptorWithKeyword (uint keyword)
229 { 242 {
230 return invokeObjcSelf!(void, "removeParamDescriptorWithKeyword:", uint)(keyword); 243 return invokeObjcSelf!(void, "removeParamDescriptorWithKeyword:", uint)(keyword);
231 } 244 }
235 return invokeObjcSelf!(void, "setAttributeDescriptor:forKeyword:", NSAppleEventDescriptor, uint)(descriptor, keyword); 248 return invokeObjcSelf!(void, "setAttributeDescriptor:forKeyword:", NSAppleEventDescriptor, uint)(descriptor, keyword);
236 } 249 }
237 250
238 NSAppleEventDescriptor attributeDescriptorForKeyword (uint keyword) 251 NSAppleEventDescriptor attributeDescriptorForKeyword (uint keyword)
239 { 252 {
240 id result = invokeObjcSelf!(id, "attributeDescriptorForKeyword:", uint)(keywordreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null); } 253 id result = invokeObjcSelf!(id, "attributeDescriptorForKeyword:", uint)(keyword);
254 return result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);
255 }
241 256
242 NSInteger numberOfItems () 257 NSInteger numberOfItems ()
243 { 258 {
244 return invokeObjcSelf!(NSInteger, "numberOfItems"); 259 return invokeObjcSelf!(NSInteger, "numberOfItems");
245 } 260 }
249 return invokeObjcSelf!(void, "insertDescriptor:atIndex:", NSAppleEventDescriptor, NSInteger)(descriptor, index); 264 return invokeObjcSelf!(void, "insertDescriptor:atIndex:", NSAppleEventDescriptor, NSInteger)(descriptor, index);
250 } 265 }
251 266
252 NSAppleEventDescriptor descriptorAtIndex (NSInteger index) 267 NSAppleEventDescriptor descriptorAtIndex (NSInteger index)
253 { 268 {
254 id result = invokeObjcSelf!(id, "descriptorAtIndex:", NSInteger)(indexreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null); } 269 id result = invokeObjcSelf!(id, "descriptorAtIndex:", NSInteger)(index);
270 return result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);
271 }
255 272
256 void removeDescriptorAtIndex (NSInteger index) 273 void removeDescriptorAtIndex (NSInteger index)
257 { 274 {
258 return invokeObjcSelf!(void, "removeDescriptorAtIndex:", NSInteger)(index); 275 return invokeObjcSelf!(void, "removeDescriptorAtIndex:", NSInteger)(index);
259 } 276 }
263 return invokeObjcSelf!(void, "setDescriptor:forKeyword:", NSAppleEventDescriptor, uint)(descriptor, keyword); 280 return invokeObjcSelf!(void, "setDescriptor:forKeyword:", NSAppleEventDescriptor, uint)(descriptor, keyword);
264 } 281 }
265 282
266 NSAppleEventDescriptor descriptorForKeyword (uint keyword) 283 NSAppleEventDescriptor descriptorForKeyword (uint keyword)
267 { 284 {
268 id result = invokeObjcSelf!(id, "descriptorForKeyword:", uint)(keywordreturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null); } 285 id result = invokeObjcSelf!(id, "descriptorForKeyword:", uint)(keyword);
286 return result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);
287 }
269 288
270 void removeDescriptorWithKeyword (uint keyword) 289 void removeDescriptorWithKeyword (uint keyword)
271 { 290 {
272 return invokeObjcSelf!(void, "removeDescriptorWithKeyword:", uint)(keyword); 291 return invokeObjcSelf!(void, "removeDescriptorWithKeyword:", uint)(keyword);
273 } 292 }
277 return invokeObjcSelf!(uint, "keywordForDescriptorAtIndex:", NSInteger)(index); 296 return invokeObjcSelf!(uint, "keywordForDescriptorAtIndex:", NSInteger)(index);
278 } 297 }
279 298
280 NSAppleEventDescriptor coerceToDescriptorType (uint descriptorType) 299 NSAppleEventDescriptor coerceToDescriptorType (uint descriptorType)
281 { 300 {
282 id result = invokeObjcSelf!(id, "coerceToDescriptorType:", uint)(descriptorTypereturn result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null); } 301 id result = invokeObjcSelf!(id, "coerceToDescriptorType:", uint)(descriptorType);
302 return result is this.objcObject ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);
303 }
283 304
284 Object copyWithZone (NSZone* zone) 305 Object copyWithZone (NSZone* zone)
285 { 306 {
286 return invokeObjcSelf!(Object, "copyWithZone:", NSZone*)(zone); 307 return invokeObjcSelf!(Object, "copyWithZone:", NSZone*)(zone);
287 } 308 }