view dwt/graphics/GCData.d @ 156:969e7de37c3d default tip

Fixes to get dwt to work with dmd and ldc
author Jacob Carlborg <doob@me.com>
date Wed, 08 Jul 2009 21:56:44 +0200
parents 476f8d5c0b07
children
line wrap: on
line source

/*******************************************************************************
 * Copyright (c) 2000, 2008 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     
 * Port to the D programming language:
 *     Jacob Carlborg <doob@me.com>
 *******************************************************************************/
module dwt.graphics.GCData;


import dwt.DWT;
import dwt.internal.cocoa.NSAffineTransform;
import dwt.internal.cocoa.NSBezierPath;
import dwt.internal.cocoa.NSRect;
import dwt.internal.cocoa.NSSize;
import dwt.internal.cocoa.NSView;

import tango.core.Thread;

import dwt.dwthelper.utils;
import dwt.graphics.Device;
import dwt.graphics.Pattern;
import dwt.graphics.Image;
import dwt.graphics.Font;
import dwt.internal.c.Carbon;

/**
 * Instances of this class are descriptions of GCs in terms
 * of unallocated platform-specific data fields.
 * <p>
 * <b>IMPORTANT:</b> This class is <em>not</em> part of the public
 * API for DWT. It is marked public only so that it can be shared
 * within the packages provided by DWT. It is not available on all
 * platforms, and should never be called from application code.
 * </p>
 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
 */
public final class GCData {
    public Device device;
    public int style, state = -1;
    public CGFloat[] foreground;
    public CGFloat[] background;
    public Pattern foregroundPattern;
    public Pattern backgroundPattern;
    public Font font;
    public int alpha = 0xFF;
    public CGFloat lineWidth = 0.0;
    public int lineStyle = DWT.LINE_SOLID;
    public int lineCap = DWT.CAP_FLAT;
    public int lineJoin = DWT.JOIN_MITER;
    public CGFloat lineDashesOffset = 0.0;
    public CGFloat[] lineDashes;
    public CGFloat lineMiterLimit = 10;
    public bool xorMode;
    public int antialias = DWT.DEFAULT;
    public int textAntialias = DWT.DEFAULT;
    public int fillRule = DWT.FILL_EVEN_ODD;
    public ubyte* bitmapDataAddress;

    public Image image;
    
    public CGFloat drawXOffset = 0.0, drawYOffset = 0.0;
    public NSRect* paintRect;
    public NSBezierPath path;
    public NSAffineTransform transform, inverseTransform;
    public NSBezierPath clipPath;
    public NSView view;
    public NSSize* size;    
    public NSRect* windowRect, visibleRect;
    public Thread thread;
    
    public NSRect paintRectStruct;
    public NSSize sizeStruct;
    public NSRect windowRectStruct;
    public NSRect visibleRectStruct;
}