Mercurial > projects > dstep
comparison dstep/qtkit/QTCaptureLayer.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 28, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.qtkit.QTCaptureLayer; | |
8 | |
9 import dstep.foundation.Foundation; | |
10 import dstep.objc.bridge.Bridge; | |
11 import dstep.objc.objc; | |
12 import dstep.qtkit.QTCaptureSession; | |
13 import dstep.qtkit.QTKitDefines; | |
14 import dstep.quartzcore.CALayer; | |
15 import dstep.quartzcore.QuartzCore; | |
16 | |
17 class QTCaptureLayer : CALayer | |
18 { | |
19 mixin (ObjcWrap); | |
20 | |
21 static Object layerWithSession (QTCaptureSession session) | |
22 { | |
23 return invokeObjcSelfClass!(Object, "layerWithSession:", QTCaptureSession)(session); | |
24 } | |
25 | |
26 QTCaptureLayer initWithSession (QTCaptureSession session) | |
27 { | |
28 id result = invokeObjcSelf!(id, "initWithSession:", QTCaptureSession)(session); | |
29 return result is this.objcObject ? this : (result !is null ? new QTCaptureLayer(result) : null); | |
30 } | |
31 | |
32 this (QTCaptureSession session) | |
33 { | |
34 super(QTCaptureLayer.alloc.initWithSession(session).objcObject); | |
35 } | |
36 | |
37 void setSession (QTCaptureSession session) | |
38 { | |
39 return invokeObjcSelf!(void, "setSession:", QTCaptureSession)(session); | |
40 } | |
41 | |
42 QTCaptureSession session () | |
43 { | |
44 return invokeObjcSelf!(QTCaptureSession, "session"); | |
45 } | |
46 } | |
47 |