Mercurial > projects > dwt2
comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/image/FileFormat.d @ 22:4642ab680468
some work on dwt-win for tango/phobos
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 20 Mar 2009 12:52:28 +0100 |
parents | f36c67707cb3 |
children | 536e43f63c81 |
comparison
equal
deleted
inserted
replaced
21:9b96950f2c3c | 22:4642ab680468 |
---|---|
30 import org.eclipse.swt.internal.image.TIFFFileFormat; | 30 import org.eclipse.swt.internal.image.TIFFFileFormat; |
31 import org.eclipse.swt.internal.image.OS2BMPFileFormat; | 31 import org.eclipse.swt.internal.image.OS2BMPFileFormat; |
32 import org.eclipse.swt.internal.image.JPEGFileFormat; | 32 import org.eclipse.swt.internal.image.JPEGFileFormat; |
33 import org.eclipse.swt.internal.image.PNGFileFormat; | 33 import org.eclipse.swt.internal.image.PNGFileFormat; |
34 | 34 |
35 import tango.core.Tuple; | 35 version(Tango){ |
36 import tango.core.Tuple; | |
37 } else { // Phobos | |
38 import std.typetuple; | |
39 } | |
36 | 40 |
37 /** | 41 /** |
38 * Abstract factory class for loading/unloading images from files or streams | 42 * Abstract factory class for loading/unloading images from files or streams |
39 * in various image file formats. | 43 * in various image file formats. |
40 * | 44 * |
41 */ | 45 */ |
42 public abstract class FileFormat { | 46 public abstract class FileFormat { |
43 static const String FORMAT_PACKAGE = "org.eclipse.swt.internal.image"; //$NON-NLS-1$ | 47 static const String FORMAT_PACKAGE = "org.eclipse.swt.internal.image"; //$NON-NLS-1$ |
44 static const String FORMAT_SUFFIX = "FileFormat"; //$NON-NLS-1$ | 48 static const String FORMAT_SUFFIX = "FileFormat"; //$NON-NLS-1$ |
45 static const String[] FORMATS = [ "WinBMP"[], "WinBMP", "GIF", "WinICO", "JPEG", "PNG", "TIFF", "OS2BMP" ]; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$//$NON-NLS-7$//$NON-NLS-8$ | 49 static const String[] FORMATS = [ "WinBMP"[], "WinBMP", "GIF", "WinICO", "JPEG", "PNG", "TIFF", "OS2BMP" ]; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$//$NON-NLS-7$//$NON-NLS-8$ |
46 alias Tuple!( WinBMPFileFormat, WinBMPFileFormat, GIFFileFormat, WinICOFileFormat, JPEGFileFormat, PNGFileFormat, TIFFFileFormat, OS2BMPFileFormat ) TFormats; | 50 version(Tango){ |
51 alias Tuple!( WinBMPFileFormat, WinBMPFileFormat, GIFFileFormat, WinICOFileFormat, JPEGFileFormat, PNGFileFormat, TIFFFileFormat, OS2BMPFileFormat ) TFormats; | |
52 } else { // Phobos | |
53 alias TypeTuple!( WinBMPFileFormat, WinBMPFileFormat, GIFFileFormat, WinICOFileFormat, JPEGFileFormat, PNGFileFormat, TIFFFileFormat, OS2BMPFileFormat ) TFormats; | |
54 } | |
55 | |
47 LEDataInputStream inputStream; | 56 LEDataInputStream inputStream; |
48 LEDataOutputStream outputStream; | 57 LEDataOutputStream outputStream; |
49 ImageLoader loader; | 58 ImageLoader loader; |
50 int compression; | 59 int compression; |
51 | 60 |