module win32.ansi.imm;

// Translated from Microsoft Platform SDK August 2001 Edition
// by Y.Tomino (demoonlit@inter7.jp)

import win32.ansi.winuser;

// #ifndef _IMM_
// #define _IMM_

// #ifdef __cplusplus
// extern "C" {
// #endif

// #ifndef _IMM_SDK_DEFINED_
// #define _IMM_SDK_DEFINED_

// #if (WINVER >= 0x040A)
alias void* HIMC;
alias void* HIMCC;
// #else
// ...
// #endif /* WINVER >= 0x040A */

alias HKL* LPHKL;
alias UINT* LPUINT;

struct tagCOMPOSITIONFORM {
  DWORD dwStyle;
  POINT ptCurrentPos;
  RECT rcArea;
}
alias tagCOMPOSITIONFORM COMPOSITIONFORM;
alias tagCOMPOSITIONFORM* PCOMPOSITIONFORM;
alias tagCOMPOSITIONFORM* NPCOMPOSITIONFORM;
alias tagCOMPOSITIONFORM* LPCOMPOSITIONFORM;

struct tagCANDIDATEFORM {
  DWORD dwIndex;
  DWORD dwStyle;
  POINT ptCurrentPos;
  RECT rcArea;
}
alias tagCANDIDATEFORM CANDIDATEFORM;
alias tagCANDIDATEFORM* PCANDIDATEFORM;
alias tagCANDIDATEFORM* NPCANDIDATEFORM;
alias tagCANDIDATEFORM* LPCANDIDATEFORM;

struct tagCANDIDATELIST {
  DWORD dwSize;
  DWORD dwStyle;
  DWORD dwCount;
  DWORD dwSelection;
  DWORD dwPageStart;
  DWORD dwPageSize;
  DWORD dwOffset[1];
}
alias tagCANDIDATELIST CANDIDATELIST;
alias tagCANDIDATELIST* PCANDIDATELIST;
alias tagCANDIDATELIST* NPCANDIDATELIST;
alias tagCANDIDATELIST* LPCANDIDATELIST;

struct tagREGISTERWORDA {
  LPSTR lpReading;
  LPSTR lpWord;
}
alias tagREGISTERWORDA REGISTERWORDA;
alias tagREGISTERWORDA* PREGISTERWORDA;
alias tagREGISTERWORDA* NPREGISTERWORDA;
alias tagREGISTERWORDA* LPREGISTERWORDA;

struct tagREGISTERWORDW {
  LPWSTR lpReading;
  LPWSTR lpWord;
}
alias tagREGISTERWORDW REGISTERWORDW;
alias tagREGISTERWORDW* PREGISTERWORDW;
alias tagREGISTERWORDW* NPREGISTERWORDW;
alias tagREGISTERWORDW* LPREGISTERWORDW;

// #ifdef UNICODE
// ...
// #else
alias REGISTERWORDA REGISTERWORD;
alias PREGISTERWORDA PREGISTERWORD;
alias NPREGISTERWORDA NPREGISTERWORD;
alias LPREGISTERWORDA LPREGISTERWORD;
// #endif // UNICODE

// #if (WINVER >= 0x040A)

struct tagRECONVERTSTRING {
  DWORD dwSize;
  DWORD dwVersion;
  DWORD dwStrLen;
  DWORD dwStrOffset;
  DWORD dwCompStrLen;
  DWORD dwCompStrOffset;
  DWORD dwTargetStrLen;
  DWORD dwTargetStrOffset;
}
alias tagRECONVERTSTRING RECONVERTSTRING;
alias tagRECONVERTSTRING* PRECONVERTSTRING;
alias tagRECONVERTSTRING* NPRECONVERTSTRING;
alias tagRECONVERTSTRING* LPRECONVERTSTRING;

// #endif /* WINVER >= 0x040A */

enum : uint { STYLE_DESCRIPTION_SIZE = 32 }

struct tagSTYLEBUFA {
  DWORD dwStyle;
  CHAR szDescription[STYLE_DESCRIPTION_SIZE];
}
alias tagSTYLEBUFA STYLEBUFA;
alias tagSTYLEBUFA* PSTYLEBUFA;
alias tagSTYLEBUFA* NPSTYLEBUFA;
alias tagSTYLEBUFA* LPSTYLEBUFA;

