test: immstruc.h File Reference

Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

# immstruc.h File Reference

`#include <imm.h>`
`#include <immp.h>`
`#include <ime.h>`
`#include <imep.h>`

Go to the source code of this file.

## Classes

struct | _tagIMEHOTKEY
struct | _tagIMEHOTKEYOBJ
struct | tagIMEINFOEX

## Defines

#define | NULL_HIMC (HIMC) 0
#define | INVALID_HIMC (HIMC) -1
#define | NULL_HIMCC (HIMCC) 0
#define | INVALID_HIMCC (HIMCC)-1
#define | IMCF_UNICODE 0x0001
#define | IMCF_ACTIVE 0x0002
#define | IMCF_CHGMSG 0x0004
#define | IMCF_SAVECTRL 0x0008
#define | IMCF_PROCESSEVENT 0x0010
#define | IMCF_FIRSTSELECT 0x0020
#define | IMCF_INDESTROY 0x0040
#define | IMCF_WINNLSDISABLE 0x0080
#define | IMCF_DEFAULTIMC 0x0100
#define | IGSC_DEFIMCFALLBACK 0x0001
#define | IGSC_WINNLSCHECK 0x0002
#define | IFL_DEACTIVATEIME 0x0001
#define | IFL_UNLOADIME 0x0002
#define | IS_IME_KBDLAYOUT(hkl) ((HIWORD((ULONG_PTR)(hkl)) & 0xf000) == 0xe000)
#define | IMEF_NONLOAD 0x0000
#define | IMEF_LOADERROR 0x0001
#define | IMEF_LOADED 0x0002
#define | IM_DESC_SIZE 50
#define | IM_FILE_SIZE 80
#define | IM_OPTIONS_SIZE 30
#define | IM_UI_CLASS_SIZE 16
#define | IM_USRFONT_SIZE 80
#define | MOD_MODIFY_KEYS (MOD_ALT|MOD_CONTROL|MOD_SHIFT|MOD_WIN)
#define | MOD_BOTH_SIDES (MOD_LEFT|MOD_RIGHT)
#define | ISHK_REMOVE 1
#define | ISHK_ADD 2
#define | ISHK_INITIALIZE 3
#define | W32KAPI DECLSPEC_ADDRSAFE

## Typedefs

typedef _tagIMEHOTKEY | IMEHOTKEY
typedef IMEHOTKEY * | PIMEHOTKEY
typedef IMEHOTKEY CONST * | PCIMEHOTKEY
typedef _tagIMEHOTKEYOBJ | IMEHOTKEYOBJ
typedef _tagIMEHOTKEYOBJ * | PIMEHOTKEYOBJ
typedef tagIMEINFOEX | IMEINFOEX
typedef tagIMEINFOEX * | PIMEINFOEX
typedef enum _AIC_STATUS | AIC_STATUS
typedef enum _UPDATEINPUTCONTEXTCLASS | UPDATEINPUTCONTEXTCLASS
typedef enum _INPUTCONTEXTINFOCLASS | INPUTCONTEXTINFOCLASS
typedef enum _IMEINFOEXCLASS | IMEINFOEXCLASS

## Enumerations

enum | _AIC_STATUS { AIC_SUCCESS, AIC_FOCUSCONTEXTCHANGED, AIC_ERROR }
enum | _UPDATEINPUTCONTEXTCLASS { UpdateClientInputContext, UpdateInUseImeWindow }
enum | _INPUTCONTEXTINFOCLASS { InputContextProcess, InputContextThread, InputContextDefaultImeWindow, InputContextDefaultInputContext }
enum | _IMEINFOEXCLASS { ImeInfoExKeyboardLayout, ImeInfoExImeWindow, ImeInfoExImeFileName }

## Functions

W32KAPI HIMC | NtUserCreateInputContext (IN ULONG_PTR dwClientImcData)
W32KAPI BOOL | NtUserDestroyInputContext (IN HIMC hImc)
W32KAPI AIC_STATUS | NtUserAssociateInputContext (IN HWND hwnd, IN HIMC hImc, IN DWORD dwFlag)
W32KAPI BOOL | NtUserUpdateInputContext (IN HIMC hImc, IN UPDATEINPUTCONTEXTCLASS UpdateType, IN ULONG_PTR UpdateValue)
W32KAPI ULONG_PTR | NtUserQueryInputContext (IN HIMC hImc, IN INPUTCONTEXTINFOCLASS InputContextInfo)
W32KAPI NTSTATUS | NtUserBuildHimcList (IN DWORD idThread, IN UINT cHimcMax, OUT HIMC *phimcFirst, OUT PUINT pcHimcNeeded)
W32KAPI BOOL | NtUserGetImeInfoEx (IN OUT PIMEINFOEX piiex, IN IMEINFOEXCLASS SearchType)
W32KAPI BOOL | NtUserSetImeInfoEx (IN PIMEINFOEX piiex)
W32KAPI BOOL | NtUserGetImeHotKey (IN DWORD dwID, OUT PUINT puModifiers, OUT PUINT puVKey, OUT HKL *phkl)
W32KAPI BOOL | NtUserSetImeHotKey (IN DWORD dwID, IN UINT uModifiers, IN UINT uVKey, IN HKL hkl, IN DWORD dwAction)
W32KAPI DWORD | NtUserCheckImeHotKey (IN UINT uVKey, IN LPARAM lParam)
W32KAPI BOOL | NtUserSetAppImeLevel (IN HWND hWnd, IN DWORD dwLevel)
W32KAPI DWORD | NtUserGetAppImeLevel (IN HWND hWnd)
W32KAPI BOOL | NtUserSetImeOwnerWindow (IN HWND hwndIme, IN HWND hwndFocus)
W32KAPI VOID | NtUserSetThreadLayoutHandles (IN HKL hklNew, IN HKL hklOld)
W32KAPI VOID | NtUserNotifyIMEStatus (IN HWND hwnd, IN DWORD dwOpenStatus, IN DWORD dwConversion)
W32KAPI BOOL | NtUserDisableThreadIme (IN DWORD dwThreadId)

