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 {
|
|
28 return invokeObjcSelfClass!(NSScriptSuiteRegistry, "sharedScriptSuiteRegistry"return result is this.objcObject ? this : (result !is null ? new NSScriptSuiteRegistry(result) : null); }
|
|
29
|
|
30 static void setSharedScriptSuiteRegistry (NSScriptSuiteRegistry registry)
|
|
31 {
|
|
32 return invokeObjcSelfClass!(void, "setSharedScriptSuiteRegistry:", NSScriptSuiteRegistry)(registry);
|
|
33 }
|
|
34
|
|
35 void loadSuitesFromBundle (NSBundle bundle)
|
|
36 {
|
|
37 return invokeObjcSelf!(void, "loadSuitesFromBundle:", NSBundle)(bundle);
|
|
38 }
|
|
39
|
|
40 void loadSuiteWithDictionary (NSDictionary suiteDeclaration, NSBundle bundle)
|
|
41 {
|
|
42 return invokeObjcSelf!(void, "loadSuiteWithDictionary:fromBundle:", NSDictionary, NSBundle)(suiteDeclaration, bundle);
|
|
43 }
|
|
44
|
|
45 void registerClassDescription (NSScriptClassDescription classDescription)
|
|
46 {
|
|
47 return invokeObjcSelf!(void, "registerClassDescription:", NSScriptClassDescription)(classDescription);
|
|
48 }
|
|
49
|
|
50 void registerCommandDescription (NSScriptCommandDescription commandDescription)
|
|
51 {
|
|
52 return invokeObjcSelf!(void, "registerCommandDescription:", NSScriptCommandDescription)(commandDescription);
|
|
53 }
|
|
54
|
|
55 NSArray suiteNames ()
|
|
56 {
|
|
57 return invokeObjcSelf!(NSArray, "suiteNames");
|
|
58 }
|
|
59
|
|
60 uint appleEventCodeForSuite (NSString suiteName)
|
|
61 {
|
|
62 return invokeObjcSelf!(uint, "appleEventCodeForSuite:", NSString)(suiteName);
|
|
63 }
|
|
64
|
|
65 NSBundle bundleForSuite (NSString suiteName)
|
|
66 {
|
|
67 return invokeObjcSelf!(NSBundle, "bundleForSuite:", NSString)(suiteName);
|
|
68 }
|
|
69
|
|
70 NSDictionary classDescriptionsInSuite (NSString suiteName)
|
|
71 {
|
|
72 return invokeObjcSelf!(NSDictionary, "classDescriptionsInSuite:", NSString)(suiteName);
|
|
73 }
|
|
74
|
|
75 NSDictionary commandDescriptionsInSuite (NSString suiteName)
|
|
76 {
|
|
77 return invokeObjcSelf!(NSDictionary, "commandDescriptionsInSuite:", NSString)(suiteName);
|
|
78 }
|
|
79
|
|
80 NSString suiteForAppleEventCode (uint appleEventCode)
|
|
81 {
|
|
82 return invokeObjcSelf!(NSString, "suiteForAppleEventCode:", uint)(appleEventCode);
|
|
83 }
|
|
84
|
|
85 NSScriptClassDescription classDescriptionWithAppleEventCode (uint appleEventCode)
|
|
86 {
|
|
87 return invokeObjcSelf!(NSScriptClassDescription, "classDescriptionWithAppleEventCode:", uint)(appleEventCode);
|
|
88 }
|
|
89
|
|
90 NSScriptCommandDescription commandDescriptionWithAppleEventClass (uint appleEventClassCode, uint appleEventIDCode)
|
|
91 {
|
|
92 return invokeObjcSelf!(NSScriptCommandDescription, "commandDescriptionWithAppleEventClass:andAppleEventCode:", uint, uint)(appleEventClassCode, appleEventIDCode);
|
|
93 }
|
|
94
|
|
95 NSData aeteResource (NSString languageName)
|
|
96 {
|
|
97 return invokeObjcSelf!(NSData, "aeteResource:", NSString)(languageName);
|
|
98 }
|
|
99 }
|
|
100
|