struct tagSTYLEBUFW {
  DWORD dwStyle;
  WCHAR szDescription[STYLE_DESCRIPTION_SIZE];
}
alias tagSTYLEBUFW STYLEBUFW;
alias tagSTYLEBUFW* PSTYLEBUFW;
alias tagSTYLEBUFW* NPSTYLEBUFW;
alias tagSTYLEBUFW* LPSTYLEBUFW;

// #ifdef UNICODE
// ...
// #else
alias STYLEBUFA STYLEBUF;
alias PSTYLEBUFA PSTYLEBUF;
alias NPSTYLEBUFA NPSTYLEBUF;
alias LPSTYLEBUFA LPSTYLEBUF;
// #endif // UNICODE

// #if (WINVER >= 0x040A)

enum : uint { IMEMENUITEM_STRING_SIZE = 80 }

struct tagIMEMENUITEMINFOA {
  UINT cbSize;
  UINT fType;
  UINT fState;
  UINT wID;
  HBITMAP hbmpChecked;
  HBITMAP hbmpUnchecked;
  DWORD dwItemData;
  CHAR szString[IMEMENUITEM_STRING_SIZE];
  HBITMAP hbmpItem;
}
alias tagIMEMENUITEMINFOA IMEMENUITEMINFOA;
alias tagIMEMENUITEMINFOA* PIMEMENUITEMINFOA;
alias tagIMEMENUITEMINFOA* NPIMEMENUITEMINFOA;
alias tagIMEMENUITEMINFOA* LPIMEMENUITEMINFOA;

struct tagIMEMENUITEMINFOW {
  UINT cbSize;
  UINT fType;
  UINT fState;
  UINT wID;
  HBITMAP hbmpChecked;
  HBITMAP hbmpUnchecked;
  DWORD dwItemData;
  WCHAR szString[IMEMENUITEM_STRING_SIZE];
  HBITMAP hbmpItem;
}
alias tagIMEMENUITEMINFOW IMEMENUITEMINFOW;
alias tagIMEMENUITEMINFOW* PIMEMENUITEMINFOW;
alias tagIMEMENUITEMINFOW* NPIMEMENUITEMINFOW;
alias tagIMEMENUITEMINFOW* LPIMEMENUITEMINFOW;

// #ifdef UNICODE
// ...
// #else
alias IMEMENUITEMINFOA IMEMENUITEMINFO;
alias PIMEMENUITEMINFOA PIMEMENUITEMINFO;
alias NPIMEMENUITEMINFOA NPIMEMENUITEMINFO;
alias LPIMEMENUITEMINFOA LPIMEMENUITEMINFO;
// #endif // UNICODE

struct tagIMECHARPOSITION {
  DWORD dwSize;
  DWORD dwCharPos;
  POINT pt;
  UINT cLineHeight;
  RECT rcDocument;
}
alias tagIMECHARPOSITION IMECHARPOSITION;
alias tagIMECHARPOSITION* PIMECHARPOSITION;
alias tagIMECHARPOSITION* NPIMECHARPOSITION;
alias tagIMECHARPOSITION* LPIMECHARPOSITION;

extern(Windows) alias BOOL function(HIMC, LPARAM) IMCENUMPROC;

// #endif /* WINVER >= 0x040A */

extern(Windows) export HKL ImmInstallIMEA( LPCSTR lpszIMEFileName, LPCSTR lpszLayoutText);
extern(Windows) export HKL ImmInstallIMEW( LPCWSTR lpszIMEFileName, LPCWSTR lpszLayoutText);
// #ifdef UNICODE
// #...
// #else
alias ImmInstallIMEA ImmInstallIME;
// #endif // !UNICODE

extern(Windows) export HWND ImmGetDefaultIMEWnd( HWND);

extern(Windows) export UINT ImmGetDescriptionA( HKL, LPSTR, UINT uBufLen);
extern(Windows) export UINT ImmGetDescriptionW( HKL, LPWSTR, UINT uBufLen);
// #ifdef UNICODE
// #...
// #else
alias ImmGetDescriptionA ImmGetDescription;
// #endif // !UNICODE

extern(Windows) export UINT ImmGetIMEFileNameA( HKL, LPSTR, UINT uBufLen);
extern(Windows) export UINT ImmGetIMEFileNameW( HKL, LPWSTR, UINT uBufLen);
// #ifdef UNICODE
// #...
// #else
alias ImmGetIMEFileNameA ImmGetIMEFileName;
// #endif // !UNICODE

extern(Windows) export DWORD ImmGetProperty( HKL, DWORD);

extern(Windows) export BOOL ImmIsIME( HKL);

