Mercurial > projects > dwt-mac
diff dwt/widgets/Widget.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 | 762fbe6f17d3 e831403a80a9 |
children | 453387bb0706 |
line wrap: on
line diff
--- a/dwt/widgets/Widget.d Fri Aug 29 21:47:55 2008 +0200 +++ b/dwt/widgets/Widget.d Fri Aug 29 22:04:22 2008 +0200 @@ -1176,20 +1176,20 @@ // */ // } // if (event.keyCode is 0) { -// int kchrPtr = OS.GetScriptManagerVariable ((short) OS.smKCHRCache); +// int kchrPtr = OS.GetScriptManagerVariable (cast(short) OS.smKCHRCache); // if (display.kchrPtr !is kchrPtr) { // display.kchrPtr = kchrPtr; // display.kchrState [0] = 0; // } -// int result = OS.KeyTranslate (display.kchrPtr, (short)keyCode [0], display.kchrState); +// int result = OS.KeyTranslate (display.kchrPtr, cast(short)keyCode [0], display.kchrState); // if (result <= 0x7f) { // event.keyCode = result & 0x7f; // } else { // int [] encoding = new int [1]; -// short keyScript = (short) OS.GetScriptManagerVariable ((short) OS.smKeyScript); -// short regionCode = (short) OS.GetScriptManagerVariable ((short) OS.smRegionCode); -// if (OS.UpgradeScriptInfoToTextEncoding (keyScript, (short) OS.kTextLanguageDontCare, regionCode, null, encoding) is OS.paramErr) { -// if (OS.UpgradeScriptInfoToTextEncoding (keyScript, (short) OS.kTextLanguageDontCare, (short) OS.kTextRegionDontCare, null, encoding) is OS.paramErr) { +// short keyScript = cast(short) OS.GetScriptManagerVariable (cast(short) OS.smKeyScript); +// short regionCode = cast(short) OS.GetScriptManagerVariable (cast(short) OS.smRegionCode); +// if (OS.UpgradeScriptInfoToTextEncoding (keyScript, cast(short) OS.kTextLanguageDontCare, regionCode, null, encoding) is OS.paramErr) { +// if (OS.UpgradeScriptInfoToTextEncoding (keyScript, cast(short) OS.kTextLanguageDontCare, cast(short) OS.kTextRegionDontCare, null, encoding) is OS.paramErr) { // encoding [0] = OS.kTextEncodingMacRoman; // } // } @@ -1200,7 +1200,7 @@ // int [] nchars = new int [1]; // byte [] buffer = new byte [2]; // buffer [0] = 1; -// buffer [1] = (byte) (result & 0xFF); +// buffer [1] = cast(byte) (result & 0xFF); // OS.ConvertFromPStringToUnicode (encodingInfo [0], buffer, chars.length * 2, nchars, chars); // OS.DisposeTextToUnicodeInfo (encodingInfo); // event.keyCode = chars [0];