mirror of
https://github.com/reactos/reactos.git
synced 2025-01-19 10:03:28 +08:00
[NTUSER] Implement NtUserGetAppImeLevel and NtUserSetAppImeLevel (#4313)
- Add AtomImeLevel atom. - Modify NtUserSetAppImeLevel prototype. - Implement NtUserGetAppImeLevel and NtUserSetAppImeLevel functions. CORE-11700
This commit is contained in:
parent
963e76fd60
commit
9c8167e90a
@ -3084,11 +3084,11 @@ NTAPI
|
||||
NtUserSetActiveWindow(
|
||||
HWND Wnd);
|
||||
|
||||
DWORD
|
||||
BOOL
|
||||
NTAPI
|
||||
NtUserSetAppImeLevel(
|
||||
DWORD dwUnknown1,
|
||||
DWORD dwUnknown2);
|
||||
HWND hWnd,
|
||||
DWORD dwLevel);
|
||||
|
||||
HWND
|
||||
NTAPI
|
||||
|
@ -238,8 +238,29 @@ DWORD
|
||||
APIENTRY
|
||||
NtUserGetAppImeLevel(HWND hWnd)
|
||||
{
|
||||
STUB;
|
||||
return 0;
|
||||
DWORD ret = 0;
|
||||
PWND pWnd;
|
||||
PTHREADINFO pti;
|
||||
|
||||
UserEnterShared();
|
||||
|
||||
pWnd = ValidateHwndNoErr(hWnd);
|
||||
if (!pWnd)
|
||||
goto Quit;
|
||||
|
||||
if (!IS_IMM_MODE())
|
||||
{
|
||||
EngSetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
goto Quit;
|
||||
}
|
||||
|
||||
pti = PsGetCurrentThreadWin32Thread();
|
||||
if (pWnd->head.pti->ppi == pti->ppi)
|
||||
ret = (DWORD)(ULONG_PTR)UserGetProp(pWnd, AtomImeLevel, TRUE);
|
||||
|
||||
Quit:
|
||||
UserLeave();
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL FASTCALL UserGetImeInfoEx(LPVOID pUnknown, PIMEINFOEX pInfoEx, IMEINFOEXCLASS SearchType)
|
||||
@ -335,14 +356,33 @@ Quit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
DWORD
|
||||
BOOL
|
||||
APIENTRY
|
||||
NtUserSetAppImeLevel(
|
||||
DWORD dwUnknown1,
|
||||
DWORD dwUnknown2)
|
||||
NtUserSetAppImeLevel(HWND hWnd, DWORD dwLevel)
|
||||
{
|
||||
STUB;
|
||||
return 0;
|
||||
BOOL ret = FALSE;
|
||||
PWND pWnd;
|
||||
PTHREADINFO pti;
|
||||
|
||||
UserEnterExclusive();
|
||||
|
||||
pWnd = ValidateHwndNoErr(hWnd);
|
||||
if (!pWnd)
|
||||
goto Quit;
|
||||
|
||||
if (!IS_IMM_MODE())
|
||||
{
|
||||
EngSetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
goto Quit;
|
||||
}
|
||||
|
||||
pti = PsGetCurrentThreadWin32Thread();
|
||||
if (pWnd->head.pti->ppi == pti->ppi)
|
||||
ret = UserSetProp(pWnd, AtomImeLevel, (HANDLE)(ULONG_PTR)dwLevel, TRUE);
|
||||
|
||||
Quit:
|
||||
UserLeave();
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL FASTCALL UserSetImeInfoEx(LPVOID pUnknown, PIMEINFOEX pImeInfoEx)
|
||||
|
@ -25,6 +25,7 @@ ATOM AtomQOS; // Window DDE Quality of Service atom.
|
||||
HINSTANCE hModClient = NULL;
|
||||
BOOL ClientPfnInit = FALSE;
|
||||
ATOM gaGuiConsoleWndClass;
|
||||
ATOM AtomImeLevel;
|
||||
|
||||
/* PRIVATE FUNCTIONS **********************************************************/
|
||||
|
||||
@ -55,6 +56,7 @@ InitUserAtoms(VOID)
|
||||
|
||||
AtomDDETrack = IntAddGlobalAtom(L"SysDT", TRUE);
|
||||
AtomQOS = IntAddGlobalAtom(L"SysQOS", TRUE);
|
||||
AtomImeLevel = IntAddGlobalAtom(L"SysIMEL", TRUE);
|
||||
|
||||
/*
|
||||
* FIXME: AddPropW uses the global kernel atom table, thus leading to conflicts if we use
|
||||
|
@ -18,6 +18,7 @@ extern BOOL g_AlwaysDisplayVersion;
|
||||
extern ATOM gaGuiConsoleWndClass;
|
||||
extern ATOM AtomDDETrack;
|
||||
extern ATOM AtomQOS;
|
||||
extern ATOM AtomImeLevel;
|
||||
extern ERESOURCE UserLock;
|
||||
|
||||
CODE_SEG("INIT") NTSTATUS NTAPI InitUserImpl(VOID);
|
||||
|
Loading…
Reference in New Issue
Block a user