Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSCustomImageRep.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.NSCustomImageRep; | 14 module dwt.internal.cocoa.NSCustomImageRep; |
15 | 15 |
16 import dwt.internal.cocoa.id; | |
16 import dwt.internal.cocoa.NSImageRep; | 17 import dwt.internal.cocoa.NSImageRep; |
17 import dwt.internal.cocoa.OS; | 18 import dwt.internal.cocoa.OS; |
18 import objc = dwt.internal.objc.runtime; | 19 import objc = dwt.internal.objc.runtime; |
19 | 20 |
20 public class NSCustomImageRep : NSImageRep | 21 public class NSCustomImageRep : NSImageRep |
30 super(id); | 31 super(id); |
31 } | 32 } |
32 | 33 |
33 public id delegatee () | 34 public id delegatee () |
34 { | 35 { |
35 objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); | 36 objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate); |
36 return result !is null ? new id(result) : null; | 37 return result !is null ? new id(result) : null; |
37 } | 38 } |
38 | 39 |
39 public objc.SEL drawSelector () | 40 public objc.SEL drawSelector () |
40 { | 41 { |
41 return OS.objc_msgSend(this.id, OS.sel_drawSelector); | 42 return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_drawSelector); |
42 } | 43 } |
43 | 44 |
44 public NSCustomImageRep initWithDrawSelector (objc.SEL aMethod, id anObject) | 45 public NSCustomImageRep initWithDrawSelector (char[] aMethod, id anObject) |
45 { | 46 { |
46 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithDrawSelector_1delegate_1, aMethod, anObject !is null ? anObject.id : null); | 47 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithDrawSelector_1delegate_1, aMethod, anObject !is null ? anObject.id_ : null); |
47 return result !is null ? this : null; | 48 return result !is null ? this : null; |
48 } | 49 } |
49 | 50 |
50 } | 51 } |