changeset 261:edcf78db8722

fix compile errors for SWT 3.4
author Frank Benoit <benoit@tionex.de>
date Thu, 03 Jul 2008 21:20:33 +0200
parents 71a9cd1cf2e9
children e10de397beb1
files dwt/graphics/TextLayout.d dwt/widgets/IME.d
diffstat 2 files changed, 16 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/dwt/graphics/TextLayout.d	Thu Jul 03 21:18:53 2008 +0200
+++ b/dwt/graphics/TextLayout.d	Thu Jul 03 21:20:33 2008 +0200
@@ -12,6 +12,8 @@
  *******************************************************************************/
 module dwt.graphics.TextLayout;
 
+import dwt.dwthelper.utils;
+
 import dwt.internal.Compatibility;
 import dwt.internal.cairo.Cairo;
 import dwt.internal.gtk.OS;
@@ -52,7 +54,7 @@
  * @see <a href="http://www.eclipse.org/swt/snippets/#textlayout">TextLayout, TextStyle snippets</a>
  * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: CustomControlExample, StyledText tab</a>
  * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
- * 
+ *
  * @since 3.0
  */
 public final class TextLayout : Resource {
@@ -217,7 +219,7 @@
         byteStart = Math.min(byteStart, slen);
         byteEnd = Math.min(byteEnd, slen);
         Font font = style.font;
-        if (font !is null && !font.isDisposed() && !defaultFont.equals(font)) {
+        if (font !is null && !font.isDisposed() && !defaultFont.opEquals(font)) {
             auto attr = OS.pango_attr_font_desc_new (font.handle);
             attr.start_index = byteStart;
             attr.end_index = byteEnd;
@@ -898,7 +900,7 @@
  * @exception DWTException <ul>
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
- * 
+ *
  * @see #setWidth(int)
  * @see #getLineBounds(int)
  */
--- a/dwt/widgets/IME.d	Thu Jul 03 21:18:53 2008 +0200
+++ b/dwt/widgets/IME.d	Thu Jul 03 21:20:33 2008 +0200
@@ -10,6 +10,7 @@
  *******************************************************************************/
 module dwt.widgets.IME;
 
+import dwt.dwthelper.utils;
 
 import dwt.DWT;
 import dwt.DWTException;
@@ -27,7 +28,7 @@
  * These are typically in-line pre-edit text areas that allow
  * the user to compose characters from Far Eastern languages
  * such as Japanese, Chinese or Korean.
- * 
+ *
  * <dl>
  * <dt><b>Styles:</b></dt>
  * <dd>(none)</dd>
@@ -37,9 +38,9 @@
  * <p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
- * 
+ *
  * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
- * 
+ *
  * @since 3.4
  */
 public class IME : Widget {
@@ -64,7 +65,7 @@
  * <p>
  * The style value is either one of the style constants defined in
  * class <code>DWT</code> which is applicable to instances of this
- * class, or must be built by <em>bitwise OR</em>'ing together 
+ * class, or must be built by <em>bitwise OR</em>'ing together
  * (that is, using the <code>int</code> "|" operator) two or more
  * of those <code>DWT</code> style constants. The class description
  * lists the style constants that are applicable to the class.
@@ -120,14 +121,14 @@
  * number of characters that have been composed.  When the
  * commit count is equal to the length of the composition
  * text, then the in-line edit operation is complete.
- * 
+ *
  * @return the commit count
  *
  * @exception DWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  * </ul>
- * 
+ *
  * @see IME#getText
  */
 public int getCommitCount () {
@@ -168,7 +169,7 @@
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  * </ul>
- * 
+ *
  * @see IME#getStyles
  */
 public int [] getRanges () {
@@ -189,14 +190,14 @@
  * that starts at ranges[n] and ends at ranges[n+1] uses the style
  * at styles[n/2].
  * </p>
- * 
+ *
  * @return the ranges for the styles
  *
  * @exception DWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  * </ul>
- * 
+ *
  * @see IME#getRanges
  */
 public TextStyle [] getStyles () {
@@ -233,7 +234,7 @@
  * <code>false</code> otherwise.  In some languages, for example
  * Korean, the caret is typically widened to the width of the
  * current character in the in-line edit session.
- * 
+ *
  * @return the wide caret state
  *
  * @exception DWTException <ul>