Author: dchapyshev
Date: Wed Jan 28 02:08:31 2009
New Revision: 39163
URL:
http://svn.reactos.org/svn/reactos?rev=39163&view=rev
Log:
- More implement User32InitializeImmEntryTable
Modified:
trunk/reactos/dll/win32/user32/misc/imm.c
Modified: trunk/reactos/dll/win32/user32/misc/imm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/imm.…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/imm.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/imm.c [iso-8859-1] Wed Jan 28 02:08:31 2009
@@ -18,7 +18,21 @@
typedef struct
{
BOOL (WINAPI* pImmIsIME) (HKL);
+ LRESULT (WINAPI* pImmEscapeA) (HKL, HIMC, UINT, LPVOID);
+ LRESULT (WINAPI* pImmEscapeW) (HKL, HIMC, UINT, LPVOID);
+ LONG (WINAPI* pImmGetCompositionStringA) (HIMC, DWORD, LPVOID, DWORD);
+ LONG (WINAPI* pImmGetCompositionStringW) (HIMC, DWORD, LPVOID, DWORD);
+ BOOL (WINAPI* pImmGetCompositionFontA) (HIMC, LPLOGFONTA);
+ BOOL (WINAPI* pImmGetCompositionFontW) (HIMC, LPLOGFONTW);
+ BOOL (WINAPI* pImmSetCompositionFontA)(HIMC, LPLOGFONTA);
+ BOOL (WINAPI* pImmSetCompositionFontW)(HIMC, LPLOGFONTW);
+ BOOL (WINAPI* pImmGetCompositionWindow) (HIMC, LPCOMPOSITIONFORM);
+ BOOL (WINAPI* pImmSetCompositionWindow) (HIMC, LPCOMPOSITIONFORM);
HIMC (WINAPI* pImmAssociateContext) (HWND, HIMC);
+ BOOL (WINAPI* pImmReleaseContext) (HWND, HIMC);
+ HIMC (WINAPI* pImmGetContext) (HWND);
+ HWND (WINAPI* pImmGetDefaultIMEWnd) (HWND);
+ BOOL (WINAPI* pImmNotifyIME) (HIMC, DWORD, DWORD, DWORD);
} Imm32ApiTable;
Imm32ApiTable *pImmApiTable = {0};
@@ -34,16 +48,19 @@
* This function should not be implemented, it is used,
* if you can not load function from imm32.dll
*/
-BOOL WINAPI IMM_ImmIsIME(HKL hKL)
-{
- return 0;
-}
-
-/* See comment for IMM_ImmIsIME */
-HIMC WINAPI IMM_ImmAssociateContext(HWND hwnd, HIMC himc)
-{
- return 0;
-}
+BOOL WINAPI IMM_ImmIsIME(HKL hKL) { return 0; }
+HIMC WINAPI IMM_ImmAssociateContext(HWND hwnd, HIMC himc) { return 0; }
+BOOL WINAPI IMM_ImmReleaseContext(HWND hwnd, HIMC himc) { return 0; }
+LRESULT WINAPI IMM_ImmEscapeAW(HKL hkl, HIMC himc, UINT uint, LPVOID lpvoid) { return 0;
}
+LONG WINAPI IMM_ImmGetCompositionStringAW(HIMC himc, DWORD dword1, LPVOID lpvoid, DWORD
dword2) { return 0; }
+BOOL WINAPI IMM_ImmGetCompositionFontA(HIMC himc, LPLOGFONTA lplf) { return 0; }
+BOOL WINAPI IMM_ImmGetCompositionFontW(HIMC himc, LPLOGFONTW lplf) { return 0; }
+BOOL WINAPI IMM_ImmSetCompositionFontA(HIMC himc, LPLOGFONTA lplf) { return 0; }
+BOOL WINAPI IMM_ImmSetCompositionFontW(HIMC himc, LPLOGFONTW lplf) { return 0; }
+BOOL WINAPI IMM_ImmSetGetCompositionWindow(HIMC himc, LPCOMPOSITIONFORM lpcf) { return 0;
}
+HIMC WINAPI IMM_ImmGetContext(HWND hwnd) { return 0; }
+HWND WINAPI IMM_ImmGetDefaultIMEWnd(HWND hwnd) { return 0; }
+BOOL WINAPI IMM_ImmNotifyIME(HIMC himc, DWORD dword1, DWORD dword2, DWORD dword3) {
return 0; }
/*
* @unimplemented
@@ -68,9 +85,65 @@
if (!pImmApiTable->pImmIsIME)
pImmApiTable->pImmIsIME = IMM_ImmIsIME;
+ pImmApiTable->pImmEscapeA = (LRESULT (WINAPI*)(HKL, HIMC, UINT, LPVOID))
GetProcAddress(hImmInstance, "ImmEscapeA");
+ if (!pImmApiTable->pImmEscapeA)
+ pImmApiTable->pImmEscapeA = IMM_ImmEscapeAW;
+
+ pImmApiTable->pImmEscapeW = (LRESULT (WINAPI*)(HKL, HIMC, UINT, LPVOID))
GetProcAddress(hImmInstance, "ImmEscapeW");
+ if (!pImmApiTable->pImmEscapeW)
+ pImmApiTable->pImmEscapeW = IMM_ImmEscapeAW;
+
+ pImmApiTable->pImmGetCompositionStringA = (LONG (WINAPI*)(HIMC, DWORD, LPVOID,
DWORD)) GetProcAddress(hImmInstance, "ImmGetCompositionStringA");
+ if (!pImmApiTable->pImmGetCompositionStringA)
+ pImmApiTable->pImmGetCompositionStringA = IMM_ImmGetCompositionStringAW;
+
+ pImmApiTable->pImmGetCompositionStringW = (LONG (WINAPI*)(HIMC, DWORD, LPVOID,
DWORD)) GetProcAddress(hImmInstance, "ImmGetCompositionStringW");
+ if (!pImmApiTable->pImmGetCompositionStringW)
+ pImmApiTable->pImmGetCompositionStringW = IMM_ImmGetCompositionStringAW;
+
+ pImmApiTable->pImmGetCompositionFontA = (BOOL (WINAPI*)(HIMC, LPLOGFONTA))
GetProcAddress(hImmInstance, "ImmGetCompositionFontA");
+ if (!pImmApiTable->pImmGetCompositionFontA)
+ pImmApiTable->pImmGetCompositionFontA = IMM_ImmGetCompositionFontA;
+
+ pImmApiTable->pImmGetCompositionFontW = (BOOL (WINAPI*)(HIMC, LPLOGFONTW))
GetProcAddress(hImmInstance, "ImmGetCompositionFontW");
+ if (!pImmApiTable->pImmGetCompositionFontW)
+ pImmApiTable->pImmGetCompositionFontW = IMM_ImmGetCompositionFontW;
+
+ pImmApiTable->pImmSetCompositionFontA = (BOOL (WINAPI*)(HIMC, LPLOGFONTA))
GetProcAddress(hImmInstance, "ImmSetCompositionFontA");
+ if (!pImmApiTable->pImmSetCompositionFontA)
+ pImmApiTable->pImmSetCompositionFontA = IMM_ImmSetCompositionFontA;
+
+ pImmApiTable->pImmSetCompositionFontW = (BOOL (WINAPI*)(HIMC, LPLOGFONTW))
GetProcAddress(hImmInstance, "ImmSetCompositionFontW");
+ if (!pImmApiTable->pImmSetCompositionFontW)
+ pImmApiTable->pImmSetCompositionFontW = IMM_ImmSetCompositionFontW;
+
+ pImmApiTable->pImmGetCompositionWindow = (BOOL (WINAPI*)(HIMC, LPCOMPOSITIONFORM))
GetProcAddress(hImmInstance, "ImmGetCompositionWindow");
+ if (!pImmApiTable->pImmGetCompositionWindow)
+ pImmApiTable->pImmGetCompositionWindow = IMM_ImmSetGetCompositionWindow;
+
+ pImmApiTable->pImmSetCompositionWindow = (BOOL (WINAPI*)(HIMC, LPCOMPOSITIONFORM))
GetProcAddress(hImmInstance, "ImmSetCompositionWindow");
+ if (!pImmApiTable->pImmSetCompositionWindow)
+ pImmApiTable->pImmSetCompositionWindow = IMM_ImmSetGetCompositionWindow;
+
pImmApiTable->pImmAssociateContext = (HIMC (WINAPI*)(HWND, HIMC))
GetProcAddress(hImmInstance, "ImmAssociateContext");
if (!pImmApiTable->pImmAssociateContext)
pImmApiTable->pImmAssociateContext = IMM_ImmAssociateContext;
+
+ pImmApiTable->pImmReleaseContext = (BOOL (WINAPI*)(HWND, HIMC))
GetProcAddress(hImmInstance, "ImmReleaseContext");
+ if (!pImmApiTable->pImmReleaseContext)
+ pImmApiTable->pImmReleaseContext = IMM_ImmReleaseContext;
+
+ pImmApiTable->pImmGetContext = (HIMC (WINAPI*)(HWND)) GetProcAddress(hImmInstance,
"ImmGetContext");
+ if (!pImmApiTable->pImmGetContext)
+ pImmApiTable->pImmGetContext = IMM_ImmGetContext;
+
+ pImmApiTable->pImmGetDefaultIMEWnd = (HWND (WINAPI*)(HWND))
GetProcAddress(hImmInstance, "ImmGetDefaultIMEWnd");
+ if (!pImmApiTable->pImmGetDefaultIMEWnd)
+ pImmApiTable->pImmGetDefaultIMEWnd = IMM_ImmGetDefaultIMEWnd;
+
+ pImmApiTable->pImmNotifyIME = (BOOL (WINAPI*)(HIMC, DWORD, DWORD, DWORD))
GetProcAddress(hImmInstance, "ImmNotifyIME");
+ if (!pImmApiTable->pImmNotifyIME)
+ pImmApiTable->pImmNotifyIME = IMM_ImmNotifyIME;
/*
* TODO: Load more functions from imm32.dll