Author: jimtabor
Date: Thu Dec 15 00:40:35 2011
New Revision: 54654
URL:
http://svn.reactos.org/svn/reactos?rev=54654&view=rev
Log:
- Sync wine Imm32.
Modified:
trunk/reactos/dll/win32/imm32/imm.c
trunk/reactos/dll/win32/imm32/imm32.spec
trunk/reactos/include/psdk/imm.h
Modified: trunk/reactos/dll/win32/imm32/imm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/imm32/imm.c?rev=…
==============================================================================
--- trunk/reactos/dll/win32/imm32/imm.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/imm32/imm.c [iso-8859-1] Thu Dec 15 00:40:35 2011
@@ -1154,7 +1154,7 @@
return rc;
}
-static INT CopyCompClauseIMEtoClient(InputContextData *data, LPBYTE source, INT slen,
LPBYTE ssource, INT sslen,
+static INT CopyCompClauseIMEtoClient(InputContextData *data, LPBYTE source, INT slen,
LPBYTE ssource,
LPBYTE target, INT tlen, BOOL unicode )
{
INT rc;
@@ -1265,13 +1265,13 @@
case GCS_COMPCLAUSE:
TRACE("GCS_COMPCLAUSE\n");
rc = CopyCompClauseIMEtoClient(data, compdata +
compstr->dwCompClauseOffset,compstr->dwCompClauseLen,
- compdata + compstr->dwCompStrOffset,
compstr->dwCompStrLen,
+ compdata + compstr->dwCompStrOffset,
lpBuf, dwBufLen, unicode);
break;
case GCS_RESULTCLAUSE:
TRACE("GCS_RESULTCLAUSE\n");
rc = CopyCompClauseIMEtoClient(data, compdata +
compstr->dwResultClauseOffset,compstr->dwResultClauseLen,
- compdata + compstr->dwResultStrOffset,
compstr->dwResultStrLen,
+ compdata + compstr->dwResultStrOffset,
lpBuf, dwBufLen, unicode);
break;
case GCS_RESULTREADSTR:
@@ -1281,7 +1281,7 @@
case GCS_RESULTREADCLAUSE:
TRACE("GCS_RESULTREADCLAUSE\n");
rc = CopyCompClauseIMEtoClient(data, compdata +
compstr->dwResultReadClauseOffset,compstr->dwResultReadClauseLen,
- compdata + compstr->dwResultStrOffset,
compstr->dwResultStrLen,
+ compdata + compstr->dwResultStrOffset,
lpBuf, dwBufLen, unicode);
break;
case GCS_COMPREADSTR:
@@ -1297,7 +1297,7 @@
case GCS_COMPREADCLAUSE:
TRACE("GCS_COMPREADCLAUSE\n");
rc = CopyCompClauseIMEtoClient(data, compdata +
compstr->dwCompReadClauseOffset,compstr->dwCompReadClauseLen,
- compdata + compstr->dwCompStrOffset,
compstr->dwCompStrLen,
+ compdata + compstr->dwCompStrOffset,
lpBuf, dwBufLen, unicode);
break;
case GCS_CURSORPOS:
@@ -1360,9 +1360,15 @@
*/
HIMC WINAPI ImmGetContext(HWND hWnd)
{
- HIMC rc = NULL;
+ HIMC rc;
TRACE("%p\n", hWnd);
+
+ if (!IsWindow(hWnd))
+ {
+ SetLastError(ERROR_INVALID_WINDOW_HANDLE);
+ return NULL;
+ }
if (!IMM_GetThreadData()->defaultContext)
IMM_GetThreadData()->defaultContext = ImmCreateContext();
@@ -1769,6 +1775,7 @@
if ( data )
return data->lastVK;
+ version.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
GetVersionExA( &version );
switch(version.dwPlatformId)
{
@@ -1884,21 +1891,20 @@
TRACE("(%p, %x, %ld, %ld)\n", hWndIME, msg, wParam, lParam);
if ((msg >= WM_IME_STARTCOMPOSITION && msg <= WM_IME_KEYLAST) ||
- (msg >= WM_IME_SETCONTEXT && msg <= WM_IME_KEYUP) ||
- (msg == WM_MSIME_SERVICE) ||
- (msg == WM_MSIME_RECONVERTOPTIONS) ||
- (msg == WM_MSIME_MOUSE) ||
- (msg == WM_MSIME_RECONVERTREQUEST) ||
- (msg == WM_MSIME_RECONVERT) ||
- (msg == WM_MSIME_QUERYPOSITION) ||
- (msg == WM_MSIME_DOCUMENTFEED))
-
- {
- if (!IMM_GetThreadData()->hwndDefault)
- ImmGetDefaultIMEWnd(NULL);
-
- if (hWndIME == NULL)
- PostMessageA(IMM_GetThreadData()->hwndDefault, msg, wParam, lParam);
+ (msg == WM_IME_SETCONTEXT) ||
+ (msg == WM_IME_NOTIFY) ||
+ (msg == WM_IME_COMPOSITIONFULL) ||
+ (msg == WM_IME_SELECT) ||
+ (msg == 0x287 /* FIXME: WM_IME_SYSTEM */) ||
+ (msg == WM_MSIME_RECONVERTOPTIONS) ||
+ (msg == WM_MSIME_MOUSE) ||
+ (msg == WM_MSIME_RECONVERTREQUEST) ||
+ (msg == WM_MSIME_RECONVERT) ||
+ (msg == WM_MSIME_QUERYPOSITION) ||
+ (msg == WM_MSIME_DOCUMENTFEED))
+ {
+ if (hWndIME)
+ SendMessageA(hWndIME, msg, wParam, lParam);
rc = TRUE;
}
@@ -1912,17 +1918,26 @@
HWND hWndIME, UINT msg, WPARAM wParam, LPARAM lParam)
{
BOOL rc = FALSE;
- TRACE("(%p, %d, %ld, %ld):\n", hWndIME, msg, wParam, lParam);
+
+ TRACE("(%p, %x, %ld, %ld)\n", hWndIME, msg, wParam, lParam);
if ((msg >= WM_IME_STARTCOMPOSITION && msg <= WM_IME_KEYLAST) ||
- (msg >= WM_IME_SETCONTEXT && msg <= WM_IME_KEYUP) ||
- (msg == WM_MSIME_SERVICE) ||
- (msg == WM_MSIME_RECONVERTOPTIONS) ||
- (msg == WM_MSIME_MOUSE) ||
- (msg == WM_MSIME_RECONVERTREQUEST) ||
- (msg == WM_MSIME_RECONVERT) ||
- (msg == WM_MSIME_QUERYPOSITION) ||
- (msg == WM_MSIME_DOCUMENTFEED))
+ (msg == WM_IME_SETCONTEXT) ||
+ (msg == WM_IME_NOTIFY) ||
+ (msg == WM_IME_COMPOSITIONFULL) ||
+ (msg == WM_IME_SELECT) ||
+ (msg == 0x287 /* FIXME: WM_IME_SYSTEM */) ||
+ (msg == WM_MSIME_RECONVERTOPTIONS) ||
+ (msg == WM_MSIME_MOUSE) ||
+ (msg == WM_MSIME_RECONVERTREQUEST) ||
+ (msg == WM_MSIME_RECONVERT) ||
+ (msg == WM_MSIME_QUERYPOSITION) ||
+ (msg == WM_MSIME_DOCUMENTFEED))
+ {
+ if (hWndIME)
+ SendMessageW(hWndIME, msg, wParam, lParam);
+
rc = TRUE;
+ }
return rc;
}
@@ -2820,3 +2835,13 @@
FIXME("Stub\n");
return FALSE;
}
+
+/***********************************************************************
+ * ImmEnumInputContext(IMM32.@)
+ */
+
+BOOL WINAPI ImmEnumInputContext(DWORD idThread, IMCENUMPROC lpfn, LPARAM lParam)
+{
+ FIXME("Stub\n");
+ return FALSE;
+}
Modified: trunk/reactos/dll/win32/imm32/imm32.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/imm32/imm32.spec…
==============================================================================
--- trunk/reactos/dll/win32/imm32/imm32.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/imm32/imm32.spec [iso-8859-1] Thu Dec 15 00:40:35 2011
@@ -12,7 +12,7 @@
@ stdcall ImmDisableIME(long)
@ stdcall ImmDisableIme(long) ImmDisableIME
@ stdcall ImmDisableTextFrameService(long)
-@ stub ImmEnumInputContext
+@ stdcall ImmEnumInputContext(long ptr long)
@ stdcall ImmEnumRegisterWordA(long ptr str long str ptr)
@ stdcall ImmEnumRegisterWordW(long ptr wstr long wstr ptr)
@ stdcall ImmEscapeA(long long long ptr)
Modified: trunk/reactos/include/psdk/imm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/imm.h?rev=546…
==============================================================================
--- trunk/reactos/include/psdk/imm.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/imm.h [iso-8859-1] Thu Dec 15 00:40:35 2011
@@ -118,6 +118,16 @@
DECL_WINELIB_TYPE_AW(IMEMENUITEMINFO)
DECL_WINELIB_TYPE_AW(LPIMEMENUITEMINFO)
+
+typedef struct tagIMECHARPOSITION {
+ DWORD dwSize;
+ DWORD dwCharPos;
+ POINT pt;
+ UINT cLineHeight;
+ RECT rcDocument;
+} IMECHARPOSITION, *PIMECHARPOSITION, *NPIMECHARPOSITION, *LPIMECHARPOSITION;
+
+typedef BOOL (CALLBACK* IMCENUMPROC)(HIMC, LPARAM);
typedef struct _tagCOMPOSITIONFORM
{
@@ -600,6 +610,7 @@
HIMC WINAPI ImmCreateContext(void);
BOOL WINAPI ImmDestroyContext(HIMC hIMC);
BOOL WINAPI ImmDisableIME(DWORD idThread);
+BOOL WINAPI ImmEnumInputContext(DWORD, IMCENUMPROC, LPARAM);
UINT WINAPI ImmEnumRegisterWordA(HKL, REGISTERWORDENUMPROCA, LPCSTR, DWORD, LPCSTR,
LPVOID);
UINT WINAPI ImmEnumRegisterWordW(HKL, REGISTERWORDENUMPROCW, LPCWSTR, DWORD, LPCWSTR,
LPVOID);
#define ImmEnumRegisterWord WINELIB_NAME_AW(ImmEnumRegisterWord)