SDL  2.0
SDL_msctf.h
Go to the documentation of this file.
1 /*
2  Simple DirectMedia Layer
3  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
4 
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.
8 
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:
12 
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.
20 */
21 
22 #ifndef SDL_msctf_h_
23 #define SDL_msctf_h_
24 
25 #include <unknwn.h>
26 
27 #define TF_INVALID_COOKIE (0xffffffff)
28 #define TF_IPSINK_FLAG_ACTIVE 0x0001
29 #define TF_TMAE_UIELEMENTENABLEDONLY 0x00000004
30 
31 typedef struct ITfThreadMgr ITfThreadMgr;
32 typedef struct ITfDocumentMgr ITfDocumentMgr;
33 typedef struct ITfClientId ITfClientId;
34 
39 typedef struct ITfContext ITfContext;
41 typedef struct ITfUIElementSink ITfUIElementSink;
42 typedef struct ITfUIElement ITfUIElement;
43 typedef struct ITfUIElementMgr ITfUIElementMgr;
45 typedef struct ITfThreadMgrEx ITfThreadMgrEx;
49 typedef struct ITfSource ITfSource;
50 
51 typedef DWORD TfClientId;
52 typedef DWORD TfEditCookie;
53 
54 typedef struct ITfThreadMgrVtbl
55 {
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 **);
71 
73 {
74  const struct ITfThreadMgrVtbl *lpVtbl;
75 };
76 
77 typedef struct ITfThreadMgrExVtbl
78 {
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 *);
96 
98 {
99  const struct ITfThreadMgrExVtbl *lpVtbl;
100 };
101 
102 typedef struct ITfDocumentMgrVtbl
103 {
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 **);
114 
116 {
117  const struct ITfDocumentMgrVtbl *lpVtbl;
118 };
119 
120 typedef struct ITfUIElementSinkVtbl
121 {
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);
129 
131 {
133 };
134 
135 typedef struct ITfUIElementMgrVtbl
136 {
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 **);
146 
148 {
150 };
151 
153 {
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 *);
170 
172 {
174 };
175 
177 {
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 *);
192 
194 {
196 };
197 
198 typedef struct ITfUIElementVtbl
199 {
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 *);
208 
210 {
211  const struct ITfUIElementVtbl *lpVtbl;
212 };
213 
215 {
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);
220 
222 
224 {
226 };
227 
228 typedef struct ITfSourceVtbl
229 {
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);
235 } ITfSourceVtbl;
236 
237 struct ITfSource
238 {
239  const struct ITfSourceVtbl *lpVtbl;
240 };
241 
242 #endif /* SDL_msctf_h_ */
ITfDocumentMgr IEnumTfDocumentMgrs ITfDocumentMgr ITfDocumentMgr ITfDocumentMgr ITfDocumentMgr BOOL REFCLSID
Definition: SDL_msctf.h:90
struct IEnumTfContexts IEnumTfContexts
Definition: SDL_msctf.h:40
BOOL DWORD ITfDocumentMgr UINT UINT BSTR UINT UINT
Definition: SDL_msctf.h:166
struct ITfFunctionProvider ITfFunctionProvider
Definition: SDL_msctf.h:37
BOOL DWORD ITfDocumentMgr UINT UINT BSTR UINT UINT UINT UINT
Definition: SDL_msctf.h:167
IEnumTfDocumentMgrs ITfDocumentMgr ITfDocumentMgr HWND
Definition: SDL_msctf.h:65
const struct ITfThreadMgrExVtbl * lpVtbl
Definition: SDL_msctf.h:99
const struct ITfSourceVtbl * lpVtbl
Definition: SDL_msctf.h:239
void ** ULONG(STDMETHODCALLTYPE *AddRef)(ITfThreadMgr *)
const struct ITfThreadMgrVtbl * lpVtbl
Definition: SDL_msctf.h:74
DWORD TfEditCookie
Definition: SDL_msctf.h:52
IEnumTfDocumentMgrs ITfDocumentMgr ITfDocumentMgr ITfDocumentMgr ITfDocumentMgr BOOL REFCLSID
Definition: SDL_msctf.h:67
struct ITfCompartmentMgr ITfCompartmentMgr
Definition: SDL_msctf.h:38
struct IEnumTfUIElements IEnumTfUIElements
Definition: SDL_msctf.h:44
const struct ITfDocumentMgrVtbl * lpVtbl
Definition: SDL_msctf.h:117
DWORD TfClientId
Definition: SDL_msctf.h:51
const struct ITfInputProcessorProfileActivationSinkVtbl * lpVtbl
Definition: SDL_msctf.h:225
const struct ITfCandidateListUIElementVtbl * lpVtbl
Definition: SDL_msctf.h:173
struct IEnumTfFunctionProviders IEnumTfFunctionProviders
Definition: SDL_msctf.h:36
BOOL DWORD ITfDocumentMgr UINT UINT UINT
Definition: SDL_msctf.h:165
HRESULT(STDMETHODCALLTYPE *QueryInterface)(ITfThreadMgr *
const struct ITfUIElementVtbl * lpVtbl
Definition: SDL_msctf.h:211
struct ITfClientId ITfClientId
Definition: SDL_msctf.h:33
IUnknown DWORD DWORD
Definition: SDL_msctf.h:234
ITfDocumentMgr IEnumTfDocumentMgrs ITfDocumentMgr ITfDocumentMgr ITfDocumentMgr ITfDocumentMgr BOOL ITfFunctionProvider IEnumTfFunctionProviders ITfCompartmentMgr TfClientId DWORD
Definition: SDL_msctf.h:93
const struct ITfUIElementSinkVtbl * lpVtbl
Definition: SDL_msctf.h:132
ITfUIElement BOOL DWORD DWORD
Definition: SDL_msctf.h:141
BSTR GUID BOOL
Definition: SDL_msctf.h:205
struct ITfContext ITfContext
Definition: SDL_msctf.h:39
const struct ITfReadingInformationUIElementVtbl * lpVtbl
Definition: SDL_msctf.h:195
struct IEnumTfDocumentMgrs IEnumTfDocumentMgrs
Definition: SDL_msctf.h:35
const struct ITfUIElementMgrVtbl * lpVtbl
Definition: SDL_msctf.h:149