## Define Documentation

#define IFL_DEACTIVATEIME 0x0001

| Definition at line 52 of file immstruc.h. Referenced by ImmFreeLayout(), xxxImmActivateAndUnloadThreadsLayout(), xxxImmUnloadLayout(), and xxxImmUnloadThreadsLayout().

#define IFL_UNLOADIME 0x0002

| Definition at line 53 of file immstruc.h. Referenced by ImmFreeLayout(), xxxFreeImeKeyboardLayouts(), and xxxImmUnloadThreadsLayout().

#define IGSC_DEFIMCFALLBACK 0x0001

| Definition at line 46 of file immstruc.h. Referenced by ImmGetSaveContext(), ImmSetActiveContext(), and TranslateIMESubFunctions().

#define IGSC_WINNLSCHECK 0x0002

| Definition at line 47 of file immstruc.h. Referenced by ImmGetContext(), ImmGetSaveContext(), and ImmWINNLSGetEnableStatus().

#define IM_DESC_SIZE 50

| Definition at line 64 of file immstruc.h.

#define IM_FILE_SIZE 80

| Definition at line 65 of file immstruc.h. Referenced by GetImeInfoEx(), GetImeLayout(), ImmInstallIMEW(), ImmLoadLayout(), and WriteImeLayout().

#define IM_OPTIONS_SIZE 30

| Definition at line 66 of file immstruc.h.

#define IM_UI_CLASS_SIZE 16

| Definition at line 67 of file immstruc.h. Referenced by InquireIme().

#define IM_USRFONT_SIZE 80

| Definition at line 68 of file immstruc.h.

#define IMCF_ACTIVE 0x0002

| Definition at line 34 of file immstruc.h. Referenced by ImmSetActiveContext().

#define IMCF_CHGMSG 0x0004

| Definition at line 35 of file immstruc.h.

#define IMCF_DEFAULTIMC 0x0100

| Definition at line 41 of file immstruc.h. Referenced by DestroyInputContext(), and ImmLockClientImc().

#define IMCF_FIRSTSELECT 0x0020

| Definition at line 38 of file immstruc.h.

#define IMCF_INDESTROY 0x0040

| Definition at line 39 of file immstruc.h. Referenced by DestroyInputContext(), ImmLockClientImc(), and ImmUnlockClientImc().

#define IMCF_PROCESSEVENT 0x0010

| Definition at line 37 of file immstruc.h.

#define IMCF_SAVECTRL 0x0008

| Definition at line 36 of file immstruc.h.

#define IMCF_UNICODE 0x0001

| Definition at line 33 of file immstruc.h. Referenced by CreateInputContext(), ImmGenerateMessage(), ImmGetCandidateListCountWorker(), ImmGetCandidateListWorker(), ImmGetCompositionFontA(), ImmGetCompositionFontW(), ImmGetCompositionStringA(), ImmGetCompositionStringW(), ImmGetGuideLineWorker(), ImmPostMessages(), ImmSetCompositionFontA(), ImmSetCompositionFontW(), IsAnsiIMC(), MySetCompFont(), SelectInputContext(), and SetFontForMCWVERTICAL().

#define IMCF_WINNLSDISABLE 0x0080

| Definition at line 40 of file immstruc.h. Referenced by ImmEnableIME(), and ImmGetSaveContext().

#define IMEF_LOADED 0x0002

| Definition at line 62 of file immstruc.h. Referenced by ImmGetProperty(), and LoadIME().

#define IMEF_LOADERROR 0x0001

| Definition at line 61 of file immstruc.h. Referenced by LoadIME(), and LoadImeDpi().

#define IMEF_NONLOAD 0x0000

| Definition at line 60 of file immstruc.h. Referenced by ImmLoadLayout(), LoadIME(), and SetImeInfoEx().

#define INVALID_HIMC (HIMC) -1

| Definition at line 26 of file immstruc.h.

#define INVALID_HIMCC (HIMCC)-1

| Definition at line 28 of file immstruc.h.

