1#ifndef DO_NO_IMPORTS 2import "oaidl.idl"; 3import "msctf.idl"; 4import "ctfutb.idl"; 5#endif 6 7typedef enum 8{ 9 STYLE_ACTIVE_SELECTION = 0, 10 STYLE_IMPLIED_SELECTION = 0x1 11} TfIntegratableCandidateListSelectionStyle; 12 13typedef enum 14{ 15 GETIF_RESMGR = 0, 16 GETIF_RECOCONTEXT = 0x1, 17 GETIF_RECOGNIZER = 0x2, 18 GETIF_VOICE = 0x3, 19 GETIF_DICTGRAM = 0x4, 20 GETIF_RECOGNIZERNOINIT = 0x5 21} TfSapiObject; 22 23typedef struct TF_LMLATTELEMENT 24{ 25 DWORD dwFrameStart; 26 DWORD dwFrameLen; 27 DWORD dwFlags; 28 union { 29 INT iCost; 30 }; 31 BSTR bstrText; 32} TF_LMLATTELEMENT; 33 34cpp_quote("EXTERN_C const CLSID CLSID_SapiLayr;") 35 36interface IEnumTfCandidates; 37interface IEnumTfLatticeElements; 38interface ITfCandidateList; 39interface ITfCandidateString; 40interface ITfFnAdviseText; 41interface ITfFnBalloon; 42interface ITfFnConfigure; 43interface ITfFnConfigureRegisterEudc; 44interface ITfFnConfigureRegisterWord; 45interface ITfFnGetLinguisticAlternates; 46interface ITfFnGetPreferredTouchKeyboardLayout; 47interface ITfFnGetSAPIObject; 48interface ITfFnLMInternal; 49interface ITfFnLMProcessor; 50interface ITfFnLangProfileUtil; 51interface ITfFnPlayBack; 52interface ITfFnPropertyUIStatus; 53interface ITfFnReconversion; 54interface ITfFnSearchCandidateProvider; 55interface ITfFnShowHelp; 56interface ITfFunction; 57interface ITfIntegratableCandidateListUIElement; 58interface ITfLMLattice; 59interface IUIManagerEventSink; 60 61[ 62 object, 63 uuid(defb1926-6c80-4ce8-87d4-d6b72b812bde), 64 pointer_default(unique) 65] 66interface IEnumTfCandidates : IUnknown 67{ 68 HRESULT Clone( 69 [out] IEnumTfCandidates **ppEnum); 70 71 HRESULT Next( 72 [in] ULONG ulCount, 73 [out] ITfCandidateString **ppCand, 74 [out] ULONG *pcFetched); 75 76 HRESULT Reset(void); 77 78 HRESULT Skip( 79 [in] ULONG ulCount); 80} 81 82[ 83 object, 84 uuid(56988052-47da-4a05-911a-e3d941f17145), 85 pointer_default(unique) 86] 87interface IEnumTfLatticeElements : IUnknown 88{ 89 HRESULT Clone( 90 [out] IEnumTfLatticeElements **ppEnum); 91 92 HRESULT Next( 93 [in] ULONG ulCount, 94 [out] TF_LMLATTELEMENT *rgsElements, 95 [out] ULONG *pcFetched); 96 97 HRESULT Reset(void); 98 99 HRESULT Skip( 100 [in] ULONG ulCount); 101} 102 103[ 104 object, 105 uuid(a3ad50fb-9bdb-49e3-a843-6c76520fbf5d), 106 pointer_default(unique) 107] 108interface ITfCandidateList : IUnknown 109{ 110 typedef enum 111 { 112 CAND_FINALIZED = 0, 113 CAND_SELECTED = 0x1, 114 CAND_CANCELED = 0x2 115 } TfCandidateResult; 116 117 HRESULT EnumCandidates( 118 [out] IEnumTfCandidates **ppEnum); 119 120 HRESULT GetCandidate( 121 [in] ULONG nIndex, 122 [out] ITfCandidateString **ppCand); 123 124 HRESULT GetCandidateNum( 125 [out] ULONG *pnCnt); 126 127 HRESULT SetResult( 128 [in] ULONG nIndex, 129 [in] TfCandidateResult imcr); 130} 131 132[ 133 object, 134 uuid(581f317e-fd9d-443f-b972-ed00467c5d40), 135 pointer_default(unique) 136] 137interface ITfCandidateString : IUnknown 138{ 139 HRESULT GetString( 140 [out] BSTR *pbstr); 141 142 HRESULT GetIndex( 143 [out] ULONG *pnIndex); 144} 145 146[ 147 object, 148 uuid(3527268b-7d53-4dd9-92b7-7296ae461249), 149 pointer_default(unique) 150] 151interface ITfFnAdviseText : IUnknown 152{ 153 HRESULT OnTextUpdate( 154 [in] ITfRange *pRange, 155 [in] const WCHAR *pchText, 156 [in] LONG cch); 157 158 HRESULT OnLatticeUpdate( 159 [in] ITfRange *pRange, 160 [in] ITfLMLattice *pLattice); 161} 162 163[ 164 object, 165 uuid(3bab89e4-5fbe-45f4-a5bc-dca36ad225a8), 166 pointer_default(unique) 167] 168interface ITfFnBalloon : IUnknown 169{ 170 HRESULT UpdateBalloon( 171 [in] TfLBBalloonStyle style, 172 [in] const WCHAR *pch, 173 [in] ULONG cch); 174} 175 176[ 177 object, 178 uuid(88f567c6-1757-49f8-a1b2-89234c1eeff9), 179 pointer_default(unique) 180] 181interface ITfFnConfigure : IUnknown 182{ 183 HRESULT Show( 184 [in] HWND hwndParent, 185 [in] LANGID langid, 186 [in] REFGUID rguidProfile); 187} 188 189[ 190 object, 191 uuid(b5e26ff5-d7ad-4304-913f-21a2ed95a1b0), 192 pointer_default(unique) 193] 194interface ITfFnConfigureRegisterEudc : IUnknown 195{ 196 HRESULT Show( 197 [in] HWND hwndParent, 198 [in] LANGID langid, 199 [in] REFGUID rguidProfile, 200 BSTR bstrRegistered); 201} 202 203[ 204 object, 205 uuid(bb95808a-6d8f-4bca-8400-5390b586aedf), 206 pointer_default(unique) 207] 208interface ITfFnConfigureRegisterWord : IUnknown 209{ 210 HRESULT Show( 211 [in] HWND hwndParent, 212 [in] LANGID langid, 213 [in] REFGUID rguidProfile, 214 [in] BSTR bstrRegistered); 215} 216 217[ 218 object, 219 uuid(db593490-098f-11d3-8df0-00105a2799b5), 220 pointer_default(unique) 221] 222interface ITfFunction : IUnknown 223{ 224 HRESULT GetDisplayName( 225 [out] BSTR *pbstrName); 226} 227 228[ 229 object, 230 uuid(ea163ce2-7a65-4506-82a3-c528215da64e), 231 pointer_default(unique) 232] 233interface ITfFnGetLinguisticAlternates : ITfFunction 234{ 235 HRESULT GetAlternates( 236 [in] ITfRange *pRange, 237 [out] ITfCandidateList **ppCandidateList); 238} 239 240[ 241 object, 242 uuid(5f309a41-590a-4acc-a97f-d8efff13fdfc), 243 pointer_default(unique) 244] 245interface ITfFnGetPreferredTouchKeyboardLayout : ITfFunction 246{ 247 typedef enum 248 { 249 TKBLT_UNDEFINED = 0, 250 TKBLT_CLASSIC = 1, 251 TKBLT_OPTIMIZED = 2 252 } TKBLayoutType; 253 254 HRESULT GetLayout( 255 [out] TKBLayoutType *pTKBLayoutType, 256 [out] WORD *pwPreferredLayoutId); 257} 258 259[ 260 object, 261 uuid(5c0ab7ea-167d-4f59-bfb5-4693755e90ca), 262 pointer_default(unique) 263] 264interface ITfFnGetSAPIObject : IUnknown 265{ 266 HRESULT Get( 267 [in] TfSapiObject sObj, 268 [out] IUnknown **ppunk); 269} 270 271[ 272 object, 273 uuid(04b825b1-ac9a-4f7b-b5ad-c7168f1ee445), 274 pointer_default(unique) 275] 276interface ITfFnLMInternal : IUnknown 277{ 278 HRESULT ProcessLattice( 279 [in] ITfRange *pRange); 280} 281 282[ 283 object, 284 uuid(7afbf8e7-ac4b-4082-b058-890899d3a010), 285 pointer_default(unique) 286] 287interface ITfFnLMProcessor : IUnknown 288{ 289 HRESULT QueryRange( 290 [in] ITfRange *pRange, 291 [out] ITfRange **ppNewRange, 292 [out] BOOL *pfAccepted); 293 294 HRESULT QueryLangID( 295 [in] LANGID langid, 296 [out] BOOL *pfAccepted); 297 298 HRESULT GetReconversion( 299 [in] ITfRange *pRange, 300 [out] ITfCandidateList **ppCandList); 301 302 HRESULT Reconvert( 303 [in] ITfRange *pRange); 304 305 HRESULT QueryKey( 306 [in] BOOL fUp, 307 [in] WPARAM vKey, 308 [in] LPARAM lparamKeydata, 309 [out] BOOL *pfInterested); 310 311 HRESULT InvokeKey( 312 [in] BOOL fUp, 313 [in] WPARAM vKey, 314 [in] LPARAM lparamKeyData); 315 316 HRESULT InvokeFunc( 317 [in] ITfContext *pic, 318 [in] REFGUID refguidFunc); 319} 320 321[ 322 object, 323 uuid(a87a8574-a6c1-4e15-99f0-3d3965f548eb), 324 pointer_default(unique) 325] 326interface ITfFnLangProfileUtil : IUnknown 327{ 328 HRESULT RegisterActiveProfiles(void); 329 330 HRESULT IsProfileAvailableForLang( 331 [in] LANGID langid, 332 [out] BOOL *pfAvailable); 333} 334 335[ 336 object, 337 uuid(a3a416a4-0f64-11d3-b5b7-00c04fc324a1), 338 pointer_default(unique) 339] 340interface ITfFnPlayBack : IUnknown 341{ 342 HRESULT QueryRange( 343 [in] ITfRange *pRange, 344 [out] ITfRange **ppNewRange, 345 [out] BOOL *pfPlayable); 346 347 HRESULT Play( 348 [in] ITfRange *pRange); 349} 350 351[ 352 object, 353 uuid(2338ac6e-2b9d-44c0-a75e-ee64f256b3bd), 354 pointer_default(unique) 355] 356interface ITfFnPropertyUIStatus : IUnknown 357{ 358 HRESULT GetStatus( 359 [in] REFGUID refguidProp, 360 [out] DWORD *pdw); 361 362 HRESULT SetStatus( 363 [in] REFGUID refguidProp, 364 [in] DWORD dw); 365} 366 367[ 368 object, 369 uuid(4cea93c0-0a58-11d3-8df0-00105a2799b5), 370 pointer_default(unique) 371] 372interface ITfFnReconversion : IUnknown 373{ 374 HRESULT QueryRange( 375 [in] ITfRange *pRange, 376 ITfRange **ppNewRange, 377 [out] BOOL *pfConvertable); 378 379 HRESULT GetReconversion( 380 [in] ITfRange *pRange, 381 [out] ITfCandidateList **ppCandList 382 ); 383 384 HRESULT Reconvert( 385 [in] ITfRange *pRange); 386} 387 388[ 389 object, 390 uuid(87a2ad8f-f27b-4920-8501-67602280175d), 391 pointer_default(unique) 392] 393interface ITfFnSearchCandidateProvider : IUnknown 394{ 395 HRESULT GetSearchCandidates( 396 [in] BSTR bstrQuery, 397 [in] BSTR bstrApplicationId, 398 [out] ITfCandidateList **pplist); 399 400 HRESULT SetResult( 401 [in] BSTR bstrQuery, 402 [in] BSTR bstrApplicationID, 403 [in] BSTR bstrResult); 404} 405 406[ 407 object, 408 uuid(5ab1d30c-094d-4c29-8ea5-0bf59be87bf3), 409 pointer_default(unique) 410] 411interface ITfFnShowHelp : IUnknown 412{ 413 HRESULT Show( 414 [in] HWND hwndParent); 415} 416 417[ 418 object, 419 uuid(5ab1d30c-094d-4c29-8ea5-0bf59be87bf3), 420 pointer_default(unique) 421] 422interface ITfIntegratableCandidateListUIElement : IUnknown 423{ 424 HRESULT SetIntegrationStyle( 425 [in] GUID guidIntegrationStyle); 426 427 HRESULT GetSelectionStyle( 428 [out] TfIntegratableCandidateListSelectionStyle *ptfSelectionStyle); 429 430 HRESULT OnKeyDown( 431 [in] WPARAM wParam, 432 [in] LPARAM lParam, 433 [out] BOOL *pfEaten); 434 435 HRESULT ShowCandidateNumbers( 436 [out] BOOL *pfShow); 437 438 HRESULT FinalizeExactCompositionString(void); 439} 440 441[ 442 object, 443 uuid(d4236675-a5bf-4570-9d42-5d6d7b02d59b), 444 pointer_default(unique) 445] 446interface ITfLMLattice : IUnknown 447{ 448 HRESULT QueryType( 449 [in] REFGUID rguidType, 450 [out] BOOL *pfSupported); 451 452 HRESULT EnumLatticeElements( 453 [in] DWORD dwFrameStart, 454 [in] REFGUID rguidType, 455 [out] IEnumTfLatticeElements **ppEnum); 456} 457 458[ 459 object, 460 uuid(cd91d690-a7e8-4265-9b38-8bb3bbaba7de), 461 pointer_default(unique) 462] 463interface IUIManagerEventSink : IUnknown 464{ 465 HRESULT OnWindowOpening( 466 [in] RECT *prcBounds); 467 468 HRESULT OnWindowOpened( 469 [in] RECT *prcBounds); 470 471 HRESULT OnWindowUpdating( 472 [in] RECT *prcUpdatedBounds); 473 474 HRESULT OnWindowUpdated( 475 [in] RECT *prcUpdatedBounds); 476 477 HRESULT OnWindowClosing(void); 478 479 HRESULT OnWindowClosed(void); 480} 481