extern(Windows) export BOOL ImmSimulateHotKey( HWND, DWORD);

extern(Windows) export HIMC ImmCreateContext();
extern(Windows) export BOOL ImmDestroyContext( HIMC);
extern(Windows) export HIMC ImmGetContext( HWND);
extern(Windows) export BOOL ImmReleaseContext( HWND, HIMC);
extern(Windows) export HIMC ImmAssociateContext( HWND, HIMC);
// #if (WINVER >= 0x040A)
extern(Windows) export BOOL ImmAssociateContextEx( HWND, HIMC, DWORD);
// #endif /* WINVER >= 0x040A */

extern(Windows) export LONG ImmGetCompositionStringA( HIMC, DWORD, LPVOID, DWORD);
extern(Windows) export LONG ImmGetCompositionStringW( HIMC, DWORD, LPVOID, DWORD);
// #ifdef UNICODE
// #...
// #else
alias ImmGetCompositionStringA ImmGetCompositionString;
// #endif // !UNICODE

extern(Windows) export BOOL ImmSetCompositionStringA( HIMC, DWORD dwIndex, LPVOID lpComp, DWORD, LPVOID lpRead, DWORD);
extern(Windows) export BOOL ImmSetCompositionStringW( HIMC, DWORD dwIndex, LPVOID lpComp, DWORD, LPVOID lpRead, DWORD);
// #ifdef UNICODE
// #...
// #else
alias ImmSetCompositionStringA ImmSetCompositionString;
// #endif // !UNICODE

extern(Windows) export DWORD ImmGetCandidateListCountA( HIMC, LPDWORD lpdwListCount);
extern(Windows) export DWORD ImmGetCandidateListCountW( HIMC, LPDWORD lpdwListCount);
// #ifdef UNICODE
// #...
// #else
alias ImmGetCandidateListCountA ImmGetCandidateListCount;
// #endif // !UNICODE

extern(Windows) export DWORD ImmGetCandidateListA( HIMC, DWORD deIndex, LPCANDIDATELIST, DWORD dwBufLen);
extern(Windows) export DWORD ImmGetCandidateListW( HIMC, DWORD deIndex, LPCANDIDATELIST, DWORD dwBufLen);
// #ifdef UNICODE
// #...
// #else
alias ImmGetCandidateListA ImmGetCandidateList;
// #endif // !UNICODE

extern(Windows) export DWORD ImmGetGuideLineA( HIMC, DWORD dwIndex, LPSTR, DWORD dwBufLen);
extern(Windows) export DWORD ImmGetGuideLineW( HIMC, DWORD dwIndex, LPWSTR, DWORD dwBufLen);
// #ifdef UNICODE
// #...
// #else
alias ImmGetGuideLineA ImmGetGuideLine;
// #endif // !UNICODE

extern(Windows) export BOOL ImmGetConversionStatus( HIMC, LPDWORD, LPDWORD);
extern(Windows) export BOOL ImmSetConversionStatus( HIMC, DWORD, DWORD);
extern(Windows) export BOOL ImmGetOpenStatus( HIMC);
extern(Windows) export BOOL ImmSetOpenStatus( HIMC, BOOL);

// #if defined(_WINGDI_) && !defined(NOGDI)
// ...
// #ifdef UNICODE
// #...
// #else
// #...
// #endif // !UNICODE

// ...
// #ifdef UNICODE
// #...
// #else
// #...
// #endif // !UNICODE
// #endif  // defined(_WINGDI_) && !defined(NOGDI)

extern(Windows) export BOOL ImmConfigureIMEA( HKL, HWND, DWORD, LPVOID);
extern(Windows) export BOOL ImmConfigureIMEW( HKL, HWND, DWORD, LPVOID);
// #ifdef UNICODE
// #...
// #else
alias ImmConfigureIMEA ImmConfigureIME;
// #endif // !UNICODE

extern(Windows) export LRESULT ImmEscapeA( HKL, HIMC, UINT, LPVOID);
extern(Windows) export LRESULT ImmEscapeW( HKL, HIMC, UINT, LPVOID);
// #ifdef UNICODE
// #...
// #else
alias ImmEscapeA ImmEscape;
// #endif // !UNICODE

extern(Windows) export DWORD ImmGetConversionListA( HKL, HIMC, LPCSTR, LPCANDIDATELIST, DWORD dwBufLen, UINT uFlag);
extern(Windows) export DWORD ImmGetConversionListW( HKL, HIMC, LPCWSTR, LPCANDIDATELIST, DWORD dwBufLen, UINT uFlag);
// #ifdef UNICODE
// #...
// #else
alias ImmGetConversionListA ImmGetConversionList;
// #endif // !UNICODE