#define IS_IME_KBDLAYOUT | ( | hkl |  | ) | ((HIWORD((ULONG_PTR)(hkl)) & 0xf000) == 0xe000)

| Definition at line 55 of file immstruc.h.

#define ISHK_ADD 2

| Definition at line 77 of file immstruc.h. Referenced by CliImmSetHotKey(), CliImmSetHotKeyWorker(), CliSetDefaultImeHotKeys(), CliSetSingleHotKey(), LoadKeyboardLayoutWorker(), and SetImeHotKey().

#define ISHK_INITIALIZE 3

| Definition at line 78 of file immstruc.h. Referenced by CliImmInitializeHotKeys(), SetImeHotKey(), and UpdatePerUserSystemParameters().

#define ISHK_REMOVE 1

| Definition at line 76 of file immstruc.h. Referenced by CliImmSetHotKey(), SetImeHotKey(), and UnloadKeyboardLayout().

#define MOD_BOTH_SIDES (MOD_LEFT|MOD_RIGHT)

| Definition at line 75 of file immstruc.h. Referenced by CheckImeHotKey(), CliImmSetHotKeyWorker(), FindImeHotKeyByKey(), FindImeHotKeyByKeyWithLang(), and SetImeHotKey().

#define MOD_MODIFY_KEYS (MOD_ALT|MOD_CONTROL|MOD_SHIFT|MOD_WIN)

| Definition at line 74 of file immstruc.h. Referenced by CheckImeHotKey(), CliImmSetHotKeyWorker(), FindImeHotKeyByKey(), FindImeHotKeyByKeyWithLang(), and SetImeHotKey().

#define NULL_HIMC (HIMC) 0

| Definition at line 25 of file immstruc.h. Referenced by AssociateInputContextEx(), DefWindowProcWorker(), DestroyInputContext(), ECEnableDisableIME(), ECImmSetCompositionFont(), ECImmSetCompositionWindow(), ECNcCreate(), EditWndProc(), FocusSetIMCContext(), HotKeyIDDispatcher(), ImeControlHandler(), ImeSetContextHandler(), ImeSetImc(), ImeSystemHandler(), ImeWndCreateHandler(), ImmAssociateContext(), ImmAssociateContextEx(), ImmCallImeConsoleIME(), ImmCreateContext(), ImmEnableIME(), ImmGetContext(), ImmGetOpenStatus(), ImmGetSaveContext(), ImmLockClientImc(), ImmNotifyIME(), ImmSetActiveContext(), ImmSetActiveContextConsoleIME(), ImmWINNLSGetEnableStatus(), TranslateIMESubFunctions(), and xxxCreateWindowEx().

#define NULL_HIMCC (HIMCC) 0

| Definition at line 27 of file immstruc.h.

#define W32KAPI DECLSPEC_ADDRSAFE

| Definition at line 113 of file immstruc.h.

## Typedef Documentation

typedef enum _AIC_STATUS AIC_STATUS

| Referenced by AssociateInputContextEx(), ImmAssociateContext(), ImmAssociateContextEx(), and NtUserAssociateInputContext().

typedef struct _tagIMEHOTKEY IMEHOTKEY

typedef struct _tagIMEHOTKEYOBJ IMEHOTKEYOBJ

| Referenced by SetImeHotKey().

typedef struct tagIMEINFOEX IMEINFOEX

| Referenced by IMPGetIMEWorker().

typedef enum _IMEINFOEXCLASS IMEINFOEXCLASS

| Referenced by _InitializeImmEntryTable(), and GetPrimaryMonitor().

typedef enum _INPUTCONTEXTINFOCLASS INPUTCONTEXTINFOCLASS

typedef IMEHOTKEY CONST* PCIMEHOTKEY

| Definition at line 87 of file immstruc.h.

typedef IMEHOTKEY* PIMEHOTKEY

| Definition at line 86 of file immstruc.h.

typedef struct _tagIMEHOTKEYOBJ * PIMEHOTKEYOBJ

typedef struct tagIMEINFOEX * PIMEINFOEX

| Referenced by _InitializeImmEntryTable().

typedef enum _UPDATEINPUTCONTEXTCLASS UPDATEINPUTCONTEXTCLASS

## Enumeration Type Documentation

enum _AIC_STATUS

Enumeration values:

  AIC_SUCCESS |
  AIC_FOCUSCONTEXTCHANGED |
  AIC_ERROR |

Definition at line 129 of file immstruc.h.

    00129                          {
    00130     AIC_SUCCESS,
    00131     AIC_FOCUSCONTEXTCHANGED,
    00132     AIC_ERROR,
    00133 } AIC_STATUS;

enum _IMEINFOEXCLASS

Enumeration values:

  ImeInfoExKeyboardLayout |
  ImeInfoExImeWindow |
  ImeInfoExImeFileName |

Definition at line 175 of file immstruc.h.

    00175                              {
    00176     ImeInfoExKeyboardLayout,
    00177     ImeInfoExImeWindow,
    00178     ImeInfoExImeFileName,
    00179 } IMEINFOEXCLASS;

