comparison 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
comparison
equal deleted inserted replaced
16:fb2555104d70 17:5b53d338c709
1174 // * 1174 // *
1175 // * There is no fix at this time. 1175 // * There is no fix at this time.
1176 // */ 1176 // */
1177 // } 1177 // }
1178 // if (event.keyCode is 0) { 1178 // if (event.keyCode is 0) {
1179 // int kchrPtr = OS.GetScriptManagerVariable ((short) OS.smKCHRCache); 1179 // int kchrPtr = OS.GetScriptManagerVariable (cast(short) OS.smKCHRCache);
1180 // if (display.kchrPtr !is kchrPtr) { 1180 // if (display.kchrPtr !is kchrPtr) {
1181 // display.kchrPtr = kchrPtr; 1181 // display.kchrPtr = kchrPtr;
1182 // display.kchrState [0] = 0; 1182 // display.kchrState [0] = 0;
1183 // } 1183 // }
1184 // int result = OS.KeyTranslate (display.kchrPtr, (short)keyCode [0], display.kchrState); 1184 // int result = OS.KeyTranslate (display.kchrPtr, cast(short)keyCode [0], display.kchrState);
1185 // if (result <= 0x7f) { 1185 // if (result <= 0x7f) {
1186 // event.keyCode = result & 0x7f; 1186 // event.keyCode = result & 0x7f;
1187 // } else { 1187 // } else {
1188 // int [] encoding = new int [1]; 1188 // int [] encoding = new int [1];
1189 // short keyScript = (short) OS.GetScriptManagerVariable ((short) OS.smKeyScript); 1189 // short keyScript = cast(short) OS.GetScriptManagerVariable (cast(short) OS.smKeyScript);
1190 // short regionCode = (short) OS.GetScriptManagerVariable ((short) OS.smRegionCode); 1190 // short regionCode = cast(short) OS.GetScriptManagerVariable (cast(short) OS.smRegionCode);
1191 // if (OS.UpgradeScriptInfoToTextEncoding (keyScript, (short) OS.kTextLanguageDontCare, regionCode, null, encoding) is OS.paramErr) { 1191 // if (OS.UpgradeScriptInfoToTextEncoding (keyScript, cast(short) OS.kTextLanguageDontCare, regionCode, null, encoding) is OS.paramErr) {
1192 // if (OS.UpgradeScriptInfoToTextEncoding (keyScript, (short) OS.kTextLanguageDontCare, (short) OS.kTextRegionDontCare, null, encoding) is OS.paramErr) { 1192 // if (OS.UpgradeScriptInfoToTextEncoding (keyScript, cast(short) OS.kTextLanguageDontCare, cast(short) OS.kTextRegionDontCare, null, encoding) is OS.paramErr) {
1193 // encoding [0] = OS.kTextEncodingMacRoman; 1193 // encoding [0] = OS.kTextEncodingMacRoman;
1194 // } 1194 // }
1195 // } 1195 // }
1196 // int [] encodingInfo = new int [1]; 1196 // int [] encodingInfo = new int [1];
1197 // OS.CreateTextToUnicodeInfoByEncoding (encoding [0], encodingInfo); 1197 // OS.CreateTextToUnicodeInfoByEncoding (encoding [0], encodingInfo);
1198 // if (encodingInfo [0] !is 0) { 1198 // if (encodingInfo [0] !is 0) {
1199 // char [] chars = new char [1]; 1199 // char [] chars = new char [1];
1200 // int [] nchars = new int [1]; 1200 // int [] nchars = new int [1];
1201 // byte [] buffer = new byte [2]; 1201 // byte [] buffer = new byte [2];
1202 // buffer [0] = 1; 1202 // buffer [0] = 1;
1203 // buffer [1] = (byte) (result & 0xFF); 1203 // buffer [1] = cast(byte) (result & 0xFF);
1204 // OS.ConvertFromPStringToUnicode (encodingInfo [0], buffer, chars.length * 2, nchars, chars); 1204 // OS.ConvertFromPStringToUnicode (encodingInfo [0], buffer, chars.length * 2, nchars, chars);
1205 // OS.DisposeTextToUnicodeInfo (encodingInfo); 1205 // OS.DisposeTextToUnicodeInfo (encodingInfo);
1206 // event.keyCode = chars [0]; 1206 // event.keyCode = chars [0];
1207 // } 1207 // }
1208 // } 1208 // }