# HG changeset patch
# User Jacob Carlborg
# Date 1223376978 -7200
# Node ID db5a898b2119d9e6e60650d573e5a42057213aa7
# Parent 7d135fe0caf27f6f43d0ccc2b494cb61b6a1a5f6
Fixed a lot of compile errors
diff -r 7d135fe0caf2 -r db5a898b2119 .hgignore
--- a/.hgignore Sun Sep 14 23:32:29 2008 +0200
+++ b/.hgignore Tue Oct 07 12:56:18 2008 +0200
@@ -4,4 +4,6 @@
dsss_objs
dsss.last
*.a
-*.orig
\ No newline at end of file
+*.orig
+dsss_imports
+*.sh
\ No newline at end of file
diff -r 7d135fe0caf2 -r db5a898b2119 dsss.conf
--- a/dsss.conf Sun Sep 14 23:32:29 2008 +0200
+++ b/dsss.conf Tue Oct 07 12:56:18 2008 +0200
@@ -1,38 +1,52 @@
[dwt]
-buildflags+=-framework=Cocoa
-exclude=dwt/browser
-exclude=dwt/dnd
-exclude=dwt/effects
-exclude=dwt/graphics/TextLayout.d
-exclude=dwt/internal/cocoa/DOM*
-exclude=dwt/internal/cocoa/MacGenerator.d
-exclude=dwt/internal/cocoa/Web*
-exclude=dwt/internal/theme
-exclude=dwt/layout
-exclude=dwt/opengl
-exclude=dwt/printing
-exclude=dwt/program
-exclude=dwt/widgets/ColorDialog.d
-exclude=dwt/widgets/Combo.d
-exclude=dwt/widgets/CoolBar.d
-exclude=dwt/widgets/CoolItem.d
-exclude=dwt/widgets/DateTime.d
-exclude=dwt/widgets/DirectoryDialog.d
-exclude=dwt/widgets/ExpandBar.d
-exclude=dwt/widgets/ExpandItem.d
-exclude=dwt/widgets/FileDialog.d
-exclude=dwt/widgets/FontDialog.d
-exclude=dwt/widgets/Group.d
-exclude=dwt/widgets/Label.d
-exclude=dwt/widgets/Link.d
-exclude=dwt/widgets/List.d
-exclude=dwt/widgets/MessageBox.d
-exclude=dwt/widgets/ProgressBar.d
-exclude=dwt/widgets/Sash.d
-exclude=dwt/widgets/Scale.d
-exclude=dwt/widgets/Slider.d
-exclude=dwt/widgets/Spinner.d
-exclude=dwt/widgets/Ta*
-exclude=dwt/widgets/Text.d
-exclude=dwt/widgets/Too*
-exclude=dwt/widgets/Tr*
\ No newline at end of file
+buildflags+=-framework Cocoa
+exclude+=dwt/accessibility
+exclude+=dwt/browser/
+exclude+=dwt/custom
+exclude+=dwt/dnd
+exclude+=dwt/effects
+exclude+=dwt/events
+exclude+=dwt/graphics/TextLayout.d
+exclude+=dwt/internal/cocoa/DOM*
+exclude+=dwt/internal/cocoa/MacGenerator.d
+exclude+=dwt/internal/cocoa/Web*
+exclude+=dwt/internal/theme
+exclude+=dwt/layout
+exclude+=dwt/opengl
+exclude+=dwt/printing
+exclude+=dwt/program
+exclude+=dwt/widgets/ColorDialog.d
+exclude+=dwt/widgets/Combo.d
+exclude+=dwt/widgets/CoolBar.d
+exclude+=dwt/widgets/CoolItem.d
+exclude+=dwt/widgets/DateTime.d
+exclude+=dwt/widgets/DirectoryDialog.d
+exclude+=dwt/widgets/ExpandBar.d
+exclude+=dwt/widgets/ExpandItem.d
+exclude+=dwt/widgets/FileDialog.d
+exclude+=dwt/widgets/FontDialog.d
+exclude+=dwt/widgets/Group.d
+exclude+=dwt/widgets/Label.d
+exclude+=dwt/widgets/Link.d
+exclude+=dwt/widgets/List.d
+exclude+=dwt/widgets/MessageBox.d
+exclude+=dwt/widgets/ProgressBar.d
+exclude+=dwt/widgets/Sash.d
+exclude+=dwt/widgets/Scale.d
+exclude+=dwt/widgets/Slider.d
+exclude+=dwt/widgets/Spinner.d
+exclude+=dwt/widgets/TabFolder.d
+exclude+=dwt/widgets/TabItem.d
+exclude+=dwt/widgets/Table.d
+exclude+=dwt/widgets/TableColumn.d
+exclude+=dwt/widgets/TableItem.d
+exclude+=dwt/widgets/Text.d
+exclude+=dwt/widgets/ToolBar.d
+exclude+=dwt/widgets/ToolItem.d
+exclude+=dwt/widgets/ToolTip.d
+exclude+=dwt/widgets/Tracker.d
+exclude+=dwt/widgets/Tray.d
+exclude+=dwt/widgets/TrayItem.d
+exclude+=dwt/widgets/Tree.d
+exclude+=dwt/widgets/TreeColumn.d
+exclude+=dwt/widgets/TreeItem.d
\ No newline at end of file
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/DWT.d
--- a/dwt/DWT.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/DWT.d Tue Oct 07 12:56:18 2008 +0200
@@ -3697,7 +3697,7 @@
* @return the DWT version number
*/
public static int getVersion () {
- return Library.DWT_VERSION;
+ return Library.SWT_VERSION;
}
/**
@@ -3705,6 +3705,10 @@
*
* @param code the DWT error code
*/
+ public static void error (String file, long line, int code) {
+ error (code, null);
+ }
+
public static void error (int code) {
error(code, null);
}
@@ -3782,9 +3786,9 @@
* NOTE: Exceptions thrown in syncExec and asyncExec must be
* wrapped.
*/
- if (code != SWT.ERROR_FAILED_EXEC) {
- if (cast(SWTError) throwable) throw cast(SWTError) throwable;
- if (cast(SWTException) throwable) throw cast(SWTException) throwable;
+ if (code != DWT.ERROR_FAILED_EXEC) {
+ if (cast(DWTError) throwable) throw cast(DWTError) throwable;
+ if (cast(DWTException) throwable) throw cast(DWTException) throwable;
}
String message = findErrorText (code);
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/DWTError.d
--- a/dwt/DWTError.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/DWTError.d Tue Oct 07 12:56:18 2008 +0200
@@ -137,8 +137,8 @@
* @return the error message string of this DWTError object
*/
public String getMessage () {
- if (throwable is null) return super.getMessage();
- return super.getMessage () ~ " (" ~ throwable.toString () ~ ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ if (throwable is null) return super.toString();
+ return super.toString () ~ " (" ~ throwable.toString () ~ ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
/**
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/DWTException.d
--- a/dwt/DWTException.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/DWTException.d Tue Oct 07 12:56:18 2008 +0200
@@ -129,8 +129,8 @@
* @return the error message string of this DWTException object
*/
public String getMessage () {
- if (throwable is null) return super.getMessage ();
- return super.getMessage () ~ " (" ~ throwable.toString () ~ ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ if (throwable is null) return super.toString ();
+ return super.toString () ~ " (" ~ throwable.toString () ~ ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
/**
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/accessibility/AccessibleEvent.d
--- a/dwt/accessibility/AccessibleEvent.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/accessibility/AccessibleEvent.d Tue Oct 07 12:56:18 2008 +0200
@@ -13,8 +13,11 @@
*******************************************************************************/
module dwt.accessibility.AccessibleEvent;
+import dwt.internal.DWTEventObject;
+
+import tango.text.convert.Format;
+
import dwt.dwthelper.utils;
-import dwt.internal.DWTEventObject;
/**
* Instances of this class are sent as a result of
@@ -47,7 +50,7 @@
*/
public String result;
- static final long serialVersionUID = 3257567304224026934L;
+ static const long serialVersionUID = 3257567304224026934L;
/**
* Constructs a new instance of this class.
@@ -65,6 +68,6 @@
* @return a String representation of the event
*/
public String toString () {
- return "AccessibleEvent {childID=" + childID + " result=" + result + "}"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ return Format("AccessibleEvent {childID={}{}{}{}" , childID , " result=" , result , "}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/accessibility/AccessibleTextEvent.d
--- a/dwt/accessibility/AccessibleTextEvent.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/accessibility/AccessibleTextEvent.d Tue Oct 07 12:56:18 2008 +0200
@@ -13,8 +13,11 @@
*******************************************************************************/
module dwt.accessibility.AccessibleTextEvent;
+import dwt.internal.DWTEventObject;
+
+import tango.text.convert.Format;
+
import dwt.dwthelper.utils;
-import dwt.internal.DWTEventObject;
/**
* Instances of this class are sent as a result of
@@ -36,7 +39,7 @@
public int childID; // IN
public int offset, length; // OUT
- static final long serialVersionUID = 3977019530868308275L;
+ static const long serialVersionUID = 3977019530868308275L;
/**
* Constructs a new instance of this class.
@@ -54,9 +57,9 @@
* @return a String representation of the event
*/
public String toString () {
- return "AccessibleTextEvent {childID=" ~ childID + //$NON-NLS-1$
- " offset=" + offset + //$NON-NLS-1$
- " length=" + length + //$NON-NLS-1$
- "}"; //$NON-NLS-1$
+ return Format("AccessibleTextEvent {childID={}{}{}{}{}{}" , childID , //$NON-NLS-1$
+ " offset=" , offset , //$NON-NLS-1$
+ " length=" , length , //$NON-NLS-1$
+ "}"); //$NON-NLS-1$
}
}
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/browser/Mozilla.d
--- a/dwt/browser/Mozilla.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/browser/Mozilla.d Tue Oct 07 12:56:18 2008 +0200
@@ -1236,7 +1236,7 @@
error (rc);
}
- delegate.init ();
+ delegate_.init_ ();
listener = new Listener () {
public void handleEvent (Event event) {
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/browser/MozillaDelegate.d
--- a/dwt/browser/MozillaDelegate.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/browser/MozillaDelegate.d Tue Oct 07 12:56:18 2008 +0200
@@ -123,7 +123,7 @@
return true;
}
- void init () {
+ void init_ () {
}
bool needsSpinup () {
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/custom/StyledText.d
--- a/dwt/custom/StyledText.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/custom/StyledText.d Tue Oct 07 12:56:18 2008 +0200
@@ -387,7 +387,7 @@
printerRenderer = null;
}
}
- void init() {
+ void init_() {
Rectangle trim = printer.computeTrim(0, 0, 0, 0);
Point dpi = printer.getDPI();
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/dwthelper/BufferedOutputStream.d
--- a/dwt/dwthelper/BufferedOutputStream.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/dwthelper/BufferedOutputStream.d Tue Oct 07 12:56:18 2008 +0200
@@ -79,7 +79,7 @@
{
if (count > 0)
{
- ostr.write(buf, 0, count);
+ write(buf, 0, count);
count = 0;
}
}
@@ -127,7 +127,7 @@
flush the output buffer and then write the data directly.
In this way buffered streams will cascade harmlessly. */
flushBuffer();
- ostr.write(b, off, len);
+ write(b, off, len);
return;
}
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/dwthelper/OutputStream.d
--- a/dwt/dwthelper/OutputStream.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/dwthelper/OutputStream.d Tue Oct 07 12:56:18 2008 +0200
@@ -1,5 +1,6 @@
/**
* Authors: Frank Benoit
+ * Jacob Carlborg
*/
module dwt.dwthelper.OutputStream;
@@ -8,7 +9,7 @@
public abstract class OutputStream {
- private tango.io.model.IConduit.OutputStream ostr;
+ protected tango.io.model.IConduit.OutputStream ostr;
public this(){
}
@@ -32,7 +33,7 @@
}
public void write( byte[] b, int off, int len ){
- implMissing( __FILE__, __LINE__ );
+ ostr.write(b[off .. off + len]);
}
public void flush(){
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/dwthelper/System.d
--- a/dwt/dwthelper/System.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/dwthelper/System.d Tue Oct 07 12:56:18 2008 +0200
@@ -4,8 +4,10 @@
module dwt.dwthelper.System;
import tango.core.Exception;
+import tango.io.Stdout;
+import tango.io.Print;
+import tango.stdc.stdlib : exit;
import tango.time.Clock;
-import tango.stdc.stdlib : exit;
template SimpleType(T) {
debug{
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/dwthelper/utils.d
--- a/dwt/dwthelper/utils.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/dwthelper/utils.d Tue Oct 07 12:56:18 2008 +0200
@@ -25,11 +25,9 @@
alias bool boolean;
alias char[] String;
alias tango.text.Text.Text!(char) StringBuffer;
-alias opEquals equals;
alias PlatformException Error;
alias Exception Throwable;
-alias Exception RuntimeException;
alias ClassInfo Class;
@@ -573,7 +571,7 @@
}
public size_t length(T)(T arr){
- return str.length;
+ return arr.length;
}
public String replace( String str, char from, char to ){
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/graphics/Color.d
--- a/dwt/graphics/Color.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/graphics/Color.d Tue Oct 07 12:56:18 2008 +0200
@@ -17,6 +17,8 @@
import dwt.DWT;
import dwt.DWTException;
+import tango.text.convert.Format;
+
import dwt.dwthelper.utils;
import dwt.graphics.Device;
import dwt.graphics.Resource;
@@ -38,6 +40,9 @@
* @see Device#getSystemColor
*/
public final class Color : Resource {
+
+ alias Resource.init_ init_;
+
/**
* the handle to the OS color resource
* (Warning: This field is platform dependent)
@@ -80,8 +85,8 @@
*/
public this(Device device, int red, int green, int blue) {
super(device);
- init(red, green, blue);
- init();
+ init_(red, green, blue);
+ init_();
}
/**
@@ -109,8 +114,8 @@
public this(Device device, RGB rgb) {
super(device);
if (rgb is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
- init(rgb.red, rgb.green, rgb.blue);
- init();
+ init_(rgb.red, rgb.green, rgb.blue);
+ init_();
}
void destroy() {
@@ -235,7 +240,7 @@
return color;
}
-void init(int red, int green, int blue) {
+void init_(int red, int green, int blue) {
if ((red > 255) || (red < 0) ||
(green > 255) || (green < 0) ||
(blue > 255) || (blue < 0)) {
@@ -271,7 +276,7 @@
*/
public String toString () {
if (isDisposed()) return "Color {*DISPOSED*}";
- return "Color {" ~ getRed() ~ ", " ~ getGreen() ~ ", " ~ getBlue() + "}";
+ return Format("Color {{}{}{}{}{}{}" , getRed() , ", " , getGreen() , ", " , getBlue() , "}");
}
}
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/graphics/Cursor.d
--- a/dwt/graphics/Cursor.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/graphics/Cursor.d Tue Oct 07 12:56:18 2008 +0200
@@ -61,6 +61,8 @@
public final class Cursor : Resource {
+ alias Resource.init_ init_;
+
/**
* the handle to the OS cursor resource
* (Warning: This field is platform dependent)
@@ -151,7 +153,7 @@
}
handle.retain();
handle.setOnMouseEntered(true);
- init();
+ init_();
}
/**
@@ -229,10 +231,11 @@
}
}
createNSCursor(hotspotX, hotspotY, data, source.width, source.height);
- init();
+ init_();
}
void createNSCursor(int hotspotX, int hotspotY, byte[] buffer, int width, int height) {
+ ubyte** dummy;
NSImage nsImage = cast(NSImage)(new NSImage()).alloc();
NSBitmapImageRep nsImageRep = cast(NSBitmapImageRep)(new NSBitmapImageRep()).alloc();
handle = cast(NSCursor)(new NSCursor()).alloc();
@@ -240,10 +243,10 @@
size.width = width;
size.height = height;
nsImage = nsImage.initWithSize(size);
- nsImageRep = nsImageRep.initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_(0, cast(NSInteger) width, cast(NSInteger) height,
- 8, 4, true, false, new NSString(OS.NSDeviceRGBColorSpace()),
- OS.NSAlphaFirstBitmapFormat | OS.NSAlphaNonpremultipliedBitmapFormat, cast(NSInteger) (width * 4, 32));
- OS.memmove(nsImageRep.bitmapData(), buffer, buffer.length);
+ nsImageRep = nsImageRep.initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_(dummy, cast(NSInteger) width, cast(NSInteger) height,
+ 8, 4, true, false, OS.NSDeviceRGBColorSpace,
+ NSAlphaFirstBitmapFormat | NSAlphaNonpremultipliedBitmapFormat, cast(NSInteger) (width * 4), 32);
+ OS.memmove(cast(void*) nsImageRep.bitmapData(), buffer.ptr, buffer.length);
nsImage.addRepresentation(nsImageRep);
NSPoint point = NSPoint();
point.x = hotspotX;
@@ -338,7 +341,7 @@
}
}
createNSCursor(hotspotX, hotspotY, data, source.width, source.height);
- init();
+ init_();
}
void destroy() {
@@ -363,7 +366,7 @@
return device is cursor.device && handle is cursor.handle;
}
-alias opEequals equals;
+alias opEquals equals;
/**
* Returns an integer hash code for the receiver. Any two
@@ -375,8 +378,8 @@
*
* @see #equals
*/
-public hast_t toHash () {
- return handle !is null ? handle.id_ : 0;
+public hash_t toHash () {
+ return handle !is null ? cast(hash_t) handle.id_ : 0;
}
alias toHash hashCode;
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/graphics/Device.d
--- a/dwt/graphics/Device.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/graphics/Device.d Tue Oct 07 12:56:18 2008 +0200
@@ -13,8 +13,6 @@
*******************************************************************************/
module dwt.graphics.Device;
-import dwt.dwthelper.utils;
-
import dwt.DWT;
import dwt.DWTException;
import dwt.internal.Compatibility;
@@ -30,15 +28,18 @@
import dwt.internal.cocoa.OS;
import dwt.internal.cocoa.id;
+import dwt.dwthelper.Runnable;
+import dwt.dwthelper.utils;
import dwt.graphics.Drawable;
-
import dwt.graphics.Color;
import dwt.graphics.DeviceData;
import dwt.graphics.Font;
import dwt.graphics.FontData;
import dwt.graphics.GCData;
+import dwt.graphics.Point;
import dwt.graphics.Rectangle;
import dwt.internal.cocoa.NSInteger;
+import objc = dwt.internal.objc.runtime;
/**
@@ -49,9 +50,9 @@
*/
public abstract class Device : Drawable {
- /* Debugging */
- public static bool DEBUG;
- bool debugg = DEBUG;
+ /* debug_ing */
+ public static const bool DEBUG = true;
+ bool debug_ = DEBUG;
bool tracking = DEBUG;
Error [] errors;
Object [] objects;
@@ -127,7 +128,7 @@
public this(DeviceData data) {
synchronized (Device.classinfo) {
if (data !is null) {
- debugg = data.debugg;
+ debug_ = data.debug_;
tracking = data.tracking;
}
if (tracking) {
@@ -136,7 +137,7 @@
trackingLock = new Object ();
}
create (data);
- init ();
+ init_ ();
}
}
@@ -269,7 +270,7 @@
public DeviceData getDeviceData () {
checkDevice();
DeviceData data = new DeviceData ();
- data.debugg = debugg;
+ data.debug_ = debug_;
data.tracking = tracking;
if (tracking) {
synchronized (trackingLock) {
@@ -345,7 +346,7 @@
public Point getDPI () {
checkDevice ();
NSDictionary dictionary = NSScreen.mainScreen().deviceDescription();
- NSValue value = new NSValue(dictionary.objectForKey(new id(OS.NSDeviceResolution())).id_);
+ NSValue value = new NSValue(dictionary.objectForKey(new id(OS.NSDeviceResolution().id_)).id_);
NSSize size = value.sizeValue();
return new Point(cast(int)size.width, cast(int)size.height);
}
@@ -486,7 +487,7 @@
*
* @see #create
*/
-protected void init () {
+protected void init_ () {
/* Create the standard colors */
COLOR_BLACK = new Color (this, 0,0,0);
COLOR_DARK_RED = new Color (this, 0x80,0,0);
@@ -523,7 +524,7 @@
* @param data the platform specific GC data
* @return the platform specific GC handle
*/
-public abstract int internal_new_GC (GCData data);
+public abstract objc.id internal_new_GC (GCData data);
/**
* Invokes platform specific functionality to dispose a GC handle.
@@ -586,7 +587,7 @@
for (int i=0; iDrawable can have a graphics context cast(GC)
@@ -48,7 +50,7 @@
* @return the platform specific GC handle
*/
-public size_t /*long*/ internal_new_GC (GCData data);
+public objc.id /*long*/ internal_new_GC (GCData data);
/**
* Invokes platform specific functionality to dispose a GC handle.
@@ -63,6 +65,6 @@
* @param handle the platform specific GC handle
* @param data the platform specific GC data
*/
-public void internal_dispose_GC (size_t /*long*/ handle, GCData data);
+public void internal_dispose_GC (objc.id /*long*/ handle, GCData data);
}
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/graphics/Font.d
--- a/dwt/graphics/Font.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/graphics/Font.d Tue Oct 07 12:56:18 2008 +0200
@@ -21,7 +21,8 @@
import dwt.internal.cocoa.NSString;
import tango.stdc.stringz;
-import tango.text.convert.Utf;
+import tango.text.convert.Format;
+static import tango.text.convert.Utf;
import dwt.dwthelper.utils;
import dwt.graphics.Device;
@@ -44,6 +45,8 @@
*/
public final class Font : Resource {
+ alias Resource.init_ init_;
+
/**
* the handle to the OS font resource
* (Warning: This field is platform dependent)
@@ -81,8 +84,8 @@
public this(Device device, FontData fd) {
super(device);
if (fd is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
- init(fd.getName(), fd.getHeightF(), fd.getStyle(), fd.nsName);
- init();
+ init_(fd.getName(), fd.getHeightF(), fd.getStyle(), fd.nsName);
+ init_();
}
/**
@@ -116,8 +119,8 @@
if (fds[i] is null) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
}
FontData fd = fds[0];
- init(fd.getName(), fd.getHeightF(), fd.getStyle(), fd.nsName);
- init();
+ init_(fd.getName(), fd.getHeightF(), fd.getStyle(), fd.nsName);
+ init_();
}
/**
@@ -144,14 +147,14 @@
*/
public this(Device device, String name, int height, int style) {
super(device);
- init(name, height, style, null);
- init();
+ init_(name, height, style, null);
+ init_();
}
/*public*/ this(Device device, String name, float height, int style) {
super(device);
- init(name, height, style, null);
- init();
+ init_(name, height, style, null);
+ init_();
}
void destroy() {
@@ -169,7 +172,7 @@
*
* @see #hashCode
*/
-public bool opEquals(Object object) {
+public int opEquals(Object object) {
if (object is this) return true;
if (!( null !is cast(Font)object )) return false;
Font font = cast(Font)object;
@@ -194,18 +197,18 @@
if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
NSString family = handle.familyName();
wchar[] buffer1 = new wchar[family.length()];
- family.getCharacters_(buffer1);
- String name = buffer1.toString().dup;
+ family.getCharacters_(buffer1.ptr);
+ String name = tango.text.convert.Utf.toString(buffer1).dup;
NSString str = handle.fontName();
wchar[] buffer = new wchar[str.length()];
- str.getCharacters_(buffer);
- String nsName = buffer.toString().dup;
+ str.getCharacters_(buffer.ptr);
+ String nsName = tango.text.convert.Utf.toString(buffer).dup;
int style = DWT.NORMAL;
if (nsName.indexOf("Italic") !is -1) style |= DWT.ITALIC;
if (nsName.indexOf("Bold") !is -1) style |= DWT.BOLD;
FontData data = new FontData(name, handle.pointSize(), style);
data.nsName = nsName;
- return new FontData[][data];
+ return [data];
}
/**
@@ -242,24 +245,24 @@
* @see #equals
*/
public hash_t toHash() {
- return handle !is null ? handle.id : 0;
+ return handle !is null ? cast(hash_t) handle.id_ : 0;
}
alias toHash hashCode;
-void init(String name, float height, int style, String nsName) {
+void init_(String name, float height, int style, String nsName) {
//if (name is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
if (height < 0) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
if (nsName !is null) {
handle = NSFont.static_fontWithName_size_(NSString.stringWith(nsName), cast(CGFloat) height);
} else {
nsName = name;
- if ((style & DWT.BOLD) !is 0) nsName += " Bold";
- if ((style & DWT.ITALIC) !is 0) nsName += " Italic";
+ if ((style & DWT.BOLD) !is 0) nsName ~= " Bold";
+ if ((style & DWT.ITALIC) !is 0) nsName ~= " Italic";
handle = NSFont.static_fontWithName_size_(NSString.stringWith(nsName), cast(CGFloat) height);
if (handle is null && (style & DWT.ITALIC) !is 0) {
nsName = name;
- if ((style & DWT.BOLD) !is 0) nsName += " Bold";
+ if ((style & DWT.BOLD) !is 0) nsName ~= " Bold";
handle = NSFont.static_fontWithName_size_(NSString.stringWith(nsName), cast(CGFloat) height);
}
if (handle is null && (style & DWT.BOLD) !is 0) {
@@ -295,7 +298,7 @@
*/
public String toString () {
if (isDisposed()) return "Font {*DISPOSED*}";
- return "Font {" ~ handle ~ "}";
+ return Format("Font {{}{}" , handle , "}");
}
}
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/graphics/FontData.d
--- a/dwt/graphics/FontData.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/graphics/FontData.d Tue Oct 07 12:56:18 2008 +0200
@@ -222,7 +222,7 @@
return name.equals(data.name) && height is data.height && style is data.style;
}
-alias opEquals equals;
+//alias opEquals equals;
/**
* Returns the height of the receiver in points.
@@ -317,8 +317,8 @@
*
* @see #equals
*/
-public hast_t toHash () {
- return name.hashCode() ^ getHeight() ^ style;
+public hash_t toHash () {
+ return typeid(String).getHash(&name) ^ getHeight() ^ style;
}
alias toHash hashCode;
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/graphics/GC.d
--- a/dwt/graphics/GC.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/graphics/GC.d Tue Oct 07 12:56:18 2008 +0200
@@ -26,6 +26,7 @@
import dwt.internal.cocoa.NSGradient;
import dwt.internal.cocoa.NSGraphicsContext;
import dwt.internal.cocoa.NSImage;
+import dwt.internal.cocoa.NSInteger;
import dwt.internal.cocoa.NSMutableDictionary;
import dwt.internal.cocoa.NSPoint;
import dwt.internal.cocoa.NSRect;
@@ -86,6 +87,9 @@
* @see dwt.events.PaintEvent
*/
public final class GC : Resource {
+
+ alias Resource.init_ init_;
+
/**
* the handle to the OS device context
* (Warning: This field is platform dependent)
@@ -118,14 +122,14 @@
const static int DRAW = CLIPPING | TRANSFORM | FOREGROUND | LINE_WIDTH | LINE_STYLE | LINE_CAP | LINE_JOIN | LINE_MITERLIMIT | DRAW_OFFSET;
const static int FILL = CLIPPING | TRANSFORM | BACKGROUND;
- static const CGFloat[] LINE_DOT = new CGFloat[][1, 1];
- static const CGFloat[] LINE_DASH = new CGFloat[][3, 1];
- static const CGFloat[] LINE_DASHDOT = new CGFloat[][3, 1, 1, 1];
- static const CGFloat[] LINE_DASHDOTDOT = new CGFloat[][3, 1, 1, 1, 1, 1];
- static const CGFloat[] LINE_DOT_ZERO = new CGFloat[][3, 3];
- static const CGFloat[] LINE_DASH_ZERO = new CGFloat[][18, 6];
- static const CGFloat[] LINE_DASHDOT_ZERO = new CGFloat[][9, 6, 3, 6];
- static const CGFloat[] LINE_DASHDOTDOT_ZERO = new CGFloat[][9, 3, 3, 3, 3, 3];
+ static const CGFloat[] LINE_DOT = [1, 1];
+ static const CGFloat[] LINE_DASH = [3, 1];
+ static const CGFloat[] LINE_DASHDOT = [3, 1, 1, 1];
+ static const CGFloat[] LINE_DASHDOTDOT = [3, 1, 1, 1, 1, 1];
+ static const CGFloat[] LINE_DOT_ZERO = [3, 3];
+ static const CGFloat[] LINE_DASH_ZERO = [18, 6];
+ static const CGFloat[] LINE_DASHDOT_ZERO = [9, 6, 3, 6];
+ static const CGFloat[] LINE_DASHDOTDOT_ZERO = [9, 3, 3, 3, 3, 3];
this() {
}
@@ -151,7 +155,7 @@
* ERROR_NO_HANDLES if a handle could not be obtained for GC creation
* ERROR_THREAD_INVALID_ACCESS if not called from the thread that created the drawable
*
- */
+ */
public this(Drawable drawable) {
this(drawable, 0);
}
@@ -187,13 +191,13 @@
if (drawable is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
GCData data = new GCData();
data.style = checkStyle(style);
- size_t contextId = drawable.internal_new_GC(data);
+ objc.id contextId = drawable.internal_new_GC(data);
Device device = data.device;
if (device is null) device = Device.getDevice();
if (device is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
this.device = data.device = device;
- init(drawable, data, contextId);
- init();
+ init_(drawable, data, contextId);
+ init_();
}
static int checkStyle (int style) {
@@ -220,9 +224,9 @@
*/
public static GC cocoa_new(Drawable drawable, GCData data) {
GC gc = new GC();
- size_t context = drawable.internal_new_GC(data);
+ objc.id context = drawable.internal_new_GC(data);
gc.device = data.device;
- gc.init(drawable, data, context);
+ gc.init_(drawable, data, context);
return gc;
}
@@ -241,10 +245,10 @@
*
* @return a new GC
*/
-public static GC carbon_new(int context, GCData data) {
+public static GC carbon_new(objc.id context, GCData data) {
GC gc = new GC();
gc.device = data.device;
- gc.init(null, data, context);
+ gc.init_(null, data, context);
return gc;
}
@@ -329,22 +333,22 @@
path.setMiterLimit(data.lineMiterLimit);
}
if ((state & LINE_JOIN) !is 0) {
- int joinStyle = 0;
+ NSLineJoinStyle joinStyle;
switch (data.lineJoin) {
- case DWT.JOIN_MITER: joinStyle = OS.NSMiterLineJoinStyle; break;
- case DWT.JOIN_ROUND: joinStyle = OS.NSRoundLineJoinStyle; break;
- case DWT.JOIN_BEVEL: joinStyle = OS.NSBevelLineJoinStyle; break;
+ case DWT.JOIN_MITER: joinStyle = NSMiterLineJoinStyle; break;
+ case DWT.JOIN_ROUND: joinStyle = NSRoundLineJoinStyle; break;
+ case DWT.JOIN_BEVEL: joinStyle = NSBevelLineJoinStyle; break;
}
- path.setLineJoinStyle(cast(objc.id_) joinStyle);
+ path.setLineJoinStyle(joinStyle);
}
if ((state & LINE_CAP) !is 0) {
- int capStyle = 0;
+ NSLineCapStyle capStyle;
switch (data.lineCap) {
- case DWT.CAP_ROUND: capStyle = OS.NSRoundLineCapStyle; break;
- case DWT.CAP_FLAT: capStyle = OS.NSButtLineCapStyle; break;
- case DWT.CAP_SQUARE: capStyle = OS.NSSquareLineCapStyle; break;
+ case DWT.CAP_ROUND: capStyle = NSRoundLineCapStyle; break;
+ case DWT.CAP_FLAT: capStyle = NSButtLineCapStyle; break;
+ case DWT.CAP_SQUARE: capStyle = NSSquareLineCapStyle; break;
}
- path.setLineCapStyle(cast(objc.id_) capStyle);
+ path.setLineCapStyle(capStyle);
}
if ((state & DRAW_OFFSET) !is 0) {
data.drawXOffset = data.drawYOffset = 0;
@@ -366,7 +370,7 @@
data.drawYOffset = 0.5f / scaling;
}
}
-}
+}
/**
* Copies a rectangular area of the receiver at the specified
@@ -914,7 +918,7 @@
destRect.y = destY;
destRect.width = destWidth;
destRect.height = destHeight;
- imageHandle.drawInRect(destRect, srcRect, OS.NSCompositeSourceOver, 1);
+ imageHandle.drawInRect(destRect, srcRect, NSCompositeSourceOver, 1);
handle.restoreGraphicsState();
NSGraphicsContext.setCurrentContext(context);
}
@@ -1423,7 +1427,7 @@
*
* @see #hashCode
*/
-public bool opEquals(Object object) {
+public int opEquals(Object object) {
if (object is this) return true;
if (!( null !is cast(GC)object )) return false;
return handle is (cast(GC)object).handle;
@@ -1834,7 +1838,7 @@
public int getAdvanceWidth(char ch) {
if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
//NOT DONE
- return stringExtent(new char[][ch]).x;
+ return stringExtent([ch]).x;
}
/**
@@ -1956,7 +1960,7 @@
public int getCharWidth(char ch) {
if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
//NOT DONE
- return stringExtent(new char[][ch]).x;
+ return stringExtent([ch]).x;
}
/**
@@ -1973,7 +1977,7 @@
*/
public Rectangle getClipping() {
if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
- NSRect rect = void;
+ NSRect rect;
if (data.view !is null) {
rect = data.view.bounds();
} else {
@@ -1989,11 +1993,11 @@
}
if (data.paintRect !is null || data.clipPath !is null || data.inverseTransform !is null) {
if (data.paintRect !is null) {
- OS.NSIntersectionRect(rect, rect, data.paintRect);
+ rect = OS.NSIntersectionRect(rect, *data.paintRect);
}
if (data.clipPath !is null) {
NSRect clip = data.clipPath.bounds();
- OS.NSIntersectionRect(rect, rect, clip);
+ rect = OS.NSIntersectionRect(rect, clip);
}
if (data.inverseTransform !is null && rect.width > 0 && rect.height > 0) {
NSPoint pt = NSPoint();
@@ -2047,8 +2051,8 @@
}
}
region.add(cast(int)rect.x, cast(int)rect.y, cast(int)rect.width, cast(int)rect.height);
- NSRect paintRect = data.paintRect;
- if (paintRect !is null) {
+ NSRect paintRect = *data.paintRect;
+ if (paintRect !is NSRect.init) {
region.intersect(cast(int)paintRect.x, cast(int)paintRect.y, cast(int)paintRect.width, cast(int)paintRect.height);
}
if (data.clipPath !is null) {
@@ -2060,22 +2064,22 @@
NSPointArray points = cast(NSPointArray) OS.malloc(NSPoint.sizeof);
if (points is null) DWT.error(DWT.ERROR_NO_HANDLES);
NSPoint pt = NSPoint();
- for (NSInteger i = 0; i < count; i++) {
+ for (int i = 0; i < count; i++) {
NSBezierPathElement element = clip.elementAtIndex_associatedPoints_(i, points);
switch (element) {
- case OS.NSMoveToBezierPathElement:
+ case NSMoveToBezierPathElement:
if (pointCount !is 0) clipRgn.add(pointArray, pointCount);
pointCount = 0;
- OS.memmove(pt, points, NSPoint.sizeof);
+ OS.memmove(&pt, points, NSPoint.sizeof);
pointArray[pointCount++] = cast(int)pt.x;
pointArray[pointCount++] = cast(int)pt.y;
break;
- case OS.NSLineToBezierPathElement:
- OS.memmove(pt, points, NSPoint.sizeof);
+ case NSLineToBezierPathElement:
+ OS.memmove(&pt, points, NSPoint.sizeof);
pointArray[pointCount++] = cast(int)pt.x;
pointArray[pointCount++] = cast(int)pt.y;
break;
- case OS.NSClosePathBezierPathElement:
+ case NSClosePathBezierPathElement:
if (pointCount !is 0) clipRgn.add(pointArray, pointCount);
pointCount = 0;
break;
@@ -2450,12 +2454,12 @@
* @see #equals
*/
public hash_t toHash() {
- return handle !is null ? handle.id_ : 0;
+ return handle !is null ? cast(hash_t)handle.id_ : 0;
}
alias toHash hashCode;
-void init(Drawable drawable, GCData data, objc.id context) {
+void init_(Drawable drawable, GCData data, objc.id context) {
if (data.foreground !is null) data.state &= ~(FOREGROUND | FOREGROUND_FILL);
if (data.background !is null) data.state &= ~BACKGROUND;
if (data.font !is null) data.state &= ~FONT;
@@ -2469,7 +2473,7 @@
handle.retain();
handle.saveGraphicsState();
data.path = NSBezierPath.bezierPath();
- data.path.setWindingRule(data.fillRule is DWT.FILL_WINDING ? OS.NSNonZeroWindingRule : OS.NSEvenOddWindingRule);
+ data.path.setWindingRule(data.fillRule is DWT.FILL_WINDING ? NSNonZeroWindingRule : NSEvenOddWindingRule);
data.path.retain();
}
@@ -2694,7 +2698,7 @@
data.backgroundPattern = pattern;
data.state &= ~BACKGROUND;
}
-
+
/**
* Sets the area of the receiver which can be changed
* by drawing operations to the rectangular area specified
@@ -2844,7 +2848,7 @@
DWT.error(DWT.ERROR_INVALID_ARGUMENT);
}
data.fillRule = rule;
- data.path.setWindingRule(rule is DWT.FILL_WINDING ? cast(objc.id) OS.NSNonZeroWindingRule : cast(objc.id) OS.NSEvenOddWindingRule);
+ data.path.setWindingRule(rule is DWT.FILL_WINDING ? NSNonZeroWindingRule : NSEvenOddWindingRule);
}
/**
@@ -2951,12 +2955,12 @@
*/
public void setInterpolation(int interpolation) {
if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
- NSImageInterpolation quality = 0;
+ NSImageInterpolation quality;
switch (interpolation) {
- case DWT.DEFAULT: quality = OS.NSImageInterpolationDefault; break;
- case DWT.NONE: quality = OS.NSImageInterpolationNone; break;
- case DWT.LOW: quality = OS.NSImageInterpolationLow; break;
- case DWT.HIGH: quality = OS.NSImageInterpolationHigh; break;
+ case DWT.DEFAULT: quality = NSImageInterpolationDefault; break;
+ case DWT.NONE: quality = NSImageInterpolationNone; break;
+ case DWT.LOW: quality = NSImageInterpolationLow; break;
+ case DWT.HIGH: quality = NSImageInterpolationHigh; break;
default:
DWT.error(DWT.ERROR_INVALID_ARGUMENT);
}
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/graphics/GCData.d
--- a/dwt/graphics/GCData.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/graphics/GCData.d Tue Oct 07 12:56:18 2008 +0200
@@ -63,10 +63,10 @@
public Image image;
public CGFloat drawXOffset, drawYOffset;
- public NSRect paintRect;
+ public NSRect* paintRect;
public NSBezierPath path;
public NSAffineTransform transform, inverseTransform;
public NSBezierPath clipPath;
- public NSView view;
- public NSSize size;
+ public NSView* view;
+ public NSSize* size;
}
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/graphics/Image.d
--- a/dwt/graphics/Image.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/graphics/Image.d Tue Oct 07 12:56:18 2008 +0200
@@ -93,6 +93,8 @@
*/
public final class Image : Resource, Drawable {
+ alias Resource.init_ init_;
+
/**
* specifies whether the receiver is a bitmap or an icon
* (one of DWT.BITMAP
, DWT.ICON
)
@@ -189,8 +191,8 @@
*/
public this(Device device, int width, int height) {
super(device);
- init(width, height);
- init();
+ init_(width, height);
+ init_();
}
/**
@@ -258,7 +260,7 @@
handle = cast(NSImage)(new NSImage()).alloc();
handle = handle.initWithSize(size);
NSBitmapImageRep rep = imageRep = cast(NSBitmapImageRep)(new NSBitmapImageRep()).alloc();
- rep = rep.initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_(null, cast(NSInteger) width, cast(NSInteger) height, srcRep.bitsPerSample(), srcRep.samplesPerPixel(), srcRep.samplesPerPixel() is 4, srcRep.isPlanar(), new NSString(OS.NSDeviceRGBColorSpace()), OS.NSAlphaFirstBitmapFormat | OS.NSAlphaNonpremultipliedBitmapFormat, srcRep.bytesPerRow(), srcRep.bitsPerPixel());
+ rep = rep.initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_(null, cast(NSInteger) width, cast(NSInteger) height, srcRep.bitsPerSample(), srcRep.samplesPerPixel(), srcRep.samplesPerPixel() is 4, srcRep.isPlanar(), OS.NSDeviceRGBColorSpace, NSAlphaFirstBitmapFormat | NSAlphaNonpremultipliedBitmapFormat, srcRep.bytesPerRow(), srcRep.bitsPerPixel());
handle.addRepresentation(rep);
objc.id data = rep.bitmapData();
@@ -321,7 +323,7 @@
}
}
}
- init();
+ init_();
}
/**
@@ -357,8 +359,8 @@
public this(Device device, Rectangle bounds) {
super(device);
if (bounds is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
- init(bounds.width, bounds.height);
- init();
+ init_(bounds.width, bounds.height);
+ init_();
}
/**
@@ -381,8 +383,8 @@
*/
public this(Device device, ImageData data) {
super(device);
- init(data);
- init();
+ init_(data);
+ init_();
}
/**
@@ -421,7 +423,7 @@
ImageData image = new ImageData(source.width, source.height, source.depth, source.palette, source.scanlinePad, source.data);
image.maskPad = mask.scanlinePad;
image.maskData = mask.data;
- init(image);
+ init_(image);
}
/**
@@ -474,8 +476,8 @@
*/
public this(Device device, InputStream stream) {
super(device);
- init(new ImageData(stream));
- init();
+ init_(new ImageData(stream));
+ init_();
}
/**
@@ -507,8 +509,8 @@
*/
public this(Device device, String filename) {
super(device);
- init(new ImageData(filename));
- init();
+ init_(new ImageData(filename));
+ init_();
}
void createAlpha () {
@@ -596,7 +598,7 @@
int red = (transparentPixel >> 16) & 0xFF;
int green = (transparentPixel >> 8) & 0xFF;
int blue = (transparentPixel >> 0) & 0xFF;
- return Color.cocoa_new(device, new float[][red / 255f, green / 255f, blue / 255f, 1]);
+ return Color.cocoa_new(device, [red / 255f, green / 255f, blue / 255f, 1]);
}
/**
@@ -723,12 +725,12 @@
* @see #equals
*/
public hash_t toHash () {
- return handle !is null ? handle.id_ : null;
+ return handle !is null ? cast(hash_t) handle.id_ : 0;
}
alias toHash hashCode;
-void init(int width, int height) {
+void init_(int width, int height) {
if (width <= 0 || height <= 0) {
DWT.error (DWT.ERROR_INVALID_ARGUMENT);
}
@@ -742,13 +744,13 @@
size.height = height;
handle = handle.initWithSize(size);
NSBitmapImageRep rep = imageRep = cast(NSBitmapImageRep)(new NSBitmapImageRep()).alloc();
- rep = rep.initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_(0, cast(NSInteger) width, cast(NSInteger) height, 8, 3, false, false, new NSString(OS.NSDeviceRGBColorSpace()), OS.NSAlphaFirstBitmapFormat | OS.NSAlphaNonpremultipliedBitmapFormat, cast(NSInteger) (width * 4), 32);
+ rep = rep.initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_(null, cast(NSInteger) width, cast(NSInteger) height, 8, 3, false, false, OS.NSDeviceRGBColorSpace, NSAlphaFirstBitmapFormat | NSAlphaNonpremultipliedBitmapFormat, cast(NSInteger) (width * 4), 32);
OS.memset(rep.bitmapData(), 0xFF, cast(size_t) (width * height * 4));
handle.addRepresentation(rep);
// rep.release();
}
-void init(ImageData image) {
+void init_(ImageData image) {
if (image is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
this.width = image.width;
this.height = image.height;
@@ -852,7 +854,7 @@
handle = handle.initWithSize(size);
NSBitmapImageRep rep = imageRep = cast(NSBitmapImageRep)(new NSBitmapImageRep()).alloc();
rep = rep.initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_(
- null, cast(NSInteger) width, cast(NSInteger) height, 8, hasAlpha ? 4 : 3, hasAlpha, false, new NSString(OS.NSDeviceRGBColorSpace()), OS.NSAlphaFirstBitmapFormat | OS.NSAlphaNonpremultipliedBitmapFormat, cast(NSInteger) bpr, 32);
+ null, cast(NSInteger) width, cast(NSInteger) height, 8, hasAlpha ? 4 : 3, hasAlpha, false, OS.NSDeviceRGBColorSpace, NSAlphaFirstBitmapFormat | NSAlphaNonpremultipliedBitmapFormat, cast(NSInteger) bpr, 32);
OS.memmove(rep.bitmapData(), buffer.ptr, dataSize);
handle.addRepresentation(rep);
// rep.release();
@@ -871,7 +873,7 @@
* @param data the platform specific GC data
* @return the platform specific GC handle
*/
-public int internal_new_GC (GCData data) {
+public objc.id internal_new_GC (GCData data) {
if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
if (type !is DWT.BITMAP || memGC !is null) {
DWT.error(DWT.ERROR_INVALID_ARGUMENT);
@@ -881,12 +883,12 @@
if (imageRep.hasAlpha()) {
NSInteger bpr = width * 4;
rep = cast(NSBitmapImageRep)(new NSBitmapImageRep()).alloc();
- int bitmapData = imageRep.bitmapData();
+ objc.id bitmapData = imageRep.bitmapData();
if (data.bitmapDataAddress !is null) OS.free(data.bitmapDataAddress);
- data.bitmapDataAddress = OS.malloc((void*).sizeof);
- OS.memmove(data.bitmapDataAddress, (new int[] (bitmapData)).ptr, (void*).sizeof);
+ data.bitmapDataAddress = cast(ubyte*) OS.malloc((void*).sizeof);
+ OS.memmove(data.bitmapDataAddress, bitmapData, (void*).sizeof);
rep = rep.initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_(
- &data.bitmapDataAddress, cast(NSInteger) width, cast(NSInteger) height, 8, 3, false, false, new NSString(OS.NSDeviceRGBColorSpace()), OS.NSAlphaFirstBitmapFormat , bpr, 32);
+ &data.bitmapDataAddress, cast(NSInteger) width, cast(NSInteger) height, 8, 3, false, false, OS.NSDeviceRGBColorSpace, NSAlphaFirstBitmapFormat , bpr, 32);
rep.autorelease();
}
NSGraphicsContext context = NSGraphicsContext.graphicsContextWithBitmapImageRep(rep);
@@ -908,7 +910,7 @@
data.image = this;
}
NSGraphicsContext.setCurrentContext(current);
- return context.id;
+ return context.id_;
}
/**
@@ -924,7 +926,7 @@
* @param hDC the platform specific GC handle
* @param data the platform specific GC data
*/
-public void internal_dispose_GC (int context, GCData data) {
+public void internal_dispose_GC (objc.id context, GCData data) {
if (data.bitmapDataAddress !is null) OS.free(data.bitmapDataAddress);
data.bitmapDataAddress = null;
}
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/graphics/ImageDataLoader.d
--- a/dwt/graphics/ImageDataLoader.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/graphics/ImageDataLoader.d Tue Oct 07 12:56:18 2008 +0200
@@ -16,6 +16,7 @@
import dwt.dwthelper.utils;
import dwt.dwthelper.InputStream;
import dwt.graphics.ImageLoader;
+import dwt.graphics.ImageData;
/**
* Internal class that separates ImageData from ImageLoader
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/graphics/Path.d
--- a/dwt/graphics/Path.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/graphics/Path.d Tue Oct 07 12:56:18 2008 +0200
@@ -40,6 +40,7 @@
import dwt.graphics.Resource;
import dwt.internal.cocoa.CGFloat;
import dwt.internal.cocoa.NSFont : NSGlyph;
+import dwt.internal.cocoa.NSInteger;
/**
* Instances of this class represent paths through the two-dimensional
@@ -59,6 +60,8 @@
* @since 3.1
*/
public class Path : Resource {
+
+ alias Resource.init_ init_;
/**
* the OS resource for the Path
@@ -100,7 +103,7 @@
if (handle is null) DWT.error(DWT.ERROR_NO_HANDLES);
handle.retain();
handle.moveToPoint(NSPoint());
- init();
+ init_();
}
public this (Device device, Path path, float flatness) {
@@ -117,13 +120,13 @@
NSBezierPath.setDefaultFlatness(defaultFlatness);
}
if (handle is null) DWT.error(DWT.ERROR_NO_HANDLES);
- init();
+ init_();
}
public this (Device device, PathData data) {
this(device);
if (data is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
- init(data);
+ init_(data);
}
/**
@@ -250,7 +253,7 @@
textStorage.endEditing();
range = layoutManager.glyphRangeForTextContainer(textContainer);
if (range.length !is 0) {
- NSGlyph* glyphs = OS.malloc(4 * range.length * 2);
+ NSGlyph* glyphs = cast(NSGlyph*) OS.malloc(4 * range.length * 2);
layoutManager.getGlyphs(glyphs, range);
NSBezierPath path = NSBezierPath.bezierPath();
NSPoint point = NSPoint();
@@ -418,37 +421,37 @@
int pointCount = 0, typeCount = 0;
byte[] types = new byte[count];
float[] pointArray = new float[count * 6];
- NSPointArray points = OS.malloc(3 * NSPoint.sizeof);
- if (points is 0) DWT.error(DWT.ERROR_NO_HANDLES);
+ NSPointArray points = cast(NSPointArray) OS.malloc(3 * NSPoint.sizeof);
+ if (points is null) DWT.error(DWT.ERROR_NO_HANDLES);
NSPoint pt = NSPoint();
for (NSInteger i = 0; i < count; i++) {
NSBezierPathElement element = handle.elementAtIndex_associatedPoints_(i, points);
switch (element) {
- case OS.NSMoveToBezierPathElement:
+ case NSMoveToBezierPathElement:
types[typeCount++] = DWT.PATH_MOVE_TO;
- OS.memmove(pt, points, NSPoint.sizeof);
+ OS.memmove(&pt, points, NSPoint.sizeof);
pointArray[pointCount++] = cast(int)pt.x;
pointArray[pointCount++] = cast(int)pt.y;
break;
- case OS.NSLineToBezierPathElement:
+ case NSLineToBezierPathElement:
types[typeCount++] = DWT.PATH_LINE_TO;
- OS.memmove(pt, points, NSPoint.sizeof);
+ OS.memmove(&pt, points, NSPoint.sizeof);
pointArray[pointCount++] = cast(int)pt.x;
pointArray[pointCount++] = cast(int)pt.y;
break;
- case OS.NSCurveToBezierPathElement:
+ case NSCurveToBezierPathElement:
types[typeCount++] = DWT.PATH_CUBIC_TO;
- OS.memmove(pt, points, NSPoint.sizeof);
+ OS.memmove(&pt, points, NSPoint.sizeof);
pointArray[pointCount++] = cast(int)pt.x;
pointArray[pointCount++] = cast(int)pt.y;
- OS.memmove(pt, points + NSPoint.sizeof, NSPoint.sizeof);
+ OS.memmove(&pt, points + NSPoint.sizeof, NSPoint.sizeof);
pointArray[pointCount++] = cast(int)pt.x;
pointArray[pointCount++] = cast(int)pt.y;
- OS.memmove(pt, points + NSPoint.sizeof + NSPoint.sizeof, NSPoint.sizeof);
+ OS.memmove(&pt, points + NSPoint.sizeof + NSPoint.sizeof, NSPoint.sizeof);
pointArray[pointCount++] = cast(int)pt.x;
pointArray[pointCount++] = cast(int)pt.y;
break;
- case OS.NSClosePathBezierPathElement:
+ case NSClosePathBezierPathElement:
types[typeCount++] = DWT.PATH_CLOSE;
break;
}
@@ -465,7 +468,7 @@
return data;
}
-void init(PathData data) {
+void init_(PathData data) {
byte[] types = data.types;
float[] points = data.points;
for (int i = 0, j = 0; i < types.length; i++) {
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/graphics/Pattern.d
--- a/dwt/graphics/Pattern.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/graphics/Pattern.d Tue Oct 07 12:56:18 2008 +0200
@@ -47,6 +47,8 @@
* @since 3.1
*/
public class Pattern : Resource {
+ alias Resource.init_ init_;
+
NSColor color;
NSGradient gradient;
NSPoint pt1, pt2;
@@ -86,7 +88,7 @@
this.image = image;
color = NSColor.colorWithPatternImage(image.handle);
color.retain();
- init();
+ init_();
}
/**
@@ -179,7 +181,7 @@
NSColor start = NSColor.colorWithDeviceRed(cast(CGFloat) color1.handle[0], cast(CGFloat) color1.handle[1], cast(CGFloat) color1.handle[2], cast(CGFloat) (alpha1 / 255f));
NSColor end = NSColor.colorWithDeviceRed(cast(CGFloat) color2.handle[0], cast(CGFloat) color2.handle[1], cast(CGFloat) color2.handle[2], cast(CGFloat) (alpha2 / 255f));
gradient = (cast(NSGradient)(new NSGradient()).alloc()).initWithStartingColor(start, end);
- init();
+ init_();
}
void destroy() {
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/graphics/RGB.d
--- a/dwt/graphics/RGB.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/graphics/RGB.d Tue Oct 07 12:56:18 2008 +0200
@@ -17,6 +17,7 @@
import dwt.DWT;
import dwt.internal.SerializableCompatibility;
+import tango.text.convert.Format;
import dwt.dwthelper.utils;
/**
@@ -196,7 +197,7 @@
*
* @see #hashCode()
*/
-public bool opEquals(Object object) {
+public int opEquals(Object object) {
if (object is this) return true;
if (!( null !is cast(RGB)object )) return false;
RGB rgb = cast(RGB)object;
@@ -228,7 +229,7 @@
* @return a string representation of the RGB
*/
public String toString() {
- return "RGB {" ~ red ~ ", " ~ green ~ ", " ~ blue ~ "}"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ return Format("RGB {{}{}{}{}{}{}" , red , ", " , green , ", " , blue , "}"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
}
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/graphics/Rectangle.d
--- a/dwt/graphics/Rectangle.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/graphics/Rectangle.d Tue Oct 07 12:56:18 2008 +0200
@@ -19,6 +19,7 @@
import tango.text.convert.Format;
import dwt.dwthelper.utils;
+import dwt.graphics.Point;
/**
* Instances of this class represent rectangular areas in an
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/graphics/Region.d
--- a/dwt/graphics/Region.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/graphics/Region.d Tue Oct 07 12:56:18 2008 +0200
@@ -30,8 +30,9 @@
import dwt.graphics.Point;
import dwt.graphics.Rectangle;
import dwt.graphics.Resource;
+import dwt.internal.c.carboncore.MacTypes;
import dwt.internal.c.qd.Quickdraw;
-import dwt.internal.c.qd.QuickdrawTypes;
+static import QuickdrawTypes = dwt.internal.c.qd.QuickdrawTypes;
/**
* Instances of this class represent areas of an x-y coordinate
@@ -44,6 +45,9 @@
*
*/
public final class Region : Resource {
+
+ alias Resource.init_ init_;
+
/**
* the OS resource for the region
* (Warning: This field is platform dependent)
@@ -54,7 +58,7 @@
* platforms and should never be accessed from application code.
*
*/
- public RgnHandle handle;
+ public QuickdrawTypes.RgnHandle handle;
/**
* Constructs a new empty region.
@@ -90,10 +94,10 @@
super(device);
handle = OS.NewRgn();
if (handle is null) DWT.error(DWT.ERROR_NO_HANDLES);
- init();
+ init_();
}
-this(Device device, RgnHandle handle) {
+this(Device device, QuickdrawTypes.RgnHandle handle) {
super(device);
this.handle = handle;
}
@@ -122,7 +126,7 @@
void add(int[] pointArray, int count) {
if (count <= 2) return;
- RgnHandle polyRgn = OS.NewRgn();
+ QuickdrawTypes.RgnHandle polyRgn = OS.NewRgn();
OS.OpenRgn();
OS.MoveTo(cast(short)pointArray[0], cast(short)pointArray[1]);
for (int i = 1; i < count / 2; i++) {
@@ -176,7 +180,7 @@
public void add(int x, int y, int width, int height) {
if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
if (width < 0 || height < 0) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
- RgnHandle rectRgn = OS.NewRgn();
+ QuickdrawTypes.RgnHandle rectRgn = OS.NewRgn();
Rect r;
OS.SetRect(&r, cast(short)x, cast(short)y, cast(short)(x + width),cast(short)(y + height));
OS.RectRgn(rectRgn, &r);
@@ -221,7 +225,7 @@
*/
public bool contains(int x, int y) {
if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
- Point point = Point(cast(short)x, cast(short)y);
+ QuickdrawTypes.Point point = {cast(short)x, cast(short)y};
return OS.PtInRgn(point, handle);
}
@@ -247,8 +251,8 @@
NSAffineTransform transform;
void convertRgn(NSAffineTransform transform) {
- RgnHandle newRgn = OS.NewRgn();
- RegionToRectsUPP proc = &convertRgn;
+ QuickdrawTypes.RgnHandle newRgn = OS.NewRgn();
+ RegionToRectsUPP proc = &Region.convertRgn_;
this.transform = transform;
OS.QDRegionToRects(handle, OS.kQDParseRegionFromTopLeft, proc, newRgn);
this.transform = null;
@@ -256,12 +260,12 @@
OS.DisposeRgn(newRgn);
}
-extern(C) private static OSStatus* convertRgn(ushort message, RgnHandle rgn, Rect* r, void* newRgn) {
+extern(C) private static OSStatus* convertRgn_(ushort message, QuickdrawTypes.RgnHandle rgn, Rect* r, void* newRgn) {
if (message is OS.kQDRegionToRectsMsgParse) {
Rect rect;
OS.memmove(&rect, r, rect.sizeof);
NSPoint point = NSPoint();
- RgnHandle polyRgn = OS.NewRgn();
+ QuickdrawTypes.RgnHandle polyRgn = OS.NewRgn();
OS.OpenRgn();
point.x = rect.left;
point.y = rect.top;
@@ -282,7 +286,7 @@
OS.LineTo(cast(short)point.x, cast(short)Math.round(point.y));
OS.LineTo(startX, startY);
OS.CloseRgn(polyRgn);
- OS.UnionRgn(newRgn, polyRgn, newRgn);
+ OS.UnionRgn(cast(QuickdrawTypes.RgnHandle) newRgn, polyRgn, cast(QuickdrawTypes.RgnHandle) newRgn);
OS.DisposeRgn(polyRgn);
}
return null;
@@ -290,7 +294,7 @@
void destroy() {
OS.DisposeRgn(handle);
- handle = 0;
+ handle = null;
}
/**
@@ -337,32 +341,32 @@
NSBezierPath getPath() {
NSBezierPath path = NSBezierPath.bezierPath();
path.retain();
- OS.QDRegionToRects(handle, OS.kQDParseRegionFromTopLeft, ®ionToRects, path.id_);
+ OS.QDRegionToRects(handle, OS.kQDParseRegionFromTopLeft, &Region.regionToRects, path.id_);
if (path.isEmpty()) path.appendBezierPathWithRect(NSRect());
return path;
}
-NSPoint pt = NSPoint();
-Rect rect;
-extern(C) private static OSStatus* regionToRects(ushort message, RgnHandle rgn, Rect* r, void* path) {
+static NSPoint pt = NSPoint();
+static Rect rect;
+extern(C) private static OSStatus* regionToRects(ushort message, QuickdrawTypes.RgnHandle rgn, Rect* r, void* path) {
if (message is OS.kQDRegionToRectsMsgParse) {
- OS.memmove(rect, r, rect.sizeof);
+ OS.memmove(&rect, r, rect.sizeof);
pt.x = rect.left;
pt.y = rect.top;
- OS.objc_msgSend(path, OS.sel_moveToPoint_1, pt);
+ OS.objc_msgSend(cast(objc.id) path, OS.sel_moveToPoint_1, pt);
pt.x = rect.right;
- OS.objc_msgSend(path, OS.sel_lineToPoint_1, pt);
+ OS.objc_msgSend(cast(objc.id) path, OS.sel_lineToPoint_1, pt);
pt.x = rect.right;
pt.y = rect.bottom;
- OS.objc_msgSend(path, OS.sel_lineToPoint_1, pt);
+ OS.objc_msgSend(cast(objc.id) path, OS.sel_lineToPoint_1, pt);
pt.x = rect.left;
- OS.objc_msgSend(path, OS.sel_lineToPoint_1, pt);
- OS.objc_msgSend(path, OS.sel_closePath);
+ OS.objc_msgSend(cast(objc.id) path, OS.sel_lineToPoint_1, pt);
+ OS.objc_msgSend(cast(objc.id) path, OS.sel_closePath);
}
return null;
}
-public static Region carbon_new(Device device, RgnHandle handle) {
+public static Region carbon_new(Device device, QuickdrawTypes.RgnHandle handle) {
return new Region(device, handle);
}
@@ -377,7 +381,7 @@
* @see #equals
*/
public hash_t toHash() {
- return handle;
+ return cast(hash_t) handle;
}
alias toHash hashCode;
@@ -425,7 +429,7 @@
public void intersect(int x, int y, int width, int height) {
if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
if (width < 0 || height < 0) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
- RgnHandle rectRgn = OS.NewRgn();
+ QuickdrawTypes.RgnHandle rectRgn = OS.NewRgn();
Rect r;
OS.SetRect(&r, cast(short)x, cast(short)y, cast(short)(x + width),cast(short)(y + height));
OS.RectRgn(rectRgn, &r);
@@ -552,7 +556,7 @@
if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
if (pointArray.length < 2) return;
- RgnHandle polyRgn = OS.NewRgn();
+ QuickdrawTypes.RgnHandle polyRgn = OS.NewRgn();
OS.OpenRgn();
OS.MoveTo(cast(short)pointArray[0], cast(short)pointArray[1]);
for (int i = 1; i < pointArray.length / 2; i++) {
@@ -607,9 +611,9 @@
public void subtract(int x, int y, int width, int height) {
if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
if (width < 0 || height < 0) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
- RgnHandle rectRgn = OS.NewRgn();
+ QuickdrawTypes.RgnHandle rectRgn = OS.NewRgn();
Rect r;
- OS.SetRect(r, cast(short)x, cast(short)y, cast(short)(x + width),cast(short)(y + height));
+ OS.SetRect(&r, cast(short)x, cast(short)y, cast(short)(x + width),cast(short)(y + height));
OS.RectRgn(rectRgn, &r);
OS.DiffRgn(handle, rectRgn, handle);
OS.DisposeRgn(rectRgn);
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/graphics/Resource.d
--- a/dwt/graphics/Resource.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/graphics/Resource.d Tue Oct 07 12:56:18 2008 +0200
@@ -86,7 +86,7 @@
return device;
}
-void init() {
+void init_() {
if (device.tracking) device.new_Object(this);
}
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/graphics/TextLayout.d
--- a/dwt/graphics/TextLayout.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/graphics/TextLayout.d Tue Oct 07 12:56:18 2008 +0200
@@ -7,11 +7,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ *
+ * Port to the D programming language:
+ * Jacob Carlborg
*******************************************************************************/
module dwt.graphics.TextLayout;
-import dwt.dwthelper.utils;
-
import dwt.DWT;
import dwt.DWTException;
import dwt.internal.cocoa.NSColor;
@@ -28,6 +29,20 @@
import dwt.internal.cocoa.NSTextStorage;
import dwt.internal.cocoa.OS;
+import dwt.dwthelper.utils;
+import dwt.graphics.Color;
+import dwt.graphics.Device;
+import dwt.graphics.Font;
+import dwt.graphics.FontMetrics;
+import dwt.graphics.GC;
+import dwt.graphics.GCData;
+import dwt.graphics.GlyphMetrics;
+import dwt.graphics.Point;
+import dwt.graphics.Rectangle;
+import dwt.graphics.Region;
+import dwt.graphics.Resource;
+import dwt.graphics.TextStyle;
+
/**
* TextLayout
is a graphic object that represents
* styled text.
@@ -44,6 +59,8 @@
* @since 3.0
*/
public final class TextLayout : Resource {
+
+ alias Resource.init_ init_;
NSTextStorage textStorage;
NSLayoutManager layoutManager;
@@ -101,7 +118,7 @@
styles = new StyleItem[2];
styles[0] = new StyleItem();
styles[1] = new StyleItem();
- init();
+ init_();
}
void checkLayout() {
@@ -111,10 +128,10 @@
void computeRuns() {
if (textStorage !is null) return;
NSString str = NSString.stringWith(text);
- textStorage = (cast(NSTextStorage)new NSTextStorage().alloc());
+ textStorage = (cast(NSTextStorage)(new NSTextStorage()).alloc());
textStorage.initWithString_(str);
- layoutManager = cast(NSLayoutManager)new NSLayoutManager().alloc().init();
- textContainer = cast(NSTextContainer)new NSTextContainer().alloc();
+ layoutManager = cast(NSLayoutManager)(new NSLayoutManager()).alloc().init();
+ textContainer = cast(NSTextContainer)(new NSTextContainer()).alloc();
NSSize size = new NSSize();
size.width = wrapWidth !is -1 ? wrapWidth : Float.MAX_VALUE;
size.height = Float.MAX_VALUE;
@@ -128,20 +145,20 @@
range.length = str.length();
textStorage.addAttribute(OS.NSFontAttributeName(), defaultFont.handle, range);
- NSMutableParagraphStyle paragraph = cast(NSMutableParagraphStyle)new NSMutableParagraphStyle().alloc().init();
- int align = OS.NSLeftTextAlignment;
+ NSMutableParagraphStyle paragraph = cast(NSMutableParagraphStyle)(new NSMutableParagraphStyle()).alloc().init();
+ int align_ = OS.NSLeftTextAlignment;
if (justify) {
- align = OS.NSJustifiedTextAlignment;
+ align_ = OS.NSJustifiedTextAlignment;
} else {
switch (alignment) {
case DWT.CENTER:
- align = OS.NSCenterTextAlignment;
+ align_ = OS.NSCenterTextAlignment;
break;
case DWT.RIGHT:
- align = OS.NSRightTextAlignment;
+ align_ = OS.NSRightTextAlignment;
}
}
- paragraph.setAlignment(align);
+ paragraph.setAlignment(align_);
paragraph.setLineSpacing(spacing);
paragraph.setFirstLineHeadIndent(indent);
@@ -1229,7 +1246,7 @@
public void setSegments(int[] segments) {
checkLayout();
if (this.segments is null && segments is null) return;
- if (this.segments !is null && segments !isnull) {
+ if (this.segments !is null && segments !is null) {
if (this.segments.length is segments.length) {
int i;
for (i = 0; i TextStyle defines a set of styles that can be applied
@@ -202,7 +203,7 @@
*
* @see #hashCode()
*/
-public bool opEquals(Object object) {
+public int opEquals(Object object) {
if (object is this) return true;
if (object is null) return false;
if (!( null !is cast(TextStyle)object )) return false;
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/graphics/Transform.d
--- a/dwt/graphics/Transform.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/graphics/Transform.d Tue Oct 07 12:56:18 2008 +0200
@@ -42,6 +42,9 @@
* @since 3.1
*/
public class Transform : Resource {
+
+ alias Resource.init_ init_;
+
/**
* the OS resource for the Transform
* (Warning: This field is platform dependent)
@@ -144,7 +147,7 @@
if (handle is null) DWT.error(DWT.ERROR_NO_HANDLES);
handle.retain();
setElements(m11, m12, m21, m22, dx, dy);
- init();
+ init_();
}
static float[] checkTransform(float[] elements) {
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/internal/C.d
--- a/dwt/internal/C.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/internal/C.d Tue Oct 07 12:56:18 2008 +0200
@@ -13,8 +13,8 @@
*******************************************************************************/
module dwt.internal.C;
-import stdc = tango.stdc.stdlib : free, malloc, getenv;
-import stdc = tango.stdc.string : memmove, memset, strlen;
+static import stdlib = tango.stdc.stdlib;
+static import stdcstring = tango.stdc.string;
import dwt.internal.Library;
import dwt.internal.Platform;
@@ -32,12 +32,12 @@
public static const size_t PTR_SIZEOF = (void*).sizeof;
- alias stdc.free free;
- alias stdc.getenv getenv;
- alias stdc.malloc malloc;
- alias stdc.memset memset;
- alias stdc.memmove memmove;
- alias stdc.strlen strlen;
+ alias stdlib.free free;
+ alias stdlib.getenv getenv;
+ alias stdlib.malloc malloc;
+ alias stdcstring.memset memset;
+ alias stdcstring.memmove memmove;
+ alias stdcstring.strlen strlen;
/+public static final native void free (int /*long*/ ptr);
public static final native int /*long*/ getenv (byte[] wcsToMbcs);
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/internal/DWTEventListener.d
--- a/dwt/internal/DWTEventListener.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/internal/DWTEventListener.d Tue Oct 07 12:56:18 2008 +0200
@@ -13,6 +13,8 @@
*******************************************************************************/
module dwt.internal.DWTEventListener;
+import dwt.dwthelper.utils : EventListener;
+
/**
* This interface is the cross-platform version of the
* java.util.EventListener interface.
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/internal/c/hiservices/bindings.d
--- a/dwt/internal/c/hiservices/bindings.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/internal/c/hiservices/bindings.d Tue Oct 07 12:56:18 2008 +0200
@@ -7,6 +7,7 @@
*/
module dwt.internal.c.hiservices.bindings;
+import dwt.internal.c.carboncore.MacTypes;
import dwt.internal.c.hiservices.Processes;
extern (C):
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/internal/c/qd/Quickdraw.d
--- a/dwt/internal/c/qd/Quickdraw.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/internal/c/qd/Quickdraw.d Tue Oct 07 12:56:18 2008 +0200
@@ -7,11 +7,8 @@
*/
module dwt.internal.c.qd.Quickdraw;
-public
-{
- import dwt.internal.c.qd.QuickdrawTypes;
- import dwt.internal.c.carboncore.MacTypes;
-}
+import dwt.internal.c.qd.QuickdrawTypes;
+import dwt.internal.c.carboncore.MacTypes;
import bindings = dwt.internal.c.qd.bindings;
@@ -41,7 +38,7 @@
alias bindings.CloseRgn CloseRgn;
alias bindings.DisposeRgn DisposeRgn;
alias bindings.PtInRgn PtInRgn;
- alias bindings.GetRegioinBounds GetRegioinBounds;
+ alias bindings.GetRegionBounds GetRegionBounds;
alias bindings.SectRgn SectRgn;
alias bindings.EmptyRgn EmptyRgn;
alias bindings.DiffRgn DiffRgn;
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/internal/c/qd/bindings.d
--- a/dwt/internal/c/qd/bindings.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/internal/c/qd/bindings.d Tue Oct 07 12:56:18 2008 +0200
@@ -7,12 +7,13 @@
*/
module dwt.internal.c.qd.bindings;
+import dwt.internal.c.carboncore.MacTypes;
import dwt.internal.c.qd.QuickdrawTypes;
import dwt.internal.c.qd.Quickdraw;
import dwt.internal.objc.runtime;
-alias extern (C) OSStatus* delegate (UInt16 message, RgnHandle rgn, /*const*/Rect* rect, void* refCon) RegionToRectsProcPtr;
+alias extern (C) OSStatus* function (UInt16 message, RgnHandle rgn, /*const*/Rect* rect, void* refCon) RegionToRectsProcPtr;
alias RegionToRectsProcPtr RegionToRectsUPP;
extern (C):
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/internal/cocoa/NSBezierPath.d
--- a/dwt/internal/cocoa/NSBezierPath.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/internal/cocoa/NSBezierPath.d Tue Oct 07 12:56:18 2008 +0200
@@ -31,10 +31,10 @@
NSClosePathBezierPathElement
}
-NSBezierPathElement.NSMoveToBezierPathElement NSMoveToBezierPathElement;
-NSBezierPathElement.NSLineToBezierPathElement NSLineToBezierPathElement;
-NSBezierPathElement.NSCurveToBezierPathElement NSCurveToBezierPathElement;
-NSBezierPathElement.NSClosePathBezierPathElement NSClosePathBezierPathElement;
+alias NSBezierPathElement.NSMoveToBezierPathElement NSMoveToBezierPathElement;
+alias NSBezierPathElement.NSLineToBezierPathElement NSLineToBezierPathElement;
+alias NSBezierPathElement.NSCurveToBezierPathElement NSCurveToBezierPathElement;
+alias NSBezierPathElement.NSClosePathBezierPathElement NSClosePathBezierPathElement;
enum NSLineCapStyle
{
@@ -43,9 +43,9 @@
NSSquareLineCapStyle = 2
}
-NSLineCapStyle.NSButtLineCapStyle NSButtLineCapStyle;
-NSLineCapStyle.NSRoundLineCapStyle NSRoundLineCapStyle;
-NSLineCapStyle.NSSquareLineCapStyle NSSquareLineCapStyle;
+alias NSLineCapStyle.NSButtLineCapStyle NSButtLineCapStyle;
+alias NSLineCapStyle.NSRoundLineCapStyle NSRoundLineCapStyle;
+alias NSLineCapStyle.NSSquareLineCapStyle NSSquareLineCapStyle;
enum NSLineJoinStyle
{
@@ -54,9 +54,9 @@
NSBevelLineJoinStyle = 2
}
-NSLineJoinStyle.NSMiterLineJoinStyle NSMiterLineJoinStyle;
-NSLineJoinStyle.NSRoundLineJoinStyle NSRoundLineJoinStyle;
-NSLineJoinStyle.NSBevelLineJoinStyle NSBevelLineJoinStyle;
+alias NSLineJoinStyle.NSMiterLineJoinStyle NSMiterLineJoinStyle;
+alias NSLineJoinStyle.NSRoundLineJoinStyle NSRoundLineJoinStyle;
+alias NSLineJoinStyle.NSBevelLineJoinStyle NSBevelLineJoinStyle;
enum NSWindingRule
{
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/internal/cocoa/NSGraphicsContext.d
--- a/dwt/internal/cocoa/NSGraphicsContext.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/internal/cocoa/NSGraphicsContext.d Tue Oct 07 12:56:18 2008 +0200
@@ -24,9 +24,7 @@
import dwt.internal.cocoa.OS;
import objc = dwt.internal.objc.runtime;
-alias NSInteger NSColorRenderingIntent;
-
-enum
+enum NSColorRenderingIntent : NSInteger
{
NSColorRenderingIntentDefault,
NSColorRenderingIntentAbsoluteColorimetric,
@@ -35,7 +33,13 @@
NSColorRenderingIntentSaturation
}
-enum NSImageInterpolation
+alias NSColorRenderingIntent.NSColorRenderingIntentDefault NSColorRenderingIntentDefault;
+alias NSColorRenderingIntent.NSColorRenderingIntentAbsoluteColorimetric NSColorRenderingIntentAbsoluteColorimetric;
+alias NSColorRenderingIntent.NSColorRenderingIntentRelativeColorimetric NSColorRenderingIntentRelativeColorimetric;
+alias NSColorRenderingIntent.NSColorRenderingIntentPerceptual NSColorRenderingIntentPerceptual;
+alias NSColorRenderingIntent.NSColorRenderingIntentSaturation NSColorRenderingIntentSaturation;
+
+enum NSImageInterpolation : NSUInteger
{
NSImageInterpolationDefault,
NSImageInterpolationNone,
@@ -43,6 +47,11 @@
NSImageInterpolationHigh
}
+alias NSImageInterpolation.NSImageInterpolationDefault NSImageInterpolationDefault;
+alias NSImageInterpolation.NSImageInterpolationNone NSImageInterpolationNone;
+alias NSImageInterpolation.NSImageInterpolationLow NSImageInterpolationLow;
+alias NSImageInterpolation.NSImageInterpolationHigh NSImageInterpolationHigh;
+
public class NSGraphicsContext : NSObject
{
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/internal/cocoa/NSRect.d
--- a/dwt/internal/cocoa/NSRect.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/internal/cocoa/NSRect.d Tue Oct 07 12:56:18 2008 +0200
@@ -13,6 +13,7 @@
*******************************************************************************/
module dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.CGFloat;
import dwt.internal.cocoa.NSInteger;
import dwt.internal.cocoa.NSPoint;
import dwt.internal.cocoa.NSSize;
@@ -39,8 +40,49 @@
NSSize size;
// for dwt compatibility
- alias origin.x x;
+
+ CGFloat x ()
+ {
+ return origin.x;
+ }
+
+ CGFloat x (CGFloat x)
+ {
+ return origin.x = x;
+ }
+
+ CGFloat y ()
+ {
+ return origin.y;
+ }
+
+ CGFloat y (CGFloat y)
+ {
+ return origin.y = y;
+ }
+
+ CGFloat width ()
+ {
+ return size.width;
+ }
+
+ CGFloat width (CGFloat width)
+ {
+ return size.width = width;
+ }
+
+ CGFloat height ()
+ {
+ return size.height;
+ }
+
+ CGFloat height (CGFloat height)
+ {
+ return size.height = height;
+ }
+
+ /*alias origin.x x;
alias origin.y y;
alias size.width width;
- alias size.height height;
+ alias size.height height;*/
}
\ No newline at end of file
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/internal/cocoa/OS.d
--- a/dwt/internal/cocoa/OS.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/internal/cocoa/OS.d Tue Oct 07 12:56:18 2008 +0200
@@ -20,20 +20,20 @@
import dwt.internal.Library;
import dwt.internal.Platform;
-static import Gestalt = dwt.internal.c.carboncore.Gestalt;
+static import dwt.internal.c.carboncore.Gestalt;
import dwt.internal.c.carboncore.MacTypes;
-static import Processes = dwt.internal.c.hiservices.Processes;
+static import dwt.internal.c.hiservices.Processes;
static import dwt.internal.c.qd.Quickdraw;
import dwt.internal.cocoa.NSInteger;
import dwt.internal.cocoa.NSString;
-static import NSAccessibility = dwt.internal.objc.appkit.NSAccessibility;
-static import NSAttributedString = dwt.internal.objc.appkit.NSAttributedString;
-static import NSGraphics = dwt.internal.objc.appkit.NSGraphics;
-static import NSScreen = dwt.internal.objc.appkit.NSScreen;
-static import CGRemoteOperation = dwt.internal.objc.coregraphics.CGRemoteOperation;
-static import NSGeometry = dwt.internal.objc.foundation.NSGeometry;
-static import NSHFSFileTypes = dwt.internal.objc.foundation.NSHFSFileTypes;
-static import NSRunLoop = dwt.internal.objc.foundation.NSRunLoop;
+static import dwt.internal.objc.appkit.NSAccessibility;
+static import dwt.internal.objc.appkit.NSAttributedString;
+static import dwt.internal.objc.appkit.NSGraphics;
+static import dwt.internal.objc.appkit.NSScreen;
+static import dwt.internal.objc.coregraphics.CGRemoteOperation;
+static import dwt.internal.objc.foundation.NSGeometry;
+static import dwt.internal.objc.foundation.NSHFSFileTypes;
+static import dwt.internal.objc.foundation.NSRunLoop;
static import dwt.internal.objc.runtime;
private alias dwt.internal.objc.runtime.objc_object objc_object;
@@ -86,7 +86,7 @@
public static const uint gestaltSystemVersion = ('s'<<24) + ('y'<<16) + ('s'<<8) + 'v';
public static const short noErr = 0;
- alias Processes.kProcessTransformToForegroundApplication kProcessTransformToForegroundApplication;
+ alias dwt.internal.c.hiservices.Processes.kProcessTransformToForegroundApplication kProcessTransformToForegroundApplication;
public static const int kAlertCautionIcon = ('c'<<24) + ('a'<<16) + ('u'<<8) + 't';
public static const int kAlertNoteIcon = ('n'<<24) + ('o'<<16) + ('t'<<8) + 'e';
public static const int kAlertStopIcon = ('s'<<24) + ('t'<<16) + ('o'<<8) + 'p';
@@ -104,18 +104,20 @@
return cast(Object) globalRef;
}
- alias Gestalt.Gestalt Gestalt;
- alias Processes.GetCurrentProcess GetCurrentProcess;
- alias Processes.SetFrontProcess SetFrontProcess;
- alias Processes.TransformProcessType TransformProcessType;
- alias NSGeometry.NSIntersectionRect NSIntersectionRect;
- alias CGRemoteOperation.CGWarpMouseCursorPosition CGWarpMouseCursorPosition;
+ alias dwt.internal.c.carboncore.Gestalt.Gestalt Gestalt;
+ alias dwt.internal.c.hiservices.Processes.GetCurrentProcess GetCurrentProcess;
+ alias dwt.internal.c.hiservices.Processes.SetFrontProcess SetFrontProcess;
+ alias dwt.internal.c.hiservices.Processes.TransformProcessType TransformProcessType;
+ alias dwt.internal.objc.foundation.NSGeometry.NSIntersectionRect NSIntersectionRect;
+ alias dwt.internal.objc.coregraphics.CGRemoteOperation.CGWarpMouseCursorPosition CGWarpMouseCursorPosition;
/** QuickDraw calls */
alias dwt.internal.c.qd.Quickdraw.RegionToRectsProcPtr RegionToRectsProcPtr;
alias dwt.internal.c.qd.Quickdraw.RegionToRectsUPP RegionToRectsUPP;
alias dwt.internal.c.qd.Quickdraw.NewRgn NewRgn;
+ alias dwt.internal.c.qd.Quickdraw.RectRgn RectRgn;
alias dwt.internal.c.qd.Quickdraw.OpenRgn OpenRgn;
+ alias dwt.internal.c.qd.Quickdraw.OffsetRgn OffsetRgn;
alias dwt.internal.c.qd.Quickdraw.MoveTo MoveTo;
alias dwt.internal.c.qd.Quickdraw.LineTo LineTo;
alias dwt.internal.c.qd.Quickdraw.UnionRgn UnionRgn;
@@ -927,7 +929,7 @@
public static /*const*/ String sel_preferredBackingLocation;
public static /*const*/ String sel_removeRowAtIndex_1;
public static /*const*/ String sel_setCurrentTime_1;
- public static /*const*/ String sel_String;
+ public static /*const*/ String sel_string;
public static /*const*/ String sel_hasVerticalScroller;
public static /*const*/ String sel_initWithTimeInterval_1sinceDate_1;
public static /*const*/ String sel_showsProgressPanel;
@@ -943,7 +945,7 @@
public static /*const*/ String sel_initWithURL_1options_1documentAttributes_1error_1;
public static /*const*/ String sel_initWithFrame_1mode_1cellClass_1numberOfRows_1numberOfColumns_1;
public static /*const*/ String sel_reflectScrolledClipView_1;
- public static /*const*/ String sel_StringWithContentsOfURL_1usedEncoding_1error_1;
+ public static /*const*/ String sel_stringWithContentsOfURL_1usedEncoding_1error_1;
public static /*const*/ String sel_displayIfNeededIgnoringOpacity;
public static /*const*/ String sel_archiverWillFinish_1;
public static /*const*/ String sel_initWithOptions_1;
@@ -1001,9 +1003,9 @@
public static /*const*/ String sel_menuFontOfSize_1;
public static /*const*/ String sel_window_1willPositionSheet_1usingRect_1;
public static /*const*/ String sel_allowsTypeSelect;
- public static /*const*/ String sel_attributeWithName_1URI_1StringValue_1;
+ public static /*const*/ String sel_attributeWithName_1URI_1stringValue_1;
public static /*const*/ String sel_setLinkTextAttributes_1;
- public static /*const*/ String sel_StringWithFormat_1;
+ public static /*const*/ String sel_stringWithFormat_1;
public static /*const*/ String sel_initWithTable_1startingRow_1rowSpan_1startingColumn_1columnSpan_1;
public static /*const*/ String sel_setShouldProcessNamespaces_1;
public static /*const*/ String sel_orderFrontRegardless;
@@ -1082,7 +1084,7 @@
public static /*const*/ String sel_clearStartAnimation;
public static /*const*/ String sel_setMovableByWindowBackground_1;
public static /*const*/ String sel_setDateFormat_1;
- public static /*const*/ String sel_StringWithContentsOfFile_1usedEncoding_1error_1;
+ public static /*const*/ String sel_stringWithContentsOfFile_1usedEncoding_1error_1;
public static /*const*/ String sel_toggleAutomaticLinkDetection_1;
public static /*const*/ String sel_statusForTable_1;
public static /*const*/ String sel_setAllowsColumnSelection_1;
@@ -1140,7 +1142,7 @@
public static /*const*/ String sel_discardCachedImage;
public static /*const*/ String sel_rootProxyForConnectionWithRegisteredName_1host_1usingNameServer_1;
public static /*const*/ String sel_mouseExited_1;
- public static /*const*/ String sel_StringWithCString_1;
+ public static /*const*/ String sel_stringWithCString_1;
public static /*const*/ String sel_standardUserDefaults;
public static /*const*/ String sel_archiver_1didEncodeObject_1;
public static /*const*/ String sel_canDraw;
@@ -1246,7 +1248,7 @@
public static /*const*/ String sel_playsSelectionOnly;
public static /*const*/ String sel_boundsRectForTextBlock_1glyphRange_1;
public static /*const*/ String sel_makeObjectsPerformSelector_1withObject_1;
- public static /*const*/ String sel_StringByTrimmingCharactersInSet_1;
+ public static /*const*/ String sel_stringByTrimmingCharactersInSet_1;
public static /*const*/ String sel_timerWithTimeInterval_1invocation_1repeats_1;
public static /*const*/ String sel_viewDidMoveToSuperview;
public static /*const*/ String sel_pathCell_1willDisplayOpenPanel_1;
@@ -1645,7 +1647,7 @@
public static /*const*/ String sel_isGathering;
public static /*const*/ String sel_slideImage_1from_1to_1;
public static /*const*/ String sel_initWithTCPPort_1;
- public static /*const*/ String sel_StringByFoldingWithOptions_1locale_1;
+ public static /*const*/ String sel_stringByFoldingWithOptions_1locale_1;
public static /*const*/ String sel_viewDidUnhide;
public static /*const*/ String sel_controlSize;
public static /*const*/ String sel_resourceDataUsingCache_1;
@@ -1669,7 +1671,7 @@
public static /*const*/ String sel_descriptionInStringsFileFormat;
public static /*const*/ String sel_isOutputStackInReverseOrder;
public static /*const*/ String sel_takeValue_1forKey_1;
- public static /*const*/ String sel_StringWithContentsOfFile_1;
+ public static /*const*/ String sel_stringWithContentsOfFile_1;
public static /*const*/ String sel_addItem_1;
public static /*const*/ String sel_viewWillMoveToWindow_1;
public static /*const*/ String sel_changeFileAttributes_1atPath_1;
@@ -1688,7 +1690,7 @@
public static /*const*/ String sel_shortWeekdaySymbols;
public static /*const*/ String sel_titleOfSelectedItem;
public static /*const*/ String sel_setWindowsNeedUpdate_1;
- public static /*const*/ String sel_StringWithUTF8String_1;
+ public static /*const*/ String sel_stringWithUTF8String_1;
public static /*const*/ String sel_transformedValueClass;
public static /*const*/ String sel_initWithColorsAndLocations_1;
public static /*const*/ String sel_acceptsMouseMovedEvents;
@@ -1778,7 +1780,7 @@
public static /*const*/ String sel_numberOfRows;
public static /*const*/ String sel_isReadableFileAtPath_1;
public static /*const*/ String sel_canInsertChild;
- public static /*const*/ String sel_StringByReplacingOccurrencesOfString_1withString_1options_1range_1;
+ public static /*const*/ String sel_stringByReplacingOccurrencesOfString_1withString_1options_1range_1;
public static /*const*/ String sel_ok_1;
public static /*const*/ String sel_hourOfDay;
public static /*const*/ String sel_paragraphRangeForRange_1;
@@ -1924,7 +1926,7 @@
public static /*const*/ String sel_setRelativePosition_1;
public static /*const*/ String sel_allConnections;
public static /*const*/ String sel_isLessThanOrEqualTo_1;
- public static /*const*/ String sel_attributeWithName_1StringValue_1;
+ public static /*const*/ String sel_attributeWithName_1stringValue_1;
public static /*const*/ String sel_floatForKey_1;
public static /*const*/ String sel_initWithDomain_1type_1name_1port_1;
public static /*const*/ String sel_setShadowOffset_1;
@@ -2132,7 +2134,7 @@
public static /*const*/ String sel_getLineFragmentRect_1usedRect_1remainingRect_1forStartingGlyphAtIndex_1proposedRect_1lineSpacing_1paragraphSpacingBefore_1paragraphSpacingAfter_1;
public static /*const*/ String sel_textContainerInset;
public static /*const*/ String sel_positionsForCompositeSequence_1numberOfGlyphs_1pointArray_1;
- public static /*const*/ String sel_StringByAppendingPathComponent_1;
+ public static /*const*/ String sel_stringByAppendingPathComponent_1;
public static /*const*/ String sel_application_1printFiles_1;
public static /*const*/ String sel_scanInt_1;
public static /*const*/ String sel_operators;
@@ -2144,7 +2146,7 @@
public static /*const*/ String sel_contentWidthValueType;
public static /*const*/ String sel_paddingPosition;
public static /*const*/ String sel_removeLastObject;
- public static /*const*/ String sel_StringByReplacingCharactersInRange_1withString_1;
+ public static /*const*/ String sel_stringByReplacingCharactersInRange_1withString_1;
public static /*const*/ String sel_pointerValue;
public static /*const*/ String sel_setTruncatesLastVisibleLine_1;
public static /*const*/ String sel_URLHandleResourceDidBeginLoading_1;
@@ -2437,7 +2439,7 @@
public static /*const*/ String sel_HTTPShouldHandleCookies;
public static /*const*/ String sel_rearrangeObjects;
public static /*const*/ String sel_graphicsContextWithWindow_1;
- public static /*const*/ String sel_StringWithCapacity_1;
+ public static /*const*/ String sel_stringWithCapacity_1;
public static /*const*/ String sel_results;
public static /*const*/ String sel_loadFileWrapperRepresentation_1ofType_1;
public static /*const*/ String sel_secondsFromGMTForDate_1;
@@ -2660,7 +2662,7 @@
public static /*const*/ String sel_sharedURLCache;
public static /*const*/ String sel_edited_1range_1changeInLength_1;
public static /*const*/ String sel_prepareContent;
- public static /*const*/ String sel_StringWithCString_1encoding_1;
+ public static /*const*/ String sel_stringWithCString_1encoding_1;
public static /*const*/ String sel_postNotificationName_1object_1userInfo_1deliverImmediately_1;
public static /*const*/ String sel_coerceToDescriptorType_1;
public static /*const*/ String sel_selectionIndex;
@@ -3088,7 +3090,7 @@
public static /*const*/ String sel_scriptErrorExpectedTypeDescriptor;
public static /*const*/ String sel_setHasHorizontalRuler_1;
public static /*const*/ String sel_initialFirstResponder;
- public static /*const*/ String sel_StringForObjectValue_1;
+ public static /*const*/ String sel_stringForObjectValue_1;
public static /*const*/ String sel_pageRange;
public static /*const*/ String sel_printOperationWithView_1;
public static /*const*/ String sel_initWithFrame_1pixelFormat_1;
@@ -3160,7 +3162,7 @@
public static /*const*/ String sel_tableColumns;
public static /*const*/ String sel_removeObjectAtIndex_1;
public static /*const*/ String sel_insertNewButtonImage_1in_1;
- public static /*const*/ String sel_StringWithContentsOfURL_1encoding_1error_1;
+ public static /*const*/ String sel_stringWithContentsOfURL_1encoding_1error_1;
public static /*const*/ String sel_menuChangedMessagesEnabled;
public static /*const*/ String sel_initWithShort_1;
public static /*const*/ String sel_setColorRenderingIntent_1;
@@ -3174,7 +3176,7 @@
public static /*const*/ String sel_firstIndex;
public static /*const*/ String sel_setFontManagerFactory_1;
public static /*const*/ String sel_exponentSymbol;
- public static /*const*/ String sel_StringValue;
+ public static /*const*/ String sel_stringValue;
public static /*const*/ String sel_getObjects_1range_1;
public static /*const*/ String sel_scriptingProperties;
public static /*const*/ String sel_query;
@@ -3182,7 +3184,7 @@
public static /*const*/ String sel_dateWithNaturalLanguageString_1;
public static /*const*/ String sel_datePickerMode;
public static /*const*/ String sel_setAlternateMnemonicLocation_1;
- public static /*const*/ String sel_StringByDeletingLastPathComponent;
+ public static /*const*/ String sel_stringByDeletingLastPathComponent;
public static /*const*/ String sel_encodeObject_1;
public static /*const*/ String sel_unarchiveObjectWithData_1;
public static /*const*/ String sel_destination;
@@ -3196,7 +3198,7 @@
public static /*const*/ String sel_rectForBlock_1layoutAtPoint_1inRect_1textContainer_1characterRange_1;
public static /*const*/ String sel_pasteFont_1;
public static /*const*/ String sel_backgroundColor;
- public static /*const*/ String sel_StringFromNumber_1;
+ public static /*const*/ String sel_stringFromNumber_1;
public static /*const*/ String sel_expiresDate;
public static /*const*/ String sel_initWithWindowRef_1;
public static /*const*/ String sel_toggleToolbarShown_1;
@@ -3241,7 +3243,7 @@
public static /*const*/ String sel_setSelectsInsertedObjects_1;
public static /*const*/ String sel_alternateSelectedControlTextColor;
public static /*const*/ String sel_isValidGlyphIndex_1;
- public static /*const*/ String sel_StringForKey_1inTable_1;
+ public static /*const*/ String sel_stringForKey_1inTable_1;
public static /*const*/ String sel_cellSizeForBounds_1;
public static /*const*/ String sel_beginSheetForDirectory_1file_1modalForWindow_1modalDelegate_1didEndSelector_1contextInfo_1;
public static /*const*/ String sel_invalidateLayoutForCharacterRange_1actualCharacterRange_1;
@@ -3378,7 +3380,7 @@
public static /*const*/ String sel_compoundTypes;
public static /*const*/ String sel_setShortStandaloneWeekdaySymbols_1;
public static /*const*/ String sel_removeWindowsItem_1;
- public static /*const*/ String sel_StringArrayForKey_1;
+ public static /*const*/ String sel_stringArrayForKey_1;
public static /*const*/ String sel_outlineView_1typeSelectStringForTableColumn_1item_1;
public static /*const*/ String sel_initWithWindow_1;
public static /*const*/ String sel_accessibilityIsAttributeSettable_1;
@@ -3691,7 +3693,7 @@
public static /*const*/ String sel_week;
public static /*const*/ String sel_takeIntValueFrom_1;
public static /*const*/ String sel_setWantsNotificationForMarkedText_1;
- public static /*const*/ String sel_StringByPaddingToLength_1withString_1startingAtIndex_1;
+ public static /*const*/ String sel_stringByPaddingToLength_1withString_1startingAtIndex_1;
public static /*const*/ String sel_stopModal;
public static /*const*/ String sel_veryShortWeekdaySymbols;
public static /*const*/ String sel_user;
@@ -3730,7 +3732,7 @@
public static /*const*/ String sel_removeSelectionIndexPaths_1;
public static /*const*/ String sel_TIFFRepresentationOfImageRepsInArray_1;
public static /*const*/ String sel_setSet_1;
- public static /*const*/ String sel_StringWithCString_1length_1;
+ public static /*const*/ String sel_stringWithCString_1length_1;
public static /*const*/ String sel_objectsByEvaluatingSpecifier;
public static /*const*/ String sel_subarrayWithRange_1;
public static /*const*/ String sel_collectIfNeeded;
@@ -4016,7 +4018,7 @@
public static /*const*/ String sel_setSelectedRanges_1affinity_1stillSelecting_1;
public static /*const*/ String sel_setHTTPShouldHandleCookies_1;
public static /*const*/ String sel_initWithType_1location_1;
- public static /*const*/ String sel_StringByResolvingSymlinksInPath;
+ public static /*const*/ String sel_stringByResolvingSymlinksInPath;
public static /*const*/ String sel_tryLock;
public static /*const*/ String sel_convertSizeFromBase_1;
public static /*const*/ String sel_setCacheMode_1;
@@ -4166,7 +4168,7 @@
public static /*const*/ String sel_subscript_1;
public static /*const*/ String sel_URL;
public static /*const*/ String sel_headerColor;
- public static /*const*/ String sel_StringByAddingPercentEscapesUsingEncoding_1;
+ public static /*const*/ String sel_stringByAddingPercentEscapesUsingEncoding_1;
public static /*const*/ String sel_draggingExited_1;
public static /*const*/ String sel_ignoreModifierKeysWhileDragging;
public static /*const*/ String sel_componentsToDisplayForPath_1;
@@ -4265,7 +4267,7 @@
public static /*const*/ String sel_addresses;
public static /*const*/ String sel_setCanBeVisibleOnAllSpaces_1;
public static /*const*/ String sel_bundleForSuite_1;
- public static /*const*/ String sel_StringWithCharacters_1length_1;
+ public static /*const*/ String sel_stringWithCharacters_1length_1;
public static /*const*/ String sel_dataWithContentsOfURL_1options_1error_1;
public static /*const*/ String sel_isExpanded;
public static /*const*/ String sel_rectForLayoutAtPoint_1inRect_1textContainer_1characterRange_1;
@@ -4368,7 +4370,7 @@
public static /*const*/ String sel_fontDescriptorByAddingAttributes_1;
public static /*const*/ String sel_startTrackingAt_1inView_1;
public static /*const*/ String sel_application_1delegateHandlesKey_1;
- public static /*const*/ String sel_StringByExpandingTildeInPath;
+ public static /*const*/ String sel_stringByExpandingTildeInPath;
public static /*const*/ String sel_menu;
public static /*const*/ String sel_setMinute_1;
public static /*const*/ String sel_startSubelementIdentifier;
@@ -4416,7 +4418,7 @@
public static /*const*/ String sel_setTypingAttributes_1;
public static /*const*/ String sel_observeValueForKeyPath_1ofObject_1change_1context_1;
public static /*const*/ String sel_performDragOperation_1;
- public static /*const*/ String sel_processingInstructionWithName_1StringValue_1;
+ public static /*const*/ String sel_processingInstructionWithName_1stringValue_1;
public static /*const*/ String sel_initWithKind_1options_1;
public static /*const*/ String sel_instancesRespondToSelector_1;
public static /*const*/ String sel_keyEquivalentFont;
@@ -4502,7 +4504,7 @@
public static /*const*/ String sel_isMovableByWindowBackground;
public static /*const*/ String sel_printerNames;
public static /*const*/ String sel_initWithDictionary_1;
- public static /*const*/ String sel_StringByStandardizingPath;
+ public static /*const*/ String sel_stringByStandardizingPath;
public static /*const*/ String sel_usesUserKeyEquivalents;
public static /*const*/ String sel_drawStateImageWithFrame_1inView_1;
public static /*const*/ String sel_openUntitledDocumentAndDisplay_1error_1;
@@ -4657,7 +4659,7 @@
public static /*const*/ String sel_setNegativeFormat_1;
public static /*const*/ String sel_copyFont_1;
public static /*const*/ String sel_outlineView_1sortDescriptorsDidChange_1;
- public static /*const*/ String sel_StringWithString_1;
+ public static /*const*/ String sel_stringWithString_1;
public static /*const*/ String sel_valueWithUniqueID_1inPropertyWithKey_1;
public static /*const*/ String sel_setHighlightsBy_1;
public static /*const*/ String sel_setContinuousSpellCheckingEnabled_1;
@@ -4684,7 +4686,7 @@
public static /*const*/ String sel_expressionForAggregate_1;
public static /*const*/ String sel_useStoredAccessor;
public static /*const*/ String sel_ensureAttributesAreFixedInRange_1;
- public static /*const*/ String sel_StringForType_1;
+ public static /*const*/ String sel_stringForType_1;
public static /*const*/ String sel_setLeaf_1;
public static /*const*/ String sel_URLFromPasteboard_1;
public static /*const*/ String sel_initWithURL_1byReference_1;
@@ -5013,8 +5015,8 @@
public static /*const*/ String sel_initForWritingWithMutableData_1;
public static /*const*/ String sel_content;
public static /*const*/ String sel_addSubview_1;
- public static /*const*/ String sel_StringByReplacingOccurrencesOfString_1withString_1;
- public static /*const*/ String sel_StringWithFileSystemRepresentation_1length_1;
+ public static /*const*/ String sel_stringByReplacingOccurrencesOfString_1withString_1;
+ public static /*const*/ String sel_stringWithFileSystemRepresentation_1length_1;
public static /*const*/ String sel_isVerticallyCentered;
public static /*const*/ String sel_setVerticallyCentered_1;
public static /*const*/ String sel_selectPrevious_1;
@@ -5266,7 +5268,7 @@
public static /*const*/ String sel_initWithTextureTarget_1textureInternalFormat_1textureMaxMipMapLevel_1pixelsWide_1pixelsHigh_1;
public static /*const*/ String sel_classForClassName_1;
public static /*const*/ String sel_decodeInt64ForKey_1;
- public static /*const*/ String sel_StringWithSavedFrame;
+ public static /*const*/ String sel_stringWithSavedFrame;
public static /*const*/ String sel_writeRTFDToFile_1atomically_1;
public static /*const*/ String sel_initWithLocal_1connection_1;
public static /*const*/ String sel_sendBeforeDate_1msgid_1components_1from_1reserved_1;
@@ -5305,7 +5307,7 @@
public static /*const*/ String sel_control_1didFailToFormatString_1errorDescription_1;
public static /*const*/ String sel_isBaseFont;
public static /*const*/ String sel_removeDescriptorWithKeyword_1;
- public static /*const*/ String sel_subStringFromIndex_1;
+ public static /*const*/ String sel_substringFromIndex_1;
public static /*const*/ String sel_componentsFromLocaleIdentifier_1;
public static /*const*/ String sel_setUsesFeedbackWindow_1;
public static /*const*/ String sel_setAnimates_1;
@@ -5333,7 +5335,7 @@
public static /*const*/ String sel_draggingSourceOperationMaskForLocal_1;
public static /*const*/ String sel_willPresentError_1;
public static /*const*/ String sel_strikethroughGlyphRange_1strikethroughType_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1;
- public static /*const*/ String sel_elementWithName_1StringValue_1;
+ public static /*const*/ String sel_elementWithName_1stringValue_1;
public static /*const*/ String sel_unsignedCharValue;
public static /*const*/ String sel_rangeOfComposedCharacterSequencesForRange_1;
public static /*const*/ String sel_activate_1;
@@ -5433,7 +5435,7 @@
public static /*const*/ String sel_addSymbolicLinkWithDestination_1preferredFilename_1;
public static /*const*/ String sel_destinationOfSymbolicLinkAtPath_1error_1;
public static /*const*/ String sel_runUntilDate_1;
- public static /*const*/ String sel_StringByAbbreviatingWithTildeInPath;
+ public static /*const*/ String sel_stringByAbbreviatingWithTildeInPath;
public static /*const*/ String sel_drawerWillResizeContents_1toSize_1;
public static /*const*/ String sel_imageRectForBounds_1;
public static /*const*/ String sel_indexGreaterThanIndex_1;
@@ -5651,7 +5653,7 @@
public static /*const*/ String sel_localNameForName_1;
public static /*const*/ String sel_loopMode;
public static /*const*/ String sel_setFocusRingType_1;
- public static /*const*/ String sel_StringForKey_1;
+ public static /*const*/ String sel_stringForKey_1;
public static /*const*/ String sel_initWithDomain_1type_1name_1;
public static /*const*/ String sel_animationDidEnd_1;
public static /*const*/ String sel_addSubview_1positioned_1relativeTo_1;
@@ -5678,7 +5680,7 @@
public static /*const*/ String sel_windowDidExpose_1;
public static /*const*/ String sel_systemID;
public static /*const*/ String sel_turnOffKerning_1;
- public static /*const*/ String sel_StringByReplacingPercentEscapesUsingEncoding_1;
+ public static /*const*/ String sel_stringByReplacingPercentEscapesUsingEncoding_1;
public static /*const*/ String sel_control_1textView_1completions_1forPartialWordRange_1indexOfSelectedItem_1;
public static /*const*/ String sel_selectLastTabViewItem_1;
public static /*const*/ String sel_setKeyEquivalentFont_1;
@@ -5781,7 +5783,7 @@
public static /*const*/ String sel_encodeValueOfObjCType_1at_1;
public static /*const*/ String sel_mode;
public static /*const*/ String sel_appleEventWithEventClass_1eventID_1targetDescriptor_1returnID_1transactionID_1;
- public static /*const*/ String sel_StringByDeletingPathExtension;
+ public static /*const*/ String sel_stringByDeletingPathExtension;
public static /*const*/ String sel_standardOutput;
public static /*const*/ String sel_enumCodeValue;
public static /*const*/ String sel_setResourceData_1;
@@ -5823,7 +5825,7 @@
public static /*const*/ String sel_hyphenationFactor;
public static /*const*/ String sel_setAcceptsGlyphInfo_1;
public static /*const*/ String sel_formatWidth;
- public static /*const*/ String sel_StringByAppendingFormat_1;
+ public static /*const*/ String sel_stringByAppendingFormat_1;
public static /*const*/ String sel_documentForFileName_1;
public static /*const*/ String sel_outlineView_1nextTypeSelectMatchFromItem_1toItem_1forString_1;
public static /*const*/ String sel_isItemExpanded_1;
@@ -5883,7 +5885,7 @@
public static /*const*/ String sel_setMaxDate_1;
public static /*const*/ String sel_performMnemonic_1;
public static /*const*/ String sel_maximumRecentDocumentCount;
- public static /*const*/ String sel_StringsByAppendingPaths_1;
+ public static /*const*/ String sel_stringsByAppendingPaths_1;
public static /*const*/ String sel_localTimeZone;
public static /*const*/ String sel_draggingLocation;
public static /*const*/ String sel_searchForAllDomains;
@@ -5906,7 +5908,7 @@
public static /*const*/ String sel_hasBytesAvailable;
public static /*const*/ String sel_currentConversation;
public static /*const*/ String sel_setAllowsEditingTextAttributes_1;
- public static /*const*/ String sel_initWithName_1StringValue_1;
+ public static /*const*/ String sel_initWithName_1stringValue_1;
public static /*const*/ String sel_tableViewColumnDidResize_1;
public static /*const*/ String sel_knowsPageRange_1;
public static /*const*/ String sel_uppercaseLetterCharacterSet;
@@ -5917,7 +5919,7 @@
public static /*const*/ String sel_paragraphs;
public static /*const*/ String sel_setJobDisposition_1;
public static /*const*/ String sel_setContainerClassDescription_1;
- public static /*const*/ String sel_StringWithContentsOfURL_1;
+ public static /*const*/ String sel_stringWithContentsOfURL_1;
public static /*const*/ String sel_setTrackingMode_1;
public static /*const*/ String sel_canCloseDocumentWithDelegate_1shouldCloseSelector_1contextInfo_1;
public static /*const*/ String sel_usesItemFromMenu;
@@ -6169,7 +6171,7 @@
public static /*const*/ String sel_dictionaryWithDictionary_1;
public static /*const*/ String sel_drawMarkersInRect_1;
public static /*const*/ String sel_centerSelectionInVisibleArea_1;
- public static /*const*/ String sel_StringByAppendingString_1;
+ public static /*const*/ String sel_stringByAppendingString_1;
public static /*const*/ String sel_flushWindowIfNeeded;
public static /*const*/ String sel_lockFocusOnRepresentation_1;
public static /*const*/ String sel_setNotShownAttribute_1forGlyphAtIndex_1;
@@ -6349,7 +6351,7 @@
public static /*const*/ String sel_isDaylightSavingTime;
public static /*const*/ String sel_setShowsBorderOnlyWhileMouseInside_1;
public static /*const*/ String sel_isSetOnMouseEntered;
- public static /*const*/ String sel_StringFromDate_1;
+ public static /*const*/ String sel_stringFromDate_1;
public static /*const*/ String sel_deselectColumn_1;
public static /*const*/ String sel_requestHeaderFieldsWithCookies_1;
public static /*const*/ String sel_outlineViewColumnDidMove_1;
@@ -6620,10 +6622,10 @@
public static /*const*/ String sel_comboBoxSelectionDidChange_1;
public static /*const*/ String sel_hasMarkedText;
public static /*const*/ String sel_setDefaultLineCapStyle_1;
- public static /*const*/ String sel_StringListForKey_1inTable_1;
+ public static /*const*/ String sel_stringListForKey_1inTable_1;
public static /*const*/ String sel_defaultConnection;
public static /*const*/ String sel_pathContentOfSymbolicLinkAtPath_1;
- public static /*const*/ String sel_StringWithContentsOfFile_1encoding_1error_1;
+ public static /*const*/ String sel_stringWithContentsOfFile_1encoding_1error_1;
public static /*const*/ String sel_detachSubmenu;
public static /*const*/ String sel_isSecure;
public static /*const*/ String sel_movie;
@@ -6802,7 +6804,7 @@
public static /*const*/ String sel_colorWithCIColor_1;
public static /*const*/ String sel_getCyan_1magenta_1yellow_1black_1alpha_1;
public static /*const*/ String sel_symbolicTraits;
- public static /*const*/ String sel_StringByAppendingPathExtension_1;
+ public static /*const*/ String sel_stringByAppendingPathExtension_1;
public static /*const*/ String sel_horizontalScroller;
public static /*const*/ String sel_setInitialValue_1;
public static /*const*/ String sel_sizeForPaperName_1;
@@ -6881,7 +6883,7 @@
public static /*const*/ String sel_notificationCenter;
public static /*const*/ String sel_setAlternateImage_1;
public static /*const*/ String sel_mainWindow;
- public static /*const*/ String sel_subStringWithRange_1;
+ public static /*const*/ String sel_substringWithRange_1;
public static /*const*/ String sel_forgetWord_1;
public static /*const*/ String sel_shouldCascadeWindows;
public static /*const*/ String sel_updateScroller;
@@ -6890,7 +6892,7 @@
public static /*const*/ String sel_splitView_1constrainMinCoordinate_1ofSubviewAt_1;
public static /*const*/ String sel_drawWithFrame_1inView_1;
public static /*const*/ String sel_encodingScheme;
- public static /*const*/ String sel_namespaceWithName_1StringValue_1;
+ public static /*const*/ String sel_namespaceWithName_1stringValue_1;
public static /*const*/ String sel_initWithLongLong_1;
public static /*const*/ String sel_processIdentifier;
public static /*const*/ String sel_setSubmenu_1forItem_1;
@@ -7183,7 +7185,7 @@
public static /*const*/ String sel_document;
public static /*const*/ String sel_interiorBackgroundStyleForSegment_1;
public static /*const*/ String sel_transformedValue_1;
- public static /*const*/ String sel_subStringToIndex_1;
+ public static /*const*/ String sel_substringToIndex_1;
public static /*const*/ String sel_addDocument_1;
public static /*const*/ String sel_numberWithInteger_1;
public static /*const*/ String sel_setBoundsRotation_1;
@@ -7209,7 +7211,7 @@
public static /*const*/ String sel_setFrameLoadDelegate_1;
public static /*const*/ String sel_takeStringURLFrom_1;
public static /*const*/ String sel_registerURLSchemeAsLocal_1;
- public static /*const*/ String sel_StringByEvaluatingJavaScriptFromString_1;
+ public static /*const*/ String sel_stringByEvaluatingJavaScriptFromString_1;
public static /*const*/ String sel_replaceSelectionWithMarkupString_1;
public static /*const*/ String sel_setPreferences_1;
public static /*const*/ String sel_customUserAgent;
@@ -13779,7 +13781,7 @@
{ &sel_setFrameLoadDelegate_1, "setFrameLoadDelegate:" },
{ &sel_takeStringURLFrom_1, "takeStringURLFrom:" },
{ &sel_registerURLSchemeAsLocal_1, "registerURLSchemeAsLocal:" },
- { &sel_StringByEvaluatingJavaScriptFromString_1, "StringByEvaluatingJavaScriptFromString:" },
+ { &sel_stringByEvaluatingJavaScriptFromString_1, "stringByEvaluatingJavaScriptFromString:" },
{ &sel_replaceSelectionWithMarkupString_1, "replaceSelectionWithMarkupString:" },
{ &sel_setPreferences_1, "setPreferences:" },
{ &sel_customUserAgent, "customUserAgent" },
@@ -15835,7 +15837,7 @@
// public static const native int NSAccessibilityPickAction();
// public static const native int NSAccessibilityPointsUnitValue();
// public static const native int NSAccessibilityPopUpButtonRole();
- alias NSAccessibility.NSAccessibilityPositionAttribute NSAccessibilityPositionAttribute;
+ alias dwt.internal.objc.appkit.NSAccessibility.NSAccessibilityPositionAttribute NSAccessibilityPositionAttribute;
// public static const native int NSAccessibilityPressAction();
// public static const native int NSAccessibilityPreviousContentsAttribute();
// public static const native int NSAccessibilityProgressIndicatorRole();
@@ -15882,7 +15884,7 @@
// public static const native int NSAccessibilitySheetRole();
// public static const native int NSAccessibilityShowMenuAction();
// public static const native int NSAccessibilityShownMenuAttribute();
- alias NSAccessibility.NSAccessibilitySizeAttribute NSAccessibilitySizeAttribute;
+ alias dwt.internal.objc.appkit.NSAccessibility.NSAccessibilitySizeAttribute NSAccessibilitySizeAttribute;
// public static const native int NSAccessibilitySliderRole();
// public static const native int NSAccessibilitySortButtonRole();
// public static const native int NSAccessibilitySortDirectionAttribute();
@@ -15986,7 +15988,7 @@
// public static const native int NSAttachmentAttributeName();
// public static const native int NSAttributedStringBinding();
// public static const native int NSAuthorDocumentAttribute();
- alias NSAttributedString.NSBackgroundColorAttributeName NSBackgroundColorAttributeName;
+ alias dwt.internal.objc.appkit.NSAttributedString.NSBackgroundColorAttributeName NSBackgroundColorAttributeName;
// public static const native int NSBackgroundColorDocumentAttribute();
// public static const native int NSBadBitmapParametersException();
// public static const native int NSBadComparisonException();
@@ -15995,7 +15997,7 @@
// public static const native int NSBadRTFFontTableException();
// public static const native int NSBadRTFStyleSheetException();
// public static const native int NSBaseURLDocumentOption();
- alias NSAttributedString.NSBaselineOffsetAttributeName NSBaselineOffsetAttributeName;
+ alias dwt.internal.objc.appkit.NSAttributedString.NSBaselineOffsetAttributeName NSBaselineOffsetAttributeName;
// public static const native int NSBlack();
// public static const native int NSBottomMarginDocumentAttribute();
// public static const native int NSBrowserColumnConfigurationDidChangeNotification();
@@ -16057,8 +16059,8 @@
// public static const native int NSDeviceColorSpaceName();
// public static const native int NSDeviceIsPrinter();
// public static const native int NSDeviceIsScreen();
- alias NSGraphics.NSDeviceRGBColorSpace NSDeviceRGBColorSpace;
- alias NSScreen.NSDeviceResolution NSDeviceResolution;
+ alias dwt.internal.objc.appkit.NSGraphics.NSDeviceRGBColorSpace NSDeviceRGBColorSpace;
+ alias dwt.internal.objc.appkit.NSScreen.NSDeviceResolution NSDeviceResolution;
// public static const native int NSDeviceSize();
// public static const native int NSDeviceWhiteColorSpace();
// public static const native int NSDirectoryFileType();
@@ -16094,7 +16096,7 @@
// public static const native int NSFindPanelSearchOptionsPboardType();
// public static const native int NSFindPanelSubStringMatch();
// public static const native int NSFindPboard();
- alias NSAttributedString.NSFontAttributeName NSFontAttributeName;
+ alias dwt.internal.objc.appkit.NSAttributedString.NSFontAttributeName NSFontAttributeName;
// public static const native int NSFontBinding();
// public static const native int NSFontBoldBinding();
// public static const native int NSFontCascadeListAttribute();
@@ -16129,7 +16131,7 @@
// public static const native int NSFontVisibleNameAttribute();
// public static const native int NSFontWeightTrait();
// public static const native int NSFontWidthTrait();
- alias NSAttributedString.NSForegroundColorAttributeName NSForegroundColorAttributeName;
+ alias dwt.internal.objc.appkit.NSAttributedString.NSForegroundColorAttributeName NSForegroundColorAttributeName;
// public static const native int NSFullScreenModeAllScreens();
// public static const native int NSFullScreenModeSetting();
// public static const native int NSFullScreenModeWindowLevel();
@@ -16221,7 +16223,7 @@
// public static const native int NSLeftMarginDocumentAttribute();
// public static const native int NSLigatureAttributeName();
// public static const native int NSLightGray();
- alias NSAttributedString.NSLinkAttributeName NSLinkAttributeName;
+ alias dwt.internal.objc.appkit.NSAttributedString.NSLinkAttributeName NSLinkAttributeName;
// public static const native int NSLocalizedKeyDictionaryBinding();
// public static const native int NSMacSimpleTextDocumentType();
// public static const native int NSManagedObjectContextBinding();
@@ -16276,7 +16278,7 @@
// public static const native int NSPPDIncludeStackUnderflowException();
// public static const native int NSPPDParseException();
// public static const native int NSPaperSizeDocumentAttribute();
- alias NSAttributedString.NSParagraphStyleAttributeName NSParagraphStyleAttributeName;
+ alias dwt.internal.objc.appkit.NSAttributedString.NSParagraphStyleAttributeName NSParagraphStyleAttributeName;
// public static const native int NSPasteboardCommunicationException();
// public static const native int NSPatternColorSpace();
// public static const native int NSPlainFileType();
@@ -16424,8 +16426,8 @@
// public static const native int NSSpellingStateAttributeName();
// public static const native int NSSplitViewDidResizeSubviewsNotification();
// public static const native int NSSplitViewWillResizeSubviewsNotification();
- alias NSAttributedString.NSStrikethroughColorAttributeName NSStrikethroughColorAttributeName;
- alias NSAttributedString.NSStrikethroughStyleAttributeName NSStrikethroughStyleAttributeName;
+ alias dwt.internal.objc.appkit.NSAttributedString.NSStrikethroughColorAttributeName NSStrikethroughColorAttributeName;
+ alias dwt.internal.objc.appkit.NSAttributedString.NSStrikethroughStyleAttributeName NSStrikethroughStyleAttributeName;
// public static const native int NSStringPboardType();
// public static const native int NSStrokeColorAttributeName();
// public static const native int NSStrokeWidthAttributeName();
@@ -16476,9 +16478,9 @@
// public static const native int NSTypedStreamVersionException();
// public static const native int NSURLPboardType();
// public static const native int NSUnderlineByWordMask();
- alias NSAttributedString.NSUnderlineColorAttributeName NSUnderlineColorAttributeName;
+ alias dwt.internal.objc.appkit.NSAttributedString.NSUnderlineColorAttributeName NSUnderlineColorAttributeName;
// public static const native int NSUnderlineStrikethroughMask();
- alias NSAttributedString.NSUnderlineStyleAttributeName NSUnderlineStyleAttributeName;
+ alias dwt.internal.objc.appkit.NSAttributedString.NSUnderlineStyleAttributeName NSUnderlineStyleAttributeName;
// public static const native int NSVCardPboardType();
// public static const native int NSValidatesImmediatelyBindingOption();
// public static const native int NSValueBinding();
@@ -16588,7 +16590,7 @@
// public static const native int NSDecimalNumberExactnessException();
// public static const native int NSDecimalNumberOverflowException();
// public static const native int NSDecimalNumberUnderflowException();
- alias NSRunLoop.NSDefaultRunLoopMode NSDefaultRunLoopMode;
+ alias dwt.internal.objc.foundation.NSRunLoop.NSDefaultRunLoopMode NSDefaultRunLoopMode;
// public static const native int NSDestinationInvalidException();
// public static const native int NSDidBecomeSingleThreadedNotification();
// public static const native int NSDistinctUnionOfArraysKeyValueOperator();
@@ -16867,7 +16869,7 @@
// public static const native void NSBeginCriticalAlertSheet(int title, int defaultButton, int alternateButton, int otherButton, int docWindow, int modalDelegate, int didEndSelector, int didDismissSelector, int contextInfo, int msgFormat);
// public static const native void NSBeginInformationalAlertSheet(int title, int defaultButton, int alternateButton, int otherButton, int docWindow, int modalDelegate, int didEndSelector, int didDismissSelector, int contextInfo, int msgFormat);
// public static const native int NSBestDepth(int colorSpace, int bps, int bpp, bool planar, int exactMatch);
- alias NSGraphics.NSBitsPerPixelFromDepth NSBitsPerPixelFromDepth;
+ alias dwt.internal.objc.appkit.NSGraphics.NSBitsPerPixelFromDepth NSBitsPerPixelFromDepth;
// public static const native int NSBitsPerSampleFromDepth(int depth);
// public static const native int NSColorSpaceFromDepth(int depth);
// public static const native int NSConvertGlyphsToPackedGlyphs(int glBuf, int count, int packing, int packedGlyphs);
@@ -16990,7 +16992,7 @@
// public static const native bool NSEqualRects(NSRect aRect, NSRect bRect);
// public static const native bool NSEqualSizes(NSSize aSize, NSSize bSize);
// public static const native int NSExtraRefCount(int object);
- alias NSHFSFileTypes.NSFileTypeForHFSTypeCode NSFileTypeForHFSTypeCode;
+ alias dwt.internal.objc.foundation.NSHFSFileTypes.NSFileTypeForHFSTypeCode NSFileTypeForHFSTypeCode;
// public static const native int NSFrameAddress(int frame);
// public static const native void NSFreeHashTable(int table);
// public static const native void NSFreeMapTable(int table);
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/internal/cocoa/SWTScrollView.d
--- a/dwt/internal/cocoa/SWTScrollView.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/internal/cocoa/SWTScrollView.d Tue Oct 07 12:56:18 2008 +0200
@@ -13,6 +13,7 @@
*******************************************************************************/
module dwt.internal.cocoa.SWTScrollView;
+import dwt.internal.cocoa.NSInteger;
import dwt.internal.cocoa.NSScrollView;
import dwt.internal.cocoa.OS;
import objc = dwt.internal.objc.runtime;
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/internal/objc/appkit/NSGraphics.d
--- a/dwt/internal/objc/appkit/NSGraphics.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/internal/objc/appkit/NSGraphics.d Tue Oct 07 12:56:18 2008 +0200
@@ -7,6 +7,7 @@
*/
module dwt.internal.objc.appkit.NSGraphics;
+import dwt.internal.cocoa.NSString;
import bindings = dwt.internal.objc.appkit.bindings : NSBitsPerPixelFromDepth, DCB_NSDeviceRGBColorSpace;
alias bindings.NSBitsPerPixelFromDepth NSBitsPerPixelFromDepth;
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/internal/objc/appkit/NSScreen.d
--- a/dwt/internal/objc/appkit/NSScreen.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/internal/objc/appkit/NSScreen.d Tue Oct 07 12:56:18 2008 +0200
@@ -7,6 +7,7 @@
*/
module dwt.internal.objc.appkit.NSScreen;
+import dwt.internal.cocoa.NSString;
import bindings = dwt.internal.objc.appkit.bindings : DCB_NSDeviceResolution;
NSString NSDeviceResolution ()
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/internal/objc/foundation/NSHFSFileTypes.d
--- a/dwt/internal/objc/foundation/NSHFSFileTypes.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/internal/objc/foundation/NSHFSFileTypes.d Tue Oct 07 12:56:18 2008 +0200
@@ -7,6 +7,7 @@
*/
module dwt.internal.objc.foundation.NSHFSFileTypes;
+import dwt.internal.cocoa.NSString;
import bindings = dwt.internal.objc.foundation.bindings;
NSString NSFileTypeForHFSTypeCode (uint hfsFileTypeCode)
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/internal/objc/runtime.d
--- a/dwt/internal/objc/runtime.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/internal/objc/runtime.d Tue Oct 07 12:56:18 2008 +0200
@@ -194,16 +194,16 @@
// os_custom
extern (C):
alias void function (id, SEL, NSRect) funcPtr;
-static IMP drawRect_1CALLBACK;
+static IMP drawRect_1CALLBACKK;
private void drawRect(id obj, SEL sel, NSRect rect)
{
- return cast(funcPtr) drawRect_1CALLBACK(obj, sel, &rect);
+ return cast(funcPtr) drawRect_1CALLBACKK(obj, sel, &rect);
}
funcPtr drawRect_1CALLBACK (IMP func)
{
- drawRect_1CALLBACK = func;
+ drawRect_1CALLBACKK = func;
return &drawRect;
}
\ No newline at end of file
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/printing/Printer.d
--- a/dwt/printing/Printer.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/printing/Printer.d Tue Oct 07 12:56:18 2008 +0200
@@ -315,8 +315,8 @@
return 0;
}
-protected void init () {
- super.init();
+protected void init_ () {
+ super.init_();
}
/**
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/widgets/Button.d
--- a/dwt/widgets/Button.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/widgets/Button.d Tue Oct 07 12:56:18 2008 +0200
@@ -35,6 +35,7 @@
import dwt.internal.cocoa.CGFloat;
import dwt.internal.cocoa.NSInteger;
import dwt.widgets.Composite;
+import dwt.widgets.Control;
import dwt.widgets.Decorations;
import dwt.widgets.TypedListener;
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/widgets/Caret.d
--- a/dwt/widgets/Caret.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/widgets/Caret.d Tue Oct 07 12:56:18 2008 +0200
@@ -44,7 +44,7 @@
public class Caret : Widget {
Canvas parent;
int x, y, width, height;
- bool isVisible, isShowing;
+ bool isVisible_, isShowing;
int blinkRate;
Image image;
Font font;
@@ -86,7 +86,7 @@
}
bool blinkCaret () {
- if (!isVisible) return true;
+ if (!isVisible_) return true;
if (!isShowing) return showCaret ();
if (blinkRate is 0) return true;
return hideCaret ();
@@ -95,7 +95,7 @@
void createWidget () {
super.createWidget ();
blinkRate = display.getCaretBlinkTime ();
- isVisible = true;
+ isVisible_ = true;
if (parent.getCaret () is null) {
parent.setCaret (this);
}
@@ -248,7 +248,7 @@
*/
public bool getVisible () {
checkWidget();
- return isVisible;
+ return isVisible_;
}
bool hideCaret () {
@@ -273,7 +273,7 @@
*/
public bool isVisible () {
checkWidget();
- return isVisible && parent.isVisible () && parent.hasFocus ();
+ return isVisible_ && parent.isVisible () && parent.hasFocus ();
}
bool isFocusCaret () {
@@ -283,7 +283,7 @@
void killFocus () {
if (display.currentCaret !is this) return;
display.setCurrentCaret (null);
- if (isVisible) hideCaret ();
+ if (isVisible_) hideCaret ();
}
void releaseParent () {
@@ -321,12 +321,12 @@
checkWidget();
if (this.x is x && this.y is y && this.width is width && this.height is height) return;
bool isFocus = isFocusCaret ();
- if (isFocus && isVisible) hideCaret ();
+ if (isFocus && isVisible_) hideCaret ();
this.x = x;
this.y = y;
this.width = width;
this.height = height;
- if (isFocus && isVisible) showCaret ();
+ if (isFocus && isVisible_) showCaret ();
}
/**
@@ -351,7 +351,7 @@
void setFocus () {
if (display.currentCaret is this) return;
display.setCurrentCaret (this);
- if (isVisible) showCaret ();
+ if (isVisible_) showCaret ();
}
/**
@@ -398,9 +398,9 @@
error (DWT.ERROR_INVALID_ARGUMENT);
}
bool isFocus = isFocusCaret ();
- if (isFocus && isVisible) hideCaret ();
+ if (isFocus && isVisible_) hideCaret ();
this.image = image;
- if (isFocus && isVisible) showCaret ();
+ if (isFocus && isVisible_) showCaret ();
}
/**
@@ -492,10 +492,10 @@
*/
public void setVisible (bool visible) {
checkWidget();
- if (visible is isVisible) return;
- isVisible = visible;
+ if (visible is isVisible_) return;
+ isVisible_ = visible;
if (!isFocusCaret ()) return;
- if (isVisible) {
+ if (isVisible_) {
showCaret ();
} else {
hideCaret ();
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/widgets/Composite.d
--- a/dwt/widgets/Composite.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/widgets/Composite.d Tue Oct 07 12:56:18 2008 +0200
@@ -70,7 +70,7 @@
* @see Canvas
*/
public class Composite : Scrollable {
- Layout layout;
+ Layout layout_;
Control[] tabList;
int scrolledVisibleRgn, siblingsVisibleRgn;
int layoutCount, backgroundMode;
@@ -199,7 +199,7 @@
Control child = changed [i];
Composite composite = child.parent;
while (child !is this) {
- if (composite.layout is null || !composite.layout.flushCache (child)) {
+ if (composite.layout_ is null || !composite.layout_.flushCache (child)) {
composite.state |= LAYOUT_CHANGED;
}
child = composite;
@@ -211,10 +211,10 @@
public Point computeSize (int wHint, int hHint, bool changed) {
checkWidget();
Point size;
- if (layout !is null) {
+ if (layout_ !is null) {
if ((wHint is DWT.DEFAULT) || (hHint is DWT.DEFAULT)) {
changed |= (state & LAYOUT_CHANGED) !is 0;
- size = layout.computeSize (this, wHint, hHint, changed);
+ size = layout_.computeSize (this, wHint, hHint, changed);
state &= ~LAYOUT_CHANGED;
} else {
size = new Point (wHint, hHint);
@@ -410,7 +410,7 @@
*/
public Layout getLayout () {
checkWidget();
- return layout;
+ return layout_;
}
/**
@@ -555,7 +555,7 @@
*/
public void layout (bool changed) {
checkWidget ();
- if (layout is null) return;
+ if (layout_ is null) return;
layout (changed, false);
}
@@ -596,7 +596,7 @@
*/
public void layout (bool changed, bool all) {
checkWidget ();
- if (layout is null && !all) return;
+ if (layout_ is null && !all) return;
markLayout (changed, all);
updateLayout (all);
}
@@ -651,9 +651,9 @@
Control child = changed [i];
Composite composite = child.parent;
while (child !is this) {
- if (composite.layout !is null) {
+ if (composite.layout_ !is null) {
composite.state |= LAYOUT_NEEDED;
- if (!composite.layout.flushCache (child)) {
+ if (!composite.layout_.flushCache (child)) {
composite.state |= LAYOUT_CHANGED;
}
}
@@ -672,7 +672,7 @@
}
void markLayout (bool changed, bool all) {
- if (layout !is null) {
+ if (layout_ !is null) {
state |= LAYOUT_NEEDED;
if (changed) state |= LAYOUT_CHANGED;
}
@@ -708,7 +708,7 @@
void releaseWidget () {
super.releaseWidget ();
- layout = null;
+ layout_ = null;
tabList = null;
}
@@ -744,7 +744,7 @@
int setBounds (int x, int y, int width, int height, bool move, bool resize) {
int result = super.setBounds (x, y, width, height, move, resize);
- if (layout !is null && (result & RESIZED) !is 0) {
+ if (layout_ !is null && (result & RESIZED) !is 0) {
markLayout (false, false);
updateLayout (false);
}
@@ -773,7 +773,7 @@
*/
public void setLayout (Layout layout) {
checkWidget();
- this.layout = layout;
+ this.layout_ = layout;
}
/**
@@ -813,7 +813,7 @@
bool setScrollBarVisible (ScrollBar bar, bool visible) {
bool changed = super.setScrollBarVisible (bar, visible);
- if (changed && layout !is null) {
+ if (changed && layout_ !is null) {
markLayout (false, false);
updateLayout (false);
}
@@ -889,7 +889,7 @@
if ((state & LAYOUT_NEEDED) !is 0) {
bool changed = (state & LAYOUT_CHANGED) !is 0;
state &= ~(LAYOUT_NEEDED | LAYOUT_CHANGED);
- layout.layout (this, changed);
+ layout_.layout (this, changed);
}
if (all) {
state &= ~LAYOUT_CHILD;
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/widgets/Decorations.d
--- a/dwt/widgets/Decorations.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/widgets/Decorations.d Tue Oct 07 12:56:18 2008 +0200
@@ -21,6 +21,7 @@
import dwt.dwthelper.utils;
import dwt.widgets.Button;
+import dwt.widgets.Canvas;
import dwt.widgets.Composite;
import dwt.widgets.Control;
import dwt.widgets.Display;
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/widgets/Display.d
--- a/dwt/widgets/Display.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/widgets/Display.d Tue Oct 07 12:56:18 2008 +0200
@@ -165,7 +165,7 @@
/* Sync/Async Widget Communication */
Synchronizer synchronizer;
Thread thread;
- bool allowTimers, runAsyncMessages;
+ bool allowTimers, runAsyncMessages_;
int lastModifiers;
@@ -1598,8 +1598,8 @@
*
* @see #create
*/
-protected void init () {
- super.init ();
+protected void init_ () {
+ super.init_ ();
initClasses ();
initApplicationDelegate();
application.finishLaunching();
@@ -2876,9 +2876,9 @@
if (getMessageCount () !is 0) return true;
NSAutoreleasePool pool = cast(NSAutoreleasePool)(new NSAutoreleasePool()).alloc().init();
try {
- allowTimers = runAsyncMessages = false;
+ allowTimers = runAsyncMessages_ = false;
NSRunLoop.currentRunLoop().runMode(OS.NSDefaultRunLoopMode, NSDate.distantFuture());
- allowTimers = runAsyncMessages = true;
+ allowTimers = runAsyncMessages_ = true;
return true;
} finally {
pool.release();
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/widgets/IME.d
--- a/dwt/widgets/IME.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/widgets/IME.d Tue Oct 07 12:56:18 2008 +0200
@@ -18,6 +18,8 @@
import dwt.graphics.TextStyle;
import dwt.dwthelper.utils;
+import dwt.widgets.Canvas;
+import dwt.widgets.Widget;
public class IME : Widget {
Canvas parent;
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/widgets/Menu.d
--- a/dwt/widgets/Menu.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/widgets/Menu.d Tue Oct 07 12:56:18 2008 +0200
@@ -33,7 +33,6 @@
import dwt.dwthelper.System;
import dwt.dwthelper.utils;
import dwt.internal.cocoa.NSInteger;
-import dwt.widgets.ImageList;
import dwt.widgets.TypedListener;
import dwt.widgets.Event;
import dwt.widgets.MenuItem;
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/widgets/ToolTip.d
--- a/dwt/widgets/ToolTip.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/widgets/ToolTip.d Tue Oct 07 12:56:18 2008 +0200
@@ -106,7 +106,7 @@
tip = new Shell (parent, DWT.ON_TOP | DWT.NO_TRIM);
Color background = display.getSystemColor (DWT.COLOR_INFO_BACKGROUND);
tip.setBackground (background);
- listener = new Listener () {
+ listener = new class Listener {
public void handleEvent (Event event) {
switch (event.type) {
case DWT.Dispose: onDispose (event); break;
@@ -179,70 +179,70 @@
spikeAbove = dest.height >= y + size.y + t;
if (dest.width >= x + size.x) {
if (dest.height >= y + size.y + t) {
- polyline = new int [] {
+ polyline = new int [] [
0, 5+t, 1, 5+t, 1, 3+t, 3, 1+t, 5, 1+t, 5, t,
16, t, 16, 0, 35, t,
w-5, t, w-5, 1+t, w-3, 1+t, w-1, 3+t, w-1, 5+t, w, 5+t,
w, h-5+t, w-1, h-5+t, w-1, h-3+t, w-2, h-3+t, w-2, h-2+t, w-3, h-2+t, w-3, h-1+t, w-5, h-1+t, w-5, h+t,
5, h+t, 5, h-1+t, 3, h-1+t, 3, h-2+t, 2, h-2+t, 2, h-3+t, 1, h-3+t, 1, h-5+t, 0, h-5+t,
- 0, 5+t};
- borderPolygon = new int[] {
+ 0, 5+t];
+ borderPolygon = new int[] [
0, 5+t, 1, 4+t, 1, 3+t, 3, 1+t, 4, 1+t, 5, t,
16, t, 16, 1, 35, t,
w-6, 0+t, w-5, 1+t, w-4, 1+t, w-2, 3+t, w-2, 4+t, w-1, 5+t,
w-1, h-6+t, w-2, h-5+t, w-2, h-4+t, w-4, h-2+t, w-5, h-2+t, w-6, h-1+t,
5, h-1+t, 4, h-2+t, 3, h-2+t, 1, h-4+t, 1, h-5+t, 0, h-6+t,
- 0, 5+t};
+ 0, 5+t];
tip.setLocation (Math.max (0, x - i), y);
} else {
- polyline = new int [] {
+ polyline = new int [] [
0, 5, 1, 5, 1, 3, 3, 1, 5, 1, 5, 0,
w-5, 0, w-5, 1, w-3, 1, w-1, 3, w-1, 5, w, 5,
w, h-5, w-1, h-5, w-1, h-3, w-2, h-3, w-2, h-2, w-3, h-2, w-3, h-1, w-5, h-1, w-5, h,
35, h, 16, h+t, 16, h,
5, h, 5, h-1, 3, h-1, 3, h-2, 2, h-2, 2, h-3, 1, h-3, 1, h-5, 0, h-5,
- 0, 5};
- borderPolygon = new int[] {
+ 0, 5];
+ borderPolygon = new int[] [
0, 5, 1, 4, 1, 3, 3, 1, 4, 1, 5, 0,
w-6, 0, w-5, 1, w-4, 1, w-2, 3, w-2, 4, w-1, 5,
w-1, h-6, w-2, h-5, w-2, h-4, w-4, h-2, w-5, h-2, w-6, h-1,
36, h-1, 16, h+t-1, 16, h-1,
5, h-1, 4, h-2, 3, h-2, 1, h-4, 1, h-5, 0, h-6,
- 0, 5};
+ 0, 5];
tip.setLocation (Math.max (0, x - i), y - size.y - t);
}
} else {
if (dest.height >= y + size.y + t) {
- polyline = new int [] {
+ polyline = new int [] [
0, 5+t, 1, 5+t, 1, 3+t, 3, 1+t, 5, 1+t, 5, t,
w-35, t, w-16, 0, w-16, t,
w-5, t, w-5, 1+t, w-3, 1+t, w-1, 3+t, w-1, 5+t, w, 5+t,
w, h-5+t, w-1, h-5+t, w-1, h-3+t, w-2, h-3+t, w-2, h-2+t, w-3, h-2+t, w-3, h-1+t, w-5, h-1+t, w-5, h+t,
5, h+t, 5, h-1+t, 3, h-1+t, 3, h-2+t, 2, h-2+t, 2, h-3+t, 1, h-3+t, 1, h-5+t, 0, h-5+t,
- 0, 5+t};
- borderPolygon = new int[] {
+ 0, 5+t];
+ borderPolygon = new int[] [
0, 5+t, 1, 4+t, 1, 3+t, 3, 1+t, 4, 1+t, 5, t,
w-35, t, w-17, 2, w-17, t,
w-6, t, w-5, 1+t, w-4, 1+t, w-2, 3+t, w-2, 4+t, w-1, 5+t,
w-1, h-6+t, w-2, h-5+t, w-2, h-4+t, w-4, h-2+t, w-5, h-2+t, w-6, h-1+t,
5, h-1+t, 4, h-2+t, 3, h-2+t, 1, h-4+t, 1, h-5+t, 0, h-6+t,
- 0, 5+t};
+ 0, 5+t];
tip.setLocation (Math.min (dest.width - size.x, x - size.x + i), y);
} else {
- polyline = new int [] {
+ polyline = new int [] [
0, 5, 1, 5, 1, 3, 3, 1, 5, 1, 5, 0,
w-5, 0, w-5, 1, w-3, 1, w-1, 3, w-1, 5, w, 5,
w, h-5, w-1, h-5, w-1, h-3, w-2, h-3, w-2, h-2, w-3, h-2, w-3, h-1, w-5, h-1, w-5, h,
w-16, h, w-16, h+t, w-35, h,
5, h, 5, h-1, 3, h-1, 3, h-2, 2, h-2, 2, h-3, 1, h-3, 1, h-5, 0, h-5,
- 0, 5};
- borderPolygon = new int[] {
+ 0, 5];
+ borderPolygon = new int[] [
0, 5, 1, 4, 1, 3, 3, 1, 4, 1, 5, 0,
w-6, 0, w-5, 1, w-4, 1, w-2, 3, w-2, 4, w-1, 5,
w-1, h-6, w-2, h-5, w-2, h-4, w-4, h-2, w-5, h-2, w-6, h-1,
w-17, h-1, w-17, h+t-2, w-36, h-1,
5, h-1, 4, h-2, 3, h-2, 1, h-4, 1, h-5, 0, h-6,
- 0, 5};
+ 0, 5];
tip.setLocation (Math.min (dest.width - size.x, x - size.x + i), y - size.y - t);
}
}
@@ -625,7 +625,7 @@
if (runnable !is null) display.timerExec (-1, runnable);
runnable = null;
if (autohide && visible) {
- runnable = new Runnable () {
+ runnable = new class Runnable {
public void run () {
if (!isDisposed ()) setVisible (false);
}
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/widgets/TrayItem.d
--- a/dwt/widgets/TrayItem.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/widgets/TrayItem.d Tue Oct 07 12:56:18 2008 +0200
@@ -10,8 +10,6 @@
*******************************************************************************/
module dwt.widgets.TrayItem;
-import dwt.dwthelper.utils;
-
import dwt.DWT;
import dwt.DWTException;
@@ -30,6 +28,13 @@
import dwt.internal.cocoa.OS;
import dwt.internal.cocoa.SWTImageView;
+import dwt.dwthelper.utils;
+
+import dwt.widgets.Item;
+import dwt.widgets.ToolTip;
+import dwt.widgets.Tray;
+import dwt.widgets.TypedListener;
+
/**
* Instances of this class represent icons that can be placed on the
* system tray or task bar status area.
@@ -164,7 +169,7 @@
item.retain();
item.setHighlightMode(true);
NSRect rect = new NSRect();
- view = cast(NSImageView)new SWTImageView().alloc();
+ view = cast(NSImageView)(new SWTImageView()).alloc();
if (view is null) error (DWT.ERROR_NO_HANDLES);
view.initWithFrame(rect);
item.setView(view);
diff -r 7d135fe0caf2 -r db5a898b2119 dwt/widgets/TypedListener.d
--- a/dwt/widgets/TypedListener.d Sun Sep 14 23:32:29 2008 +0200
+++ b/dwt/widgets/TypedListener.d Tue Oct 07 12:56:18 2008 +0200
@@ -58,6 +58,7 @@
import dwt.events.VerifyListener;
import dwt.internal.DWTEventListener;
+import dwt.widgets.Event;
import dwt.widgets.Listener;
/**