ReactOS 0.4.15-dev-6042-g2eb6700
imm32_undoc.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

BOOL WINAPI ImmGetImeInfoEx (PIMEINFOEX pImeInfoEx, IMEINFOEXCLASS SearchType, PVOID pvSearchKey)
 
PCLIENTIMC WINAPI ImmLockClientImc (HIMC hImc)
 
VOID WINAPI ImmUnlockClientImc (PCLIENTIMC pClientImc)
 
PIMEDPI WINAPI ImmLockImeDpi (HKL hKL)
 
VOID WINAPI ImmUnlockImeDpi (PIMEDPI pImeDpi)
 
HRESULT APIENTRY CtfImmTIMCreateInputContext (HIMC hIMC)
 
HRESULT APIENTRY CtfImmTIMDestroyInputContext (HIMC hIMC)
 
HRESULT WINAPI CtfImmTIMActivate (HKL hKL)
 

Function Documentation

◆ CtfImmTIMActivate()

HRESULT WINAPI CtfImmTIMActivate ( HKL  hKL)

Definition at line 75 of file ctf.c.

76{
77 FIXME("(%p)\n", hKL);
78 return E_NOTIMPL;
79}
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

Referenced by CtfLoadThreadLayout(), and Imm32InternalLockIMC().

◆ CtfImmTIMCreateInputContext()

HRESULT APIENTRY CtfImmTIMCreateInputContext ( HIMC  hIMC)

Definition at line 50 of file ctf.c.

51{
52 TRACE("(%p)\n", hIMC);
53 return E_NOTIMPL;
54}
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by Imm32CreateInputContext(), and Imm32InternalLockIMC().

◆ CtfImmTIMDestroyInputContext()

HRESULT APIENTRY CtfImmTIMDestroyInputContext ( HIMC  hIMC)

Definition at line 41 of file ctf.c.

42{
43 if (!IS_CICERO_MODE() || (GetWin32ClientInfo()->dwCompatFlags2 & 2))
44 return E_NOINTERFACE;
45
47}
HRESULT APIENTRY Imm32CtfImeDestroyInputContext(HIMC hIMC)
Definition: ctf.c:27
#define IS_CICERO_MODE()
Definition: ntuser.h:1233
#define GetWin32ClientInfo()
Definition: ntuser.h:347
#define E_NOINTERFACE
Definition: winerror.h:2364

Referenced by Imm32DestroyInputContext().

◆ ImmGetImeInfoEx()

BOOL WINAPI ImmGetImeInfoEx ( PIMEINFOEX  pImeInfoEx,
IMEINFOEXCLASS  SearchType,
PVOID  pvSearchKey 
)

Definition at line 941 of file ime.c.

942{
943 HKL hKL;
944 if (SearchType == ImeInfoExKeyboardLayout || SearchType == ImeInfoExKeyboardLayoutTFS)
945 {
946 hKL = *(HKL*)pvSearchKey;
947 pImeInfoEx->hkl = hKL;
948
949 if (SearchType == ImeInfoExKeyboardLayoutTFS)
950 {
951 if (!IS_IME_HKL(hKL))
952 {
954 {
955 TRACE("\n");
956 return FALSE;
957 }
958 }
959
960 SearchType = ImeInfoExKeyboardLayout;
961 }
962 else
963 {
964 if (!IS_IME_HKL(hKL))
965 {
966 TRACE("\n");
967 return FALSE;
968 }
969 }
970 }
971 else if (SearchType == ImeInfoExImeFileName)
972 {
973 StringCchCopyW(pImeInfoEx->wszImeFile, _countof(pImeInfoEx->wszImeFile),
974 pvSearchKey);
975 }
976 else
977 {
978 return FALSE;
979 }
980
981 return NtUserGetImeInfoEx(pImeInfoEx, SearchType);
982}
BOOL WINAPI CtfImmIsTextFrameServiceDisabled(VOID)
Definition: ctf.c:67
#define FALSE
Definition: types.h:117
#define IS_16BIT_MODE()
Definition: precomp.h:146
@ ImeInfoExImeFileName
Definition: ntuser.h:1228
@ ImeInfoExKeyboardLayoutTFS
Definition: ntuser.h:1226
@ ImeInfoExKeyboardLayout
Definition: ntuser.h:1225
BOOL NTAPI NtUserGetImeInfoEx(PIMEINFOEX pImeInfoEx, IMEINFOEXCLASS SearchType)
Definition: ime.c:1008
#define IS_IME_HKL(hKL)
Definition: kbswitch.c:32
UINT_PTR HKL
Definition: msctf.idl:104
#define _countof(array)
Definition: sndvol32.h:68
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
WCHAR wszImeFile[80]
Definition: ntuser.h:1215

