Mercurial > projects > dwt-mac
changeset 10:30a762abda2a
Revert automatic changes from dwt/internal and dwt/dwthelper. Excluded dwt/internal/image and theme.
line wrap: on
line diff
--- a/dwt/dwthelper/Runnable.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/dwthelper/Runnable.d Thu Aug 28 12:31:10 2008 +0200 @@ -15,8 +15,8 @@ class _DgRunnableT(Dg,T...) : Runnable { - alias ParameterTupleOf!cast(Dg) DgArgs; - static assert( is(DgArgs == Tuple!cast(T)), + alias ParameterTupleOf!(Dg) DgArgs; + static assert( is(DgArgs == Tuple!(T)), "Delegate args not correct" ); Dg dg; @@ -36,4 +36,4 @@ _DgRunnableT!(Dg,T) dgRunnable(Dg,T...)( Dg dg, T args ){ return new _DgRunnableT!(Dg,T)(dg,args); -} +} \ No newline at end of file
--- a/dwt/dwthelper/System.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/dwthelper/System.d Thu Aug 28 12:31:10 2008 +0200 @@ -90,19 +90,19 @@ class System { - alias SimpleType!cast(int).arraycopy arraycopy; - alias SimpleType!cast(byte).arraycopy arraycopy; - alias SimpleType!cast(double).arraycopy arraycopy; - alias SimpleType!cast(float).arraycopy arraycopy; - alias SimpleType!cast(short).arraycopy arraycopy; - alias SimpleType!cast(long).arraycopy arraycopy; + alias SimpleType!(int).arraycopy arraycopy; + alias SimpleType!(byte).arraycopy arraycopy; + alias SimpleType!(double).arraycopy arraycopy; + alias SimpleType!(float).arraycopy arraycopy; + alias SimpleType!(short).arraycopy arraycopy; + alias SimpleType!(long).arraycopy arraycopy; alias SimpleType!(uint).arraycopy arraycopy; alias SimpleType!(ushort).arraycopy arraycopy; alias SimpleType!(ubyte).arraycopy arraycopy; alias SimpleType!(ulong).arraycopy arraycopy; - alias SimpleType!cast(wchar).arraycopy arraycopy; + alias SimpleType!(char).arraycopy arraycopy; alias SimpleType!(wchar).arraycopy arraycopy; - alias SimpleType!cast(Object).arraycopy arraycopy; + alias SimpleType!(Object).arraycopy arraycopy; alias SimpleType!(void*).arraycopy arraycopy; alias SimpleType!(int[]).arraycopy arraycopy;
--- a/dwt/dwthelper/WeakRef.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/dwthelper/WeakRef.d Thu Aug 28 12:31:10 2008 +0200 @@ -20,7 +20,7 @@ class Something {} auto a = new Something(); - auto wa = new WeakRef!cast(Something)(a); + auto wa = new WeakRef!(Something)(a); std.gc.fullCollect(); // Reference 'a' prevents collection so wa.ptr is non-null @@ -36,7 +36,7 @@ * Author: William V. Baxter III * Contributors: * Date: 21 Jan 2008 - * Copyright: cast(C) 2008 William Baxter + * Copyright: (C) 2008 William Baxter * License: Public Domain where allowed by law, ZLIB/PNG otherwise. */ //=========================================================================== @@ -45,8 +45,8 @@ private { alias void delegate(Object) DisposeEvt; - extern cast(C) void rt_attachDisposeEvent( Object obj, DisposeEvt evt ); - extern cast(C) void rt_detachDisposeEvent( Object obj, DisposeEvt evt ); + extern (C) void rt_attachDisposeEvent( Object obj, DisposeEvt evt ); + extern (C) void rt_detachDisposeEvent( Object obj, DisposeEvt evt ); } class WeakRef(T : Object) { @@ -77,7 +77,7 @@ return new WeakRef(ptr()); } int opEquals( Object o ){ - if( auto other = cast( WeakRef!cast(T) )o ){ + if( auto other = cast( WeakRef!(T) )o ){ return other.cast_ptr_ is cast_ptr_; } return false;
--- a/dwt/dwthelper/utils.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/dwthelper/utils.d Thu Aug 28 12:31:10 2008 +0200 @@ -25,7 +25,7 @@ alias bool boolean; alias char[] String; alias char[] string; -alias tango.text.Text.Text!cast(wchar) StringBuffer; +alias tango.text.Text.Text!(char) StringBuffer; alias opEquals equals; alias PlatformException Error; @@ -59,7 +59,7 @@ return value == other; } public int opEquals( Object other ){ - if( auto o = cast(ValueWrapperT!cast(T))other ){ + if( auto o = cast(ValueWrapperT!(T))other ){ return value == o.value; } return false; @@ -105,7 +105,7 @@ alias Boolean ValueWrapperBool; -class Byte : ValueWrapperT!cast(byte) { +class Byte : ValueWrapperT!(byte) { public static byte parseByte( String s ){ try{ int res = tango.text.convert.Integer.parse( s ); @@ -125,7 +125,7 @@ alias Byte ValueWrapperByte; -class Integer : ValueWrapperT!cast(int) { +class Integer : ValueWrapperT!(int) { public static const int MIN_VALUE = 0x80000000; public static const int MAX_VALUE = 0x7fffffff; @@ -236,7 +236,7 @@ } alias Integer ValueWrapperInt; -class Double : ValueWrapperT!cast(double) { +class Double : ValueWrapperT!(double) { this( double value ){ super(value); } @@ -253,7 +253,7 @@ } } -class Float : ValueWrapperT!cast(float) { +class Float : ValueWrapperT!(float) { public static float POSITIVE_INFINITY = (1.0f / 0.0f); public static float NEGATIVE_INFINITY = ((-1.0f) / 0.0f); @@ -286,7 +286,7 @@ } } -class Long : ValueWrapperT!cast(long) { +class Long : ValueWrapperT!(long) { this( long value ){ super(value); } @@ -309,13 +309,13 @@ alias Long ValueWrapperLong; -// alias ValueWrapperT!cast(int) ValueWrapperInt; +// alias ValueWrapperT!(int) ValueWrapperInt; -alias ArrayWrapperT!cast(byte) ArrayWrapperByte; -alias ArrayWrapperT!cast(int) ArrayWrapperInt; -alias ArrayWrapperT!cast(Object) ArrayWrapperObject; -alias ArrayWrapperT!cast(wchar) ArrayWrapperString; -alias ArrayWrapperT!cast(String) ArrayWrapperString2; +alias ArrayWrapperT!(byte) ArrayWrapperByte; +alias ArrayWrapperT!(int) ArrayWrapperInt; +alias ArrayWrapperT!(Object) ArrayWrapperObject; +alias ArrayWrapperT!(char) ArrayWrapperString; +alias ArrayWrapperT!(String) ArrayWrapperString2; Object[] StringArrayToObjectArray( String[] strs ){ Object[] res = new Object[strs.length]; @@ -786,9 +786,9 @@ } void ExceptionPrintStackTrace( Exception e ){ - this( e, Stderr ); + ExceptionPrintStackTrace( e, Stderr ); } -void ExceptionPrintStackTrace( Exception e, Print!cast(wchar) print ){ +void ExceptionPrintStackTrace( Exception e, Print!(char) print ){ Exception exception = e; while( exception !is null ){ print.formatln( "Exception in {}({}): {}", exception.file, exception.line, exception.msg ); @@ -914,7 +914,7 @@ } } -int SeqIndexOf(T)( tango.util.collection.model.Seq.Seq!cast(T) s, T src ){ +int SeqIndexOf(T)( tango.util.collection.model.Seq.Seq!(T) s, T src ){ int idx; foreach( e; s ){ if( e == src ){ @@ -937,7 +937,7 @@ return res; } -int seqIndexOf( tango.util.collection.model.Seq.Seq!cast(Object) seq, Object v ){ +int seqIndexOf( tango.util.collection.model.Seq.Seq!(Object) seq, Object v ){ int res = -1; int idx = 0; foreach( p; seq ){
--- a/dwt/internal/Library.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/Library.d Thu Aug 28 12:31:10 2008 +0200 @@ -73,7 +73,7 @@ try { if (start < length) - major = to!cast(int)(aVersion[start .. index]); + major = to!(int)(aVersion[start .. index]); } catch (ConversionException e) { @@ -84,7 +84,7 @@ try { if (start < length) - minor = to!cast(int)(aVersion[start .. index]); + minor = to!(int)(aVersion[start .. index]); } catch (ConversionException e) { @@ -95,7 +95,7 @@ try { if (start < length) - micro = to!cast(int)(aVersion[start .. index]); + micro = to!(int)(aVersion[start .. index]); } catch (ConversionException e) { @@ -166,7 +166,7 @@ static bool load (String libName) { try { - if (libName.indexOf cast(SEPARATOR) !is -1) { + if (libName.indexOf (SEPARATOR) !is -1) { System.load (libName); } else { System.loadLibrary (libName);
--- a/dwt/internal/c/callback.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/c/callback.d Thu Aug 28 12:31:10 2008 +0200 @@ -21,13 +21,13 @@ /* Header */ -version cast(Win32) +version (Win32) { import tango.sys.win32.UserGdi; import tango.sys.win32.Types; } -else version cast(Win32_WCE) +else version (Win32_WCE) { import tango.sys.win32.UserGdi; import tango.sys.win32.Types; @@ -53,7 +53,7 @@ bool USE_ASSEMBLER = false; -version cast(X86) +version (X86) bool USE_ASSEMBLER = true; private @@ -68,8 +68,8 @@ static if (USE_ASSEMBLER) { - version cast(Win32){} - else version cast(Win32_WCE){} + version (Win32){} + else version (Win32_WCE){} else import tango.stdc.posix.sys.mman; @@ -147,14 +147,14 @@ if (callbackCode == null) { - version cast(Win32) + version (Win32) { callbackCode = VirtualAlloc(null, CALLBACK_THUNK_SIZE * MAX_CALLBACKS, MEM_COMMIT, PAGE_EXECUTE_READWRITE); if (callbackCode == null) return 0; } - else version cast(Win32_WCE) + else version (Win32_WCE) { callbackCode = VirtualAlloc(null, CALLBACK_THUNK_SIZE * MAX_CALLBACKS, MEM_COMMIT, PAGE_EXECUTE_READWRITE); if (callbackCode == null) @@ -237,7 +237,7 @@ //POP EBP - 1 byte code[j++] = 0x5d; - version cast(Win32) + version (Win32) { // RETN argCount * SWT_PTR.sizeof - 3 bytes code[j++] = 0xc2; @@ -245,7 +245,7 @@ code[j++] = 0x00; } - else version cast(Win32_WCE) + else version (Win32_WCE) { // RETN argCount * SWT_PTR.sizeof - 3 bytes code[j++] = 0xc2;
--- a/dwt/internal/c/qd/bindings.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/c/qd/bindings.d Thu Aug 28 12:31:10 2008 +0200 @@ -12,10 +12,10 @@ import dwt.internal.objc.runtime; -alias extern cast(C) OSStatus* delegate (UInt16 message, RgnHandle rgn, /*const*/Rect* rect, void* refCon) RegionToRectsProcPtr; +alias extern (C) OSStatus* delegate (UInt16 message, RgnHandle rgn, /*const*/Rect* rect, void* refCon) RegionToRectsProcPtr; alias RegionToRectsProcPtr RegionToRectsUPP; -extern cast(C): +extern (C): RgnHandle NewRgn (); void RectRgn (RgnHandle rgn, /*const*/Rect* r); @@ -34,4 +34,4 @@ Boolean RectInRgn (/*const*/Rect* r, RgnHandle rgn); OSStatus QDRegionToRects (RgnHandle rgn, QDRegionParseDirection dir, RegionToRectsUPP proc, void* userData); void CopyRgn (RgnHandle srcRgn, RgnHandle dstRgn); -void SetRect (Rect* r, short left, short top, short right, short bottom); +void SetRect (Rect* r, short left, short top, short right, short bottom); \ No newline at end of file
--- a/dwt/internal/cocoa/CGBase.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/cocoa/CGBase.d Thu Aug 28 12:31:10 2008 +0200 @@ -7,17 +7,17 @@ */ module dwt.internal.cocoa.CGBase; -version cast(X86_64) +version (X86_64) alias double CGFloat; -else version cast(PPC64) +else version (PPC64) alias double CGFloat; -else version cast(X86) +else version (X86) alias float CGFloat; -else version cast(PPC) +else version (PPC) alias float CGFloat; else - pragma(msg, "CGFloat is Unimplemented"); + pragma(msg, "CGFloat is Unimplemented"); \ No newline at end of file
--- a/dwt/internal/cocoa/CGFloat.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/cocoa/CGFloat.d Thu Aug 28 12:31:10 2008 +0200 @@ -7,17 +7,17 @@ */ module dwt.internal.cocoa.CGFloat; -version cast(X86_64) +version (X86_64) alias double CGFloat; -else version cast(PPC64) +else version (PPC64) alias double CGFloat; -else version cast(X86) +else version (X86) alias float CGFloat; -else version cast(PPC) +else version (PPC) alias float CGFloat; else - pragma(msg, "CGFloat is unimplemented"); + pragma(msg, "CGFloat is unimplemented"); \ No newline at end of file
--- a/dwt/internal/cocoa/MacGenerator.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/cocoa/MacGenerator.d Thu Aug 28 12:31:10 2008 +0200 @@ -55,7 +55,7 @@ { foreach (str ; xml) { - Document document = new Document!cast(wchar); + Document document = new Document!(char); document.parse(str); foreach (node ; document.root.children) @@ -85,7 +85,7 @@ { foreach (str ; xml) { - Document document = new Document!cast(wchar); + Document document = new Document!(char); document.parse(str); foreach (node ; document.root.children) @@ -115,7 +115,7 @@ { foreach (str ; xml) { - Document document = new Document!cast(wchar); + Document document = new Document!(char); document.parse(str); foreach (node ; document.root.children) @@ -326,7 +326,7 @@ } else if (returnNode !is null && isFloatingPoint(returnNode)) { String type = getJavaType(returnNode); out("\treturn "); - if (type.opEquals("float")) out("cast(float)"); + if (type.opEquals("float")) out("(float)"); out("OS.objc_msgSend_fpret("); } else if (returnNode !is null && isObject(returnNode)) { out("\tint result = OS.objc_msgSend("); @@ -435,7 +435,7 @@ } } for (Iterator iterator = set.iterator(); iterator.hasNext();) { - String sel = cast(String) iterator.next(); + String sel = (String) iterator.next(); String selConst = getSelConst(sel); out("public static final int "); out(selConst); @@ -574,17 +574,17 @@ out("_1=cast=(id)"); outln(); out(key); - out("_2=cast=cast(SEL)"); + out("_2=cast=(SEL)"); outln(); } else { out(key); out("_0=cast=(id)"); outln(); out(key); - out("_1=cast=cast(SEL)"); + out("_1=cast=(SEL)"); outln(); } - Node method = cast(Node)set.get(key); + Node method = (Node)set.get(key); NodeList params = method.getChildNodes(); for (int k = 0; k < params.getLength(); k++) { Node param = params.item(k); @@ -628,7 +628,7 @@ } } for (Iterator iterator = set.iterator(); iterator.hasNext();) { - String cls = cast(String) iterator.next(); + String cls = (String) iterator.next(); String clsConst = "class_" + cls; out("public static final int "); out(clsConst);
--- a/dwt/internal/cocoa/NSInteger.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/cocoa/NSInteger.d Thu Aug 28 12:31:10 2008 +0200 @@ -7,26 +7,26 @@ */ module dwt.internal.cocoa.NSInteger; -version cast(X86_64) { +version (X86_64) { alias ulong NSUInteger; alias long NSInteger; } -else version cast(PPC64) { +else version (PPC64) { alias ulong NSUInteger; alias long NSInteger; } -else version cast(X86) { +else version (X86) { alias uint NSUInteger; alias int NSInteger; } -else version cast(PPC) { +else version (PPC) { alias uint NSUInteger; alias int NSInteger; } else { pragma(error, "Unsupported architecture"); -} +} \ No newline at end of file
--- a/dwt/internal/cocoa/OS.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/cocoa/OS.d Thu Aug 28 12:31:10 2008 +0200 @@ -137,7 +137,7 @@ alias dwt.internal.objc.runtime.objc_msgSend_stret objc_msgSend_stret; alias dwt.internal.objc.runtime.objc_msgSendSuper objc_msgSendSuper; - version cast(X86) + version (X86) alias dwt.internal.objc.runtime.objc_msgSend_fpret objc_msgSend_fpret; /** Classes */
--- a/dwt/internal/cocoa/WebDataSource.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/cocoa/WebDataSource.d Thu Aug 28 12:31:10 2008 +0200 @@ -12,11 +12,11 @@ public class WebDataSource : NSObject { -public this() { +public WebDataSource() { super(); } -public this(int id) { +public WebDataSource(int id) { super(id); }
--- a/dwt/internal/cocoa/WebDocumentRepresentation.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/cocoa/WebDocumentRepresentation.d Thu Aug 28 12:31:10 2008 +0200 @@ -12,7 +12,7 @@ public class WebDocumentRepresentation : NSObject { -public this(int id) { +public WebDocumentRepresentation(int id) { super(id); }
--- a/dwt/internal/cocoa/WebFrame.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/cocoa/WebFrame.d Thu Aug 28 12:31:10 2008 +0200 @@ -12,11 +12,11 @@ public class WebFrame : NSObject { -public this() { +public WebFrame() { super(); } -public this(int id) { +public WebFrame(int id) { super(id); }
--- a/dwt/internal/cocoa/WebFrameView.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/cocoa/WebFrameView.d Thu Aug 28 12:31:10 2008 +0200 @@ -2,11 +2,11 @@ public class WebFrameView : NSObject { -public this() { +public WebFrameView() { super(); } -public this(int id) { +public WebFrameView(int id) { super(id); }
--- a/dwt/internal/cocoa/WebOpenPanelResultListener.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/cocoa/WebOpenPanelResultListener.d Thu Aug 28 12:31:10 2008 +0200 @@ -12,7 +12,7 @@ public class WebOpenPanelResultListener : NSObject { -public this(int id) { +public WebOpenPanelResultListener(int id) { super(id); }
--- a/dwt/internal/cocoa/WebPolicyDecisionListener.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/cocoa/WebPolicyDecisionListener.d Thu Aug 28 12:31:10 2008 +0200 @@ -12,7 +12,7 @@ public class WebPolicyDecisionListener : NSObject { -public this(int id) { +public WebPolicyDecisionListener(int id) { super(id); }
--- a/dwt/internal/cocoa/WebPreferences.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/cocoa/WebPreferences.d Thu Aug 28 12:31:10 2008 +0200 @@ -12,11 +12,11 @@ public class WebPreferences : NSObject { -public this() { +public WebPreferences() { super(); } -public this(int id) { +public WebPreferences(int id) { super(id); }
--- a/dwt/internal/cocoa/WebView.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/cocoa/WebView.d Thu Aug 28 12:31:10 2008 +0200 @@ -12,11 +12,11 @@ public class WebView : NSView { -public this() { +public WebView() { super(); } -public this(int id) { +public WebView(int id) { super(id); } @@ -554,7 +554,7 @@ } public float textSizeMultiplier() { - return cast(float)OS.objc_msgSend_fpret(this.id, OS.sel_textSizeMultiplier); + return (float)OS.objc_msgSend_fpret(this.id, OS.sel_textSizeMultiplier); } public void toggleContinuousSpellChecking(id sender) {
--- a/dwt/internal/objc/appkit/NSAttributedString.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/objc/appkit/NSAttributedString.d Thu Aug 28 12:31:10 2008 +0200 @@ -11,7 +11,7 @@ template NSAttributedString () { - extern cast(C): + extern (C): id* NSBackgroundColorAttributeName; id* NSBaselineOffsetAttributeName;
--- a/dwt/internal/objc/appkit/bindings.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/objc/appkit/bindings.d Thu Aug 28 12:31:10 2008 +0200 @@ -7,7 +7,7 @@ */ module dwt.internal.objc.appkit.bindings; -extern cast(C): +extern (C): /*void *NSDeviceRGBColorSpace(); void *NSAccessibilityPositionAttribute ();
--- a/dwt/internal/objc/bindings.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/objc/bindings.d Thu Aug 28 12:31:10 2008 +0200 @@ -10,7 +10,7 @@ import dwt.internal.c.qd.QuickdrawTypes : BOOL; import dwt.internal.objc.runtime; -extern cast(C): +extern (C): BOOL class_addIvar (Class cls, /*const*/char* name, size_t size, byte alignment, /*const*/char* types); BOOL class_addMethod (Class cls, SEL name, IMP imp, /*const*/char* types); @@ -26,7 +26,7 @@ void objc_msgSend_stret(void* stretAddr, id theReceiver, SEL theSelector, ...); id objc_msgSendSuper (objc_super* superr, SEL op, ...); -version cast(X86) +version (X86) double objc_msgSend_fpret(id self, SEL op, ...); version (build)
--- a/dwt/internal/objc/foundation/bindings.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/objc/foundation/bindings.d Thu Aug 28 12:31:10 2008 +0200 @@ -7,7 +7,7 @@ */ module dwt.internal.objc.foundation.bindings; -extern cast(C): +extern (C): //void* NSDefaultRunLoopMode (); void* NSFileTypeForHFSTypeCode (int hfsFileTypeCode);
--- a/dwt/internal/objc/runtime.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/internal/objc/runtime.d Thu Aug 28 12:31:10 2008 +0200 @@ -25,7 +25,7 @@ alias objc_class* Class; alias objc_object* id; -alias extern cast(C) id function(id, SEL, ...) IMP; +alias extern (C) id function(id, SEL, ...) IMP; struct objc_object { @@ -58,7 +58,7 @@ char* ivar_type; int ivar_offset; - version cast(X86_64) + version (X86_64) int space; } @@ -66,7 +66,7 @@ { int ivar_count; - version cast(X86_64) + version (X86_64) int space; /* variable length structure */ @@ -86,7 +86,7 @@ int method_count; - version cast(X86_64) + version (X86_64) int space; /* variable length structure */ @@ -178,10 +178,10 @@ return dwt.internal.objc.bindings.objc_msgSendSuper(superr, op.ptr, args); } -version cast(X86) +version (X86) { double objc_msgSend_fpret(ARGS...)(id self, string op, ARGS args) { return dwt.internal.objc.bindings.objc_msgSend_fpret(self, op.ptr, args); } -} +} \ No newline at end of file