Mercurial > projects > dstep
annotate dstep/foundation/NSMethodSignature.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.NSMethodSignature; | |
8 | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
15
diff
changeset
|
9 import dstep.foundation.NSObjCRuntime; |
14 | 10 import dstep.foundation.NSObject; |
11 import dstep.objc.bridge.Bridge; | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
15
diff
changeset
|
12 import dstep.objc.objc; |
14 | 13 |
14 class NSMethodSignature : NSObject | |
15 { | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
15
diff
changeset
|
16 mixin (ObjcWrap); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
15
diff
changeset
|
17 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
15
diff
changeset
|
18 this () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
15
diff
changeset
|
19 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
15
diff
changeset
|
20 super(typeof(this).alloc.init.objcObject); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
15
diff
changeset
|
21 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
15
diff
changeset
|
22 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
15
diff
changeset
|
23 typeof(this) init () |
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 return invokeObjcSelf!(typeof(this), "init"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
15
diff
changeset
|
26 } |
14 | 27 |
28 static NSMethodSignature signatureWithObjCTypes (char* types) | |
29 { | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
15
diff
changeset
|
30 return invokeObjcSuperClass!(NSMethodSignature, "signatureWithObjCTypes:", char*)(types); |
15
7ff919f595d5
Added the Foundation framework, again
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
31 } |
14 | 32 |
33 NSUInteger numberOfArguments () | |
34 { | |
35 return invokeObjcSelf!(NSUInteger, "numberOfArguments"); | |
36 } | |
37 | |
38 char* getArgumentTypeAtIndex (NSUInteger idx) | |
39 { | |
40 return invokeObjcSelf!(char*, "getArgumentTypeAtIndex:", NSUInteger)(idx); | |
41 } | |
42 | |
43 NSUInteger frameLength () | |
44 { | |
45 return invokeObjcSelf!(NSUInteger, "frameLength"); | |
46 } | |
47 | |
48 bool isOneway () | |
49 { | |
50 return invokeObjcSelf!(bool, "isOneway"); | |
51 } | |
52 | |
53 char* methodReturnType () | |
54 { | |
55 return invokeObjcSelf!(char*, "methodReturnType"); | |
56 } | |
57 | |
58 NSUInteger methodReturnLength () | |
59 { | |
60 return invokeObjcSelf!(NSUInteger, "methodReturnLength"); | |
61 } | |
62 } | |
63 |