extern(Windows) export BOOL ImmNotifyIME( HIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue);

extern(Windows) export BOOL ImmGetStatusWindowPos( HIMC, LPPOINT);
extern(Windows) export BOOL ImmSetStatusWindowPos( HIMC, LPPOINT);
extern(Windows) export BOOL ImmGetCompositionWindow( HIMC, LPCOMPOSITIONFORM);
extern(Windows) export BOOL ImmSetCompositionWindow( HIMC, LPCOMPOSITIONFORM);
extern(Windows) export BOOL ImmGetCandidateWindow( HIMC, DWORD, LPCANDIDATEFORM);
extern(Windows) export BOOL ImmSetCandidateWindow( HIMC, LPCANDIDATEFORM);

extern(Windows) export BOOL ImmIsUIMessageA( HWND, UINT, WPARAM, LPARAM);
extern(Windows) export BOOL ImmIsUIMessageW( HWND, UINT, WPARAM, LPARAM);
// #ifdef UNICODE
// #...
// #else
alias ImmIsUIMessageA ImmIsUIMessage;
// #endif // !UNICODE

extern(Windows) export UINT ImmGetVirtualKey( HWND);

extern(Windows) alias int function(LPCSTR, DWORD, LPCSTR, LPVOID) REGISTERWORDENUMPROCA;
extern(Windows) alias int function(LPCWSTR, DWORD, LPCWSTR, LPVOID) REGISTERWORDENUMPROCW;
// #ifdef UNICODE
// #...
// #else
alias REGISTERWORDENUMPROCA REGISTERWORDENUMPROC;
// #endif // !UNICODE

extern(Windows) export BOOL ImmRegisterWordA( HKL, LPCSTR lpszReading, DWORD, LPCSTR lpszRegister);
extern(Windows) export BOOL ImmRegisterWordW( HKL, LPCWSTR lpszReading, DWORD, LPCWSTR lpszRegister);
// #ifdef UNICODE
// #...
// #else
alias ImmRegisterWordA ImmRegisterWord;
// #endif // !UNICODE

extern(Windows) export BOOL ImmUnregisterWordA( HKL, LPCSTR lpszReading, DWORD, LPCSTR lpszUnregister);
extern(Windows) export BOOL ImmUnregisterWordW( HKL, LPCWSTR lpszReading, DWORD, LPCWSTR lpszUnregister);
// #ifdef UNICODE
// #...
// #else
alias ImmUnregisterWordA ImmUnregisterWord;
// #endif // !UNICODE

extern(Windows) export UINT ImmGetRegisterWordStyleA( HKL, UINT nItem, LPSTYLEBUFA);
extern(Windows) export UINT ImmGetRegisterWordStyleW( HKL, UINT nItem, LPSTYLEBUFW);
// #ifdef UNICODE
// #...
// #else
alias ImmGetRegisterWordStyleA ImmGetRegisterWordStyle;
// #endif // !UNICODE

extern(Windows) export UINT ImmEnumRegisterWordA( HKL, REGISTERWORDENUMPROCA, LPCSTR lpszReading, DWORD, LPCSTR lpszRegister, LPVOID);
extern(Windows) export UINT ImmEnumRegisterWordW( HKL, REGISTERWORDENUMPROCW, LPCWSTR lpszReading, DWORD, LPCWSTR lpszRegister, LPVOID);
// #ifdef UNICODE
// #...
// #else
alias ImmEnumRegisterWordA ImmEnumRegisterWord;
// #endif // !UNICODE

// #if (WINVER >= 0x040A)
extern(Windows) export BOOL ImmDisableIME( DWORD);
extern(Windows) export BOOL ImmEnumInputContext(DWORD idThread, IMCENUMPROC lpfn, LPARAM lParam);
extern(Windows) export DWORD ImmGetImeMenuItemsA( HIMC, DWORD, DWORD, LPIMEMENUITEMINFOA, LPIMEMENUITEMINFOA, DWORD);
extern(Windows) export DWORD ImmGetImeMenuItemsW( HIMC, DWORD, DWORD, LPIMEMENUITEMINFOW, LPIMEMENUITEMINFOW, DWORD);
// #ifdef UNICODE
// #...
// #else
alias ImmGetImeMenuItemsA ImmGetImeMenuItems;
// #endif // !UNICODE
// #endif /* WINVER >= 0x040A */

