From 594e534dd0793191cc4371ab08e719417e8cd9ae Mon Sep 17 00:00:00 2001 From: James Tabor Date: Sat, 27 Dec 2014 03:00:09 +0000 Subject: [PATCH] [Win32k] - Move IME from stubs into its own file. Add flags and types to main header. - Later, how to add Ime.h from mingw (tested it and works) and not effect VC++ ? VC SDK has Ime.h. - Getting ready for Window Class update based on current wine tests. svn path=/trunk/; revision=65842 --- reactos/win32ss/CMakeLists.txt | 1 + reactos/win32ss/include/ntuser.h | 9 +- reactos/win32ss/user/ntuser/ime.c | 122 ++++++++++++++++++++++++++ reactos/win32ss/user/ntuser/ntstubs.c | 112 +---------------------- 4 files changed, 131 insertions(+), 113 deletions(-) create mode 100644 reactos/win32ss/user/ntuser/ime.c diff --git a/reactos/win32ss/CMakeLists.txt b/reactos/win32ss/CMakeLists.txt index 8ecccca4144..cbed7b85905 100644 --- a/reactos/win32ss/CMakeLists.txt +++ b/reactos/win32ss/CMakeLists.txt @@ -116,6 +116,7 @@ list(APPEND SOURCE user/ntuser/hook.c user/ntuser/hotkey.c user/ntuser/input.c + user/ntuser/ime.c user/ntuser/keyboard.c user/ntuser/kbdlayout.c user/ntuser/menu.c diff --git a/reactos/win32ss/include/ntuser.h b/reactos/win32ss/include/ntuser.h index fd84e8d35fc..6bd3ee0eaa1 100644 --- a/reactos/win32ss/include/ntuser.h +++ b/reactos/win32ss/include/ntuser.h @@ -6,6 +6,9 @@ typedef struct _THREADINFO *PTHREADINFO; struct _DESKTOP; struct _WND; struct tagPOPUPMENU; +#ifndef HIMC +typedef HANDLE HIMC; +#endif #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */ #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */ @@ -679,7 +682,7 @@ typedef struct _WND /* Size of the extra data associated with the window. */ ULONG cbwndExtra; struct _WND *spwndLastActive; - //HIMC hImc; // Input context associated with this window. + HIMC hImc; // Input context associated with this window. LONG dwUserData; PVOID pActCtx; //PD3DMATRIX pTransForm; @@ -863,6 +866,8 @@ typedef LONG_PTR (NTAPI *PFN_FNID)(PWND, UINT, WPARAM, LPARAM, ULONG_PTR); #define COLOR_LAST COLOR_MENUBAR #define MAX_MB_STRINGS 11 +#define SRVINFO_DBCSENABLED 0x0002 +#define SRVINFO_IMM32 0x0004 #define SRVINFO_APIHOOK 0x0010 #define SRVINFO_METRICS 0x0020 #define SRVINFO_KBDPREF 0x0080 @@ -1613,7 +1618,7 @@ DWORD NTAPI NtUserCheckImeHotKey( DWORD dwUnknown1, - DWORD dwUnknown2); + LPARAM dwUnknown2); HWND NTAPI NtUserChildWindowFromPointEx( diff --git a/reactos/win32ss/user/ntuser/ime.c b/reactos/win32ss/user/ntuser/ime.c new file mode 100644 index 00000000000..c1962c453b3 --- /dev/null +++ b/reactos/win32ss/user/ntuser/ime.c @@ -0,0 +1,122 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Win32k subsystem + * PURPOSE: Input Method Editor and Input Method Manager support + * FILE: win32ss/user/ntuser/ime.c + * PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net) + */ + +#include +//DBG_DEFAULT_CHANNEL(UserMisc); + + +DWORD +APIENTRY +NtUserGetImeHotKey( + DWORD Unknown0, + DWORD Unknown1, + DWORD Unknown2, + DWORD Unknown3) +{ + STUB + + return 0; +} + +DWORD +APIENTRY +NtUserNotifyIMEStatus( + DWORD Unknown0, + DWORD Unknown1, + DWORD Unknown2) +{ + STUB + + return 0; +} + + +DWORD +APIENTRY +NtUserSetImeHotKey( + DWORD Unknown0, + DWORD Unknown1, + DWORD Unknown2, + DWORD Unknown3, + DWORD Unknown4) +{ + STUB + + return 0; +} + +DWORD +APIENTRY +NtUserCheckImeHotKey( + DWORD VirtualKey, + LPARAM lParam) +{ + STUB; + return 0; +} + + +DWORD +APIENTRY +NtUserDisableThreadIme( + DWORD dwUnknown1) +{ + STUB; + return 0; +} + +DWORD +APIENTRY +NtUserGetAppImeLevel( + DWORD dwUnknown1) +{ + STUB; + return 0; +} + +DWORD +APIENTRY +NtUserGetImeInfoEx( + DWORD dwUnknown1, + DWORD dwUnknown2) +{ + STUB; + return 0; +} + + +DWORD +APIENTRY +NtUserSetAppImeLevel( + DWORD dwUnknown1, + DWORD dwUnknown2) +{ + STUB; + return 0; +} + +DWORD +APIENTRY +NtUserSetImeInfoEx( + DWORD dwUnknown1) +{ + STUB; + return 0; +} + +DWORD APIENTRY +NtUserSetImeOwnerWindow(DWORD Unknown0, + DWORD Unknown1) +{ + STUB + + return 0; +} + + +/* EOF */ diff --git a/reactos/win32ss/user/ntuser/ntstubs.c b/reactos/win32ss/user/ntuser/ntstubs.c index 999a36d5141..8e8812a51e3 100644 --- a/reactos/win32ss/user/ntuser/ntstubs.c +++ b/reactos/win32ss/user/ntuser/ntstubs.c @@ -2,7 +2,7 @@ * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Win32k subsystem * PURPOSE: Native User stubs - * FILE: subsystems/win32/win32k/ntuser/ntstubs.c + * FILE: win32ss/user/ntuser/ntstubs.c * PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net) */ @@ -168,19 +168,6 @@ NtUserGetAltTabInfo( return 0; } -DWORD -APIENTRY -NtUserGetImeHotKey( - DWORD Unknown0, - DWORD Unknown1, - DWORD Unknown2, - DWORD Unknown3) -{ - STUB - - return 0; -} - BOOL APIENTRY NtUserImpersonateDdeClientWindow( @@ -291,18 +278,6 @@ NtUserModifyUserStartupInfoFlags( return 0; } -DWORD -APIENTRY -NtUserNotifyIMEStatus( - DWORD Unknown0, - DWORD Unknown1, - DWORD Unknown2) -{ - STUB - - return 0; -} - DWORD APIENTRY NtUserQueryUserCounters( @@ -349,21 +324,6 @@ NtUserSetDbgTag( return 0; } -DWORD -APIENTRY -NtUserSetImeHotKey( - DWORD Unknown0, - DWORD Unknown1, - DWORD Unknown2, - DWORD Unknown3, - DWORD Unknown4) -{ - STUB - - return 0; -} - - DWORD APIENTRY NtUserSetRipFlags( @@ -492,17 +452,6 @@ NtUserYieldTask(VOID) return 0; } - -DWORD -APIENTRY -NtUserCheckImeHotKey( - DWORD dwUnknown1, - DWORD dwUnknown2) -{ - STUB; - return 0; -} - NTSTATUS APIENTRY NtUserConsoleControl( @@ -607,34 +556,6 @@ NtUserDestroyInputContext( return 0; } -DWORD -APIENTRY -NtUserDisableThreadIme( - DWORD dwUnknown1) -{ - STUB; - return 0; -} - -DWORD -APIENTRY -NtUserGetAppImeLevel( - DWORD dwUnknown1) -{ - STUB; - return 0; -} - -DWORD -APIENTRY -NtUserGetImeInfoEx( - DWORD dwUnknown1, - DWORD dwUnknown2) -{ - STUB; - return 0; -} - DWORD APIENTRY NtUserGetRawInputBuffer( @@ -877,25 +798,6 @@ NtUserResolveDesktop( return 0; } -DWORD -APIENTRY -NtUserSetAppImeLevel( - DWORD dwUnknown1, - DWORD dwUnknown2) -{ - STUB; - return 0; -} - -DWORD -APIENTRY -NtUserSetImeInfoEx( - DWORD dwUnknown1) -{ - STUB; - return 0; -} - DWORD APIENTRY NtUserSetInformationProcess( @@ -1147,18 +1049,6 @@ NtUserLockWindowUpdate(HWND hWnd) return 0; } -/* - * @unimplemented - */ -DWORD APIENTRY -NtUserSetImeOwnerWindow(DWORD Unknown0, - DWORD Unknown1) -{ - STUB - - return 0; -} - BOOL APIENTRY NtUserGetLayeredWindowAttributes(