enum _INPUTCONTEXTINFOCLASS

Enumeration values:

  InputContextProcess |
  InputContextThread |
  InputContextDefaultImeWindow |
  InputContextDefaultInputContext |

Definition at line 154 of file immstruc.h.

    00154                                     {
    00155     InputContextProcess,
    00156     InputContextThread,
    00157     InputContextDefaultImeWindow,
    00158     InputContextDefaultInputContext,
    00159 } INPUTCONTEXTINFOCLASS;

enum _UPDATEINPUTCONTEXTCLASS

Enumeration values:

  UpdateClientInputContext |
  UpdateInUseImeWindow |

Definition at line 142 of file immstruc.h.

    00142                                       {
    00143     UpdateClientInputContext,
    00144     UpdateInUseImeWindow,
    00145 } UPDATEINPUTCONTEXTCLASS;

## Function Documentation

W32KAPI AIC_STATUS NtUserAssociateInputContext | ( | IN HWND | hwnd,
|  | IN HIMC | hImc,
|  | IN DWORD | dwFlag
| ) |

Definition at line 12635 of file kernel/ntstubs.c.

References AIC_ERROR, AIC_STATUS, AssociateInputContextEx(), BEGINATOMICRECV_HWND, ENDATOMICRECV_HWND, TRACE, ValidateHIMCOPT, and ValidateIMMEnabled.

Referenced by ImmAssociateContext(), and ImmAssociateContextEx().

    12639 {
    12640     PIMC pImc;
    12641
    12642     BEGINATOMICRECV_HWND(AIC_STATUS, AIC_ERROR, hwnd);
    12643
    12644     ValidateIMMEnabled();
    12645
    12646     ValidateHIMCOPT(pImc, hImc);
    12647
    12648     retval = AssociateInputContextEx(pwnd, pImc, dwFlag);
    12649
    12650     TRACE("NtUserAssociateInputContext");
    12651     ENDATOMICRECV_HWND();
    12652 }

W32KAPI NTSTATUS NtUserBuildHimcList | ( | IN DWORD | idThread,
|  | IN UINT | cHimcMax,
|  | OUT HIMC * | phimcFirst,
|  | OUT PUINT | pcHimcNeeded
| ) |

Definition at line 12710 of file kernel/ntstubs.c.

References BEGINATOMICRECV, BuildHimcList(), DWORD, ENDATOMICRECV, FALSE, MSGERROR, NTSTATUS(), NULL, ProbeForWriteBuffer, ProbeForWriteUlong, PtiCurrent, PtiFromThreadId(), tagTHREADINFO::rpdesk, StubExceptionHandler, TRACE, UINT, and ValidateIMMEnabled.

Referenced by BuildHimcList().

    12715 {
    12716     PTHREADINFO pti;
    12717     UINT cHimcNeeded;
    12718
    12719     BEGINATOMICRECV(NTSTATUS, STATUS_UNSUCCESSFUL);
    12720
    12721     ValidateIMMEnabled();
    12722
    12723     switch (idThread) {
    12724     case 0:
    12725         pti = PtiCurrent();
    12726         break;
    12727     case (DWORD)-1:
    12728         pti = NULL;
    12729         break;
    12730     default:
    12731         pti = PtiFromThreadId(idThread);
    12732         if (pti == NULL || pti->rpdesk == NULL) {
    12733             MSGERROR(0);
    12734         }
    12735         break;
    12736     }
    12737
    12738     /*
    12739      * Probe arguments
    12740      */
    12741     try {
    12742         ProbeForWriteBuffer(phimcFirst, cHimcMax, sizeof(DWORD));
    12743         ProbeForWriteUlong(pcHimcNeeded);
    12744     } except (StubExceptionHandler(FALSE)) {
    12745         MSGERROR(0);
    12746     }
    12747
    12748     /*
    12749      * phimcFirst is client-side.
    12750      */
    12751
    12752     cHimcNeeded = BuildHimcList(pti, cHimcMax, phimcFirst);
    12753
    12754     if (cHimcNeeded <= cHimcMax) {
    12755         retval = STATUS_SUCCESS;
    12756     } else {
    12757         retval = STATUS_BUFFER_TOO_SMALL;
    12758     }
    12759     try {
    12760         *pcHimcNeeded = cHimcNeeded;
    12761     } except (StubExceptionHandler(FALSE)) {
    12762     }
    12763
    12764     TRACE("NtUserBuildHimcList");
    12765     ENDATOMICRECV();
    12766 }

W32KAPI DWORD NtUserCheckImeHotKey | ( | IN UINT | uVKey,
|  | IN LPARAM | lParam
| ) |

W32KAPI HIMC NtUserCreateInputContext | ( | IN ULONG_PTR | dwClientImcData | ) |

Definition at line 12596 of file kernel/ntstubs.c.

References BEGINRECV, CreateInputContext(), ENDRECV, MSGERROR, NULL, PtoH, TRACE, and ValidateIMMEnabled.