enum : uint { IMC_GETCANDIDATEPOS = 0x0007 }
enum : uint { IMC_SETCANDIDATEPOS = 0x0008 }
enum : uint { IMC_GETCOMPOSITIONFONT = 0x0009 }
enum : uint { IMC_SETCOMPOSITIONFONT = 0x000A }
enum : uint { IMC_GETCOMPOSITIONWINDOW = 0x000B }
enum : uint { IMC_SETCOMPOSITIONWINDOW = 0x000C }
enum : uint { IMC_GETSTATUSWINDOWPOS = 0x000F }
enum : uint { IMC_SETSTATUSWINDOWPOS = 0x0010 }
enum : uint { IMC_CLOSESTATUSWINDOW = 0x0021 }
enum : uint { IMC_OPENSTATUSWINDOW = 0x0022 }

enum : uint { NI_OPENCANDIDATE = 0x0010 }
enum : uint { NI_CLOSECANDIDATE = 0x0011 }
enum : uint { NI_SELECTCANDIDATESTR = 0x0012 }
enum : uint { NI_CHANGECANDIDATELIST = 0x0013 }
enum : uint { NI_FINALIZECONVERSIONRESULT = 0x0014 }
enum : uint { NI_COMPOSITIONSTR = 0x0015 }
enum : uint { NI_SETCANDIDATE_PAGESTART = 0x0016 }
enum : uint { NI_SETCANDIDATE_PAGESIZE = 0x0017 }
enum : uint { NI_IMEMENUSELECTED = 0x0018 }

enum : uint { ISC_SHOWUICANDIDATEWINDOW = 0x00000001 }
enum : uint { ISC_SHOWUICOMPOSITIONWINDOW = 0x80000000 }
enum : uint { ISC_SHOWUIGUIDELINE = 0x40000000 }
enum : uint { ISC_SHOWUIALLCANDIDATEWINDOW = 0x0000000F }
enum : uint { ISC_SHOWUIALL = 0xC000000F }

enum : uint { CPS_COMPLETE = 0x0001 }
enum : uint { CPS_CONVERT = 0x0002 }
enum : uint { CPS_REVERT = 0x0003 }
enum : uint { CPS_CANCEL = 0x0004 }

enum : uint { MOD_ALT = 0x0001 }
enum : uint { MOD_CONTROL = 0x0002 }
enum : uint { MOD_SHIFT = 0x0004 }

enum : uint { MOD_LEFT = 0x8000 }
enum : uint { MOD_RIGHT = 0x4000 }

enum : uint { MOD_ON_KEYUP = 0x0800 }
enum : uint { MOD_IGNORE_ALL_MODIFIER = 0x0400 }

enum : uint { IME_CHOTKEY_IME_NONIME_TOGGLE = 0x10 }
enum : uint { IME_CHOTKEY_SHAPE_TOGGLE = 0x11 }
enum : uint { IME_CHOTKEY_SYMBOL_TOGGLE = 0x12 }

enum : uint { IME_JHOTKEY_CLOSE_OPEN = 0x30 }

enum : uint { IME_KHOTKEY_SHAPE_TOGGLE = 0x50 }
enum : uint { IME_KHOTKEY_HANJACONVERT = 0x51 }
enum : uint { IME_KHOTKEY_ENGLISH = 0x52 }

enum : uint { IME_THOTKEY_IME_NONIME_TOGGLE = 0x70 }
enum : uint { IME_THOTKEY_SHAPE_TOGGLE = 0x71 }
enum : uint { IME_THOTKEY_SYMBOL_TOGGLE = 0x72 }

enum : uint { IME_HOTKEY_DSWITCH_FIRST = 0x100 }
enum : uint { IME_HOTKEY_DSWITCH_LAST = 0x11F }

enum : uint { IME_HOTKEY_PRIVATE_FIRST = 0x200 }
enum : uint { IME_ITHOTKEY_RESEND_RESULTSTR = 0x200 }
enum : uint { IME_ITHOTKEY_PREVIOUS_COMPOSITION = 0x201 }
enum : uint { IME_ITHOTKEY_UISTYLE_TOGGLE = 0x202 }
enum : uint { IME_ITHOTKEY_RECONVERTSTRING = 0x203 }
enum : uint { IME_HOTKEY_PRIVATE_LAST = 0x21F }

