Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/WebOpenPanelResultListener.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.WebOpenPanelResultListener; |
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 WebOpenPanelResultListener : NSObject { | 23 public class WebOpenPanelResultListener : NSObject { |
14 | 24 |
15 public WebOpenPanelResultListener(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 void cancel() { | 37 public void cancel() { |
20 OS.objc_msgSend(id, OS.sel_cancel); | 38 OS.objc_msgSend(id, OS.sel_cancel); |
21 } | 39 } |
22 | 40 |
23 public void chooseFilename(NSString String) { | 41 public void chooseFilename(NSString string) { |
24 OS.objc_msgSend(id, OS.sel_chooseFilename_1, String !is null ? String.id : 0); | 42 OS.objc_msgSend(id, OS.sel_chooseFilename_, string !is null ? string.id : null); |
25 } | 43 } |
26 } | 44 } |