A Tour through TSF: TSF Managers
The next stop on the tour is an extended visit through the TSF manager interfaces. Since TSF implements a lot of interfaces, I decided to break them up into separate posts.
I've also included a (very brief) description of how a text service (or application) would obtain an instance of each interface. By default, an instance of the interface is returned by the method listed. Some interfaces are obtained by calling QueryInterface() on the specified interface, other interfaces are passed as parameters to specified methods, and yet others are obtained by calling CoCreateInstance() with a particular CLSID.
This post describes the 'top-level' interfaces in TSF. You either create them directly, or you obtain them either when your application initializes TSF, or when your text service is activated.
Interface |
How to Obtain |
---|---|
CoCreateInstance(CLSID_TF_CategoryMgr) |
|
CoCreateInstance(CLSID_TF_DisplayAttributeMgr) |
|
Application: ITfThreadMgr::CreateDocumentMgr Text Service: ITfThreadMgr::GetFocus ITfThreadMgrEventSink::OnInitDocumentMgr |
|
CoCreateInstance(CLSID_TF_InputProcessorProfiles) |
|
Application: CoCreateInstance(CLSID_TF_ThreadMgr) Text Service: Passed to ITfTextInputProcessor::Activate |
|
QI on ITfThreadMgr |
|
QI on ITfThreadMgr |
|
QI on ITfThreadMgr |
|
QI on ITfThreadMgr |
|
QI on ITfThreadMgr |
|
QI on ITfThreadMgr |
|
QI on ITfThreadMgr |
Update (7/3): I incorrectly listed ItfInputProcessorProfileMgr as an interface that could be directly created. Gael pointed out that this was incorrect, and I've updated the table to list the correct method.