Mercurial > projects > dstep
annotate dstep/foundation/NSPortMessage.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.NSPortMessage; | |
8 | |
9 import dstep.foundation.NSArray; | |
10 import dstep.foundation.NSDate; | |
11 import dstep.foundation.NSObject; | |
12 import dstep.foundation.NSPort; | |
13 import dstep.objc.bridge.Bridge; | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
14 import dstep.objc.objc; |
14 | 15 |
16 class NSPortMessage : NSObject | |
17 { | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
18 mixin (ObjcWrap); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
19 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
20 this () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
21 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
22 super(typeof(this).alloc.init.objcObject); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
23 } |
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 typeof(this) init () |
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 return invokeObjcSelf!(typeof(this), "init"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
28 } |
14 | 29 |
30 Object initWithSendPort (NSPort sendPort, NSPort replyPort, NSArray components) | |
31 { | |
32 return invokeObjcSelf!(Object, "initWithSendPort:receivePort:components:", NSPort, NSPort, NSArray)(sendPort, replyPort, components); | |
33 } | |
34 | |
35 this (NSPort sendPort, NSPort replyPort, NSArray components) | |
36 { | |
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
14
diff
changeset
|
37 typeof(this).alloc.initWithSendPort(sendPort, replyPort, components); |
14 | 38 } |
39 | |
40 NSArray components () | |
41 { | |
42 return invokeObjcSelf!(NSArray, "components"); | |
43 } | |
44 | |
45 NSPort receivePort () | |
46 { | |
47 return invokeObjcSelf!(NSPort, "receivePort"); | |
48 } | |
49 | |
50 NSPort sendPort () | |
51 { | |
52 return invokeObjcSelf!(NSPort, "sendPort"); | |
53 } | |
54 | |
55 bool sendBeforeDate (NSDate date) | |
56 { | |
57 return invokeObjcSelf!(bool, "sendBeforeDate:", NSDate)(date); | |
58 } | |
59 | |
60 uint msgid () | |
61 { | |
62 return invokeObjcSelf!(uint, "msgid"); | |
63 } | |
64 | |
65 void setMsgid (uint msgid) | |
66 { | |
67 return invokeObjcSelf!(void, "setMsgid:", uint)(msgid); | |
68 } | |
69 } | |
70 |