SDL_msctf.h 11 KB

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