Author: jimtabor
Date: Sat Dec 27 06:59:29 2014
New Revision: 65845
URL:
http://svn.reactos.org/svn/reactos?rev=65845&view=rev
Log:
[Win32ss]
- Add header for Ime information. Setup support for Ime types and hot keys.
- Finish keyboard processing changes and call Imm process key for callback to user mode.
Modified:
trunk/reactos/win32ss/include/ntuser.h
trunk/reactos/win32ss/pch.h
trunk/reactos/win32ss/user/ntuser/ime.c
trunk/reactos/win32ss/user/ntuser/input.h
trunk/reactos/win32ss/user/ntuser/kbdlayout.c
trunk/reactos/win32ss/user/ntuser/msgqueue.c
trunk/reactos/win32ss/user/ntuser/win32.h
trunk/reactos/win32ss/user/winsrv/winsrv.h
Modified: trunk/reactos/win32ss/include/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/include/ntuser.h?r…
==============================================================================
--- trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] Sat Dec 27 06:59:29 2014
@@ -1097,6 +1097,26 @@
#define CURSORF_SECRET 0x0080
#define CURSORF_LINKED 0x0100
#define CURSORF_CURRENT 0x0200
+
+typedef struct tagIMEINFOEX
+{
+ HKL hkl;
+ IMEINFO ImeInfo;
+ WCHAR wszUIClass[16];
+ ULONG fdwInitConvMode;
+ INT fInitOpen;
+ INT fLoadFlag;
+ DWORD dwProdVersion;
+ DWORD dwImeWinVersion;
+ WCHAR wszImeDescription[50];
+ WCHAR wszImeFile[80];
+ struct
+ {
+ INT fSysWow64Only:1;
+ INT fCUASLayer:1;
+ };
+} IMEINFOEX, *PIMEINFOEX;
+
DWORD
NTAPI
@@ -2149,7 +2169,7 @@
DWORD
NTAPI
NtUserGetImeInfoEx(
- DWORD dwUnknown1,
+ PIMEINFOEX pImeInfoEx,
DWORD dwUnknown2);
DWORD
@@ -2929,7 +2949,7 @@
DWORD
NTAPI
NtUserSetImeInfoEx(
- DWORD dwUnknown1);
+ PIMEINFOEX pImeInfoEx);
DWORD
NTAPI
Modified: trunk/reactos/win32ss/pch.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/pch.h?rev=65845&am…
==============================================================================
--- trunk/reactos/win32ss/pch.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/pch.h [iso-8859-1] Sat Dec 27 06:59:29 2014
@@ -59,6 +59,7 @@
#include <prntfont.h>
#define _NOCSECT_TYPE
#include <ddrawi.h>
+#include <imm.h>
/* SEH support with PSEH */
#include <pseh/pseh2.h>
Modified: trunk/reactos/win32ss/user/ntuser/ime.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/ime.c?…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/ime.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/ime.c [iso-8859-1] Sat Dec 27 06:59:29 2014
@@ -7,7 +7,34 @@
*/
#include <win32k.h>
-//DBG_DEFAULT_CHANNEL(UserMisc);
+DBG_DEFAULT_CHANNEL(UserMisc);
+
+
+UINT FASTCALL
+IntImmProcessKey(PUSER_MESSAGE_QUEUE MessageQueue, PWND pWnd, UINT Msg, WPARAM wParam,
LPARAM lParam)
+{
+ PKL pKbdLayout;
+
+ ASSERT_REFS_CO(pWnd);
+
+ if ( Msg == WM_KEYDOWN ||
+ Msg == WM_SYSKEYDOWN ||
+ Msg == WM_KEYUP ||
+ Msg == WM_SYSKEYUP )
+ {
+ //Vk = wParam & 0xff;
+ pKbdLayout = pWnd->head.pti->KeyboardLayout;
+ if (pKbdLayout == NULL) return 0;
+ //
+ if (!(gpsi->dwSRVIFlags & SRVINFO_IMM32)) return 0;
+ // need ime.h!
+ }
+ // Call User32:
+ // Anything but BOOL!
+ //ImmRet = co_IntImmProcessKey(UserHMGetHandle(pWnd), pKbdLayout->hkl, Vk, lParam,
HotKey);
+ FIXME(" is UNIMPLEMENTED.\n");
+ return 0;
+}
DWORD
@@ -82,7 +109,7 @@
DWORD
APIENTRY
NtUserGetImeInfoEx(
- DWORD dwUnknown1,
+ PIMEINFOEX pImeInfoEx,
DWORD dwUnknown2)
{
STUB;
@@ -103,7 +130,7 @@
DWORD
APIENTRY
NtUserSetImeInfoEx(
- DWORD dwUnknown1)
+ PIMEINFOEX pImeInfoEx)
{
STUB;
return 0;
Modified: trunk/reactos/win32ss/user/ntuser/input.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/input.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/input.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/input.h [iso-8859-1] Sat Dec 27 06:59:29 2014
@@ -35,7 +35,7 @@
UINT iBaseCharset;
USHORT CodePage;
WCHAR wchDiacritic;
- //PIMEINFOEX piiex;
+ PIMEINFOEX piiex;
} KL, *PKL;
typedef struct _ATTACHINFO
@@ -81,6 +81,11 @@
VOID NTAPI UserProcessMouseInput(PMOUSE_INPUT_DATA pMouseInputData);
BOOL NTAPI UserSendMouseInput(MOUSEINPUT *pMouseInput, BOOL bInjected);
+/* IMM */
+UINT FASTCALL IntImmProcessKey(PUSER_MESSAGE_QUEUE, PWND, UINT, WPARAM, LPARAM);
+
+extern DWORD gSystemFS;
+extern UINT gSystemCPCharSet;
extern HANDLE ghKeyboardDevice;
extern PTHREADINFO ptiRawInput;
extern BYTE gafAsyncKeyState[256 * 2 / 8]; // 2 bits per key
Modified: trunk/reactos/win32ss/user/ntuser/kbdlayout.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/kbdlay…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/kbdlayout.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/kbdlayout.c [iso-8859-1] Sat Dec 27 06:59:29 2014
@@ -16,6 +16,8 @@
PKL gspklBaseLayout = NULL;
PKBDFILE gpkfList = NULL;
+DWORD gSystemFS = 0;
+UINT gSystemCPCharSet = 0;
typedef PVOID (*PFN_KBDLAYERDESCRIPTOR)(VOID);
@@ -247,6 +249,13 @@
pKl->CodePage = CP_ACP;
}
+ // Set initial system character set and font signature.
+ if (gSystemFS == 0)
+ {
+ gSystemCPCharSet = pKl->iBaseCharset;
+ gSystemFS = pKl->dwFontSigs;
+ }
+
return pKl;
}
Modified: trunk/reactos/win32ss/user/ntuser/msgqueue.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/msgque…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] Sat Dec 27 06:59:29 2014
@@ -1028,8 +1028,13 @@
NTSTATUS FASTCALL
co_MsqSendMessage(PTHREADINFO ptirec,
- HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam,
- UINT uTimeout, BOOL Block, INT HookMessage,
+ HWND Wnd,
+ UINT Msg,
+ WPARAM wParam,
+ LPARAM lParam,
+ UINT uTimeout,
+ BOOL Block,
+ INT HookMessage,
ULONG_PTR *uResult)
{
PTHREADINFO pti;
@@ -1790,8 +1795,14 @@
EVENTMSG Event;
USER_REFERENCE_ENTRY Ref;
PWND pWnd;
+ UINT ImmRet;
BOOL Ret = TRUE;
PTHREADINFO pti = PsGetCurrentThreadWin32Thread();
+
+ if (Msg->message == VK_PACKET)
+ {
+ pti->wchInjected = HIWORD(Msg->wParam);
+ }
if (Msg->message == WM_KEYDOWN || Msg->message == WM_SYSKEYDOWN ||
Msg->message == WM_KEYUP || Msg->message == WM_SYSKEYUP)
@@ -1863,6 +1874,22 @@
Ret = FALSE;
}
+
+ if ( pWnd && Ret && *RemoveMessages && Msg->message ==
WM_KEYDOWN && !(pti->TIF_flags & TIF_DISABLEIME))
+ {
+ if ( (ImmRet = IntImmProcessKey(pti->MessageQueue, pWnd, Msg->message,
Msg->wParam, Msg->lParam)) )
+ {
+ if ( ImmRet & (IPHK_HOTKEY|IPHK_SKIPTHISKEY) )
+ {
+ ImmRet = 0;
+ }
+ if ( ImmRet & IPHK_PROCESSBYIME )
+ {
+ Msg->wParam = VK_PROCESSKEY;
+ }
+ }
+ }
+
if (pWnd) UserDerefObjectCo(pWnd);
return Ret;
}
Modified: trunk/reactos/win32ss/user/ntuser/win32.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/win32.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/win32.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/win32.h [iso-8859-1] Sat Dec 27 06:59:29 2014
@@ -53,6 +53,7 @@
extern BOOL RegisteredSysClasses;
typedef struct _WIN32HEAP WIN32HEAP, *PWIN32HEAP;
+typedef struct tagMENUSTATE MENUSTATE, *PMENUSTATE;
#include <pshpack1.h>
// FIXME: Move to ntuser.h
@@ -105,6 +106,7 @@
HDESK hdesk;
UINT cPaintsReady; /* Count of paints pending. */
UINT cTimersReady; /* Count of timers pending. */
+ PMENUSTATE pMenuState;
DWORD dwExpWinVer;
DWORD dwCompatFlags;
DWORD dwCompatFlags2;
@@ -125,7 +127,8 @@
/* Queue of messages posted to the queue. */
LIST_ENTRY PostedMessagesListHead; // mlPost
- UINT fsChangeBitsRemoved;
+ WORD fsChangeBitsRemoved;
+ WCHAR wchInjected;
UINT cWindows;
UINT cVisWindows;
LIST_ENTRY aphkStart[NB_HOOKS];
Modified: trunk/reactos/win32ss/user/winsrv/winsrv.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/winsrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/winsrv.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/winsrv.h [iso-8859-1] Sat Dec 27 06:59:29 2014
@@ -21,6 +21,7 @@
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
+#include <imm.h>
/* Undocumented user definitions */
#include <undocuser.h>