Referenced by Imm32LoadImeDpi(), ImmGetDescriptionA(), ImmGetDescriptionW(), ImmGetIMEFileNameA(), ImmGetIMEFileNameW(), ImmGetProperty(), ImmInstallIMEW(), ImmIsIME(), and User32CreateImeUIWindow().

◆ ImmLockClientImc()

PCLIENTIMC WINAPI ImmLockClientImc ( HIMC  hImc)

Definition at line 950 of file imm.c.

951{
952 PIMC pIMC;
953 PCLIENTIMC pClientImc;
954
955 TRACE("(%p)\n", hImc);
956
957 if (IS_NULL_UNEXPECTEDLY(hImc))
958 return NULL;
959
960 pIMC = ValidateHandle(hImc, TYPE_INPUTCONTEXT);
961 if (IS_NULL_UNEXPECTEDLY(pIMC) || !Imm32CheckImcProcess(pIMC))
962 return NULL;
963
964 pClientImc = (PCLIENTIMC)pIMC->dwClientImcData;
965 if (pClientImc)
966 {
967 if (pClientImc->dwFlags & CLIENTIMC_DESTROY)
968 return NULL;
969 goto Finish;
970 }
971
972 pClientImc = ImmLocalAlloc(HEAP_ZERO_MEMORY, sizeof(CLIENTIMC));
973 if (IS_NULL_UNEXPECTEDLY(pClientImc))
974 return NULL;
975
976 RtlInitializeCriticalSection(&pClientImc->cs);
978
980 {
981 ERR("\n");
982 ImmLocalFree(pClientImc);
983 return NULL;
984 }
985
986 pClientImc->dwFlags |= CLIENTIMC_UNKNOWN2;
987
988Finish:
989 InterlockedIncrement(&pClientImc->cLockObj);
990 return pClientImc;
991}
#define InterlockedIncrement
Definition: armddk.h:53
#define ERR(fmt,...)
Definition: debug.h:110
#define NULL
Definition: types.h:112
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
LPVOID APIENTRY ImmLocalAlloc(DWORD dwFlags, DWORD dwBytes)
Definition: utils.c:415
#define ImmLocalFree(lpData)
Definition: precomp.h:89
BOOL APIENTRY Imm32CheckImcProcess(PIMC pIMC)
Definition: utils.c:391
#define IS_NULL_UNEXPECTEDLY(p)
Definition: precomp.h:120
LPVOID FASTCALL ValidateHandle(HANDLE hObject, UINT uType)
Definition: utils.c:377
struct tagCLIENTIMC * PCLIENTIMC
#define CLIENTIMC_DESTROY
Definition: ntuser.h:1359
@ THREADSTATE_IMECOMPATFLAGS
Definition: ntuser.h:2608
#define CLIENTIMC_UNKNOWN2
Definition: ntuser.h:1361
@ TYPE_INPUTCONTEXT
Definition: ntuser.h:57
BOOL NTAPI NtUserUpdateInputContext(HIMC hIMC, DWORD dwType, DWORD_PTR dwValue)
Definition: ime.c:1762
DWORD_PTR NTAPI NtUserGetThreadState(DWORD Routine)
Definition: misc.c:232
if(dx< 0)
Definition: linetemp.h:194
NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
#define DWORD
Definition: nt_native.h:44
RTL_CRITICAL_SECTION cs
Definition: ntuser.h:1338
DWORD dwCompatFlags
Definition: ntuser.h:1337
DWORD dwFlags
Definition: ntuser.h:1336
Definition: ntuser.h:199
ULONG_PTR dwClientImcData
Definition: ntuser.h:202
uint32_t DWORD_PTR
Definition: typedefs.h:65
@ UIC_CLIENTIMCDATA
Definition: undocuser.h:303