enum : uint { GCS_COMPREADSTR = 0x0001 }
enum : uint { GCS_COMPREADATTR = 0x0002 }
enum : uint { GCS_COMPREADCLAUSE = 0x0004 }
enum : uint { GCS_COMPSTR = 0x0008 }
enum : uint { GCS_COMPATTR = 0x0010 }
enum : uint { GCS_COMPCLAUSE = 0x0020 }
enum : uint { GCS_CURSORPOS = 0x0080 }
enum : uint { GCS_DELTASTART = 0x0100 }
enum : uint { GCS_RESULTREADSTR = 0x0200 }
enum : uint { GCS_RESULTREADCLAUSE = 0x0400 }
enum : uint { GCS_RESULTSTR = 0x0800 }
enum : uint { GCS_RESULTCLAUSE = 0x1000 }

enum : uint { CS_INSERTCHAR = 0x2000 }
enum : uint { CS_NOMOVECARET = 0x4000 }

enum : uint { IMEVER_0310 = 0x0003000A }
enum : uint { IMEVER_0400 = 0x00040000 }

enum : uint { IME_PROP_AT_CARET = 0x00010000 }
enum : uint { IME_PROP_SPECIAL_UI = 0x00020000 }
enum : uint { IME_PROP_CANDLIST_START_FROM_1 = 0x00040000 }
enum : uint { IME_PROP_UNICODE = 0x00080000 }
enum : uint { IME_PROP_COMPLETE_ON_UNSELECT = 0x00100000 }

enum : uint { UI_CAP_2700 = 0x00000001 }
enum : uint { UI_CAP_ROT90 = 0x00000002 }
enum : uint { UI_CAP_ROTANY = 0x00000004 }

enum : uint { SCS_CAP_COMPSTR = 0x00000001 }
enum : uint { SCS_CAP_MAKEREAD = 0x00000002 }
enum : uint { SCS_CAP_SETRECONVERTSTRING = 0x00000004 }

enum : uint { SELECT_CAP_CONVERSION = 0x00000001 }
enum : uint { SELECT_CAP_SENTENCE = 0x00000002 }

enum : uint { GGL_LEVEL = 0x00000001 }
enum : uint { GGL_INDEX = 0x00000002 }
enum : uint { GGL_STRING = 0x00000003 }
enum : uint { GGL_PRIVATE = 0x00000004 }

enum : uint { GL_LEVEL_NOGUIDELINE = 0x00000000 }
enum : uint { GL_LEVEL_FATAL = 0x00000001 }
enum : uint { GL_LEVEL_ERROR = 0x00000002 }
enum : uint { GL_LEVEL_WARNING = 0x00000003 }
enum : uint { GL_LEVEL_INFORMATION = 0x00000004 }

enum : uint { GL_ID_UNKNOWN = 0x00000000 }
enum : uint { GL_ID_NOMODULE = 0x00000001 }
enum : uint { GL_ID_NODICTIONARY = 0x00000010 }
enum : uint { GL_ID_CANNOTSAVE = 0x00000011 }
enum : uint { GL_ID_NOCONVERT = 0x00000020 }
enum : uint { GL_ID_TYPINGERROR = 0x00000021 }
enum : uint { GL_ID_TOOMANYSTROKE = 0x00000022 }
enum : uint { GL_ID_READINGCONFLICT = 0x00000023 }
enum : uint { GL_ID_INPUTREADING = 0x00000024 }
enum : uint { GL_ID_INPUTRADICAL = 0x00000025 }
enum : uint { GL_ID_INPUTCODE = 0x00000026 }
enum : uint { GL_ID_INPUTSYMBOL = 0x00000027 }
enum : uint { GL_ID_CHOOSECANDIDATE = 0x00000028 }
enum : uint { GL_ID_REVERSECONVERSION = 0x00000029 }
enum : uint { GL_ID_PRIVATE_FIRST = 0x00008000 }
enum : uint { GL_ID_PRIVATE_LAST = 0x0000FFFF }

enum : DWORD { IGP_GETIMEVERSION = cast(DWORD)-4 }
enum : uint { IGP_PROPERTY = 0x00000004 }
enum : uint { IGP_CONVERSION = 0x00000008 }
enum : uint { IGP_SENTENCE = 0x0000000c }
enum : uint { IGP_UI = 0x00000010 }
enum : uint { IGP_SETCOMPSTR = 0x00000014 }
enum : uint { IGP_SELECT = 0x00000018 }