Referenced by ImmCreateContext().

    12598 {
    12599     BEGINRECV(HIMC, (HIMC)NULL);
    12600
    12601     ValidateIMMEnabled();
    12602
    12603     if (dwClientImcData == 0) {
    12604         RIPERR0(ERROR_INVALID_PARAMETER, RIP_WARNING, "Invalid hMemClientIC parameter");
    12605         MSGERROR(0);
    12606     }
    12607
    12608     retval = (HIMC)CreateInputContext(dwClientImcData);
    12609
    12610     retval = (HIMC)PtoH((PVOID)retval);
    12611
    12612     TRACE("NtUserCreateInputContext");
    12613     ENDRECV();
    12614 }

W32KAPI BOOL NtUserDestroyInputContext | ( | IN HIMC | hImc | ) |

Definition at line 12617 of file kernel/ntstubs.c.

References BEGINATOMICRECV, BOOL, DestroyInputContext(), ENDATOMICRECV, FALSE, TRACE, ValidateHIMC, and ValidateIMMEnabled.

Referenced by DestroyInputContext().

    12619 {
    12620     PIMC pImc;
    12621
    12622     BEGINATOMICRECV(BOOL, FALSE);
    12623
    12624     ValidateIMMEnabled();
    12625
    12626     ValidateHIMC(pImc, hImc);
    12627
    12628     retval = DestroyInputContext(pImc);
    12629
    12630     TRACE("NtUserDestroyInputContext");
    12631     ENDATOMICRECV();
    12632 }

W32KAPI BOOL NtUserDisableThreadIme | ( | IN DWORD | dwThreadId | ) |

Definition at line 13087 of file kernel/ntstubs.c.

References BEGINRECV, BOOL, ENDRECV, FALSE, MSGERROR, NULL, tagTHREADINFO::ppi, PtiCurrent, PtiFromThreadId(), tagPROCESSINFO::ptiList, tagTHREADINFO::ptiSibling, tagTHREADINFO::spwndDefaultIme, TIF_DISABLEIME, tagTHREADINFO::TIF_flags, TRACE, TRUE, ValidateIMMEnabled, and xxxDestroyWindow().

Referenced by ImmDisableIME().

    13089 {
    13090     PTHREADINFO ptiCurrent, pti;
    13091
    13092     BEGINRECV(BOOL, FALSE);
    13093
    13094     ValidateIMMEnabled();
    13095
    13096     ptiCurrent = PtiCurrent();
    13097
    13098     if (dwThreadId == -1) {
    13099         // IME processing is disabled for all the thread in the current process
    13100         ptiCurrent->ppi->W32PF_Flags |= W32PF_DISABLEIME;
    13101         // destory IME stuff
    13102         pti = ptiCurrent->ppi->ptiList;
    13103         while (pti) {
    13104             pti->TIF_flags |= TIF_DISABLEIME;
    13105             if (pti->spwndDefaultIme != NULL) {
    13106                 xxxDestroyWindow(pti->spwndDefaultIme);
    13107                 // Start the search over from beginning
    13108                 // Since the ptilist may be updated
    13109                 pti = ptiCurrent->ppi->ptiList;
    13110                 continue;
    13111             }
    13112             pti = pti->ptiSibling;
    13113         }
    13114     } else {
    13115         if (dwThreadId == 0) {
    13116             pti = ptiCurrent;
    13117         }
    13118         else {
    13119             pti = PtiFromThreadId(dwThreadId);
    13120             if (pti == NULL || pti->ppi != ptiCurrent->ppi)
    13121                 MSGERROR(0);
    13122         }
    13123         pti->TIF_flags |= TIF_DISABLEIME;
    13124         if (pti->spwndDefaultIme != NULL) {
    13125             xxxDestroyWindow(pti->spwndDefaultIme);
    13126         }
    13127
    13128     }
    13129
    13130     retval = TRUE;
    13131
    13132     TRACE("NtUserDisableThreadIme");
    13133     ENDRECV();
    13134 }

W32KAPI DWORD NtUserGetAppImeLevel | ( | IN HWND | hWnd | ) |

Definition at line 12915 of file kernel/ntstubs.c.

References _GetProp(), BEGINRECV_HWND_SHARED, DWORD, ENDRECV_HWND_SHARED, GETPTI, MSGERROR, PROP_IMELEVEL, PtiCurrentShared, TRACE, TRUE, and ValidateIMMEnabled.

Referenced by TransGetLevel().

    12917 {
    12918     BEGINRECV_HWND_SHARED(DWORD, 0, hwnd);
    12919
    12920     ValidateIMMEnabled();
    12921
    12922     if ( GETPTI(pwnd)->ppi == PtiCurrentShared()->ppi ) {
    12923         retval = (DWORD)(ULONG_PTR)_GetProp(pwnd, PROP_IMELEVEL, TRUE);
    12924     } else {
    12925         MSGERROR(0);
    12926     }
    12927     TRACE("NtUserGetAppImeLevel");
    12928     ENDRECV_HWND_SHARED();
    12929 }

