imm32: All HIMCC in the InputContext should be initialized at creation.
This commit is contained in:
parent
352c98d7d5
commit
3dde049f31
|
@ -496,6 +496,8 @@ BOOL WINAPI ImmConfigureIMEW(
|
|||
HIMC WINAPI ImmCreateContext(void)
|
||||
{
|
||||
InputContextData *new_context;
|
||||
LPGUIDELINE gl;
|
||||
LPCANDIDATEINFO ci;
|
||||
|
||||
new_context = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(InputContextData));
|
||||
|
||||
|
@ -509,9 +511,19 @@ HIMC WINAPI ImmCreateContext(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* hCompStr is never NULL */
|
||||
/* the HIMCCs are never NULL */
|
||||
new_context->IMC.hCompStr = ImmCreateBlankCompStr();
|
||||
new_context->IMC.hMsgBuf = ImmCreateIMCC(1);
|
||||
new_context->IMC.hMsgBuf = ImmCreateIMCC(0);
|
||||
new_context->IMC.hCandInfo = ImmCreateIMCC(sizeof(CANDIDATEINFO));
|
||||
ci = ImmLockIMCC(new_context->IMC.hCandInfo);
|
||||
memset(ci,0,sizeof(CANDIDATEINFO));
|
||||
ci->dwSize = sizeof(CANDIDATEINFO);
|
||||
ImmUnlockIMCC(new_context->IMC.hCandInfo);
|
||||
new_context->IMC.hGuideLine = ImmCreateIMCC(sizeof(GUIDELINE));
|
||||
gl = ImmLockIMCC(new_context->IMC.hGuideLine);
|
||||
memset(gl,0,sizeof(GUIDELINE));
|
||||
gl->dwSize = sizeof(GUIDELINE);
|
||||
ImmUnlockIMCC(new_context->IMC.hGuideLine);
|
||||
|
||||
/* Initialize the IME Private */
|
||||
new_context->IMC.hPrivate = ImmCreateIMCC(new_context->immKbd->imeInfo.dwPrivateDataSize);
|
||||
|
|
|
@ -84,6 +84,24 @@ typedef struct tagCOMPOSITIONSTRING {
|
|||
DWORD dwPrivateOffset;
|
||||
} COMPOSITIONSTRING, *LPCOMPOSITIONSTRING;
|
||||
|
||||
typedef struct tagGUIDELINE {
|
||||
DWORD dwSize;
|
||||
DWORD dwLevel;
|
||||
DWORD dwIndex;
|
||||
DWORD dwStrLen;
|
||||
DWORD dwStrOffset;
|
||||
DWORD dwPrivateSize;
|
||||
DWORD dwPrivateOffset;
|
||||
} GUIDELINE, *LPGUIDELINE;
|
||||
|
||||
typedef struct tagCANDIDATEINFO {
|
||||
DWORD dwSize;
|
||||
DWORD dwCount;
|
||||
DWORD dwOffset[32];
|
||||
DWORD dwPrivateSize;
|
||||
DWORD dwPrivateOffset;
|
||||
} CANDIDATEINFO, *LPCANDIDATEINFO;
|
||||
|
||||
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC);
|
||||
BOOL WINAPI ImmUnlockIMC(HIMC);
|
||||
DWORD WINAPI ImmGetIMCLockCount(HIMC);
|
||||
|
|
Loading…
Reference in New Issue