Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSEPSImageRep.d @ 1:8b48be5454ce
The internal cocoa classes compile now
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Tue, 19 Aug 2008 17:35:17 +0200 |
parents | 380af2bdd8e5 |
children | f565d3a95c0a |
comparison
equal
deleted
inserted
replaced
0:380af2bdd8e5 | 1:8b48be5454ce |
---|---|
11 * Port to the D Programming language: | 11 * Port to the D Programming language: |
12 * Jacob Carlborg <jacob.carlborg@gmail.com> | 12 * Jacob Carlborg <jacob.carlborg@gmail.com> |
13 *******************************************************************************/ | 13 *******************************************************************************/ |
14 module dwt.internal.cocoa.NSEPSImageRep; | 14 module dwt.internal.cocoa.NSEPSImageRep; |
15 | 15 |
16 import dwt.internal.cocoa.id; | |
16 import dwt.internal.cocoa.NSInteger; | 17 import dwt.internal.cocoa.NSInteger; |
17 import dwt.internal.cocoa.NSData; | 18 import dwt.internal.cocoa.NSData; |
18 import dwt.internal.cocoa.NSImageRep; | 19 import dwt.internal.cocoa.NSImageRep; |
19 import dwt.internal.cocoa.NSRect; | 20 import dwt.internal.cocoa.NSRect; |
20 import dwt.internal.cocoa.OS; | 21 import dwt.internal.cocoa.OS; |
33 super(id); | 34 super(id); |
34 } | 35 } |
35 | 36 |
36 public NSData EPSRepresentation () | 37 public NSData EPSRepresentation () |
37 { | 38 { |
38 objc.id result = OS.objc_msgSend(this.id, OS.sel_EPSRepresentation); | 39 objc.id result = OS.objc_msgSend(this.id_, OS.sel_EPSRepresentation); |
39 return result !is null ? new NSData(result) : null; | 40 return result !is null ? new NSData(result) : null; |
40 } | 41 } |
41 | 42 |
42 public NSRect boundingBox () | 43 public NSRect boundingBox () |
43 { | 44 { |
44 NSRect result; | 45 NSRect result; |
45 OS.objc_msgSend_stret(result, this.id, OS.sel_boundingBox); | 46 OS.objc_msgSend_stret(&result, this.id_, OS.sel_boundingBox); |
46 return result; | 47 return result; |
47 } | 48 } |
48 | 49 |
49 public static id imageRepWithData (NSData epsData) | 50 public static id imageRepWithData (NSData epsData) |
50 { | 51 { |
51 objc.id result = OS.objc_msgSend(OS.class_NSEPSImageRep, OS.sel_imageRepWithData_1, epsData !is null ? epsData.id : null); | 52 objc.id result = OS.objc_msgSend(OS.class_NSEPSImageRep, OS.sel_imageRepWithData_1, epsData !is null ? epsData.id_ : null); |
52 return result !is null ? new id(result) : null; | 53 return result !is null ? new id(result) : null; |
53 } | 54 } |
54 | 55 |
55 public id initWithData (NSData epsData) | 56 public id initWithData (NSData epsData) |
56 { | 57 { |
57 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithData_1, epsData !is null ? epsData.id : null); | 58 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithData_1, epsData !is null ? epsData.id_ : null); |
58 return result !is null ? new id(result) : null; | 59 return result !is null ? new id(result) : null; |
59 } | 60 } |
60 | 61 |
61 public void prepareGState () | 62 public void prepareGState () |
62 { | 63 { |
63 OS.objc_msgSend(this.id, OS.sel_prepareGState); | 64 OS.objc_msgSend(this.id_, OS.sel_prepareGState); |
64 } | 65 } |
65 | 66 |
66 } | 67 } |