Referenced by Imm32InternalLockIMC(), Imm32IsImcAnsi(), Imm32ProcessRequest(), Imm32SelectInputContext(), ImmGenerateMessage(), ImmGetAppCompatFlags(), ImmGetCandidateListAW(), ImmGetCandidateListCountAW(), ImmGetCompositionFontA(), ImmGetCompositionFontW(), ImmGetCompositionStringA(), ImmGetCompositionStringW(), ImmGetGuideLineAW(), ImmGetIMCLockCount(), ImmGetSaveContext(), ImmPostMessages(), ImmSetActiveContext(), ImmSetCompositionFontA(), ImmSetCompositionFontW(), ImmUnlockIMC(), and ImmWINNLSEnableIME().

◆ ImmLockImeDpi()

PIMEDPI WINAPI ImmLockImeDpi ( HKL  hKL)

Definition at line 987 of file ime.c.

988{
989 PIMEDPI pImeDpi = NULL;
990
991 TRACE("(%p)\n", hKL);
992
994
995 /* Find by hKL */
996 for (pImeDpi = gpImeDpiList; pImeDpi; pImeDpi = pImeDpi->pNext)
997 {
998 if (pImeDpi->hKL == hKL) /* found */
999 {
1000 /* lock if possible */
1001 if (pImeDpi->dwFlags & IMEDPI_FLAG_UNLOADED)
1002 pImeDpi = NULL;
1003 else
1004 ++(pImeDpi->cLockObj);
1005 break;
1006 }
1007 }
1008
1010 return pImeDpi;
1011}
RTL_CRITICAL_SECTION gcsImeDpi
Definition: ime.c:16
PIMEDPI gpImeDpiList
Definition: ime.c:17
#define IMEDPI_FLAG_UNLOADED
Definition: ntuser.h:1328
NTSYSAPI NTSTATUS NTAPI RtlEnterCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI NTSTATUS NTAPI RtlLeaveCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
DWORD dwFlags
Definition: ntuser.h:1288
HKL hKL
Definition: ntuser.h:1283
struct IMEDPI * pNext
Definition: ntuser.h:1281
DWORD cLockObj
Definition: ntuser.h:1287

Referenced by Imm32CreateInputContext(), Imm32DestroyInputContext(), Imm32FindOrLoadImeDpi(), Imm32MakeIMENotify(), Imm32ProcessHotKey(), Imm32SelectInputContext(), ImmActivateLayout(), ImmCallImeConsoleIME(), ImmGetImeMenuItemsAW(), ImmNotifyIME(), ImmProcessKey(), ImmSetActiveContext(), ImmSetCompositionStringAW(), ImmTranslateMessage(), and User32CreateImeUIWindow().

◆ ImmUnlockClientImc()

VOID WINAPI ImmUnlockClientImc ( PCLIENTIMC  pClientImc)

Definition at line 996 of file imm.c.

997{
998 LONG cLocks;
999 HANDLE hInputContext;
1000
1001 TRACE("(%p)\n", pClientImc);
1002
1003 cLocks = InterlockedDecrement(&pClientImc->cLockObj);
1004 if (cLocks != 0 || !(pClientImc->dwFlags & CLIENTIMC_DESTROY))
1005 return;
1006
1007 hInputContext = pClientImc->hInputContext;
1008 if (hInputContext)
1009 LocalFree(hInputContext);
1010
1011 RtlDeleteCriticalSection(&pClientImc->cs);
1012 ImmLocalFree(pClientImc);
1013}
#define InterlockedDecrement
Definition: armddk.h:52
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
static LONG cLocks
Definition: compobj.c:119
NTSYSAPI NTSTATUS NTAPI RtlDeleteCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
long LONG
Definition: pedump.c:60
HANDLE hInputContext
Definition: ntuser.h:1334
LONG cLockObj
Definition: ntuser.h:1335