enum : uint { SCS_SETSTR = GCS_COMPREADSTR|GCS_COMPSTR }
enum : uint { SCS_CHANGEATTR = GCS_COMPREADATTR|GCS_COMPATTR }
enum : uint { SCS_CHANGECLAUSE = GCS_COMPREADCLAUSE|GCS_COMPCLAUSE }
enum : uint { SCS_SETRECONVERTSTRING = 0x00010000 }
enum : uint { SCS_QUERYRECONVERTSTRING = 0x00020000 }

enum : uint { ATTR_INPUT = 0x00 }
enum : uint { ATTR_TARGET_CONVERTED = 0x01 }
enum : uint { ATTR_CONVERTED = 0x02 }
enum : uint { ATTR_TARGET_NOTCONVERTED = 0x03 }
enum : uint { ATTR_INPUT_ERROR = 0x04 }
enum : uint { ATTR_FIXEDCONVERTED = 0x05 }

enum : uint { CFS_DEFAULT = 0x0000 }
enum : uint { CFS_RECT = 0x0001 }
enum : uint { CFS_POINT = 0x0002 }
enum : uint { CFS_FORCE_POSITION = 0x0020 }
enum : uint { CFS_CANDIDATEPOS = 0x0040 }
enum : uint { CFS_EXCLUDE = 0x0080 }

enum : uint { GCL_CONVERSION = 0x0001 }
enum : uint { GCL_REVERSECONVERSION = 0x0002 }
enum : uint { GCL_REVERSE_LENGTH = 0x0003 }

enum : uint { IME_CMODE_ALPHANUMERIC = 0x0000 }
enum : uint { IME_CMODE_NATIVE = 0x0001 }
alias IME_CMODE_NATIVE IME_CMODE_CHINESE;

alias IME_CMODE_NATIVE IME_CMODE_HANGEUL;
alias IME_CMODE_NATIVE IME_CMODE_HANGUL;
alias IME_CMODE_NATIVE IME_CMODE_JAPANESE;
enum : uint { IME_CMODE_KATAKANA = 0x0002 }
enum : uint { IME_CMODE_LANGUAGE = 0x0003 }
enum : uint { IME_CMODE_FULLSHAPE = 0x0008 }
enum : uint { IME_CMODE_ROMAN = 0x0010 }
enum : uint { IME_CMODE_CHARCODE = 0x0020 }
enum : uint { IME_CMODE_HANJACONVERT = 0x0040 }
enum : uint { IME_CMODE_SOFTKBD = 0x0080 }
enum : uint { IME_CMODE_NOCONVERSION = 0x0100 }
enum : uint { IME_CMODE_EUDC = 0x0200 }
enum : uint { IME_CMODE_SYMBOL = 0x0400 }
enum : uint { IME_CMODE_FIXED = 0x0800 }

enum : uint { IME_SMODE_NONE = 0x0000 }
enum : uint { IME_SMODE_PLAURALCLAUSE = 0x0001 }
enum : uint { IME_SMODE_SINGLECONVERT = 0x0002 }
enum : uint { IME_SMODE_AUTOMATIC = 0x0004 }
enum : uint { IME_SMODE_PHRASEPREDICT = 0x0008 }
enum : uint { IME_SMODE_CONVERSATION = 0x0010 }

enum : uint { IME_CAND_UNKNOWN = 0x0000 }
enum : uint { IME_CAND_READ = 0x0001 }
enum : uint { IME_CAND_CODE = 0x0002 }
enum : uint { IME_CAND_MEANING = 0x0003 }
enum : uint { IME_CAND_RADICAL = 0x0004 }
enum : uint { IME_CAND_STROKE = 0x0005 }

enum : uint { IMN_CLOSESTATUSWINDOW = 0x0001 }
enum : uint { IMN_OPENSTATUSWINDOW = 0x0002 }
enum : uint { IMN_CHANGECANDIDATE = 0x0003 }
enum : uint { IMN_CLOSECANDIDATE = 0x0004 }
enum : uint { IMN_OPENCANDIDATE = 0x0005 }
enum : uint { IMN_SETCONVERSIONMODE = 0x0006 }
enum : uint { IMN_SETSENTENCEMODE = 0x0007 }
enum : uint { IMN_SETOPENSTATUS = 0x0008 }
enum : uint { IMN_SETCANDIDATEPOS = 0x0009 }
enum : uint { IMN_SETCOMPOSITIONFONT = 0x000A }
enum : uint { IMN_SETCOMPOSITIONWINDOW = 0x000B }
enum : uint { IMN_SETSTATUSWINDOWPOS = 0x000C }
enum : uint { IMN_GUIDELINE = 0x000D }
enum : uint { IMN_PRIVATE = 0x000E }

