Mercurial > projects > dstep
comparison dstep/quartzcore/CATransaction.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 | |
children | b9de51448c6b |
comparison
equal
deleted
inserted
replaced
15:7ff919f595d5 | 16:19885b43130e |
---|---|
1 /** | |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Sep 24, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.quartzcore.CATransaction; | |
8 | |
9 import dstep.foundation.NSObject; | |
10 import dstep.foundation.NSString; | |
11 import dstep.objc.bridge.Bridge; | |
12 import dstep.objc.objc; | |
13 import dstep.quartzcore.CABase; | |
14 | |
15 import bindings = dstep.quartzcore.CATransaction_bindings; | |
16 | |
17 private | |
18 { | |
19 NSString kCATransactionAnimationDuration_; | |
20 NSString kCATransactionDisableActions_; | |
21 } | |
22 | |
23 NSString kCATransactionAnimationDuration () | |
24 { | |
25 if (kCATransactionAnimationDuration_) | |
26 return kCATransactionAnimationDuration_; | |
27 | |
28 return kCATransactionAnimationDuration_ = new NSString(bindings.kCATransactionAnimationDuration); | |
29 } | |
30 | |
31 NSString kCATransactionDisableActions () | |
32 { | |
33 if (kCATransactionDisableActions_) | |
34 return kCATransactionDisableActions_; | |
35 | |
36 return kCATransactionDisableActions_ = new NSString(bindings.kCATransactionDisableActions); | |
37 } | |
38 | |
39 class CATransaction : NSObject | |
40 { | |
41 mixin (ObjcWrap); | |
42 | |
43 static void begin () | |
44 { | |
45 return invokeObjcSelfClass!(void, "begin"); | |
46 } | |
47 | |
48 static void commit () | |
49 { | |
50 return invokeObjcSelfClass!(void, "commit"); | |
51 } | |
52 | |
53 static void flush () | |
54 { | |
55 return invokeObjcSelfClass!(void, "flush"); | |
56 } | |
57 | |
58 static Object valueForKey (NSString key) | |
59 { | |
60 return invokeObjcSelfClass!(Object, "valueForKey:", NSString)(key); | |
61 } | |
62 | |
63 static void setValue (Object anObject, NSString key) | |
64 { | |
65 return invokeObjcSelfClass!(void, "setValue:forKey:", Object, NSString)(anObject, key); | |
66 } | |
67 } | |
68 |