Mercurial > projects > dstep
comparison dstep/quartzcore/CARenderer.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.CARenderer; | |
8 | |
9 import dstep.applicationservices.coregraphics.CGGeometry; | |
10 import dstep.foundation.NSDictionary; | |
11 import dstep.foundation.NSObject; | |
12 import dstep.objc.bridge.Bridge; | |
13 import dstep.objc.objc; | |
14 import dstep.quartzcore.CABase; | |
15 import dstep.quartzcore.CALayer; | |
16 import dstep.quartzcore.CIContext; | |
17 import dstep.quartzcore.CVBase; | |
18 | |
19 class CARenderer : NSObject | |
20 { | |
21 mixin (ObjcWrap); | |
22 | |
23 static CARenderer rendererWithCGLContext (void* ctx, NSDictionary dict) | |
24 { | |
25 return invokeObjcSelfClass!(CARenderer, "rendererWithCGLContext:options:", void*, NSDictionary)(ctx, dict); | |
26 } | |
27 | |
28 CGRect bounds () | |
29 { | |
30 return invokeObjcSelf!(CGRect, "bounds"); | |
31 } | |
32 | |
33 void setBounds (CGRect arg0) | |
34 { | |
35 return invokeObjcSelf!(void, "setBounds:", CGRect)(arg0); | |
36 } | |
37 | |
38 alias setBounds bounds; | |
39 | |
40 void beginFrameAtTime (double t, CVTimeStamp* ts) | |
41 { | |
42 return invokeObjcSelf!(void, "beginFrameAtTime:timeStamp:", double, CVTimeStamp*)(t, ts); | |
43 } | |
44 | |
45 CGRect updateBounds () | |
46 { | |
47 return invokeObjcSelf!(CGRect, "updateBounds"); | |
48 } | |
49 | |
50 void addUpdateRect (CGRect r) | |
51 { | |
52 return invokeObjcSelf!(void, "addUpdateRect:", CGRect)(r); | |
53 } | |
54 | |
55 void render () | |
56 { | |
57 return invokeObjcSelf!(void, "render"); | |
58 } | |
59 | |
60 double nextFrameTime () | |
61 { | |
62 return invokeObjcSelf!(double, "nextFrameTime"); | |
63 } | |
64 | |
65 void endFrame () | |
66 { | |
67 return invokeObjcSelf!(void, "endFrame"); | |
68 } | |
69 } | |
70 |