ReactOS  0.4.15-dev-4616-g17e0e44
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 67 of file ctf.c.

68 {
69  FIXME("(%p)\n", hKL);
70  return E_NOTIMPL;
71 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

Referenced by Imm32InternalLockIMC().

◆ CtfImmTIMCreateInputContext()

HRESULT APIENTRY CtfImmTIMCreateInputContext ( HIMC  hIMC)

Definition at line 42 of file ctf.c.

43 {
44  TRACE("(%p)\n", hIMC);
45  return E_NOTIMPL;
46 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

Referenced by Imm32InternalLockIMC().

◆ CtfImmTIMDestroyInputContext()

HRESULT APIENTRY CtfImmTIMDestroyInputContext ( HIMC  hIMC)

Definition at line 33 of file ctf.c.

34 {
35  if (!Imm32IsCiceroMode() || (GetWin32ClientInfo()->dwCompatFlags2 & 2))
36  return E_NOINTERFACE;
37 
38  return Imm32CtfImeDestroyInputContext(hIMC);
39 }
#define E_NOINTERFACE
Definition: winerror.h:2364
#define GetWin32ClientInfo()
Definition: ntuser.h:335
HRESULT APIENTRY Imm32CtfImeDestroyInputContext(HIMC hIMC)
Definition: ctf.c:20
#define Imm32IsCiceroMode()
Definition: precomp.h:118

Referenced by Imm32DestroyInputContext().

◆ ImmGetImeInfoEx()

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

Definition at line 686 of file ime.c.

687 {
688  HKL hKL;
689  if (SearchType == ImeInfoExKeyboardLayout || SearchType == ImeInfoExKeyboardLayoutTFS)
690  {
691  hKL = *(HKL*)pvSearchKey;
692  pImeInfoEx->hkl = hKL;
693 
694  if (SearchType == ImeInfoExKeyboardLayoutTFS)
695  {
696  if (!IS_IME_HKL(hKL))
697  {
700  {
701  return FALSE;
702  }
703  }
704 
705  SearchType = ImeInfoExKeyboardLayout;
706  }
707  else
708  {
709  if (!IS_IME_HKL(hKL))
710  return FALSE;
711  }
712  }
713  else if (SearchType == ImeInfoExImeFileName)
714  {
715  StringCchCopyW(pImeInfoEx->wszImeFile, _countof(pImeInfoEx->wszImeFile),
716  pvSearchKey);
717  }
718  else
719  {
720  return FALSE;
721  }
722 
723  return NtUserGetImeInfoEx(pImeInfoEx, SearchType);
724 }
BOOL WINAPI CtfImmIsTextFrameServiceDisabled(VOID)
Definition: ctf.c:59
#define FALSE
Definition: types.h:117
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
#define IS_IME_HKL(hkl)
Definition: ntuser.h:1203
BOOL NTAPI NtUserGetImeInfoEx(PIMEINFOEX pImeInfoEx, IMEINFOEXCLASS SearchType)
Definition: ime.c:1007
#define _countof(array)
Definition: sndvol32.h:68
UINT_PTR HKL
Definition: msctf.idl:101
WCHAR wszImeFile[80]
Definition: ntuser.h:1187
#define Imm32Is16BitMode()
Definition: precomp.h:119
#define Imm32IsCiceroMode()
Definition: precomp.h:118

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

◆ ImmLockClientImc()

PCLIENTIMC WINAPI ImmLockClientImc ( HIMC  hImc)

Definition at line 909 of file imm.c.

910 {
911  PIMC pIMC;
912  PCLIENTIMC pClientImc;
913 
914  TRACE("(%p)\n", hImc);
915 
916  if (!hImc)
917  return NULL;
918 
919  pIMC = ValidateHandle(hImc, TYPE_INPUTCONTEXT);
920  if (!pIMC || !Imm32CheckImcProcess(pIMC))
921  return NULL;
922 
923  pClientImc = (PCLIENTIMC)pIMC->dwClientImcData;
924  if (pClientImc)
925  {
926  if (pClientImc->dwFlags & CLIENTIMC_DESTROY)
927  return NULL;
928  goto Finish;
929  }
930 
931  pClientImc = ImmLocalAlloc(HEAP_ZERO_MEMORY, sizeof(CLIENTIMC));
932  if (!pClientImc)
933  return NULL;
934 
935  RtlInitializeCriticalSection(&pClientImc->cs);
937 
938  if (!NtUserUpdateInputContext(hImc, UIC_CLIENTIMCDATA, (DWORD_PTR)pClientImc))
939  {
940  ImmLocalFree(pClientImc);
941  return NULL;
942  }
943 
944  pClientImc->dwFlags |= CLIENTIMC_UNKNOWN2;
945 
946 Finish:
947  InterlockedIncrement(&pClientImc->cLockObj);
948  return pClientImc;
949 }
DWORD_PTR NTAPI NtUserGetThreadState(DWORD Routine)
Definition: misc.c:232
ULONG_PTR dwClientImcData
Definition: ntuser.h:194
LPVOID APIENTRY ImmLocalAlloc(DWORD dwFlags, DWORD dwBytes)
Definition: utils.c:234
Definition: ntuser.h:190
if(dx==0 &&dy==0)
Definition: linetemp.h:174
#define DWORD
Definition: nt_native.h:44
#define CLIENTIMC_UNKNOWN2
Definition: ntuser.h:1330
#define CLIENTIMC_DESTROY
Definition: ntuser.h:1328
#define TRACE(s)
Definition: solgame.cpp:4
NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
struct tagCLIENTIMC * PCLIENTIMC
#define ImmLocalFree(lpData)
Definition: precomp.h:89
RTL_CRITICAL_SECTION cs
Definition: ntuser.h:1307
uint32_t DWORD_PTR
Definition: typedefs.h:65
#define InterlockedIncrement
Definition: armddk.h:53
BOOL NTAPI NtUserUpdateInputContext(HIMC hIMC, DWORD dwType, DWORD_PTR dwValue)
Definition: ime.c:1744
#define NULL
Definition: types.h:112
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
BOOL APIENTRY Imm32CheckImcProcess(PIMC pIMC)
Definition: utils.c:221
DWORD dwFlags
Definition: ntuser.h:1305
LPVOID FASTCALL ValidateHandle(HANDLE hObject, UINT uType)
Definition: utils.c:207
DWORD dwCompatFlags
Definition: ntuser.h:1306

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

◆ ImmLockImeDpi()

PIMEDPI WINAPI ImmLockImeDpi ( HKL  hKL)

Definition at line 729 of file ime.c.

730 {
731  PIMEDPI pImeDpi = NULL;
732 
733  TRACE("(%p)\n", hKL);
734 
736 
737  /* Find by hKL */
738  for (pImeDpi = gpImeDpiList; pImeDpi; pImeDpi = pImeDpi->pNext)
739  {
740  if (pImeDpi->hKL == hKL) /* found */
741  {
742  /* lock if possible */
743  if (pImeDpi->dwFlags & IMEDPI_FLAG_UNKNOWN)
744  pImeDpi = NULL;
745  else
746  ++(pImeDpi->cLockObj);
747  break;
748  }
749  }
750 
752  return pImeDpi;
753 }
NTSYSAPI NTSTATUS NTAPI RtlEnterCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
PIMEDPI gpImeDpiList
Definition: ime.c:17
NTSYSAPI NTSTATUS NTAPI RtlLeaveCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
DWORD cLockObj
Definition: ntuser.h:1256
#define TRACE(s)
Definition: solgame.cpp:4
RTL_CRITICAL_SECTION gcsImeDpi
Definition: ime.c:16
struct IMEDPI * pNext
Definition: ntuser.h:1250
DWORD dwFlags
Definition: ntuser.h:1257
#define NULL
Definition: types.h:112
#define IMEDPI_FLAG_UNKNOWN
Definition: ntuser.h:1297
HKL hKL
Definition: ntuser.h:1252

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

◆ ImmUnlockClientImc()

VOID WINAPI ImmUnlockClientImc ( PCLIENTIMC  pClientImc)

Definition at line 954 of file imm.c.

955 {
956  LONG cLocks;
957  HANDLE hInputContext;
958 
959  TRACE("(%p)\n", pClientImc);
960 
961  cLocks = InterlockedDecrement(&pClientImc->cLockObj);
962  if (cLocks != 0 || !(pClientImc->dwFlags & CLIENTIMC_DESTROY))
963  return;
964 
965  hInputContext = pClientImc->hInputContext;
966  if (hInputContext)
967  LocalFree(hInputContext);
968 
969  RtlDeleteCriticalSection(&pClientImc->cs);
970  ImmLocalFree(pClientImc);
971 }
LONG cLockObj
Definition: ntuser.h:1304
static LONG cLocks
Definition: compobj.c:119
#define CLIENTIMC_DESTROY
Definition: ntuser.h:1328
long LONG
Definition: pedump.c:60
#define TRACE(s)
Definition: solgame.cpp:4
HANDLE hInputContext
Definition: ntuser.h:1303
#define ImmLocalFree(lpData)
Definition: precomp.h:89
#define InterlockedDecrement
Definition: armddk.h:52
RTL_CRITICAL_SECTION cs
Definition: ntuser.h:1307
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
DWORD dwFlags
Definition: ntuser.h:1305
NTSYSAPI NTSTATUS NTAPI RtlDeleteCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)

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

◆ ImmUnlockImeDpi()

VOID WINAPI ImmUnlockImeDpi ( PIMEDPI  pImeDpi)

Definition at line 758 of file ime.c.

759 {
760  PIMEDPI *ppEntry;
761 
762  TRACE("(%p)\n", pImeDpi);
763 
764  if (pImeDpi == NULL)
765  return;
766 
768 
769  /* unlock */
770  --(pImeDpi->cLockObj);
771  if (pImeDpi->cLockObj != 0)
772  {
774  return;
775  }
776 
777  if ((pImeDpi->dwFlags & IMEDPI_FLAG_UNKNOWN) == 0)
778  {
779  if ((pImeDpi->dwFlags & IMEDPI_FLAG_LOCKED) == 0 ||
780  (pImeDpi->ImeInfo.fdwProperty & IME_PROP_END_UNLOAD) == 0)
781  {
783  return;
784  }
785  }
786 
787  /* Remove from list */
788  for (ppEntry = &gpImeDpiList; *ppEntry; ppEntry = &((*ppEntry)->pNext))
789  {
790  if (*ppEntry == pImeDpi) /* found */
791  {
792  *ppEntry = pImeDpi->pNext;
793  break;
794  }
795  }
796 
797  Imm32FreeIME(pImeDpi, TRUE);
798  ImmLocalFree(pImeDpi);
799 
801 }
IMEINFO ImeInfo
Definition: ntuser.h:1253
#define TRUE
Definition: types.h:120
NTSYSAPI NTSTATUS NTAPI RtlEnterCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
PIMEDPI gpImeDpiList
Definition: ime.c:17
NTSYSAPI NTSTATUS NTAPI RtlLeaveCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
DWORD cLockObj
Definition: ntuser.h:1256
#define TRACE(s)
Definition: solgame.cpp:4
RTL_CRITICAL_SECTION gcsImeDpi
Definition: ime.c:16
DWORD fdwProperty
Definition: imm.h:158
#define ImmLocalFree(lpData)
Definition: precomp.h:89
struct IMEDPI * pNext
Definition: ntuser.h:1250
DWORD dwFlags
Definition: ntuser.h:1257
#define NULL
Definition: types.h:112
VOID APIENTRY Imm32FreeIME(PIMEDPI pImeDpi, BOOL bDestroy)
Definition: ime.c:36
#define IMEDPI_FLAG_UNKNOWN
Definition: ntuser.h:1297
#define IME_PROP_END_UNLOAD
Definition: imm.h:213
#define IMEDPI_FLAG_LOCKED
Definition: ntuser.h:1298

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