W32KAPI BOOL NtUserGetImeHotKey | ( | IN DWORD | dwID,
|  | OUT PUINT | puModifiers,
|  | OUT PUINT | puVKey,
|  | OUT HKL * | phkl
| ) |

W32KAPI BOOL NtUserGetImeInfoEx | ( | IN OUT PIMEINFOEX | piiex,
|  | IN IMEINFOEXCLASS | SearchType
| ) |

Definition at line 12769 of file kernel/ntstubs.c.

References _GetProcessWindowStation(), BEGINRECV_SHARED, BOOL, BYTE, ENDRECV_SHARED, FALSE, GetImeInfoEx(), MSGERROR, NULL, ProbeForWrite(), StubExceptionHandler, TRACE, and ValidateIMMEnabled.

Referenced by ImmGetImeInfoEx().

    12772 {
    12773     IMEINFOEX iiex;
    12774     BEGINRECV_SHARED(BOOL, FALSE);
    12775
    12776     ValidateIMMEnabled();
    12777
    12778     try {
    12779         ProbeForWrite(piiex, sizeof(*piiex), sizeof(BYTE));
    12780         RtlCopyMemory(&iiex, piiex, sizeof(IMEINFOEX));
    12781     } except (StubExceptionHandler(FALSE)) {
    12782         MSGERROR(0);
    12783     }
    12784
    12785     retval = GetImeInfoEx(
    12786                     _GetProcessWindowStation(NULL),
    12787                     &iiex,
    12788                     SearchType);
    12789
    12790     try {
    12791         RtlCopyMemory(piiex, &iiex, sizeof(IMEINFOEX));
    12792     } except (StubExceptionHandler(FALSE)) {
    12793     }
    12794
    12795     TRACE("NtUserGetImeInfoEx");
    12796     ENDRECV_SHARED();
    12797 }

W32KAPI VOID NtUserNotifyIMEStatus | ( | IN HWND | hwnd,
|  | IN DWORD | dwOpenStatus,
|  | IN DWORD | dwConversion
| ) |

Definition at line 13072 of file kernel/ntstubs.c.

References BEGINRECV_HWNDLOCK_VOID, ENDRECV_HWNDLOCK_VOID, TRACEVOID, ValidateIMMEnabledVOID, VOID(), and xxxNotifyIMEStatus().

Referenced by ImeNotifyHandler(), ImmSetActiveContext(), ImmSetConversionStatus(), ImmSetOpenStatus(), and SendNotificationProc().

    13076 {
    13077     BEGINRECV_HWNDLOCK_VOID(hwnd);
    13078
    13079     ValidateIMMEnabledVOID();
    13080
    13081     xxxNotifyIMEStatus( pwnd, dwOpen, dwConversion );
    13082
    13083     TRACEVOID("NtUserNotifyIMEStatus");
    13084     ENDRECV_HWNDLOCK_VOID()
    13085 }

W32KAPI ULONG_PTR NtUserQueryInputContext | ( | IN HIMC | hImc,
|  | IN INPUTCONTEXTINFOCLASS | InputContextInfo
| ) |

Definition at line 12674 of file kernel/ntstubs.c.

References BEGINRECV_SHARED, ENDRECV_SHARED, GETPTI, HW, InputContextDefaultImeWindow, InputContextDefaultInputContext, InputContextProcess, InputContextThread, PtoH, tagTHREADINFO::spDefaultImc, tagTHREADINFO::spwndDefaultIme, ValidateHIMC, and ValidateIMMEnabled.

Referenced by ImmGetImeMenuItemsInterProcess(), and InternalImmLockIMC().

    12677 {
    12678     PTHREADINFO ptiImc;
    12679     PIMC pImc;
    12680
    12681     BEGINRECV_SHARED(ULONG_PTR, 0);
    12682
    12683     ValidateIMMEnabled();
    12684
    12685     ValidateHIMC(pImc, hImc);
    12686
    12687     ptiImc = GETPTI(pImc);
    12688
    12689     switch (InputContextInfo) {
    12690     case InputContextProcess:
    12691         retval = (ULONG_PTR)ptiImc->pEThread->Cid.UniqueProcess;
    12692         break;
    12693
    12694     case InputContextThread:
    12695         retval = (ULONG_PTR)ptiImc->pEThread->Cid.UniqueThread;
    12696         break;
    12697
    12698     case InputContextDefaultImeWindow:
    12699         retval = (ULONG_PTR)HW(ptiImc->spwndDefaultIme);
    12700         break;
    12701
    12702     case InputContextDefaultInputContext:
    12703         retval = (ULONG_PTR)PtoH(ptiImc->spDefaultImc);
    12704         break;
    12705     }
    12706
    12707     ENDRECV_SHARED();
    12708 }

W32KAPI BOOL NtUserSetAppImeLevel | ( | IN HWND | hWnd,
|  | IN DWORD | dwLevel
| ) |

Definition at line 12887 of file kernel/ntstubs.c.

References BEGINRECV_HWND, BOOL, ENDRECV_HWND, FALSE, GETPTI, InternalSetProp(), MSGERROR, PpiCurrent, PROP_IMELEVEL, PROPF_INTERNAL, PROPF_NOPOOL, TRACE, TRUE, and ValidateIMMEnabled.

