Mercurial > projects > dwt2
comparison org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/graphics/Color.d @ 26:f589fc20a5f9
work on linux phobos
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 21 Mar 2009 11:22:55 +0100 |
parents | f713da8bc051 |
children | 536e43f63c81 |
comparison
equal
deleted
inserted
replaced
25:f713da8bc051 | 26:f589fc20a5f9 |
---|---|
19 import org.eclipse.swt.internal.gtk.OS; | 19 import org.eclipse.swt.internal.gtk.OS; |
20 import org.eclipse.swt.graphics.Resource; | 20 import org.eclipse.swt.graphics.Resource; |
21 import org.eclipse.swt.graphics.RGB; | 21 import org.eclipse.swt.graphics.RGB; |
22 import org.eclipse.swt.graphics.Device; | 22 import org.eclipse.swt.graphics.Device; |
23 | 23 |
24 import tango.text.convert.Format; | |
25 | 24 |
26 | 25 |
27 /** | 26 /** |
28 * Instances of this class manage the operating system resources that | 27 * Instances of this class manage the operating system resources that |
29 * implement SWT's RGB color model. To create a color you can either | 28 * implement SWT's RGB color model. To create a color you can either |
139 * @param object the object to compare with this object | 138 * @param object the object to compare with this object |
140 * @return <code>true</code> if the object is the same as this object and <code>false</code> otherwise | 139 * @return <code>true</code> if the object is the same as this object and <code>false</code> otherwise |
141 * | 140 * |
142 * @see #hashCode | 141 * @see #hashCode |
143 */ | 142 */ |
144 public override int opEquals(Object object) { | 143 public override equals_t opEquals(Object object) { |
145 if (object is this) return true; | 144 if (object is this) return true; |
146 if ( auto color = cast(Color)object ){ | 145 if ( auto color = cast(Color)object ){ |
147 GdkColor* gdkColor = color.handle; | 146 GdkColor* gdkColor = color.handle; |
148 if (handle is gdkColor) return true; | 147 if (handle is gdkColor) return true; |
149 return device is color.device && handle.red is gdkColor.red && | 148 return device is color.device && handle.red is gdkColor.red && |