Mercurial > projects > dwt-win
comparison dwt/widgets/IME.d @ 297:7d431a32f71e
Fix: IME ole call and string processing.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 23 Aug 2008 03:55:06 +0200 |
parents | fd9c62a2998e |
children | 8fa53b71485d |
comparison
equal
deleted
inserted
replaced
296:4289aa6cbc0c | 297:7d431a32f71e |
---|---|
191 void* pEnum; | 191 void* pEnum; |
192 /* pProvider.EnumDisplayAttributeInfo () */ | 192 /* pProvider.EnumDisplayAttributeInfo () */ |
193 hr = OS.VtblCall (3, pProvider, cast(int)&pEnum); | 193 hr = OS.VtblCall (3, pProvider, cast(int)&pEnum); |
194 if (hr is OS.S_OK) { | 194 if (hr is OS.S_OK) { |
195 void* pDispInfo; | 195 void* pDispInfo; |
196 TF_DISPLAYATTRIBUTE* tempPda; | 196 TF_DISPLAYATTRIBUTE* tempPda = new TF_DISPLAYATTRIBUTE(); |
197 /* pEnum.Next () */ | 197 /* pEnum.Next () */ |
198 while ((hr = OS.VtblCall (4, pEnum, 1, cast(int) &pDispInfo, 0 )) is OS.S_OK) { | 198 while ((hr = OS.VtblCall (4, pEnum, 1, cast(int) &pDispInfo, 0 )) is OS.S_OK) { |
199 /* pDispInfo.GetAttributeInfo(); */ | 199 /* pDispInfo.GetAttributeInfo(); */ |
200 OS.VtblCall (5, pDispInfo, cast(int)&tempPda); | 200 OS.VtblCall (5, pDispInfo, cast(int)cast(void*)tempPda); |
201 /* pDispInfo.Release () */ | 201 /* pDispInfo.Release () */ |
202 OS.VtblCall (2, pDispInfo); | 202 OS.VtblCall (2, pDispInfo); |
203 if (tempPda.bAttr is attInfo) { | 203 if (tempPda.bAttr is attInfo) { |
204 pda = tempPda; | 204 pda = tempPda; |
205 break; | 205 break; |
403 commitCount = 0; | 403 commitCount = 0; |
404 if (event.doit) { | 404 if (event.doit) { |
405 Display display = this.display; | 405 Display display = this.display; |
406 display.lastKey = 0; | 406 display.lastKey = 0; |
407 display.lastVirtual = display.lastNull = display.lastDead = false; | 407 display.lastVirtual = display.lastNull = display.lastDead = false; |
408 length_ = chars.length; | 408 length_ = chars.codePointCount; |
409 for (int i = 0; i < length_; i++) { | 409 for (int i = 0; i < length_; i++) { |
410 char c = chars.charAt (i); | 410 dchar c = chars[ i .. $ ].firstCodePoint(); |
411 display.lastAscii = c; | 411 display.lastAscii = c; |
412 event = new Event (); | 412 event = new Event (); |
413 event.character = c; | 413 event.character = c; |
414 parent.sendEvent (DWT.KeyDown, event); | 414 parent.sendEvent (DWT.KeyDown, event); |
415 } | 415 } |