Referenced by TransSetLevel().

    12890 {
    12891     BEGINRECV_HWND(BOOL, FALSE, hwnd);
    12892
    12893     ValidateIMMEnabled();
    12894
    12895     if ( GETPTI(pwnd)->ppi == PpiCurrent() ) {
    12896         InternalSetProp(pwnd, PROP_IMELEVEL, (HANDLE)LongToHandle( dwLevel ), PROPF_INTERNAL | PROPF_NOPOOL);
    12897         retval = TRUE;
    12898     } else {
    12899         MSGERROR(0);
    12900     }
    12901     TRACE("NtUserSetAppImeLevel");
    12902     ENDRECV_HWND();
    12903 }

W32KAPI BOOL NtUserSetImeHotKey | ( | IN DWORD | dwID,
|  | IN UINT | uModifiers,
|  | IN UINT | uVKey,
|  | IN HKL | hkl,
|  | IN DWORD | dwAction
| ) |

Definition at line 12863 of file kernel/ntstubs.c.

References BEGINRECV, BOOL, dwFlags, ENDRECV, FALSE, SetImeHotKey(), and TRACE.

Referenced by CliImmSetHotKeyWorker().

    12869 {
    12870     BEGINRECV(BOOL, FALSE);
    12871
    12872     retval = SetImeHotKey( dwID, uModifiers, uVKey, hkl, dwFlags );
    12873     TRACE("NtUserSetImeHotKey");
    12874     ENDRECV();
    12875 }

W32KAPI BOOL NtUserSetImeInfoEx | ( | IN PIMEINFOEX | piiex | ) |

Definition at line 12800 of file kernel/ntstubs.c.

References _GetProcessWindowStation(), BEGINRECV, BOOL, BYTE, ENDRECV, FALSE, MSGERROR, NULL, ProbeForRead, SetImeInfoEx(), StubExceptionHandler, TRACE, and ValidateIMMEnabled.

Referenced by LoadIME().

    12802 {
    12803     IMEINFOEX iiex;
    12804     BEGINRECV(BOOL, FALSE);
    12805
    12806     ValidateIMMEnabled();
    12807
    12808     /*
    12809      * Probe arguments
    12810      */
    12811     try {
    12812         ProbeForRead(piiex, sizeof(*piiex), sizeof(BYTE));
    12813         RtlCopyMemory(&iiex, piiex, sizeof(IMEINFOEX));
    12814     } except (StubExceptionHandler(FALSE)) {
    12815         MSGERROR(0);
    12816     }
    12817
    12818     retval = SetImeInfoEx(
    12819                     _GetProcessWindowStation(NULL),
    12820                     &iiex);
    12821
    12822     TRACE("NtUserSetImeInfoEx");
    12823     ENDRECV();
    12824 }

W32KAPI BOOL NtUserSetImeOwnerWindow | ( | IN HWND | hwndIme,
|  | IN HWND | hwndFocus
| ) |

Definition at line 12956 of file kernel/ntstubs.c.

References tagCLS::atomClassName, tagSERVERINFO::atomSysClass, BEGINATOMICRECV_HWND, BOOL, CFIME, ENDATOMICRECV_HWND, FALSE, FNID_IME, GETFNID, GETPTI, GetTopLevelWindow(), gpsi, ICLS_IME, ImeCheckTopmost(), ImeSetFutureOwner(), IsWndImeRelated, Lock, MSGERROR, NULL, tagWND::pcls, tagTHREADINFO::pq, tagQ::spwndActive, tagWND::spwndOwner, TestCF, TRACE, TRUE, ValidateHWNDOPT, and ValidateIMMEnabled.

