Mercurial > projects > dwt-mac
diff dwt/widgets/Control.d @ 17:5b53d338c709
Fixed some errors after latest merge
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Fri, 29 Aug 2008 22:04:22 +0200 |
parents | 2952d5604c0a a9ab4c738ed8 |
children | 453387bb0706 |
line wrap: on
line diff
--- a/dwt/widgets/Control.d Fri Aug 29 21:47:55 2008 +0200 +++ b/dwt/widgets/Control.d Fri Aug 29 22:04:22 2008 +0200 @@ -790,14 +790,14 @@ // int window = OS.GetControlOwner (handle); // CGPoint pt = new CGPoint (); // OS.HIViewConvertPoint (pt, handle, 0); -// x += (int) pt.x; -// y += (int) pt.y; -// OS.GetWindowBounds (window, (short) OS.kWindowStructureRgn, rect); +// x += cast(int) pt.x; +// y += cast(int) pt.y; +// OS.GetWindowBounds (window, cast(short) OS.kWindowStructureRgn, rect); // x += rect.left; // y += rect.top; // dwt.internal.carbon.Point pt1 = new dwt.internal.carbon.Point (); -// pt1.h = (short) x; -// pt1.v = (short) y; +// pt1.h = cast(short) x; +// pt1.v = cast(short) y; // return OS.WaitMouseMoved (pt1); return false; } @@ -2222,15 +2222,15 @@ // CGPoint pt = new CGPoint (); // OS.GetEventParameter (theEvent, OS.kEventParamWindowMouseLocation, OS.typeHIPoint, null, CGPoint.sizeof, null, pt); // OS.HIViewConvertPoint (pt, 0, handle); -// int x = (int) pt.x; -// int y = (int) pt.y; +// int x = cast(int) pt.x; +// int y = cast(int) pt.y; // display.lastX = x; // display.lastY = y; // int [] chord = new int [1]; // OS.GetEventParameter (theEvent, OS.kEventParamMouseChord, OS.typeUInt32, null, 4, null, chord); // int [] modifiers = new int [1]; // OS.GetEventParameter (theEvent, OS.kEventParamKeyModifiers, OS.typeUInt32, null, 4, null, modifiers); -// return sendMouseEvent (type, button, count, detail, send, chord [0], (short) x, (short) y, modifiers [0]); +// return sendMouseEvent (type, button, count, detail, send, chord [0], cast(short) x, cast(short) y, modifiers [0]); return false; } @@ -2334,11 +2334,11 @@ void setBackground (int control, float [] color) { // ControlFontStyleRec fontStyle = new ControlFontStyleRec (); -// OS.GetControlData (control, (short) OS.kControlEntireControl, OS.kControlFontStyleTag, ControlFontStyleRec.sizeof, fontStyle, null); +// OS.GetControlData (control, cast(short) OS.kControlEntireControl, OS.kControlFontStyleTag, ControlFontStyleRec.sizeof, fontStyle, null); // if (color !is null) { -// fontStyle.backColor_red = (short) (color [0] * 0xffff); -// fontStyle.backColor_green = (short) (color [1] * 0xffff); -// fontStyle.backColor_blue = (short) (color [2] * 0xffff); +// fontStyle.backColor_red = cast(short) (color [0] * 0xffff); +// fontStyle.backColor_green = cast(short) (color [1] * 0xffff); +// fontStyle.backColor_blue = cast(short) (color [2] * 0xffff); // fontStyle.flags |= OS.kControlUseBackColorMask; // } else { // fontStyle.flags &= ~OS.kControlUseBackColorMask; @@ -2625,11 +2625,11 @@ void setForeground (int control, float [] color) { // ControlFontStyleRec fontStyle = new ControlFontStyleRec (); -// OS.GetControlData (control, (short) OS.kControlEntireControl, OS.kControlFontStyleTag, ControlFontStyleRec.sizeof, fontStyle, null); +// OS.GetControlData (control, cast(short) OS.kControlEntireControl, OS.kControlFontStyleTag, ControlFontStyleRec.sizeof, fontStyle, null); // if (color !is null) { -// fontStyle.foreColor_red = (short) (color [0] * 0xffff); -// fontStyle.foreColor_green = (short) (color [1] * 0xffff); -// fontStyle.foreColor_blue = (short) (color [2] * 0xffff); +// fontStyle.foreColor_red = cast(short) (color [0] * 0xffff); +// fontStyle.foreColor_green = cast(short) (color [1] * 0xffff); +// fontStyle.foreColor_blue = cast(short) (color [2] * 0xffff); // fontStyle.flags |= OS.kControlUseForeColorMask; // } else { // fontStyle.flags &= ~OS.kControlUseForeColorMask;