push 649ef288af5d6e2bc91d3ec4d104a0c9bf084d22
[wine/hacks.git] / include / ddk / imm.h
blobc492092fa993e3c1c0bc3bfbd4cbb486664467aa
1 /*
2 * Copyright (C) 2007 CodeWeavers, Aric Stewart
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef _DDKIMM_H_
20 #define _DDKIMM_H_
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
26 typedef struct _tagINPUTCONTEXT {
27 HWND hWnd;
28 BOOL fOpen;
29 POINT ptStatusWndPos;
30 POINT ptSoftKbdPos;
31 DWORD fdwConversion;
32 DWORD fdwSentence;
33 union {
34 LOGFONTA A;
35 LOGFONTW W;
36 } lfFont;
37 COMPOSITIONFORM cfCompForm;
38 CANDIDATEFORM cfCandForm[4];
39 HIMCC hCompStr;
40 HIMCC hCandInfo;
41 HIMCC hGuideLine;
42 HIMCC hPrivate;
43 DWORD dwNumMsgBuf;
44 HIMCC hMsgBuf;
45 DWORD fdwInit;
46 DWORD dwReserve[3];
47 } INPUTCONTEXT, *LPINPUTCONTEXT;
49 typedef struct _tagIMEINFO {
50 DWORD dwPrivateDataSize;
51 DWORD fdwProperty;
52 DWORD fdwConversionCaps;
53 DWORD fdwSentenceCaps;
54 DWORD fdwUICaps;
55 DWORD fdwSCSCaps;
56 DWORD fdwSelectCaps;
57 } IMEINFO, *LPIMEINFO;
59 typedef struct tagCOMPOSITIONSTRING {
60 DWORD dwSize;
61 DWORD dwCompReadAttrLen;
62 DWORD dwCompReadAttrOffset;
63 DWORD dwCompReadClauseLen;
64 DWORD dwCompReadClauseOffset;
65 DWORD dwCompReadStrLen;
66 DWORD dwCompReadStrOffset;
67 DWORD dwCompAttrLen;
68 DWORD dwCompAttrOffset;
69 DWORD dwCompClauseLen;
70 DWORD dwCompClauseOffset;
71 DWORD dwCompStrLen;
72 DWORD dwCompStrOffset;
73 DWORD dwCursorPos;
74 DWORD dwDeltaStart;
75 DWORD dwResultReadClauseLen;
76 DWORD dwResultReadClauseOffset;
77 DWORD dwResultReadStrLen;
78 DWORD dwResultReadStrOffset;
79 DWORD dwResultClauseLen;
80 DWORD dwResultClauseOffset;
81 DWORD dwResultStrLen;
82 DWORD dwResultStrOffset;
83 DWORD dwPrivateSize;
84 DWORD dwPrivateOffset;
85 } COMPOSITIONSTRING, *LPCOMPOSITIONSTRING;
87 LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC);
88 BOOL WINAPI ImmUnlockIMC(HIMC);
89 DWORD WINAPI ImmGetIMCLockCount(HIMC);
90 HIMCC WINAPI ImmCreateIMCC(DWORD);
91 HIMCC WINAPI ImmDestroyIMCC(HIMCC);
92 LPVOID WINAPI ImmLockIMCC(HIMCC);
93 BOOL WINAPI ImmUnlockIMCC(HIMCC);
94 DWORD WINAPI ImmGetIMCCLockCount(HIMCC);
95 HIMCC WINAPI ImmReSizeIMCC(HIMCC, DWORD);
96 DWORD WINAPI ImmGetIMCCSize(HIMCC);
98 #define IMMGWL_IMC 0
99 #define IMMGWL_PRIVATE (sizeof(LONG))
101 /* IME Property bits */
102 #define IME_PROP_END_UNLOAD 0x0001
103 #define IME_PROP_KBD_CHAR_FIRST 0x0002
104 #define IME_PROP_IGNORE_UPKEYS 0x0004
105 #define IME_PROP_NEED_ALTKEY 0x0008
106 #define IME_PROP_NO_KEYS_ON_CLOSE 0x0010
108 /* for NI_CONTEXTUPDATED */
109 #define IMC_SETCONVERSIONMODE 0x0002
110 #define IMC_SETSENTENCEMODE 0x0004
111 #define IMC_SETOPENSTATUS 0x0006
113 /* dwAction for ImmNotifyIME */
114 #define NI_CONTEXTUPDATED 0x0003
115 #define NI_OPENCANDIDATE 0x0010
116 #define NI_CLOSECANDIDATE 0x0011
117 #define NI_SELECTCANDIDATESTR 0x0012
118 #define NI_CHANGECANDIDATELIST 0x0013
119 #define NI_FINALIZECONVERSIONRESULT 0x0014
120 #define NI_COMPOSITIONSTR 0x0015
121 #define NI_SETCANDIDATE_PAGESTART 0x0016
122 #define NI_SETCANDIDATE_PAGESIZE 0x0017
123 #define NI_IMEMENUSELECTED 0x0018
125 BOOL WINAPI ImmGenerateMessage(HIMC);
127 BOOL WINAPI ImeInquire(LPIMEINFO, LPWSTR, LPCWSTR lpszOptions);
128 BOOL WINAPI ImeConfigure (HKL, HWND, DWORD, LPVOID);
129 DWORD WINAPI ImeConversionList(HIMC, LPCWSTR, LPCANDIDATELIST,DWORD,UINT);
130 BOOL WINAPI ImeDestroy(UINT);
131 LRESULT WINAPI ImeEscape(HIMC, UINT, LPVOID);
132 BOOL WINAPI ImeProcessKey(HIMC, UINT, LPARAM, CONST LPBYTE);
133 BOOL WINAPI ImeSelect(HIMC, BOOL);
134 BOOL WINAPI ImeSetActiveContext(HIMC, BOOL);
135 UINT WINAPI ImeToAsciiEx(UINT, UINT, CONST LPBYTE, LPDWORD, UINT, HIMC);
136 BOOL WINAPI NotifyIME(HIMC, DWORD, DWORD, DWORD);
137 BOOL WINAPI ImeRegisterWord(LPCWSTR, DWORD, LPCWSTR);
138 BOOL WINAPI ImeUnregisterWord(LPCWSTR, DWORD, LPCWSTR);
139 UINT WINAPI ImeGetRegisterWordStyle(UINT, LPSTYLEBUFW);
140 UINT WINAPI ImeEnumRegisterWord(REGISTERWORDENUMPROCW, LPCWSTR, DWORD, LPCWSTR, LPVOID);
141 BOOL WINAPI ImeSetCompositionString(HIMC, DWORD, LPCVOID, DWORD, LPCVOID, DWORD);
142 DWORD WINAPI ImeGetImeMenuItems(HIMC, DWORD, DWORD, LPIMEMENUITEMINFOW, LPIMEMENUITEMINFOW, DWORD);
144 #ifdef __cplusplus
145 } /* extern "C" */
146 #endif
148 #endif /* _DDKIMM_H_ */