mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[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. svn path=/trunk/; revision=65845
This commit is contained in:
parent
606ab6ed88
commit
5960c70f39
8 changed files with 102 additions and 9 deletions
|
@ -1098,6 +1098,26 @@ typedef struct tagCURSORDATA
|
|||
#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
|
||||
NtUserAssociateInputContext(
|
||||
|
@ -2149,7 +2169,7 @@ NtUserGetImeHotKey(
|
|||
DWORD
|
||||
NTAPI
|
||||
NtUserGetImeInfoEx(
|
||||
DWORD dwUnknown1,
|
||||
PIMEINFOEX pImeInfoEx,
|
||||
DWORD dwUnknown2);
|
||||
|
||||
DWORD
|
||||
|
@ -2929,7 +2949,7 @@ NtUserSetImeHotKey(
|
|||
DWORD
|
||||
NTAPI
|
||||
NtUserSetImeInfoEx(
|
||||
DWORD dwUnknown1);
|
||||
PIMEINFOEX pImeInfoEx);
|
||||
|
||||
DWORD
|
||||
NTAPI
|
||||
|
|
|
@ -59,6 +59,7 @@ typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
|
|||
#include <prntfont.h>
|
||||
#define _NOCSECT_TYPE
|
||||
#include <ddrawi.h>
|
||||
#include <imm.h>
|
||||
|
||||
/* SEH support with PSEH */
|
||||
#include <pseh/pseh2.h>
|
||||
|
|
|
@ -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 @@ NtUserGetAppImeLevel(
|
|||
DWORD
|
||||
APIENTRY
|
||||
NtUserGetImeInfoEx(
|
||||
DWORD dwUnknown1,
|
||||
PIMEINFOEX pImeInfoEx,
|
||||
DWORD dwUnknown2)
|
||||
{
|
||||
STUB;
|
||||
|
@ -103,7 +130,7 @@ NtUserSetAppImeLevel(
|
|||
DWORD
|
||||
APIENTRY
|
||||
NtUserSetImeInfoEx(
|
||||
DWORD dwUnknown1)
|
||||
PIMEINFOEX pImeInfoEx)
|
||||
{
|
||||
STUB;
|
||||
return 0;
|
||||
|
|
|
@ -35,7 +35,7 @@ typedef struct tagKL
|
|||
UINT iBaseCharset;
|
||||
USHORT CodePage;
|
||||
WCHAR wchDiacritic;
|
||||
//PIMEINFOEX piiex;
|
||||
PIMEINFOEX piiex;
|
||||
} KL, *PKL;
|
||||
|
||||
typedef struct _ATTACHINFO
|
||||
|
@ -81,6 +81,11 @@ WORD FASTCALL UserGetMouseButtonsState(VOID);
|
|||
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
|
||||
|
|
|
@ -16,6 +16,8 @@ DBG_DEFAULT_CHANNEL(UserKbdLayout);
|
|||
|
||||
PKL gspklBaseLayout = NULL;
|
||||
PKBDFILE gpkfList = NULL;
|
||||
DWORD gSystemFS = 0;
|
||||
UINT gSystemCPCharSet = 0;
|
||||
|
||||
typedef PVOID (*PFN_KBDLAYERDESCRIPTOR)(VOID);
|
||||
|
||||
|
@ -247,6 +249,13 @@ UserLoadKbdLayout(PUNICODE_STRING pwszKLID, HKL hKL)
|
|||
pKl->CodePage = CP_ACP;
|
||||
}
|
||||
|
||||
// Set initial system character set and font signature.
|
||||
if (gSystemFS == 0)
|
||||
{
|
||||
gSystemCPCharSet = pKl->iBaseCharset;
|
||||
gSystemFS = pKl->dwFontSigs;
|
||||
}
|
||||
|
||||
return pKl;
|
||||
}
|
||||
|
||||
|
|
|
@ -1028,8 +1028,13 @@ co_MsqSendMessageAsync(PTHREADINFO ptiReceiver,
|
|||
|
||||
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,9 +1795,15 @@ BOOL co_IntProcessKeyboardMessage(MSG* Msg, BOOL* RemoveMessages)
|
|||
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 @@ BOOL co_IntProcessKeyboardMessage(MSG* Msg, BOOL* RemoveMessages)
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@ extern PCLS SystemClassList;
|
|||
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 @@ typedef struct _THREADINFO
|
|||
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 @@ typedef struct _THREADINFO
|
|||
|
||||
/* 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];
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <winbase.h>
|
||||
#include <wingdi.h>
|
||||
#include <winuser.h>
|
||||
#include <imm.h>
|
||||
|
||||
/* Undocumented user definitions */
|
||||
#include <undocuser.h>
|
||||
|
|
Loading…
Reference in a new issue