Mercurial > projects > dstep
annotate dstep/foundation/NSScriptSuiteRegistry.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 |
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.NSScriptSuiteRegistry; | |
8 | |
9 import dstep.foundation.NSArray; | |
10 import dstep.foundation.NSBundle; | |
11 import dstep.foundation.NSData; | |
12 import dstep.foundation.NSDictionary; | |
13 import dstep.foundation.NSMutableArray; | |
14 import dstep.foundation.NSMutableDictionary; | |
15 import dstep.foundation.NSMutableSet; | |
16 import dstep.foundation.NSObject; | |
17 import dstep.foundation.NSScriptClassDescription; | |
18 import dstep.foundation.NSScriptCommandDescription; | |
19 import dstep.objc.bridge.Bridge; | |
20 import dstep.objc.objc : id; | |
21 | |
22 class NSScriptSuiteRegistry : NSObject | |
23 { | |
24 mixin ObjcWrap; | |
25 | |
26 static NSScriptSuiteRegistry sharedScriptSuiteRegistry () | |
27 { | |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
28 return invokeObjcSelfClass!(NSScriptSuiteRegistry, "sharedScriptSuiteRegistry"); |
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
29 } |
14 | 30 |
31 static void setSharedScriptSuiteRegistry (NSScriptSuiteRegistry registry) | |
32 { | |
33 return invokeObjcSelfClass!(void, "setSharedScriptSuiteRegistry:", NSScriptSuiteRegistry)(registry); | |
34 } | |
35 | |
36 void loadSuitesFromBundle (NSBundle bundle) | |
37 { | |
38 return invokeObjcSelf!(void, "loadSuitesFromBundle:", NSBundle)(bundle); | |
39 } | |
40 | |
41 void loadSuiteWithDictionary (NSDictionary suiteDeclaration, NSBundle bundle) | |
42 { | |
43 return invokeObjcSelf!(void, "loadSuiteWithDictionary:fromBundle:", NSDictionary, NSBundle)(suiteDeclaration, bundle); | |
44 } | |
45 | |
46 void registerClassDescription (NSScriptClassDescription classDescription) | |
47 { | |
48 return invokeObjcSelf!(void, "registerClassDescription:", NSScriptClassDescription)(classDescription); | |
49 } | |
50 | |
51 void registerCommandDescription (NSScriptCommandDescription commandDescription) | |
52 { | |
53 return invokeObjcSelf!(void, "registerCommandDescription:", NSScriptCommandDescription)(commandDescription); | |
54 } | |
55 | |
56 NSArray suiteNames () | |
57 { | |
58 return invokeObjcSelf!(NSArray, "suiteNames"); | |
59 } | |
60 | |
61 uint appleEventCodeForSuite (NSString suiteName) | |
62 { | |
63 return invokeObjcSelf!(uint, "appleEventCodeForSuite:", NSString)(suiteName); | |
64 } | |
65 | |
66 NSBundle bundleForSuite (NSString suiteName) | |
67 { | |
68 return invokeObjcSelf!(NSBundle, "bundleForSuite:", NSString)(suiteName); | |
69 } | |
70 | |
71 NSDictionary classDescriptionsInSuite (NSString suiteName) | |
72 { | |
73 return invokeObjcSelf!(NSDictionary, "classDescriptionsInSuite:", NSString)(suiteName); | |
74 } | |
75 | |
76 NSDictionary commandDescriptionsInSuite (NSString suiteName) | |
77 { | |
78 return invokeObjcSelf!(NSDictionary, "commandDescriptionsInSuite:", NSString)(suiteName); | |
79 } | |
80 | |
81 NSString suiteForAppleEventCode (uint appleEventCode) | |
82 { | |
83 return invokeObjcSelf!(NSString, "suiteForAppleEventCode:", uint)(appleEventCode); | |
84 } | |
85 | |
86 NSScriptClassDescription classDescriptionWithAppleEventCode (uint appleEventCode) | |
87 { | |
88 return invokeObjcSelf!(NSScriptClassDescription, "classDescriptionWithAppleEventCode:", uint)(appleEventCode); | |
89 } | |
90 | |
91 NSScriptCommandDescription commandDescriptionWithAppleEventClass (uint appleEventClassCode, uint appleEventIDCode) | |
92 { | |
93 return invokeObjcSelf!(NSScriptCommandDescription, "commandDescriptionWithAppleEventClass:andAppleEventCode:", uint, uint)(appleEventClassCode, appleEventIDCode); | |
94 } | |
95 | |
96 NSData aeteResource (NSString languageName) | |
97 { | |
98 return invokeObjcSelf!(NSData, "aeteResource:", NSString)(languageName); | |
99 } | |
100 } | |
101 |