Mercurial > projects > dwt-mac
changeset 103:e655f9f35342
Ported dwt.dnd.ByteArrayTransfer
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Wed, 31 Dec 2008 14:17:00 +0100 |
parents | 1c12673c65ca |
children | 61fdbc24abf2 |
files | dwt/dnd/FileTransfer.d |
diffstat | 1 files changed, 16 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/dwt/dnd/FileTransfer.d Wed Dec 31 13:24:24 2008 +0100 +++ b/dwt/dnd/FileTransfer.d Wed Dec 31 14:17:00 2008 +0100 @@ -8,6 +8,9 @@ * Contributors: * IBM Corporation - initial API and implementation * Outhink - support for typeFileURL + * + * Port to the D programming language: + * Jacob Carlborg <doob@me.com> *******************************************************************************/ module dwt.dnd.FileTransfer; @@ -17,6 +20,8 @@ import dwt.internal.cocoa.NSMutableArray; import dwt.internal.cocoa.NSString; import dwt.internal.cocoa.OS; + +import dwt.dnd.TransferData; /** * The class <code>FileTransfer</code> provides a platform specific mechanism @@ -38,13 +43,19 @@ * * @see Transfer */ -public class FileTransfer extends ByteArrayTransfer { +public class FileTransfer : ByteArrayTransfer { + + static FileTransfer _instance; + static const String ID_NAME = OS.NSFilenamesPboardType.getString(); + static const int ID; - static FileTransfer _instance = new FileTransfer(); - static final String ID_NAME = OS.NSFilenamesPboardType.getString(); - static final int ID = registerType(ID_NAME); + static this () + { + _instance = new FileTransfer(); + ID = registerType(ID_NAME); + } -FileTransfer() {} +this() {} /** * Returns the singleton instance of the FileTransfer class.