// #if (WINVER >= 0x040A)

enum : uint { IMR_COMPOSITIONWINDOW = 0x0001 }
enum : uint { IMR_CANDIDATEWINDOW = 0x0002 }
enum : uint { IMR_COMPOSITIONFONT = 0x0003 }
enum : uint { IMR_RECONVERTSTRING = 0x0004 }
enum : uint { IMR_CONFIRMRECONVERTSTRING = 0x0005 }
enum : uint { IMR_QUERYCHARPOSITION = 0x0006 }
enum : uint { IMR_DOCUMENTFEED = 0x0007 }
// #endif /* WINVER >= 0x040A */

enum { IMM_ERROR_NODATA = -1 }
enum { IMM_ERROR_GENERAL = -2 }

enum : uint { IME_CONFIG_GENERAL = 1 }
enum : uint { IME_CONFIG_REGISTERWORD = 2 }
enum : uint { IME_CONFIG_SELECTDICTIONARY = 3 }

enum : uint { IME_ESC_QUERY_SUPPORT = 0x0003 }
enum : uint { IME_ESC_RESERVED_FIRST = 0x0004 }
enum : uint { IME_ESC_RESERVED_LAST = 0x07FF }
enum : uint { IME_ESC_PRIVATE_FIRST = 0x0800 }
enum : uint { IME_ESC_PRIVATE_LAST = 0x0FFF }

enum : uint { IME_ESC_SEQUENCE_TO_INTERNAL = 0x1001 }
enum : uint { IME_ESC_GET_EUDC_DICTIONARY = 0x1003 }
enum : uint { IME_ESC_SET_EUDC_DICTIONARY = 0x1004 }
enum : uint { IME_ESC_MAX_KEY = 0x1005 }
enum : uint { IME_ESC_IME_NAME = 0x1006 }
enum : uint { IME_ESC_SYNC_HOTKEY = 0x1007 }
enum : uint { IME_ESC_HANJA_MODE = 0x1008 }
enum : uint { IME_ESC_AUTOMATA = 0x1009 }
enum : uint { IME_ESC_PRIVATE_HOTKEY = 0x100a }
enum : uint { IME_ESC_GETHELPFILENAME = 0x100b }

enum : uint { IME_REGWORD_STYLE_EUDC = 0x00000001 }
enum : uint { IME_REGWORD_STYLE_USER_FIRST = 0x80000000 }
enum : uint { IME_REGWORD_STYLE_USER_LAST = 0xFFFFFFFF }

// #if (WINVER >= 0x040A)

enum : uint { IACE_CHILDREN = 0x0001 }
enum : uint { IACE_DEFAULT = 0x0010 }
enum : uint { IACE_IGNORENOCONTEXT = 0x0020 }

enum : uint { IGIMIF_RIGHTMENU = 0x0001 }

enum : uint { IGIMII_CMODE = 0x0001 }
enum : uint { IGIMII_SMODE = 0x0002 }
enum : uint { IGIMII_CONFIGURE = 0x0004 }
enum : uint { IGIMII_TOOLS = 0x0008 }
enum : uint { IGIMII_HELP = 0x0010 }
enum : uint { IGIMII_OTHER = 0x0020 }
enum : uint { IGIMII_INPUTTOOLS = 0x0040 }

enum : uint { IMFT_RADIOCHECK = 0x00001 }
enum : uint { IMFT_SEPARATOR = 0x00002 }
enum : uint { IMFT_SUBMENU = 0x00004 }

alias MFS_GRAYED IMFS_GRAYED;
alias MFS_DISABLED IMFS_DISABLED;
alias MFS_CHECKED IMFS_CHECKED;
alias MFS_HILITE IMFS_HILITE;
alias MFS_ENABLED IMFS_ENABLED;
alias MFS_UNCHECKED IMFS_UNCHECKED;
alias MFS_UNHILITE IMFS_UNHILITE;
alias MFS_DEFAULT IMFS_DEFAULT;

// #endif /* WINVER >= 0x040A */

enum : uint { SOFTKEYBOARD_TYPE_T1 = 0x0001 }

enum : uint { SOFTKEYBOARD_TYPE_C1 = 0x0002 }

// #endif  // _IMM_SDK_DEFINED_

// #ifdef __cplusplus
// }
// #endif

// #endif  // _IMM_
