Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/WebDocumentRepresentation.d @ 45:d8635bb48c7c
Merge with SWT 3.5
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 01 Dec 2008 17:07:00 +0100 |
parents | 30a762abda2a |
children |
comparison
equal
deleted
inserted
replaced
44:ca5e494f2bbf | 45:d8635bb48c7c |
---|---|
5 * which accompanies this distribution, and is available at | 5 * which accompanies this distribution, and is available at |
6 * http://www.eclipse.org/legal/epl-v10.html | 6 * http://www.eclipse.org/legal/epl-v10.html |
7 * | 7 * |
8 * Contributors: | 8 * Contributors: |
9 * IBM Corporation - initial API and implementation | 9 * IBM Corporation - initial API and implementation |
10 * | |
11 * Port to the D programming language: | |
12 * Jacob Carlborg <doob@me.com> | |
10 *******************************************************************************/ | 13 *******************************************************************************/ |
11 module dwt.internal.cocoa; | 14 module dwt.internal.cocoa.WebDocumentRepresentation; |
15 | |
16 import dwt.dwthelper.utils; | |
17 import cocoa = dwt.internal.cocoa.id; | |
18 import dwt.internal.cocoa.NSObject; | |
19 import dwt.internal.cocoa.NSString; | |
20 import dwt.internal.cocoa.OS; | |
21 import objc = dwt.internal.objc.runtime; | |
12 | 22 |
13 public class WebDocumentRepresentation : NSObject { | 23 public class WebDocumentRepresentation : NSObject { |
14 | 24 |
15 public WebDocumentRepresentation(int id) { | 25 public this() { |
26 super(); | |
27 } | |
28 | |
29 public this(objc.id id) { | |
30 super(id); | |
31 } | |
32 | |
33 public this(cocoa.id id) { | |
16 super(id); | 34 super(id); |
17 } | 35 } |
18 | 36 |
19 public NSString documentSource() { | 37 public NSString documentSource() { |
20 int id = OS.objc_msgSend(this.id, OS.sel_documentSource); | 38 objc.id result = OS.objc_msgSend(this.id, OS.sel_documentSource); |
21 return id !is 0 ? new NSString(id) : null; | 39 return result !is null ? new NSString(result) : null; |
22 } | 40 } |
23 } | 41 } |