2 Simple DirectMedia Layer
3 Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
27 #define TF_INVALID_COOKIE (0xffffffff)
28 #define TF_IPSINK_FLAG_ACTIVE 0x0001
29 #define TF_TMAE_UIELEMENTENABLEDONLY 0x00000004
31 typedef struct ITfThreadMgr ITfThreadMgr;
32 typedef struct ITfDocumentMgr ITfDocumentMgr;
33 typedef struct ITfClientId ITfClientId;
35 typedef struct IEnumTfDocumentMgrs IEnumTfDocumentMgrs;
36 typedef struct IEnumTfFunctionProviders IEnumTfFunctionProviders;
37 typedef struct ITfFunctionProvider ITfFunctionProvider;
38 typedef struct ITfCompartmentMgr ITfCompartmentMgr;
39 typedef struct ITfContext ITfContext;
40 typedef struct IEnumTfContexts IEnumTfContexts;
41 typedef struct ITfUIElementSink ITfUIElementSink;
42 typedef struct ITfUIElement ITfUIElement;
43 typedef struct ITfUIElementMgr ITfUIElementMgr;
44 typedef struct IEnumTfUIElements IEnumTfUIElements;
45 typedef struct ITfThreadMgrEx ITfThreadMgrEx;
46 typedef struct ITfCandidateListUIElement ITfCandidateListUIElement;
47 typedef struct ITfReadingInformationUIElement ITfReadingInformationUIElement;
48 typedef struct ITfInputProcessorProfileActivationSink ITfInputProcessorProfileActivationSink;
49 typedef struct ITfSource ITfSource;
51 typedef DWORD TfClientId;
52 typedef DWORD TfEditCookie;
54 typedef struct ITfThreadMgrVtbl
56 HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfThreadMgr *, REFIID, void **);
57 ULONG (STDMETHODCALLTYPE *AddRef)(ITfThreadMgr *);
58 ULONG (STDMETHODCALLTYPE *Release)(ITfThreadMgr *);
59 HRESULT (STDMETHODCALLTYPE *Activate)(ITfThreadMgr *, TfClientId *);
60 HRESULT (STDMETHODCALLTYPE *Deactivate)(ITfThreadMgr *);
61 HRESULT (STDMETHODCALLTYPE *CreateDocumentMgr)(ITfThreadMgr *);
62 HRESULT (STDMETHODCALLTYPE *EnumDocumentMgrs)(ITfThreadMgr *, IEnumTfDocumentMgrs **);
63 HRESULT (STDMETHODCALLTYPE *GetFocus)(ITfThreadMgr *, ITfDocumentMgr **);
64 HRESULT (STDMETHODCALLTYPE *SetFocus)(ITfThreadMgr *, ITfDocumentMgr *);
65 HRESULT (STDMETHODCALLTYPE *AssociateFocus)(ITfThreadMgr *, HWND, ITfDocumentMgr *, ITfDocumentMgr **);
66 HRESULT (STDMETHODCALLTYPE *IsThreadFocus)(ITfThreadMgr *, BOOL *);
67 HRESULT (STDMETHODCALLTYPE *GetFunctionProvider)(ITfThreadMgr *, REFCLSID, ITfFunctionProvider **);
68 HRESULT (STDMETHODCALLTYPE *EnumFunctionProviders)(ITfThreadMgr *, IEnumTfFunctionProviders **);
69 HRESULT (STDMETHODCALLTYPE *GetGlobalCompartment)(ITfThreadMgr *, ITfCompartmentMgr **);
74 const struct ITfThreadMgrVtbl *lpVtbl;
77 typedef struct ITfThreadMgrExVtbl
79 HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfThreadMgrEx *, REFIID, void **);
80 ULONG (STDMETHODCALLTYPE *AddRef)(ITfThreadMgrEx *);
81 ULONG (STDMETHODCALLTYPE *Release)(ITfThreadMgrEx *);
82 HRESULT (STDMETHODCALLTYPE *Activate)(ITfThreadMgrEx *, TfClientId *);
83 HRESULT (STDMETHODCALLTYPE *Deactivate)(ITfThreadMgrEx *);
84 HRESULT (STDMETHODCALLTYPE *CreateDocumentMgr)(ITfThreadMgrEx *, ITfDocumentMgr **);
85 HRESULT (STDMETHODCALLTYPE *EnumDocumentMgrs)(ITfThreadMgrEx *, IEnumTfDocumentMgrs **);
86 HRESULT (STDMETHODCALLTYPE *GetFocus)(ITfThreadMgrEx *, ITfDocumentMgr **);
87 HRESULT (STDMETHODCALLTYPE *SetFocus)(ITfThreadMgrEx *, ITfDocumentMgr *);
88 HRESULT (STDMETHODCALLTYPE *AssociateFocus)(ITfThreadMgrEx *, ITfDocumentMgr *, ITfDocumentMgr **);
89 HRESULT (STDMETHODCALLTYPE *IsThreadFocus)(ITfThreadMgrEx *, BOOL *);
90 HRESULT (STDMETHODCALLTYPE *GetFunctionProvider)(ITfThreadMgrEx *, REFCLSID, ITfFunctionProvider **);
91 HRESULT (STDMETHODCALLTYPE *EnumFunctionProviders)(ITfThreadMgrEx *, IEnumTfFunctionProviders **);
92 HRESULT (STDMETHODCALLTYPE *GetGlobalCompartment)(ITfThreadMgrEx *, ITfCompartmentMgr **);
93 HRESULT (STDMETHODCALLTYPE *ActivateEx)(ITfThreadMgrEx *, TfClientId *, DWORD);
94 HRESULT (STDMETHODCALLTYPE *GetActiveFlags)(ITfThreadMgrEx *, DWORD *);
99 const struct ITfThreadMgrExVtbl *lpVtbl;
102 typedef struct ITfDocumentMgrVtbl
104 HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfDocumentMgr *, REFIID, void **);
105 ULONG (STDMETHODCALLTYPE *AddRef)(ITfDocumentMgr *);
106 ULONG (STDMETHODCALLTYPE *Release)(ITfDocumentMgr *);
107 HRESULT (STDMETHODCALLTYPE *CreateContext)(ITfDocumentMgr *, TfClientId, DWORD, IUnknown *, ITfContext **, TfEditCookie *);
108 HRESULT (STDMETHODCALLTYPE *Push)(ITfDocumentMgr *, ITfContext *);
109 HRESULT (STDMETHODCALLTYPE *Pop)(ITfDocumentMgr *);
110 HRESULT (STDMETHODCALLTYPE *GetTop)(ITfDocumentMgr *, ITfContext **);
111 HRESULT (STDMETHODCALLTYPE *GetBase)(ITfDocumentMgr *, ITfContext **);
112 HRESULT (STDMETHODCALLTYPE *EnumContexts)(ITfDocumentMgr *, IEnumTfContexts **);
113 } ITfDocumentMgrVtbl;
115 struct ITfDocumentMgr
117 const struct ITfDocumentMgrVtbl *lpVtbl;
120 typedef struct ITfUIElementSinkVtbl
122 HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfUIElementSink *, REFIID, void **);
123 ULONG (STDMETHODCALLTYPE *AddRef)(ITfUIElementSink *);
124 ULONG (STDMETHODCALLTYPE *Release)(ITfUIElementSink *);
125 HRESULT (STDMETHODCALLTYPE *BeginUIElement)(ITfUIElementSink *, DWORD, BOOL *);
126 HRESULT (STDMETHODCALLTYPE *UpdateUIElement)(ITfUIElementSink *, DWORD);
127 HRESULT (STDMETHODCALLTYPE *EndUIElement)(ITfUIElementSink *, DWORD);
128 } ITfUIElementSinkVtbl;
130 struct ITfUIElementSink
132 const struct ITfUIElementSinkVtbl *lpVtbl;
135 typedef struct ITfUIElementMgrVtbl
137 HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfUIElementMgr *, REFIID, void **);
138 ULONG (STDMETHODCALLTYPE *AddRef)(ITfUIElementMgr *);
139 ULONG (STDMETHODCALLTYPE *Release)(ITfUIElementMgr *);
140 HRESULT (STDMETHODCALLTYPE *BeginUIElement)(ITfUIElementMgr *, ITfUIElement *, BOOL *, DWORD *);
141 HRESULT (STDMETHODCALLTYPE *UpdateUIElement)(ITfUIElementMgr *, DWORD);
142 HRESULT (STDMETHODCALLTYPE *EndUIElement)(ITfUIElementMgr *, DWORD);
143 HRESULT (STDMETHODCALLTYPE *GetUIElement)(ITfUIElementMgr *, DWORD, ITfUIElement **);
144 HRESULT (STDMETHODCALLTYPE *EnumUIElements)(ITfUIElementMgr *, IEnumTfUIElements **);
145 } ITfUIElementMgrVtbl;
147 struct ITfUIElementMgr
149 const struct ITfUIElementMgrVtbl *lpVtbl;
152 typedef struct ITfCandidateListUIElementVtbl
154 HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfCandidateListUIElement *, REFIID, void **);
155 ULONG (STDMETHODCALLTYPE *AddRef)(ITfCandidateListUIElement *);
156 ULONG (STDMETHODCALLTYPE *Release)(ITfCandidateListUIElement *);
157 HRESULT (STDMETHODCALLTYPE *GetDescription)(ITfCandidateListUIElement *, BSTR *);
158 HRESULT (STDMETHODCALLTYPE *GetGUID)(ITfCandidateListUIElement *, GUID *);
159 HRESULT (STDMETHODCALLTYPE *Show)(ITfCandidateListUIElement *, BOOL);
160 HRESULT (STDMETHODCALLTYPE *IsShown)(ITfCandidateListUIElement *, BOOL *);
161 HRESULT (STDMETHODCALLTYPE *GetUpdatedFlags)(ITfCandidateListUIElement *, DWORD *);
162 HRESULT (STDMETHODCALLTYPE *GetDocumentMgr)(ITfCandidateListUIElement *, ITfDocumentMgr **);
163 HRESULT (STDMETHODCALLTYPE *GetCount)(ITfCandidateListUIElement *, UINT *);
164 HRESULT (STDMETHODCALLTYPE *GetSelection)(ITfCandidateListUIElement *, UINT *);
165 HRESULT (STDMETHODCALLTYPE *GetString)(ITfCandidateListUIElement *, UINT, BSTR *);
166 HRESULT (STDMETHODCALLTYPE *GetPageIndex)(ITfCandidateListUIElement *, UINT *, UINT, UINT *);
167 HRESULT (STDMETHODCALLTYPE *SetPageIndex)(ITfCandidateListUIElement *, UINT *, UINT);
168 HRESULT (STDMETHODCALLTYPE *GetCurrentPage)(ITfCandidateListUIElement *, UINT *);
169 } ITfCandidateListUIElementVtbl;
171 struct ITfCandidateListUIElement
173 const struct ITfCandidateListUIElementVtbl *lpVtbl;
176 typedef struct ITfReadingInformationUIElementVtbl
178 HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfReadingInformationUIElement *, REFIID, void **);
179 ULONG (STDMETHODCALLTYPE *AddRef)(ITfReadingInformationUIElement *);
180 ULONG (STDMETHODCALLTYPE *Release)(ITfReadingInformationUIElement *);
181 HRESULT (STDMETHODCALLTYPE *GetDescription)(ITfReadingInformationUIElement *, BSTR *);
182 HRESULT (STDMETHODCALLTYPE *GetGUID)(ITfReadingInformationUIElement *, GUID *);
183 HRESULT (STDMETHODCALLTYPE *Show)(ITfReadingInformationUIElement *, BOOL);
184 HRESULT (STDMETHODCALLTYPE *IsShown)(ITfReadingInformationUIElement *, BOOL *);
185 HRESULT (STDMETHODCALLTYPE *GetUpdatedFlags)(ITfReadingInformationUIElement *, DWORD *);
186 HRESULT (STDMETHODCALLTYPE *GetContext)(ITfReadingInformationUIElement *, ITfContext **);
187 HRESULT (STDMETHODCALLTYPE *GetString)(ITfReadingInformationUIElement *, BSTR *);
188 HRESULT (STDMETHODCALLTYPE *GetMaxReadingStringLength)(ITfReadingInformationUIElement *, UINT *);
189 HRESULT (STDMETHODCALLTYPE *GetErrorIndex)(ITfReadingInformationUIElement *, UINT *);
190 HRESULT (STDMETHODCALLTYPE *IsVerticalOrderPreferred)(ITfReadingInformationUIElement *, BOOL *);
191 } ITfReadingInformationUIElementVtbl;
193 struct ITfReadingInformationUIElement
195 const struct ITfReadingInformationUIElementVtbl *lpVtbl;
198 typedef struct ITfUIElementVtbl
200 HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfUIElement *, REFIID, void **);
201 ULONG (STDMETHODCALLTYPE *AddRef)(ITfUIElement *);
202 ULONG (STDMETHODCALLTYPE *Release)(ITfUIElement *);
203 HRESULT (STDMETHODCALLTYPE *GetDescription)(ITfUIElement *, BSTR *);
204 HRESULT (STDMETHODCALLTYPE *GetGUID)(ITfUIElement *, GUID *);
205 HRESULT (STDMETHODCALLTYPE *Show)(ITfUIElement *, BOOL);
206 HRESULT (STDMETHODCALLTYPE *IsShown)(ITfUIElement *, BOOL *);
211 const struct ITfUIElementVtbl *lpVtbl;
214 typedef struct ITfInputProcessorProfileActivationSinkVtbl
216 HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfInputProcessorProfileActivationSink *, REFIID, void **);
217 ULONG (STDMETHODCALLTYPE *AddRef)(ITfInputProcessorProfileActivationSink *);
218 ULONG (STDMETHODCALLTYPE *Release)(ITfInputProcessorProfileActivationSink *);
219 HRESULT (STDMETHODCALLTYPE *OnActivated)(ITfInputProcessorProfileActivationSink *, DWORD, LANGID, REFCLSID, REFGUID, REFGUID, HKL, DWORD);
221 } ITfInputProcessorProfileActivationSinkVtbl;
223 struct ITfInputProcessorProfileActivationSink
225 const struct ITfInputProcessorProfileActivationSinkVtbl *lpVtbl;
228 typedef struct ITfSourceVtbl
230 HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfSource *, REFIID, void **);
231 ULONG (STDMETHODCALLTYPE *AddRef)(ITfSource *);
232 ULONG (STDMETHODCALLTYPE *Release)(ITfSource *);
233 HRESULT (STDMETHODCALLTYPE *AdviseSink)(ITfSource *, REFIID, IUnknown *, DWORD *);
234 HRESULT (STDMETHODCALLTYPE *UnadviseSink)(ITfSource *, DWORD);
239 const struct ITfSourceVtbl *lpVtbl;
242 #endif /* SDL_msctf_h_ */