Referenced by ImeSetContextHandler().

    12959 {
    12960     PWND pwndFocus;
    12961
    12962     BEGINATOMICRECV_HWND(BOOL, FALSE, hwndIme);
    12963
    12964     ValidateIMMEnabled();
    12965
    12966     /*
    12967      * Make sure this really is an IME window.
    12968      */
    12969     if (GETFNID(pwnd) != FNID_IME)
    12970         MSGERROR(0);
    12971
    12972     ValidateHWNDOPT(pwndFocus, hwndFocus);
    12973
    12974     if (pwndFocus != NULL) {
    12975         PWND pwndTopLevel;
    12976         PWND pwndT;
    12977
    12978         if (TestCF(pwndFocus, CFIME) ||
    12979                 pwndFocus->pcls->atomClassName == gpsi->atomSysClass[ICLS_IME]) {
    12980             RIPMSG0(RIP_WARNING, "Focus window should not be an IME/UI window!!");
    12981             MSGERROR(0);
    12982         }
    12983
    12984         /*
    12985          * Child window cannot be an owner window.
    12986          */
    12987         pwndTopLevel = pwndT = GetTopLevelWindow(pwndFocus);
    12988
    12989         /*
    12990          * To prevent the IME window becomes the onwer (HY?)
    12991          */
    12992         while (pwndT != NULL) {
    12993             if (pwndT->pcls->atomClassName == gpsi->atomSysClass[ICLS_IME]) {
    12994                 RIPMSG0(RIP_WARNING,
    12995                         "The owner of focus window should not be an IME window!!");
    12996                 pwndTopLevel = NULL;
    12997                 break;
    12998             }
    12999             pwndT = pwndT->spwndOwner;
    13000         }
    13001
    13002         UserAssert(pwnd->pcls->atomClassName == gpsi->atomSysClass[ICLS_IME]);
    13003         UserAssert(pwndTopLevel == NULL || !TestCF(pwndTopLevel, CFIME));
    13004         Lock(&pwnd->spwndOwner, pwndTopLevel);
    13005         ImeCheckTopmost(pwnd);
    13006     }
    13007     else {
    13008         PTHREADINFO ptiImeWnd = GETPTI(pwnd);
    13009         PWND pwndActive = ptiImeWnd->pq->spwndActive;
    13010
    13011         /*
    13012          * If pwndFocus == NULL, active window in the queue should become the
    13013          * owner window of the IME window, except: if IME related windows
    13014          * somehow got a focus, or the active window belongs to the other thread.
    13015          */
    13016         if (pwndActive == NULL || pwndActive != pwnd->spwndOwner) {
    13017             if (pwndActive == NULL || IsWndImeRelated(pwndActive) || ptiImeWnd != GETPTI(pwndActive)) {
    13018                 /*
    13019                  * We should avoid improper window to be an owner of IME window.
    13020                  */
    13021                 ImeSetFutureOwner(pwnd, pwnd->spwndOwner);
    13022             }
    13023             else {
    13024                 Lock(&pwnd->spwndOwner, pwndActive);
    13025             }
    13026             ImeCheckTopmost(pwnd);
    13027         }
    13028     }
    13029
    13030     retval = TRUE;
    13031
    13032     TRACE("NtUserSetImeNewOwner");
    13033     ENDATOMICRECV_HWND();
    13034 }

W32KAPI VOID NtUserSetThreadLayoutHandles | ( | IN HKL | hklNew,
|  | IN HKL | hklOld
| ) |

Definition at line 13037 of file kernel/ntstubs.c.

References BEGINRECV_VOID, ENDRECV_VOID, tagKL::hkl, tagTHREADINFO::hklPrev, HKLtoPKL(), IS_IME_KBDLAYOUT, Lock, MSGERROR_VOID, NULL, PtiCurrent, tagTHREADINFO::spklActive, TRACEVOID, and VOID().

Referenced by ImmActivateLayout().

    13040 {
    13041     PTHREADINFO ptiCurrent;
    13042     PKL         pklNew;
    13043
    13044     BEGINRECV_VOID();
    13045
    13046     ptiCurrent = PtiCurrent();
    13047
    13048     if (ptiCurrent->spklActive != NULL && ptiCurrent->spklActive->hkl != hklOld)
    13049         MSGERROR_VOID();
    13050
    13051     if ((pklNew = HKLtoPKL(ptiCurrent, hklNew)) == NULL)
    13052         MSGERROR_VOID();
    13053
    13054     /*
    13055      * hklPrev is only used for IME, non-IME toggle hotkey.
    13056      * The purpose we remember hklPrev is to jump from
    13057      * non-IME keyboard layout to the most recently used
    13058      * IME layout, or to jump from an IME layout to
    13059      * the most recently used non-IME layout. Therefore
    13060      * piti->hklPrev is updated only when [ IME -> non-IME ]
    13061      * or [ non-IME -> IME ] transition is happened.
    13062      */
    13063     if (IS_IME_KBDLAYOUT(hklNew) ^ IS_IME_KBDLAYOUT(hklOld))
    13064         ptiCurrent->hklPrev = hklOld;
    13065
    13066     Lock(&ptiCurrent->spklActive, pklNew);
    13067
    13068     TRACEVOID("NtUserSetThreadLayoutHandles");
    13069     ENDRECV_VOID();
    13070 }

W32KAPI BOOL NtUserUpdateInputContext | ( | IN HIMC | hImc,
|  | IN UPDATEINPUTCONTEXTCLASS | UpdateType,
|  | IN ULONG_PTR | UpdateValue
| ) |

Definition at line 12654 of file kernel/ntstubs.c.

References BEGINATOMICRECV, BOOL, ENDATOMICRECV, FALSE, TRACE, UpdateInputContext(), ValidateHIMC, and ValidateIMMEnabled.

Referenced by ImeMarkUsedContext(), and ImmLockClientImc().

    12658 {
    12659     PIMC pImc;
    12660
    12661     BEGINATOMICRECV(BOOL, FALSE);
    12662
    12663     ValidateIMMEnabled();
    12664
    12665     ValidateHIMC(pImc, hImc);
    12666
    12667     retval = UpdateInputContext(pImc, UpdateType, UpdateValue);
    12668
    12669     TRACE("NtUserUpdateInputContext");
    12670     ENDATOMICRECV();
    12671 }