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