Mercurial > projects > dstep
annotate dstep/foundation/NSScriptCommandDescription.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 | 89f3c3ef1fd2 |
children | b9de51448c6b |
rev | line source |
---|---|
14 | 1 /** |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Aug 3, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.foundation.NSScriptCommandDescription; | |
8 | |
9 import dstep.foundation.NSArray; | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
10 import dstep.foundation.NSCoder; |
14 | 11 import dstep.foundation.NSDictionary; |
12 import dstep.foundation.NSObject; | |
13 import dstep.foundation.NSScriptCommand; | |
14 import dstep.foundation.NSString; | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
15 import dstep.foundation.NSZone; |
14 | 16 import dstep.objc.bridge.Bridge; |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
17 import dstep.objc.objc; |
14 | 18 |
19 class NSScriptCommandDescription : NSObject, INSCoding | |
20 { | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
21 mixin (ObjcWrap); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
22 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
23 this () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
24 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
25 super(typeof(this).alloc.init.objcObject); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
26 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
27 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
28 typeof(this) init () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
29 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
30 return invokeObjcSelf!(typeof(this), "init"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
31 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
32 |
14 | 33 Object initWithSuiteName (NSString suiteName, NSString commandName, NSDictionary commandDeclaration) |
34 { | |
35 return invokeObjcSelf!(Object, "initWithSuiteName:commandName:dictionary:", NSString, NSString, NSDictionary)(suiteName, commandName, commandDeclaration); | |
36 } | |
37 | |
38 this (NSString suiteName, NSString commandName, NSDictionary commandDeclaration) | |
39 { | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
40 typeof(this).alloc.initWithSuiteName(suiteName, commandName, commandDeclaration); |
14 | 41 } |
42 | |
43 NSString suiteName () | |
44 { | |
45 return invokeObjcSelf!(NSString, "suiteName"); | |
46 } | |
47 | |
48 NSString commandName () | |
49 { | |
50 return invokeObjcSelf!(NSString, "commandName"); | |
51 } | |
52 | |
53 uint appleEventClassCode () | |
54 { | |
55 return invokeObjcSelf!(uint, "appleEventClassCode"); | |
56 } | |
57 | |
58 uint appleEventCode () | |
59 { | |
60 return invokeObjcSelf!(uint, "appleEventCode"); | |
61 } | |
62 | |
63 NSString commandClassName () | |
64 { | |
65 return invokeObjcSelf!(NSString, "commandClassName"); | |
66 } | |
67 | |
68 NSString returnType () | |
69 { | |
70 return invokeObjcSelf!(NSString, "returnType"); | |
71 } | |
72 | |
73 uint appleEventCodeForReturnType () | |
74 { | |
75 return invokeObjcSelf!(uint, "appleEventCodeForReturnType"); | |
76 } | |
77 | |
78 NSArray argumentNames () | |
79 { | |
80 return invokeObjcSelf!(NSArray, "argumentNames"); | |
81 } | |
82 | |
83 NSString typeForArgumentWithName (NSString argumentName) | |
84 { | |
85 return invokeObjcSelf!(NSString, "typeForArgumentWithName:", NSString)(argumentName); | |
86 } | |
87 | |
88 uint appleEventCodeForArgumentWithName (NSString argumentName) | |
89 { | |
90 return invokeObjcSelf!(uint, "appleEventCodeForArgumentWithName:", NSString)(argumentName); | |
91 } | |
92 | |
93 bool isOptionalArgumentWithName (NSString argumentName) | |
94 { | |
95 return invokeObjcSelf!(bool, "isOptionalArgumentWithName:", NSString)(argumentName); | |
96 } | |
97 | |
98 NSScriptCommand createCommandInstance () | |
99 { | |
100 return invokeObjcSelf!(NSScriptCommand, "createCommandInstance"); | |
101 } | |
102 | |
103 NSScriptCommand createCommandInstanceWithZone (NSZone* zone) | |
104 { | |
105 return invokeObjcSelf!(NSScriptCommand, "createCommandInstanceWithZone:", NSZone*)(zone); | |
106 } | |
107 | |
108 void encodeWithCoder (NSCoder aCoder) | |
109 { | |
110 return invokeObjcSelf!(void, "encodeWithCoder:", NSCoder)(aCoder); | |
111 } | |
112 | |
113 Object initWithCoder (NSCoder aDecoder) | |
114 { | |
115 return invokeObjcSelf!(Object, "initWithCoder:", NSCoder)(aDecoder); | |
116 } | |
117 | |
118 this (NSCoder aDecoder) | |
119 { | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
120 typeof(this).alloc.initWithCoder(aDecoder); |
14 | 121 } |
122 } | |
123 |