Changeset 174:f906dbcacee5

Show
Ignore:
Timestamp:
03/02/08 17:39:01 (6 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

Minor changes to be more compatible to dwt-linux, formatting in toString, Display.DEBUG=true

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/graphics/Device.d

    r117 r174  
    1212 *******************************************************************************/ 
    1313module dwt.graphics.Device; 
    14  
    15 /++ //PORTING_TYPE 
    16 import dwt.internal.win32.OS; 
    17 class Device{ 
    18     static Device getDevice(); 
    19     void new_Object (Object object); 
    20     bool tracking; 
    21     public bool isDisposed () ; 
    22     void dispose_Object (Object object) ; 
    23     float computePoints(LOGFONT* logFont, HFONT hFont); 
    24     int computePixels(float height) ; 
    25     public HPALETTE hPalette; 
    26         int [] colorRefCount; 
    27  
    28 } 
    29 ++/ 
    3014 
    3115import dwt.DWT; 
     
    6145 
    6246    /* Debugging */ 
    63     public static bool DEBUG
     47    public static bool DEBUG = true
    6448    bool debug_; 
    6549    bool tracking; 
  • dwt/graphics/ImageLoaderEvent.d

    r48 r174  
    8686 * @return a string representation of the event 
    8787 */ 
    88 override public char[] toString () { 
     88public override char[] toString () { 
    8989    return Format( "ImageLoaderEvent {source={} imageData={} incrementCount={} endOfImage={}}", source, imageData, incrementCount, endOfImage); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ 
    9090} 
  • dwt/graphics/PaletteData.d

    r16 r174  
    1 /******************************************************************************* 
     1/******************************************************************************* 
    22 * Copyright (c) 2000, 2005 IBM Corporation and others. 
    33 * All rights reserved. This program and the accompanying materials 
     
    153153    } else { 
    154154        for (int i = 0; i < colors.length; i++) { 
    155             if (colors[i] ==/*eq*/ rgb ) return i; 
     155            if (colors[i].opEquals(rgb)) return i; 
    156156        } 
    157157        /* The RGB did not exist in the palette */ 
  • dwt/graphics/Point.d

    r48 r174  
    1 /******************************************************************************* 
     1/******************************************************************************* 
    22 * Copyright (c) 2000, 2005 IBM Corporation and others. 
    33 * All rights reserved. This program and the accompanying materials 
     
    106106 */ 
    107107override public char[] toString () { 
    108     return Format( "Point {}, {}}", x, y );; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
     108    return Format( "Point {{{}, {}}", x, y );; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
    109109} 
    110110 
  • dwt/graphics/Rectangle.d

    r4 r174  
    1 /******************************************************************************* 
     1/******************************************************************************* 
    22 * Copyright (c) 2000, 2005 IBM Corporation and others. 
    33 * All rights reserved. This program and the accompanying materials 
     
    315315 */ 
    316316public override char[] toString () { 
    317     return Format( "Rectangle {}, {}, {}, {}}", x, y, width, height ); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ 
     317    return Format( "Rectangle {{{}, {}, {}, {}}", x, y, width, height ); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ 
    318318} 
    319319 
  • dwt/graphics/Resource.d

    r14 r174  
    1 /******************************************************************************* 
     1/******************************************************************************* 
    22 * Copyright (c) 2000, 2005 IBM Corporation and others. 
    33 * All rights reserved. This program and the accompanying materials 
     
    88 * Contributors: 
    99 *     IBM Corporation - initial API and implementation 
     10 * Port to the D programming language: 
     11 *     Frank Benoit <benoit@tionex.de> 
    1012 *******************************************************************************/ 
    1113module dwt.graphics.Resource; 
     
    1517 
    1618/** 
    17  * This class is the abstract superclass of all graphics resource objects.   
     19 * This class is the abstract superclass of all graphics resource objects. 
    1820 * Resources created by the application must be disposed. 
    1921 * <p> 
     
    3335 * @see #dispose 
    3436 * @see #isDisposed 
    35  *  
     37 * 
    3638 * @since 3.1 
    3739 */ 
    3840public abstract class Resource { 
    39      
     41 
    4042    /** 
    4143     * the device where this resource was created 
     
    5557 * 
    5658 * @return <code>Device</code> the device of the receiver 
    57  *  
     59 * 
    5860 * @since 3.2 
    5961 */