Referenced by Imm32DestroyInputContext(), Imm32InternalLockIMC(), Imm32IsImcAnsi(), Imm32ProcessRequest(), Imm32SelectInputContext(), ImmGenerateMessage(), ImmGetAppCompatFlags(), ImmGetCandidateListAW(), ImmGetCandidateListCountAW(), ImmGetCompositionFontA(), ImmGetCompositionFontW(), ImmGetCompositionStringA(), ImmGetCompositionStringW(), ImmGetGuideLineAW(), ImmGetIMCLockCount(), ImmGetSaveContext(), ImmPostMessages(), ImmSetActiveContext(), ImmSetCompositionFontA(), ImmSetCompositionFontW(), ImmUnlockIMC(), ImmWINNLSEnableIME(), and START_TEST().

◆ ImmUnlockImeDpi()

VOID WINAPI ImmUnlockImeDpi ( PIMEDPI  pImeDpi)

Definition at line 1016 of file ime.c.

1017{
1018 PIMEDPI *ppEntry;
1019
1020 TRACE("(%p)\n", pImeDpi);
1021
1022 if (pImeDpi == NULL)
1023 return;
1024
1026
1027 /* unlock */
1028 --(pImeDpi->cLockObj);
1029 if (pImeDpi->cLockObj != 0)
1030 {
1032 return;
1033 }
1034
1035 if ((pImeDpi->dwFlags & IMEDPI_FLAG_UNLOADED) == 0)
1036 {
1037 if ((pImeDpi->dwFlags & IMEDPI_FLAG_LOCKED) == 0 ||
1038 (pImeDpi->ImeInfo.fdwProperty & IME_PROP_END_UNLOAD) == 0)
1039 {
1041 return;
1042 }
1043 }
1044
1045 /* Remove from list */
1046 for (ppEntry = &gpImeDpiList; *ppEntry; ppEntry = &((*ppEntry)->pNext))
1047 {
1048 if (*ppEntry == pImeDpi) /* found */
1049 {
1050 *ppEntry = pImeDpi->pNext;
1051 break;
1052 }
1053 }
1054
1055 Imm32FreeIME(pImeDpi, TRUE);
1056 ImmLocalFree(pImeDpi);
1057
1059}
#define TRUE
Definition: types.h:120
VOID APIENTRY Imm32FreeIME(PIMEDPI pImeDpi, BOOL bDestroy)
Definition: ime.c:36
#define IME_PROP_END_UNLOAD
Definition: imm.h:213
#define IMEDPI_FLAG_LOCKED
Definition: ntuser.h:1329
IMEINFO ImeInfo
Definition: ntuser.h:1284
DWORD fdwProperty
Definition: imm.h:158

Referenced by CtfImmGetGuidAtom(), CtfImmIsGuidMapEnable(), Imm32CreateInputContext(), Imm32DestroyInputContext(), Imm32MakeIMENotify(), Imm32ProcessHotKey(), Imm32SelectInputContext(), ImmActivateLayout(), ImmCallImeConsoleIME(), ImmConfigureIMEA(), ImmConfigureIMEW(), ImmEnumRegisterWordA(), ImmEnumRegisterWordW(), ImmEscapeA(), ImmEscapeW(), ImmGetConversionListA(), ImmGetConversionListW(), ImmGetImeMenuItemsAW(), ImmGetProperty(), ImmGetRegisterWordStyleA(), ImmGetRegisterWordStyleW(), ImmNotifyIME(), ImmProcessKey(), ImmRegisterWordA(), ImmRegisterWordW(), ImmSetActiveContext(), ImmSetCompositionStringAW(), ImmTranslateMessage(), ImmUnregisterWordA(), ImmUnregisterWordW(), and User32CreateImeUIWindow().