2 * private header for implementing IMM.
4 * Copyright 2000 Hidenori Takeshima
7 typedef struct IMM32_tagTHREADDATA IMM32_THREADDATA;
9 struct IMM32_tagTHREADDATA
15 typedef struct IMM32_tagMOVEABLEMEM IMM32_MOVEABLEMEM;
19 typedef BOOL (WINAPI* IMM32_pImeInquireA)(LPIMEINFO, LPSTR, LPCSTR);
20 typedef BOOL (WINAPI* IMM32_pImeInquireW)(LPIMEINFO, LPWSTR, LPCWSTR);
22 typedef BOOL (WINAPI* IMM32_pImeConfigureA)(HKL, HWND, DWORD, LPVOID);
23 typedef BOOL (WINAPI* IMM32_pImeConfigureW)(HKL, HWND, DWORD, LPVOID);
24 typedef DWORD (WINAPI* IMM32_pImeConversionListA)
25 (HIMC, LPCSTR, LPCANDIDATELIST, DWORD, UINT);
26 typedef DWORD (WINAPI* IMM32_pImeConversionListW)
27 (HIMC, LPCWSTR, LPCANDIDATELIST, DWORD, UINT);
28 typedef BOOL (WINAPI* IMM32_pImeDestroy)(UINT);
29 typedef UINT (WINAPI* IMM32_pImeEnumRegisterWordA)
30 (REGISTERWORDENUMPROCA, LPCSTR, DWORD, LPCSTR, LPVOID);
31 typedef UINT (WINAPI* IMM32_pImeEnumRegisterWordW)
32 (REGISTERWORDENUMPROCW, LPCWSTR, DWORD, LPCWSTR, LPVOID);
33 typedef UINT (WINAPI* IMM32_pImeGetRegisterWordStyleA)(UINT, LPSTYLEBUFA);
34 typedef UINT (WINAPI* IMM32_pImeGetRegisterWordStyleW)(UINT, LPSTYLEBUFW);
35 typedef LRESULT (WINAPI* IMM32_pImeEscapeA)(HIMC, UINT, LPVOID);
36 typedef LRESULT (WINAPI* IMM32_pImeEscapeW)(HIMC, UINT, LPVOID);
37 typedef BOOL (WINAPI* IMM32_pImeProcessKey)(HIMC, UINT, LPARAM, CONST LPBYTE);
38 typedef BOOL (WINAPI* IMM32_pImeRegisterWordA)(LPCSTR, DWORD, LPCSTR);
39 typedef BOOL (WINAPI* IMM32_pImeRegisterWordW)(LPCWSTR, DWORD, LPCWSTR);
40 typedef BOOL (WINAPI* IMM32_pImeSelect)(HIMC, BOOL);
41 typedef BOOL (WINAPI* IMM32_pImeSetActiveContext)(HIMC, BOOL);
42 typedef BOOL (WINAPI* IMM32_pImeSetCompositionStringA)
43 (HIMC, DWORD, LPCVOID, DWORD, LPCVOID, DWORD);
44 typedef BOOL (WINAPI* IMM32_pImeSetCompositionStringW)
45 (HIMC, DWORD, LPCVOID, DWORD, LPCVOID, DWORD);
46 typedef UINT (WINAPI* IMM32_pImeToAsciiEx)
47 (UINT, UINT, CONST LPBYTE, LPDWORD, UINT, HIMC);
48 typedef BOOL (WINAPI* IMM32_pImeUnregisterWordA)(LPCSTR, DWORD, LPCSTR);
49 typedef BOOL (WINAPI* IMM32_pImeUnregisterWordW)(LPCWSTR, DWORD, LPCWSTR);
50 typedef BOOL (WINAPI* IMM32_pNotifyIME)(HIMC, DWORD, DWORD, DWORD);
52 /* for Win98 and later */
53 typedef DWORD (WINAPI* IMM32_pImeGetImeMenuItemsA)
54 (HIMC, DWORD, DWORD, LPIMEMENUITEMINFOA, LPIMEMENUITEMINFOA, DWORD);
55 typedef DWORD (WINAPI* IMM32_pImeGetImeMenuItemsW)
56 (HIMC, DWORD, DWORD, LPIMEMENUITEMINFOW, LPIMEMENUITEMINFOW, DWORD);
58 struct IMM32_IME_EXPORTED_HANDLERS
68 IMM32_pImeConfigureA A;
69 IMM32_pImeConfigureW W;
73 IMM32_pImeConversionListA A;
74 IMM32_pImeConversionListW W;
76 IMM32_pImeDestroy pImeDestroy;
79 IMM32_pImeEnumRegisterWordA A;
80 IMM32_pImeEnumRegisterWordW W;
81 } pImeEnumRegisterWord;
84 IMM32_pImeGetRegisterWordStyleA A;
85 IMM32_pImeGetRegisterWordStyleW W;
86 } pImeGetRegisterWordStyle;
92 IMM32_pImeProcessKey pImeProcessKey;
95 IMM32_pImeRegisterWordA A;
96 IMM32_pImeRegisterWordW W;
98 IMM32_pImeSelect pImeSelect;
99 IMM32_pImeSetActiveContext pImeSetActiveContext;
102 IMM32_pImeSetCompositionStringA A;
103 IMM32_pImeSetCompositionStringW W;
104 } pImeSetCompositionString;
105 IMM32_pImeToAsciiEx pImeToAsciiEx;
108 IMM32_pImeUnregisterWordA A;
109 IMM32_pImeUnregisterWordW W;
110 } pImeUnregisterWord;
111 IMM32_pNotifyIME pNotifyIME;
113 /* for Win98 and later */
116 IMM32_pImeGetImeMenuItemsA A;
117 IMM32_pImeGetImeMenuItemsW W;
118 } pImeGetImeMenuItems;
125 LPVOID IMM32_HeapAlloc( DWORD dwFlags, DWORD dwSize );
126 LPVOID IMM32_HeapReAlloc( DWORD dwFlags, LPVOID lpv, DWORD dwSize );
127 void IMM32_HeapFree( LPVOID lpv );
128 IMM32_THREADDATA* IMM32_GetThreadData( void );
131 IMM32_MOVEABLEMEM* IMM32_MoveableAlloc( DWORD dwHeapFlags, DWORD dwHeapSize );
132 void IMM32_MoveableFree( IMM32_MOVEABLEMEM* lpMoveable );
133 BOOL IMM32_MoveableReAlloc( IMM32_MOVEABLEMEM* lpMoveable,
134 DWORD dwHeapFlags, DWORD dwHeapSize );
135 LPVOID IMM32_MoveableLock( IMM32_MOVEABLEMEM* lpMoveable );
136 BOOL IMM32_MoveableUnlock( IMM32_MOVEABLEMEM* lpMoveable );
137 DWORD IMM32_MoveableGetLockCount( IMM32_MOVEABLEMEM* lpMoveable );
138 DWORD IMM32_MoveableGetSize( IMM32_MOVEABLEMEM* lpMoveable );
141 INT IMM32_strlenAtoW( LPCSTR lpstr );
142 INT IMM32_strlenWtoA( LPCWSTR lpwstr );
143 LPWSTR IMM32_strncpyAtoW( LPWSTR lpwstr, LPCSTR lpstr, INT wbuflen );
144 LPSTR IMM32_strncpyWtoA( LPSTR lpstr, LPCWSTR lpwstr, INT abuflen );
145 LPWSTR IMM32_strdupAtoW( LPCSTR lpstr );
146 LPSTR IMM32_strdupWtoA( LPCWSTR lpwstr );
149 BOOL IMM32_RegisterIMEWndClass( HINSTANCE hInstDLL );
150 void IMM32_UnregisterIMEWndClass( HINSTANCE hInstDLL );