comparison dstep/appkit/NSMovie.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.appkit.NSMovie;
8
9 import dstep.appkit.NSPasteboard;
10 import dstep.foundation.NSCoder;
11 import dstep.foundation.NSObject;
12 import dstep.objc.bridge.Bridge;
13 import dstep.objc.objc;
14 import dstep.qtkit.QTMovie;
15
16 class NSMovie : NSObject, INSCoding
17 {
18 mixin (ObjcWrap);
19
20 this (NSCoder aDecoder)
21 {
22 super(typeof(this).alloc.initWithCoder(aDecoder).objcObject);
23 }
24
25 void encodeWithCoder (NSCoder aCoder)
26 {
27 return invokeObjcSelf!(void, "encodeWithCoder:", NSCoder)(aCoder);
28 }
29
30 typeof(this) initWithCoder (NSCoder aDecoder)
31 {
32 return invokeObjcSelf!(typeof(this), "initWithCoder:", NSCoder)(aDecoder);
33 }
34
35 NSMovie initWithMovie (QTMovie movie)
36 {
37 id result = invokeObjcSelf!(id, "initWithMovie:", QTMovie)(movie);
38 return result is this.objcObject ? this : (result !is null ? new NSMovie(result) : null);
39 }
40
41 this (QTMovie movie)
42 {
43 super(NSMovie.alloc.initWithMovie(movie).objcObject);
44 }
45
46 QTMovie QTMovie_ ()
47 {
48 return invokeObjcSelf!(QTMovie, "QTMovie");
49 }
50
51 }
52